Skip to content

Commit

Permalink
Release 1.0.1 - Fixed ore dict entries not being set
Browse files Browse the repository at this point in the history
  • Loading branch information
J0B10 committed Apr 2, 2022
1 parent db5fa7c commit e5c3550
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 17 additions & 17 deletions src/main/java/com/raptor/sdu/event/RegistryEvents.java
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand All @@ -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
Expand All @@ -53,10 +51,6 @@ public void onBlockRegistryEvent(RegistryEvent.Register<Block> 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));
}
}
}
Expand All @@ -74,9 +68,15 @@ public void onItemRegistryEvent(RegistryEvent.Register<Item> 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);
}
}
}
Expand Down

0 comments on commit e5c3550

Please sign in to comment.