Compare commits

...

1 Commits

Author SHA1 Message Date
yueh 37d8833b95 Fixes #3708: Move knifes/wrenches to oredict as constants are unreliable (#3729) 2018-09-22 20:14:28 +02:00
4 changed files with 17 additions and 42 deletions
@@ -19,14 +19,17 @@
package appeng.core.api.definitions;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.EntityEntryBuilder;
import net.minecraftforge.oredict.OreDictionary;
import appeng.api.definitions.IItemDefinition;
import appeng.api.definitions.IItems;
import appeng.api.util.AEColoredItemDefinition;
import appeng.bootstrap.FeatureFactory;
import appeng.bootstrap.components.IEntityRegistrationComponent;
import appeng.bootstrap.components.IOreDictComponent;
import appeng.client.render.crafting.ItemEncodedPatternRendering;
import appeng.core.CreativeTabFacade;
import appeng.core.features.AEFeature;
@@ -158,9 +161,13 @@ public final class ApiItems implements IItems
this.certusQuartzSword = certusTools.item( "certus_quartz_sword", () -> new ToolQuartzSword( AEFeature.CERTUS_QUARTZ_TOOLS ) )
.addFeatures( AEFeature.QUARTZ_SWORD )
.build();
this.certusQuartzWrench = certusTools.item( "certus_quartz_wrench", ToolQuartzWrench::new ).addFeatures( AEFeature.QUARTZ_WRENCH ).build();
this.certusQuartzWrench = certusTools.item( "certus_quartz_wrench", ToolQuartzWrench::new )
.addFeatures( AEFeature.QUARTZ_WRENCH )
.bootstrap( item -> (IOreDictComponent) side -> OreDictionary.registerOre( "itemQuartzWrench", new ItemStack( item ) ) )
.build();
this.certusQuartzKnife = certusTools.item( "certus_quartz_cutting_knife", () -> new ToolQuartzCuttingKnife( AEFeature.CERTUS_QUARTZ_TOOLS ) )
.addFeatures( AEFeature.QUARTZ_KNIFE )
.bootstrap( item -> (IOreDictComponent) side -> OreDictionary.registerOre( "itemQuartzKnife", new ItemStack( item ) ) )
.build();
FeatureFactory netherTools = registry.features( AEFeature.NETHER_QUARTZ_TOOLS );
@@ -179,9 +186,13 @@ public final class ApiItems implements IItems
this.netherQuartzSword = netherTools.item( "nether_quartz_sword", () -> new ToolQuartzSword( AEFeature.NETHER_QUARTZ_TOOLS ) )
.addFeatures( AEFeature.QUARTZ_SWORD )
.build();
this.netherQuartzWrench = netherTools.item( "nether_quartz_wrench", ToolQuartzWrench::new ).addFeatures( AEFeature.QUARTZ_WRENCH ).build();
this.netherQuartzWrench = netherTools.item( "nether_quartz_wrench", ToolQuartzWrench::new )
.addFeatures( AEFeature.QUARTZ_WRENCH )
.bootstrap( item -> (IOreDictComponent) side -> OreDictionary.registerOre( "itemQuartzWrench", new ItemStack( item ) ) )
.build();
this.netherQuartzKnife = netherTools.item( "nether_quartz_cutting_knife", () -> new ToolQuartzCuttingKnife( AEFeature.NETHER_QUARTZ_TOOLS ) )
.addFeatures( AEFeature.QUARTZ_KNIFE )
.bootstrap( item -> (IOreDictComponent) side -> OreDictionary.registerOre( "itemQuartzKnife", new ItemStack( item ) ) )
.build();
FeatureFactory powerTools = registry.features( AEFeature.POWERED_TOOLS );
@@ -19,44 +19,6 @@
}
]
},
{
"name": "appliedenergistics2:knife",
"conditions": [
{
"type": "appliedenergistics2:features",
"features": "quartz_knife"
}
],
"ingredient": [
{
"item": "appliedenergistics2:certus_quartz_cutting_knife",
"data": 32767
},
{
"item": "appliedenergistics2:nether_quartz_cutting_knife",
"data": 32767
}
]
},
{
"name": "appliedenergistics2:wrench",
"conditions": [
{
"type": "appliedenergistics2:features",
"features": [
"quartz_wrench"
]
}
],
"ingredient": [
{
"item": "appliedenergistics2:certus_quartz_wrench"
},
{
"item": "appliedenergistics2:nether_quartz_wrench"
}
]
},
{
"name": "appliedenergistics2:cable",
"ingredient": [
@@ -9,7 +9,8 @@
"item": "#appliedenergistics2:metalIngots"
},
{
"item": "#appliedenergistics2:knife"
"type": "forge:ore_dict",
"ore": "itemQuartzKnife"
}
]
}
@@ -13,7 +13,8 @@
"ore": "chestWood"
},
{
"item": "#appliedenergistics2:wrench"
"type": "forge:ore_dict",
"ore": "itemQuartzWrench"
},
{
"type": "appliedenergistics2:part",