20w13a
This commit is contained in:
1 parent
b16a980106
commit
061ab76b19
4 files changed
+6
-6
No files matched your search
+1
-1
@@ -41,7 +41,7 @@ public class ClientPlayNetworkHandler_smoothClientAnimationsMixin
|
||||
if (blockState.getBlock() == Blocks.MOVING_PISTON) {
|
||||
tag.putFloat("progress", Math.min(tag.getFloat("progress") + 0.5F, 1.0F));
|
||||
blockEntity = new PistonBlockEntity();
|
||||
blockEntity.fromTag(tag);
|
||||
blockEntity.fromTag(blockState, tag);
|
||||
world.setBlockEntity(blockPos, blockEntity);
|
||||
blockEntity.resetBlock();
|
||||
}
|
||||
|
||||
@@ -116,14 +116,14 @@ public abstract class PistonBlockEntity_movableTEMixin extends BlockEntity imple
|
||||
}
|
||||
|
||||
@Inject(method = "fromTag", at = @At(value = "TAIL"))
|
||||
private void onFromTag(CompoundTag compoundTag_1, CallbackInfo ci)
|
||||
private void onFromTag(BlockState state, CompoundTag compoundTag_1, CallbackInfo ci)
|
||||
{
|
||||
if (CarpetSettings.movableBlockEntities && compoundTag_1.contains("carriedTileEntityCM", 10))
|
||||
{
|
||||
if (this.pushedBlock.getBlock() instanceof BlockEntityProvider)
|
||||
this.carriedBlockEntity = ((BlockEntityProvider) (this.pushedBlock.getBlock())).createBlockEntity(this.world);
|
||||
if (carriedBlockEntity != null) //Can actually be null, as BlockPistonMoving.createNewTileEntity(...) returns null
|
||||
this.carriedBlockEntity.fromTag(compoundTag_1.getCompound("carriedTileEntityCM"));
|
||||
this.carriedBlockEntity.fromTag(state, compoundTag_1.getCompound("carriedTileEntityCM"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
@Mixin(Structure.class)
|
||||
public class Structure_fillUpdatesMixin
|
||||
{
|
||||
@Redirect( method = "place(Lnet/minecraft/world/IWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/structure/StructurePlacementData;I)Z", at = @At(
|
||||
@Redirect( method = "place(Lnet/minecraft/world/IWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/structure/StructurePlacementData;I)Z", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/world/IWorld;updateNeighbors(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/Block;)V"
|
||||
))
|
||||
@@ -23,7 +23,7 @@ public class Structure_fillUpdatesMixin
|
||||
iWorld.updateNeighbors(var1, var2);
|
||||
}
|
||||
|
||||
@Redirect(method = "place(Lnet/minecraft/world/IWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/structure/StructurePlacementData;I)Z", at = @At(
|
||||
@Redirect(method = "place(Lnet/minecraft/world/IWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/structure/StructurePlacementData;I)Z", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/structure/StructurePlacementData;shouldUpdateNeighbors()Z"
|
||||
))
|
||||
|
||||
Reference in new issue
Block a user