Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #loader contenttweaker
- #modloaded minecraft
- import mods.contenttweaker.VanillaFactory;
- import mods.contenttweaker.Item;
- import mods.contenttweaker.IItemGetContainerItem;
- import crafttweaker.item.IItemStack;
- import mods.contenttweaker.ResourceLocation;
- import crafttweaker.data.IData;
- import crafttweaker.item.IIngredient;
- import crafttweaker.item.IItemTransformer;
- import crafttweaker.item.IItemCondition;
- var test_fuel = VanillaFactory.createItem("testitem_fuel");
- test_fuel.maxStackSize = 1 as int;
- test_fuel.maxDamage = 32000;
- test_fuel.creativeTab = <creativetab:misc>;
- test_fuel.register();
- test_fuel.itemGetContainerItem = function (input as IItemStack) as IItemStack{
- var m = input.maxDamage - 1;
- var c = (input.damage < m) | (input.hasTag & (input.tag.Broken.asInt() != 0));
- if c {
- return (<item:contenttweaker:testitem_fuel>*1).withDamage(input.damage+1);
- }
- else{
- return ((<item:contenttweaker:testitem_fuel> * 1).withDamage(input.damage+1)).withTag({Broken:1} as IData);
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement