This commit is contained in:
gnembon committed 2024-03-27 21:57:05 +01:00
1 parent d4e1976ff8
commit d7468ac561
6 files changed
+16 -8

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check https://fabricmc.net/develop/
minecraft_version=24w12a
minecraft_version=24w13a
loader_version=0.15.7
jsr305_version=3.0.2
fabric_version=0.96.9+1.20.5
@@ -133,7 +133,7 @@ public abstract class PistonMovingBlockEntity_movableBEMixin extends BlockEntity
}
}
@Inject(method = "load", at = @At(value = "TAIL"))
@Inject(method = "loadAdditional", at = @At(value = "TAIL"))
private void onFromTag(CompoundTag NbtCompound_1, HolderLookup.Provider registries, CallbackInfo ci)
{
if (CarpetSettings.movableBlockEntities && NbtCompound_1.contains("carriedTileEntityCM", 10))
@@ -141,7 +141,7 @@ public abstract class PistonMovingBlockEntity_movableBEMixin extends BlockEntity
if (this.movedState.getBlock() instanceof EntityBlock)
this.carriedBlockEntity = ((EntityBlock) (this.movedState.getBlock())).newBlockEntity(worldPosition, movedState);// this.world);
if (carriedBlockEntity != null) //Can actually be null, as BlockPistonMoving.createNewTileEntity(...) returns null
this.carriedBlockEntity.load(NbtCompound_1.getCompound("carriedTileEntityCM"), registries);
this.carriedBlockEntity.loadWithComponents(NbtCompound_1.getCompound("carriedTileEntityCM"), registries);
setCarriedBlockEntity(carriedBlockEntity);
}
}
@@ -13,7 +13,7 @@ import org.spongepowered.asm.mixin.injection.ModifyConstant;
public abstract class StructureBlockEntity_limitsMixin
{
@ModifyConstant(
method = "load",
method = "loadAdditional",
constant = @Constant(intValue = StructureBlockEntity.MAX_SIZE_PER_AXIS)
)
private int positiveLimit(int original) {
@@ -21,7 +21,7 @@ public abstract class StructureBlockEntity_limitsMixin
}
@ModifyConstant(
method = "load",
method = "loadAdditional",
constant = @Constant(intValue = -StructureBlockEntity.MAX_SIZE_PER_AXIS)
)
private int negativeLimit(int original) {
@@ -828,7 +828,7 @@ public class WorldAccess
destTag.putInt("x", targetPos.getX());
destTag.putInt("y", targetPos.getY());
destTag.putInt("z", targetPos.getZ());
be.load(destTag, world.registryAccess());
be.loadWithComponents(destTag, world.registryAccess());
be.setChanged();
success = true;
}
@@ -433,7 +433,7 @@ public class ShapesRenderer
BlockEntity.setLevel(client.level);
if (shape.blockEntity != null)
{
BlockEntity.load(shape.blockEntity, client.level.registryAccess());
BlockEntity.loadWithComponents(shape.blockEntity, client.level.registryAccess());
}
}
}
+9 -1
View File
@@ -55,7 +55,15 @@ public class Messenger
BLACK ('k', (s, f) -> s.withColor(ChatFormatting.BLACK)),
COLOR ('#', (s, f) -> {
TextColor color = TextColor.parseColor("#"+f).getOrThrow(false, LOG::warn);
TextColor color;
try
{
color = TextColor.parseColor("#" + f).getOrThrow(RuntimeException::new);
}
catch (RuntimeException e)
{
return s;
}
return color == null ? s : s.withColor(color);
}, s -> {
Matcher m = colorExtract.matcher(s);