diff --git a/gradle.properties b/gradle.properties index e54be7b9..a0283f08 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ # This is required to provide enough memory for the Minecraft decompilation process. org.gradle.jvmargs=-Xmx3G -mod_version=1.0.0 +mod_version=1.0.1 mcversion=1.12.2 forge_version=1.12.2-14.23.5.2832 diff --git a/src/main/java/com/raptor/sdu/event/RegistryEvents.java b/src/main/java/com/raptor/sdu/event/RegistryEvents.java index 45c1b625..c046fe46 100644 --- a/src/main/java/com/raptor/sdu/event/RegistryEvents.java +++ b/src/main/java/com/raptor/sdu/event/RegistryEvents.java @@ -1,15 +1,5 @@ package com.raptor.sdu.event; -import static com.raptor.sdu.type.Mods.BLOCKS; -import static com.raptor.sdu.type.Mods.ENABLED_MODS; -import static com.raptor.sdu.type.Mods.ITEMS; -import static net.minecraftforge.oredict.OreDictionary.WILDCARD_VALUE; - -import java.util.ArrayList; -import java.util.List; - -import javax.annotation.Nonnull; - import com.jaquadro.minecraft.storagedrawers.StorageDrawers; import com.jaquadro.minecraft.storagedrawers.api.storage.EnumBasicDrawer; import com.jaquadro.minecraft.storagedrawers.config.ConfigManager; @@ -21,7 +11,6 @@ import com.raptor.sdu.type.DrawerMaterial; import com.raptor.sdu.type.DrawerMaterial.AbstractItemStack; import com.raptor.sdu.type.Mod; - import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -33,6 +22,15 @@ import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.registries.IForgeRegistry; +import javax.annotation.Nonnull; +import java.util.ArrayList; +import java.util.List; + +import static com.raptor.sdu.type.Mods.BLOCKS; +import static com.raptor.sdu.type.Mods.ENABLED_MODS; +import static com.raptor.sdu.type.Mods.ITEMS; +import static net.minecraftforge.oredict.OreDictionary.WILDCARD_VALUE; + public class RegistryEvents { @SubscribeEvent @@ -53,10 +51,6 @@ public void onBlockRegistryEvent(RegistryEvent.Register event) { if((!isDrawer || anyDrawerEnabled) && (!isTrim || trimEnabled)) { registry.register(block); - if(isDrawer) - OreDictionary.registerOre("drawerBasic", new ItemStack(block, 1, WILDCARD_VALUE)); - else if(isTrim) - OreDictionary.registerOre("drawerTrim", new ItemStack(block, 1, WILDCARD_VALUE)); } } } @@ -74,9 +68,15 @@ public void onItemRegistryEvent(RegistryEvent.Register event) { } } for(Item item : ITEMS) { - if((!(item instanceof ItemUnlimitedDrawers) || anyDrawerEnabled) - && (!(item instanceof ItemUnlimitedTrim) || trimEnabled)) { + boolean isDrawer = item instanceof ItemUnlimitedDrawers; + boolean isTrim = item instanceof ItemUnlimitedTrim; + if ((!isDrawer || anyDrawerEnabled) + && (!isTrim || trimEnabled)) { registry.register(item); + if (isDrawer) + OreDictionary.registerOre("drawerBasic", new ItemStack(item, 1, WILDCARD_VALUE)); + else if (isTrim) + OreDictionary.registerOre("drawerTrim", item); } } }