restrict honey rule to 1.14 only

This commit is contained in:
gnembon committed 2019-10-16 09:38:47 -03:00
1 parent e625734910
commit 79e7bba04b
3 files changed
+7 -7

No files matched your search

@@ -32,7 +32,7 @@ public abstract class PistonBlock_movableTEMixin extends FacingBlock
@Inject(method = "isMovable", at = @At("HEAD"), cancellable = true) @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) 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.honeyGlidingSlime && direction_1 != direction_2) if (CarpetSettings.honeySlime && direction_1 != direction_2)
{ {
Block block = blockState_1.getBlock(); Block block = blockState_1.getBlock();
if (block != Blocks.ORANGE_STAINED_GLASS && block != Blocks.SLIME_BLOCK) return; if (block != Blocks.ORANGE_STAINED_GLASS && block != Blocks.SLIME_BLOCK) return;
@@ -41,7 +41,7 @@ public abstract class PistonHandler_movableTEMixin
* @author 2No2Name * @author 2No2Name
*/ */
private void stickToStickySide(BlockPos blockPos_1, Direction direction_1, CallbackInfoReturnable<Boolean> cir, BlockState blockState_1, Block block_1, int int_1, int int_2, int int_4, BlockPos blockPos_3, int int_5, int int_6){ private void stickToStickySide(BlockPos blockPos_1, Direction direction_1, CallbackInfoReturnable<Boolean> cir, BlockState blockState_1, Block block_1, int int_1, int int_2, int int_4, BlockPos blockPos_3, int int_5, int int_6){
if (CarpetSettings.honeyGlidingSlime && this.world.getBlockState(blockPos_1).getBlock() == Blocks.ORANGE_STAINED_GLASS && !method_11538(blockPos_1)) { if (CarpetSettings.honeySlime && this.world.getBlockState(blockPos_1).getBlock() == Blocks.ORANGE_STAINED_GLASS && !method_11538(blockPos_1)) {
cir.setReturnValue(false); cir.setReturnValue(false);
return; return;
} }
@@ -58,7 +58,7 @@ public abstract class PistonHandler_movableTEMixin
*/ */
private void stickToStickySide(CallbackInfoReturnable<Boolean> cir, int int_1){ private void stickToStickySide(CallbackInfoReturnable<Boolean> cir, int int_1){
BlockPos pos = this.movedBlocks.get(int_1); BlockPos pos = this.movedBlocks.get(int_1);
if (CarpetSettings.honeyGlidingSlime && world.getBlockState(pos).getBlock() == Blocks.ORANGE_STAINED_GLASS && !method_11538(pos)) if (CarpetSettings.honeySlime && world.getBlockState(pos).getBlock() == Blocks.ORANGE_STAINED_GLASS && !method_11538(pos))
{ {
cir.setReturnValue(false); cir.setReturnValue(false);
return; return;
@@ -120,7 +120,7 @@ public abstract class PistonHandler_movableTEMixin
* @author 2No2Nameb * @author 2No2Nameb
*/ */
private Block redirectSlimeBlock() { private Block redirectSlimeBlock() {
if (CarpetSettings.honeyGlidingSlime && blockState_1.getBlock() == Blocks.ORANGE_STAINED_GLASS) if (CarpetSettings.honeySlime && blockState_1.getBlock() == Blocks.ORANGE_STAINED_GLASS)
return Blocks.ORANGE_STAINED_GLASS; return Blocks.ORANGE_STAINED_GLASS;
if (CarpetSettings.movableBlockEntities && isStickyOnSide(blockState_1, this.direction.getOpposite())) if (CarpetSettings.movableBlockEntities && isStickyOnSide(blockState_1, this.direction.getOpposite()))
return blockState_1.getBlock(); //this makes the comparison in the while condition "while(blockState_1.getBlock() == redirectSlimeBlock())" evaluate to true, so the block is treated as sticky return blockState_1.getBlock(); //this makes the comparison in the while condition "while(blockState_1.getBlock() == redirectSlimeBlock())" evaluate to true, so the block is treated as sticky
@@ -151,11 +151,11 @@ public class CarpetSettings
public static boolean movableBlockEntities = false; public static boolean movableBlockEntities = false;
@Rule( @Rule(
desc = "Honey doesn't stick to Slime and vice versa", desc = "Orange stained glass behaves like slime, but doesn't stick to it",
extra = "In 1.14 that behaviour is applied to orange stained glass instead", extra = "Only available for 1.14. in 1.15 use honey instead",
category = {EXPERIMENTAL, FEATURE} category = {EXPERIMENTAL, FEATURE}
) )
public static boolean honeyGlidingSlime = false; public static boolean honeySlime = false;
@Rule( desc = "Saplings turn into dead shrubs in hot climates and no water access", category = FEATURE ) @Rule( desc = "Saplings turn into dead shrubs in hot climates and no water access", category = FEATURE )
public static boolean desertShrubs = false; public static boolean desertShrubs = false;