slime is honey 1
This commit is contained in:
1 parent
5b1cb6aaf9
commit
7ba4ff6647
1 file changed
+14
-1
@@ -41,6 +41,10 @@ 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)) {
|
||||
cir.setReturnValue(false);
|
||||
return;
|
||||
}
|
||||
if(!stickToStickySide(blockPos_3)){
|
||||
cir.setReturnValue(false);
|
||||
cir.cancel();
|
||||
@@ -53,7 +57,13 @@ public abstract class PistonHandler_movableTEMixin
|
||||
* @author 2No2Name
|
||||
*/
|
||||
private void stickToStickySide(CallbackInfoReturnable<Boolean> cir, int int_1){
|
||||
if(!stickToStickySide(this.movedBlocks.get(int_1))){
|
||||
BlockPos pos = this.movedBlocks.get(int_1);
|
||||
if (CarpetSettings.stickyHoney && world.getBlockState(pos).getBlock() == Blocks.GOLD_BLOCK)
|
||||
{
|
||||
cir.setReturnValue(false);
|
||||
return;
|
||||
}
|
||||
if(!stickToStickySide(pos)){
|
||||
cir.setReturnValue(false);
|
||||
cir.cancel();
|
||||
}
|
||||
@@ -88,6 +98,9 @@ public abstract class PistonHandler_movableTEMixin
|
||||
|
||||
//Get access to the blockstate to check if it is a chest
|
||||
@Shadow @Final private Direction direction;
|
||||
|
||||
@Shadow protected abstract boolean method_11538(BlockPos blockPos_1);
|
||||
|
||||
private BlockState blockState_1;
|
||||
@Redirect(method = "tryMove",
|
||||
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;getBlockState(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;", ordinal = 0))
|
||||
|
||||
Reference in new issue
Block a user