Skip to content

Commit

Permalink
Prefer vanilla nuggets when available (that is, in 1.11.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
gigaherz committed Jan 30, 2017
1 parent 10b896a commit 1ec5b43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'

version = "1.8.3"
group= "gigaherz.survivalist" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Survivalist-1.11.0"
archivesBaseName = "Survivalist-1.11.2"

minecraft {
version = "1.11.2-13.20.0.2201"
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/gigaherz/survivalist/Survivalist.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import net.minecraftforge.fml.common.registry.EntityRegistry;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.oredict.OreDictionary;
Expand Down Expand Up @@ -235,6 +236,13 @@ public void getSubItems(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> su

private static void registerOredictNames()
{
// Make sure to register the vanilla iron nugget if it isn't registered.
Item item = ForgeRegistries.ITEMS.getValue(new ResourceLocation("minecraft","iron_nugget"));
if (item != null && OreDictionary.getOreIDs(new ItemStack(item)).length == 0)
{
OreDictionary.registerOre("nuggetIron", item);
}

OreDictionary.registerOre("materialLeather", tanned_leather);
OreDictionary.registerOre("materialTannedLeather", tanned_leather);
OreDictionary.registerOre("materialHardenedLeather", tanned_leather);
Expand Down

0 comments on commit 1ec5b43

Please sign in to comment.