slime is honey 2
This commit is contained in:
1 parent
7ba4ff6647
commit
c9a6d2ef96
3 files changed
+25
-4
No files matched your search
@@ -28,7 +28,20 @@ public abstract class PistonBlock_movableTEMixin extends FacingBlock
|
||||
}
|
||||
|
||||
private ThreadLocal<List<BlockEntity>> list1_BlockEntities = new ThreadLocal<>(); //Unneccessary ThreadLocal if client and server use different PistonBlock instances
|
||||
|
||||
|
||||
@Inject(method = "isMovable", at = @At("HEAD"), cancellable = true)
|
||||
private static void slimeHoney(BlockState blockState_1, World world_1, BlockPos blockPos_1, Direction direction_1, boolean boolean_1, Direction direction_2, CallbackInfoReturnable<Boolean> cir)
|
||||
{
|
||||
if (CarpetSettings.stickyHoney && direction_1 != direction_2)
|
||||
{
|
||||
Block block = blockState_1.getBlock();
|
||||
if (block != Blocks.GOLD_BLOCK && block != Blocks.SLIME_BLOCK) return;
|
||||
Block otherBlock = world_1.getBlockState(blockPos_1.method_10079(direction_2.getOpposite(),1)).getBlock();
|
||||
if (otherBlock != Blocks.GOLD_BLOCK && otherBlock != Blocks.SLIME_BLOCK) return;
|
||||
cir.setReturnValue(block == otherBlock);
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "isMovable", at = @At(value = "RETURN", ordinal = 3, shift = At.Shift.BEFORE))
|
||||
private static void movableCMD(BlockState blockState_1, World world_1, BlockPos blockPos_1,
|
||||
Direction direction_1, boolean boolean_1, Direction direction_2, CallbackInfoReturnable<Boolean> cir)
|
||||
|
||||
Reference in new issue
Block a user