be more considerate to other modders
This commit is contained in:
1 parent
a366e63987
commit
e61549ae10
1 file changed
+10
-9
@@ -18,6 +18,7 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
@@ -41,13 +42,6 @@ public abstract class RedstoneWireBlockMixin implements RedstoneWireBlockInterfa
|
||||
@Shadow
|
||||
private BlockState update(World world_1, BlockPos blockPos_1, BlockState blockState_1) { return null; }
|
||||
|
||||
// =
|
||||
|
||||
@Override
|
||||
public BlockState updateLogicPublic(World world_1, BlockPos blockPos_1, BlockState blockState_1) {
|
||||
return updateLogic(world_1, blockPos_1, blockState_1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Accessor("wiresGivePower")
|
||||
public abstract void setWiresGivePower(boolean wiresGivePower);
|
||||
@@ -79,8 +73,15 @@ public abstract class RedstoneWireBlockMixin implements RedstoneWireBlockInterfa
|
||||
/**
|
||||
* @author theosib, soykaf, gnembon
|
||||
*/
|
||||
@Overwrite
|
||||
private BlockState updateLogic(World world_1, BlockPos blockPos_1, BlockState blockState_1) {
|
||||
@Inject(method = "updateLogic", at = @At("HEAD"), cancellable = true)
|
||||
private void updateLogicAlternative(World world, BlockPos pos, BlockState state, CallbackInfoReturnable<BlockState> cir)
|
||||
{
|
||||
if (CarpetSettings.fastRedstoneDust)
|
||||
cir.setReturnValue(updateLogicPublic(world, pos, state));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState updateLogicPublic(World world_1, BlockPos blockPos_1, BlockState blockState_1) {
|
||||
BlockState blockState_2 = blockState_1;
|
||||
int int_1 = (Integer)blockState_1.get(POWER); // i
|
||||
this.wiresGivePower = false;
|
||||
|
||||
Reference in new issue
Block a user