21w07a
This commit is contained in:
1 parent
695d66da50
commit
6d320866e6
7 files changed
+21
-19
No files matched your search
@@ -26,7 +26,7 @@ public abstract class ArmorStandEntity_scarpetMarkerMixin extends LivingEntity
|
||||
* Remove all markers that do not belong to any script host and not part of the global one when loaded
|
||||
* @param ci
|
||||
*/
|
||||
@Inject(method = "readCustomDataFromTag", at = @At("HEAD"))
|
||||
@Inject(method = "readCustomDataFromNbt", at = @At("HEAD"))
|
||||
private void checkScarpetMarkerUnloaded(CallbackInfo ci)
|
||||
{
|
||||
if (!world.isClient)
|
||||
|
||||
@@ -127,7 +127,7 @@ public abstract class PistonBlockEntity_movableTEMixin extends BlockEntity imple
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "fromTag", at = @At(value = "TAIL"))
|
||||
@Inject(method = "readNbt", at = @At(value = "TAIL"))
|
||||
private void onFromTag(CompoundTag compoundTag_1, CallbackInfo ci)
|
||||
{
|
||||
if (CarpetSettings.movableBlockEntities && compoundTag_1.contains("carriedTileEntityCM", 10))
|
||||
@@ -135,18 +135,18 @@ public abstract class PistonBlockEntity_movableTEMixin extends BlockEntity imple
|
||||
if (this.pushedBlock.getBlock() instanceof BlockEntityProvider)
|
||||
this.carriedBlockEntity = ((BlockEntityProvider) (this.pushedBlock.getBlock())).createBlockEntity(pos, pushedBlock);// this.world);
|
||||
if (carriedBlockEntity != null) //Can actually be null, as BlockPistonMoving.createNewTileEntity(...) returns null
|
||||
this.carriedBlockEntity.fromTag(compoundTag_1.getCompound("carriedTileEntityCM"));
|
||||
this.carriedBlockEntity.readNbt(compoundTag_1.getCompound("carriedTileEntityCM"));
|
||||
setCarriedBlockEntity(carriedBlockEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "toTag", at = @At(value = "RETURN", shift = At.Shift.BEFORE))
|
||||
@Inject(method = "writeNbt", at = @At(value = "RETURN", shift = At.Shift.BEFORE))
|
||||
private void onToTag(CompoundTag compoundTag_1, CallbackInfoReturnable<CompoundTag> cir)
|
||||
{
|
||||
if (CarpetSettings.movableBlockEntities && this.carriedBlockEntity != null)
|
||||
{
|
||||
//Leave name "carriedTileEntityCM" instead of "carriedBlockEntityCM" for upgrade compatibility with 1.13.2 movable TE
|
||||
compoundTag_1.put("carriedTileEntityCM", this.carriedBlockEntity.toTag(new CompoundTag()));
|
||||
compoundTag_1.put("carriedTileEntityCM", this.carriedBlockEntity.writeNbt(new CompoundTag()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||
public abstract class StructureBlockBlockEntity_limitsMixin
|
||||
{
|
||||
@ModifyConstant(
|
||||
method = "fromTag",
|
||||
method = "readNbt",
|
||||
constant = @Constant(intValue = 48)
|
||||
)
|
||||
private int positiveLimit(int original) {
|
||||
@@ -23,7 +23,7 @@ public abstract class StructureBlockBlockEntity_limitsMixin
|
||||
}
|
||||
|
||||
@ModifyConstant(
|
||||
method = "fromTag",
|
||||
method = "readNbt",
|
||||
constant = @Constant(intValue = -48)
|
||||
)
|
||||
private int negativeLimit(int original) {
|
||||
@@ -41,7 +41,7 @@ public abstract class StructureBlockBlockEntity_limitsMixin
|
||||
private Block ignoredBlock(Block original) {
|
||||
return CarpetSettings.structureBlockIgnoredBlock;
|
||||
}
|
||||
|
||||
/*
|
||||
@Environment(EnvType.CLIENT)
|
||||
@ModifyConstant(
|
||||
method = "getSquaredRenderDistance",
|
||||
@@ -50,4 +50,6 @@ public abstract class StructureBlockBlockEntity_limitsMixin
|
||||
private double outlineRenderDistanceLimit(double original) {
|
||||
return CarpetSettings.structureBlockOutlineDistance;
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
Reference in new issue
Block a user