diff --git a/CHANGELOG.md b/CHANGELOG.md index 037cd69b2..23ad820c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,9 @@ Nothing (I tend to only add finished Stuff to the Changelog). 6.16.02: (Not released yet) +[FIXED] Village Names should no longer crash with the Blacksmith Chest. [CHANGED] Wooden Barrels and Plastic Canisters can now have decorative nonfunctional Covers attached to them. Now you can put Hazard Stickers on them, lol. +[CHANGED] Blacksmith Loot Chest is now made of Meteoric Steel instead of regular Steel, unless Village Names is installed. [ADDED] Drain Covers can now partially drain GT Fluids. diff --git a/src/main/java/gregapi/data/CS.java b/src/main/java/gregapi/data/CS.java index bb15394cc..54f0a9982 100644 --- a/src/main/java/gregapi/data/CS.java +++ b/src/main/java/gregapi/data/CS.java @@ -1994,6 +1994,7 @@ public static class ModIDs { , LOSTBOOKS = "LostBooks" , LOOTBAGS = "lootbags" , EUREKA = "eureka" + , VN4 = "VillageNames" , UB = "UndergroundBiomes" , COG = "CustomOreGen" diff --git a/src/main/java/gregapi/data/MD.java b/src/main/java/gregapi/data/MD.java index 53a17afad..c4dfb217a 100644 --- a/src/main/java/gregapi/data/MD.java +++ b/src/main/java/gregapi/data/MD.java @@ -110,6 +110,7 @@ public class MD { , LOSTBOOKS = new ModData(ModIDs.LOSTBOOKS , "Lost Books") , LOOTBAGS = new ModData(ModIDs.LOOTBAGS , "Lootbags") , EUREKA = new ModData(ModIDs.EUREKA , "Eureka") + , VN4 = new ModData(ModIDs.VN4 , "Village Names") , UB = new ModData(ModIDs.UB , "Underground Biomes") , COG = new ModData(ModIDs.COG , "Custom Ore Generation") diff --git a/src/main/java/gregtech/loaders/c/Loader_Loot.java b/src/main/java/gregtech/loaders/c/Loader_Loot.java index 399d191ef..40608c277 100644 --- a/src/main/java/gregtech/loaders/c/Loader_Loot.java +++ b/src/main/java/gregtech/loaders/c/Loader_Loot.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2022 GregTech-6 Team + * Copyright (c) 2023 GregTech-6 Team * * This file is part of GregTech. * @@ -20,6 +20,7 @@ package gregtech.loaders.c; import gregapi.data.IL; +import gregapi.data.MD; import gregapi.data.MT; import gregapi.data.OP; import gregapi.util.ST; @@ -40,12 +41,14 @@ public class Loader_Loot implements Runnable { public void run() { new ChestGenHooksChestReplacer(ChestGenHooks.DUNGEON_CHEST , 32745); new ChestGenHooksChestReplacer(ChestGenHooks.MINESHAFT_CORRIDOR , 500); - new ChestGenHooksChestReplacer(ChestGenHooks.VILLAGE_BLACKSMITH , 10); new ChestGenHooksChestReplacer(ChestGenHooks.STRONGHOLD_LIBRARY , 508); new ChestGenHooksChestReplacer(ChestGenHooks.STRONGHOLD_CROSSING , 509); new ChestGenHooksChestReplacer(ChestGenHooks.STRONGHOLD_CORRIDOR , 510); new ChestGenHooksChestReplacer(ChestGenHooks.PYRAMID_DESERT_CHEST, 2); new ChestGenHooksChestReplacer(ChestGenHooks.PYRAMID_JUNGLE_CHEST, 502); + if (!MD.VN4.mLoaded) + new ChestGenHooksChestReplacer(ChestGenHooks.VILLAGE_BLACKSMITH , 24); + addLoot(ChestGenHooks.BONUS_CHEST , 2, 8,16, IL.Bottle_Purple_Drink.get(1)); addLoot(ChestGenHooks.BONUS_CHEST , 5, 8,16, IL.Bottle_Glue.get(1)); diff --git a/src/main/java/gregtech/worldgen/ChestGenHooksChestReplacer.java b/src/main/java/gregtech/worldgen/ChestGenHooksChestReplacer.java index ea470e7da..e3bf8ead9 100644 --- a/src/main/java/gregtech/worldgen/ChestGenHooksChestReplacer.java +++ b/src/main/java/gregtech/worldgen/ChestGenHooksChestReplacer.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2021 GregTech-6 Team + * Copyright (c) 2023 GregTech-6 Team * * This file is part of GregTech. * @@ -19,14 +19,6 @@ package gregtech.worldgen; -import static gregapi.data.CS.*; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Random; - import gregapi.block.multitileentity.MultiTileEntityRegistry; import gregapi.util.UT; import net.minecraft.init.Blocks; @@ -37,6 +29,14 @@ import net.minecraft.world.World; import net.minecraftforge.common.ChestGenHooks; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Random; + +import static gregapi.data.CS.*; + /** * @author Gregorius Techneticies */ @@ -109,7 +109,7 @@ protected ItemStack[] generateChestContent(Random aRandom, IInventory aInventory // XYZ and check if the Block we replace is a regular Chest. int aX = ((TileEntityChest)aInventory).xCoord, aY = ((TileEntityChest)aInventory).yCoord, aZ = ((TileEntityChest)aInventory).zCoord; if (Blocks.chest != aWorld.getBlock(aX, aY, aZ)) return generateChestContent2(aRandom, aInventory); - // Does my Registry exist? + // Does Greg's Registry exist? MultiTileEntityRegistry tRegistry = MultiTileEntityRegistry.getRegistry("gt.multitileentity"); if (tRegistry == null) return generateChestContent2(aRandom, aInventory); // Grab the Chests Facing.