From 3d5a99414fffef1cfa90f58a668828657599503f Mon Sep 17 00:00:00 2001 From: Mrbysco Date: Wed, 16 Oct 2024 22:50:31 +0200 Subject: [PATCH] Remove old TileEntityBase TODO's Remove unused method --- .../mod/tile/TileEntityBase.java | 30 ------------------- .../actuallyadditions/mod/util/AssetUtil.java | 5 ---- 2 files changed, 35 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java index e0dcadd6d..ac11c73d7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java @@ -49,25 +49,11 @@ public abstract class TileEntityBase extends BlockEntity { this.writeSyncableNBT(compound, lookupProvider, NBTType.SAVE_TILE); } - // TODO: [port] remove if the above is correct - // @Override - // public final CompoundNBT writeToNBT(CompoundNBT compound) { - // this.writeSyncableNBT(compound, NBTType.SAVE_TILE); - // return compound; - // } - @Override public void loadAdditional(CompoundTag compound, HolderLookup.Provider lookupProvider) { this.readSyncableNBT(compound, lookupProvider, NBTType.SAVE_TILE); } - - // TODO: [port] remove if the above is correct - // @Override - // public final void readFromNBT(CompoundNBT compound) { - // this.readSyncableNBT(compound, NBTType.SAVE_TILE); - // } - @Nullable @Override public ClientboundBlockEntityDataPacket getUpdatePacket() { @@ -150,22 +136,6 @@ public abstract class TileEntityBase extends BlockEntity { } } - // TODO: [port] eval if still required in some way - // @Override - // public boolean shouldRefresh(World world, BlockPos pos, BlockState oldState, BlockState newState) { - // return !oldState.getBlock().isAssociatedBlock(newState.getBlock()); - // } - - @Deprecated - public String getNameForTranslation() { - return "removeme";// "container.actuallyadditions." + this.name + ".name"; - } - - // @Override - // public ITextComponent getDisplayName() { - // return new TranslationTextComponent(this.getNameForTranslation()); - // } - public int getComparatorStrength() { return 0; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java index 1243ea46f..c02c5e0f0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java @@ -72,11 +72,6 @@ public final class AssetUtil { guiGraphics.drawString(font, text, xSize / 2f - font.width(text) / 2f, yPositionOfMachineText, 0xFFFFFF, false); } - - public static void displayNameString(GuiGraphics guiGraphics, Font font, int xSize, int yPositionOfMachineText, TileEntityBase tile) { - displayNameString(guiGraphics, font, xSize, yPositionOfMachineText, I18n.get(tile.getNameForTranslation())); - } - // public static void renderBlockInWorld(Block block, int meta) { // renderItemInWorld(new ItemStack(block, 1, meta), combinedLightIn, combinedOverlayIn, matrices, buffer); // }