mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 20:22:36 +00:00
Promote the gearcast to an actual pattern. It can now be stored in a patternchest.
This commit is contained in:
1 parent
78bd97ee04
commit
410f2ae006
2 files changed
+25
-3
No files matched your search
@@ -0,0 +1,24 @@
|
||||
package tconstruct.plugins.gears;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.PatternBuilder;
|
||||
import tconstruct.library.util.IPattern;
|
||||
|
||||
public class GearCast extends Item implements IPattern {
|
||||
public GearCast() {
|
||||
setTextureName("tinker:materials/gear_cast");
|
||||
setUnlocalizedName("tconstruct.GearPattern");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPatternCost(ItemStack pattern) {
|
||||
return 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPatternOutput(ItemStack pattern, ItemStack input, PatternBuilder.MaterialSet set) {
|
||||
return TConstructRegistry.getPartMapping(this, pattern.getItemDamage(), set.materialID);
|
||||
}
|
||||
}
|
||||
@@ -27,9 +27,7 @@ public class TinkerGears {
|
||||
@Handler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
TConstruct.logger.info("Gear module active. Adding gear cast.");
|
||||
gearCast = new Item();
|
||||
gearCast.setTextureName("tinker:materials/gear_cast");
|
||||
gearCast.setUnlocalizedName("tconstruct.GearPattern");
|
||||
gearCast = new GearCast();
|
||||
|
||||
GameRegistry.registerItem(gearCast, "gearCast");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user