From 318af9da8c564223cf5c0b32d05de98af1a5b09a Mon Sep 17 00:00:00 2001 From: Connor Colenso Date: Fri, 12 Jan 2024 22:06:07 +0000 Subject: [PATCH] Spotless + remove debug code --- README.md | 2 +- src/main/java/com/colen/postea/Postea.java | 11 +++++++++-- .../com/colen/postea/Utility/ChunkFixerUtility.java | 4 ---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 325e191..918d8ec 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ TileEntityReplacementManager.tileEntityTransformer("GT_TileEntity_Ores", (tag, w #### b. We do the same here, but now we convert a Furnace TE to a chest TE. We also need to convert the underlying block to a chest. In addtion to this we can provide a transformer that can edit the NBTTagCompound of the TE. This is useful for converting NBT data from one format to another. Here we simply edit the NBT to place stone in the middle slot. ```java -TileEntityReplacementManager.tileEntityTransformer("Furnace", (tag, world) -> { +TileEntityReplacementManager.tileEntityTransformer("Chest", (tag, world) -> { return new BlockInfo(Blocks.chest, 0, Postea::chestTransformer); }); diff --git a/src/main/java/com/colen/postea/Postea.java b/src/main/java/com/colen/postea/Postea.java index 4026990..1c2e933 100644 --- a/src/main/java/com/colen/postea/Postea.java +++ b/src/main/java/com/colen/postea/Postea.java @@ -2,8 +2,16 @@ package com.colen.postea; import static com.colen.postea.API.BlockReplacementManager.blockReplacementMap; import static com.colen.postea.API.BlockReplacementManager.posteaMarkedIDs; +import static com.colen.postea.Utility.ChunkFixerUtility.POSTEA_UPDATE_CODE; +import static com.colen.postea.Utility.PosteaUtilities.cleanseNBT; import net.minecraft.block.Block; +import net.minecraft.init.Blocks; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; + +import com.colen.postea.API.TileEntityReplacementManager; +import com.colen.postea.Utility.BlockInfo; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -15,9 +23,8 @@ import cpw.mods.fml.common.event.FMLServerStoppingEvent; public class Postea { @Mod.EventHandler - public void preInit(FMLPreInitializationEvent event) { + public void preInit(FMLPreInitializationEvent event) { } - } @Mod.EventHandler public void onServerStarting(FMLServerAboutToStartEvent event) { diff --git a/src/main/java/com/colen/postea/Utility/ChunkFixerUtility.java b/src/main/java/com/colen/postea/Utility/ChunkFixerUtility.java index 747e880..3dc2509 100644 --- a/src/main/java/com/colen/postea/Utility/ChunkFixerUtility.java +++ b/src/main/java/com/colen/postea/Utility/ChunkFixerUtility.java @@ -62,9 +62,6 @@ public class ChunkFixerUtility { byte[] metadataArray = section.getByteArray("Data16"); byte sectionY = section.getByte("Y"); - System.out.println("Y: " + sectionY); - System.out.println("i: " + i); - System.out.println("sections.tagCount(): " + sections.tagCount()); for (int index = 0; index < blockArray.length / 2; index++) { // Horrible bit jank to recreate the actual IDs, because the array is just a byte array. @@ -111,7 +108,6 @@ public class ChunkFixerUtility { } } } - } private static void transformTileEntities(NBTTagCompound levelCompoundTag, World world) {