renamed and changed block based on the final mojang proposal
This commit is contained in:
1 parent
84aee6b593
commit
155c62d3fc
3 files changed
+8
-8
No files matched your search
@@ -32,12 +32,12 @@ public abstract class PistonBlock_movableTEMixin extends FacingBlock
|
||||
@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)
|
||||
if (CarpetSettings.honeyGlidingSlime && direction_1 != direction_2)
|
||||
{
|
||||
Block block = blockState_1.getBlock();
|
||||
if (block != Blocks.GOLD_BLOCK && block != Blocks.SLIME_BLOCK) return;
|
||||
if (block != Blocks.ORANGE_STAINED_GLASS && block != Blocks.SLIME_BLOCK) return;
|
||||
Block otherBlock = world_1.getBlockState(blockPos_1.offset(direction_2.getOpposite(),1)).getBlock();
|
||||
if (otherBlock != Blocks.GOLD_BLOCK && otherBlock != Blocks.SLIME_BLOCK) return;
|
||||
if (otherBlock != Blocks.ORANGE_STAINED_GLASS && otherBlock != Blocks.SLIME_BLOCK) return;
|
||||
cir.setReturnValue(block == otherBlock);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public abstract class PistonHandler_movableTEMixin
|
||||
* @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){
|
||||
if (CarpetSettings.stickyHoney && this.world.getBlockState(blockPos_1).getBlock() == Blocks.GOLD_BLOCK && !method_11538(blockPos_1)) {
|
||||
if (CarpetSettings.honeyGlidingSlime && this.world.getBlockState(blockPos_1).getBlock() == Blocks.ORANGE_STAINED_GLASS && !method_11538(blockPos_1)) {
|
||||
cir.setReturnValue(false);
|
||||
return;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public abstract class PistonHandler_movableTEMixin
|
||||
*/
|
||||
private void stickToStickySide(CallbackInfoReturnable<Boolean> cir, int int_1){
|
||||
BlockPos pos = this.movedBlocks.get(int_1);
|
||||
if (CarpetSettings.stickyHoney && world.getBlockState(pos).getBlock() == Blocks.GOLD_BLOCK && !method_11538(pos))
|
||||
if (CarpetSettings.honeyGlidingSlime && world.getBlockState(pos).getBlock() == Blocks.ORANGE_STAINED_GLASS && !method_11538(pos))
|
||||
{
|
||||
cir.setReturnValue(false);
|
||||
return;
|
||||
@@ -120,8 +120,8 @@ public abstract class PistonHandler_movableTEMixin
|
||||
* @author 2No2Nameb
|
||||
*/
|
||||
private Block redirectSlimeBlock() {
|
||||
if (CarpetSettings.stickyHoney && blockState_1.getBlock() == Blocks.GOLD_BLOCK)
|
||||
return Blocks.GOLD_BLOCK;
|
||||
if (CarpetSettings.honeyGlidingSlime && blockState_1.getBlock() == Blocks.ORANGE_STAINED_GLASS)
|
||||
return Blocks.ORANGE_STAINED_GLASS;
|
||||
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 Blocks.SLIME_BLOCK; //vanilla behavior
|
||||
|
||||
@@ -156,7 +156,7 @@ public class CarpetSettings
|
||||
"In 1.14 that behaviour is applied to gold blocks instead"},
|
||||
category = {EXPERIMENTAL, FEATURE}
|
||||
)
|
||||
public static boolean stickyHoney = false;
|
||||
public static boolean honeyGlidingSlime = false;
|
||||
|
||||
@Rule( desc = "Saplings turn into dead shrubs in hot climates and no water access", category = FEATURE )
|
||||
public static boolean desertShrubs = false;
|
||||
|
||||
Reference in new issue
Block a user