Skip to content

Commit

Permalink
Sync with 1.21.4
Browse files Browse the repository at this point in the history
  • Loading branch information
sakura-ryoko committed Dec 11, 2024
1 parent 62216ef commit 852090e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
import fi.dy.masa.malilib.network.IPluginClientPlayHandler;
import fi.dy.masa.malilib.util.Constants;
import fi.dy.masa.malilib.util.InventoryUtils;
import fi.dy.masa.malilib.util.NBTUtils;
import fi.dy.masa.malilib.util.NbtKeys;
import fi.dy.masa.malilib.util.nbt.NbtUtils;
import fi.dy.masa.malilib.util.nbt.NbtKeys;
import fi.dy.masa.litematica.Litematica;
import fi.dy.masa.litematica.Reference;
import fi.dy.masa.litematica.config.Configs;
Expand Down Expand Up @@ -892,7 +892,7 @@ public void handleBulkEntityData(int transactionId, @Nullable NbtCompound nbt)
for (int i = 0; i < tileList.size(); ++i)
{
NbtCompound te = tileList.getCompound(i);
BlockPos pos = NBTUtils.readBlockPos(te);
BlockPos pos = NbtUtils.readBlockPos(te);
Identifier type = Identifier.of(te.getString("id"));

this.handleBlockEntityData(pos, te, type);
Expand All @@ -901,7 +901,7 @@ public void handleBulkEntityData(int transactionId, @Nullable NbtCompound nbt)
for (int i = 0; i < entityList.size(); ++i)
{
NbtCompound ent = entityList.getCompound(i);
Vec3d pos = NBTUtils.readEntityPositionFromTag(ent);
Vec3d pos = NbtUtils.readEntityPositionFromTag(ent).toVanilla();
int entityId = ent.getInt("entityId");

this.handleEntityData(entityId, ent);
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/fi/dy/masa/litematica/render/RenderUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
import fi.dy.masa.malilib.render.InventoryOverlay;
import fi.dy.masa.malilib.render.InventoryOverlay.InventoryProperties;
import fi.dy.masa.malilib.render.InventoryOverlay.InventoryRenderType;
import fi.dy.masa.malilib.util.BlockUtils;
import fi.dy.masa.malilib.util.Color4f;
import fi.dy.masa.malilib.util.GuiUtils;
import fi.dy.masa.malilib.util.StringUtils;
import fi.dy.masa.malilib.util.game.BlockUtils;
import fi.dy.masa.malilib.util.nbt.NbtBlockUtils;
import fi.dy.masa.litematica.Litematica;
import fi.dy.masa.litematica.util.BlockInfoAlignment;
import fi.dy.masa.litematica.util.InventoryUtils;
Expand Down Expand Up @@ -705,7 +706,7 @@ public static int renderInventoryOverlay(BlockInfoAlignment align, LeftRight sid

if (ctx.nbt() != null && !ctx.nbt().isEmpty())
{
disabledSlots = BlockUtils.getDisabledSlotsFromNbt(ctx.nbt());
disabledSlots = NbtBlockUtils.getDisabledSlotsFromNbt(ctx.nbt());
}
else if (ctx.be() instanceof CrafterBlockEntity cbe)
{
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/fi/dy/masa/litematica/util/EasyPlaceUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.lang.reflect.Method;
import java.util.*;
import javax.annotation.Nullable;

import org.jetbrains.annotations.ApiStatus;

import net.minecraft.block.*;
Expand Down Expand Up @@ -31,15 +30,14 @@
import fi.dy.masa.malilib.util.InfoUtils;
import fi.dy.masa.malilib.util.IntBoundingBox;
import fi.dy.masa.malilib.util.LayerRange;
import fi.dy.masa.malilib.util.game.BlockUtils;
import fi.dy.masa.malilib.util.game.PlacementUtils;
import fi.dy.masa.litematica.Litematica;
import fi.dy.masa.litematica.config.Configs;
import fi.dy.masa.litematica.config.Hotkeys;
import fi.dy.masa.litematica.data.DataManager;
import fi.dy.masa.litematica.materials.MaterialCache;
import fi.dy.masa.litematica.mixin.IMixinKeyBinding;
import fi.dy.masa.litematica.schematic.placement.SchematicPlacementManager;
import fi.dy.masa.litematica.tool.ToolMode;
import fi.dy.masa.litematica.world.SchematicWorldHandler;

/**
Expand Down Expand Up @@ -564,7 +562,7 @@ private static Vec3d applyCarpetProtocolHitVec(BlockPos pos, BlockState state, V
double y = hitVecIn.y;
double z = hitVecIn.z;
Block block = state.getBlock();
Optional<Direction> facingOptional = fi.dy.masa.malilib.util.BlockUtils.PRW_getFirstPropertyFacingValue(state);
Optional<Direction> facingOptional = BlockUtils.getFirstPropertyFacingValue(state);

if (facingOptional.isPresent())
{
Expand Down Expand Up @@ -593,7 +591,7 @@ else if (block instanceof StairsBlock && state.get(StairsBlock.HALF) == BlockHal

private static Direction applyPlacementFacing(BlockState stateSchematic, Direction side, BlockState stateClient)
{
Optional<EnumProperty<Direction>> propOptional = fi.dy.masa.malilib.util.BlockUtils.PRW_getFirstDirectionProperty(stateSchematic);
Optional<EnumProperty<Direction>> propOptional = BlockUtils.getFirstDirectionProperty(stateSchematic);

if (propOptional.isPresent())
{
Expand Down

0 comments on commit 852090e

Please sign in to comment.