2
0
Fork 0

LOTREnchantment exclusions, more items to creative tabs

frozen
Shinare 1 year ago
parent a9ada9f089
commit d077158a57

@ -142,6 +142,7 @@ public class CinderLoE {
public static Block shadowTile; public static Block shadowTile;
public static Block entityBarrier; public static Block entityBarrier;
public static Block iceCage; public static Block iceCage;
public static Block enchantedIce;
//public static Block verticalWeaponRack; //public static Block verticalWeaponRack;
@ -382,6 +383,8 @@ public class CinderLoE {
recipes.registerRecipes(); // Register recipes at com.zivilon.cinder_loe.recipes.java recipes.registerRecipes(); // Register recipes at com.zivilon.cinder_loe.recipes.java
setupTradeEntries(); setupTradeEntries();
LOTRWeaponStats.registerMeleeReach(Whip.class, 1.5F); LOTRWeaponStats.registerMeleeReach(Whip.class, 1.5F);
LOTRWeaponStats.registerMeleeReach(FirstAgeGlaive.class, 1.8F);
LOTRWeaponStats.registerMeleeSpeed(FirstAgeGlaive.class, 1.0F);
LoECreativeTabs.setupIcons(); LoECreativeTabs.setupIcons();
} }
@ -533,6 +536,8 @@ public class CinderLoE {
GameRegistry.registerBlock(entityBarrier, "entity_barrier"); GameRegistry.registerBlock(entityBarrier, "entity_barrier");
iceCage = (new IceCage()); iceCage = (new IceCage());
GameRegistry.registerBlock(iceCage, "ice_cage"); GameRegistry.registerBlock(iceCage, "ice_cage");
enchantedIce = (new EnchantedIce());
GameRegistry.registerBlock(enchantedIce, "enchanted_ice");
// Building Blocks // Building Blocks
cutDrystone = (new cutDrystone()); cutDrystone = (new cutDrystone());
@ -729,24 +734,24 @@ public class CinderLoE {
legsJade = (new LOTRItemArmor(MATERIAL_JADE, 2,"leggings")).setUnlocalizedName("lotr:legsJade").setTextureName("lotr:legsJade").setCreativeTab(null); legsJade = (new LOTRItemArmor(MATERIAL_JADE, 2,"leggings")).setUnlocalizedName("lotr:legsJade").setTextureName("lotr:legsJade").setCreativeTab(null);
bootsJade = (new LOTRItemArmor(MATERIAL_JADE, 3)).setUnlocalizedName("lotr:bootsJade").setTextureName("lotr:bootsJade").setCreativeTab(null); bootsJade = (new LOTRItemArmor(MATERIAL_JADE, 3)).setUnlocalizedName("lotr:bootsJade").setTextureName("lotr:bootsJade").setCreativeTab(null);
helmetNexIce = (new LOTRItemArmor(MATERIAL_NEX_ICE, 0)).setUnlocalizedName("lotr:helmetNexIce").setTextureName("lotr:helmetNexIce").setCreativeTab(null); helmetNexIce = (new LOTRItemArmor(MATERIAL_NEX_ICE, 0)).setUnlocalizedName("lotr:helmetNexIce").setTextureName("lotr:helmetNexIce").setCreativeTab(LoECreativeTabs.tabCombatLoE);
bodyNexIce = (new LOTRItemArmor(MATERIAL_NEX_ICE, 1)).setUnlocalizedName("lotr:bodyNexIce").setTextureName("lotr:bodyNexIce").setCreativeTab(null); bodyNexIce = (new LOTRItemArmor(MATERIAL_NEX_ICE, 1)).setUnlocalizedName("lotr:bodyNexIce").setTextureName("lotr:bodyNexIce").setCreativeTab(LoECreativeTabs.tabCombatLoE);
legsNexIce = (new LOTRItemArmor(MATERIAL_NEX_ICE, 2)).setUnlocalizedName("lotr:legsNexIce").setTextureName("lotr:legsNexIce").setCreativeTab(null); legsNexIce = (new LOTRItemArmor(MATERIAL_NEX_ICE, 2)).setUnlocalizedName("lotr:legsNexIce").setTextureName("lotr:legsNexIce").setCreativeTab(LoECreativeTabs.tabCombatLoE);
bootsNexIce = (new LOTRItemArmor(MATERIAL_NEX_ICE, 3)).setUnlocalizedName("lotr:bootsNexIce").setTextureName("lotr:bootsNexIce").setCreativeTab(null); bootsNexIce = (new LOTRItemArmor(MATERIAL_NEX_ICE, 3)).setUnlocalizedName("lotr:bootsNexIce").setTextureName("lotr:bootsNexIce").setCreativeTab(LoECreativeTabs.tabCombatLoE);
helmetNexFire = (new LOTRItemArmor(MATERIAL_NEX_FIRE, 0)).setUnlocalizedName("lotr:helmetNexFire").setTextureName("lotr:helmetNexFire").setCreativeTab(null); helmetNexFire = (new LOTRItemArmor(MATERIAL_NEX_FIRE, 0)).setUnlocalizedName("lotr:helmetNexFire").setTextureName("lotr:helmetNexFire").setCreativeTab(LoECreativeTabs.tabCombatLoE);
bodyNexFire = (new LOTRItemArmor(MATERIAL_NEX_FIRE, 1)).setUnlocalizedName("lotr:bodyNexFire").setTextureName("lotr:bodyNexFire").setCreativeTab(null); bodyNexFire = (new LOTRItemArmor(MATERIAL_NEX_FIRE, 1)).setUnlocalizedName("lotr:bodyNexFire").setTextureName("lotr:bodyNexFire").setCreativeTab(LoECreativeTabs.tabCombatLoE);
legsNexFire = (new LOTRItemArmor(MATERIAL_NEX_FIRE, 2)).setUnlocalizedName("lotr:legsNexFire").setTextureName("lotr:legsNexFire").setCreativeTab(null); legsNexFire = (new LOTRItemArmor(MATERIAL_NEX_FIRE, 2)).setUnlocalizedName("lotr:legsNexFire").setTextureName("lotr:legsNexFire").setCreativeTab(LoECreativeTabs.tabCombatLoE);
bootsNexFire = (new LOTRItemArmor(MATERIAL_NEX_FIRE, 3)).setUnlocalizedName("lotr:bootsNexFire").setTextureName("lotr:bootsNexFire").setCreativeTab(null); bootsNexFire = (new LOTRItemArmor(MATERIAL_NEX_FIRE, 3)).setUnlocalizedName("lotr:bootsNexFire").setTextureName("lotr:bootsNexFire").setCreativeTab(LoECreativeTabs.tabCombatLoE);
helmetNexToxin = (new LOTRItemArmor(MATERIAL_NEX_TOXIN, 0)).setUnlocalizedName("lotr:helmetNexToxin").setTextureName("lotr:helmetNexToxin").setCreativeTab(null); helmetNexToxin = (new LOTRItemArmor(MATERIAL_NEX_TOXIN, 0)).setUnlocalizedName("lotr:helmetNexToxin").setTextureName("lotr:helmetNexToxin").setCreativeTab(LoECreativeTabs.tabCombatLoE);
bodyNexToxin = (new LOTRItemArmor(MATERIAL_NEX_TOXIN, 1)).setUnlocalizedName("lotr:bodyNexToxin").setTextureName("lotr:bodyNexToxin").setCreativeTab(null); bodyNexToxin = (new LOTRItemArmor(MATERIAL_NEX_TOXIN, 1)).setUnlocalizedName("lotr:bodyNexToxin").setTextureName("lotr:bodyNexToxin").setCreativeTab(LoECreativeTabs.tabCombatLoE);
legsNexToxin = (new LOTRItemArmor(MATERIAL_NEX_TOXIN, 2)).setUnlocalizedName("lotr:legsNexToxin").setTextureName("lotr:legsNexToxin").setCreativeTab(null); legsNexToxin = (new LOTRItemArmor(MATERIAL_NEX_TOXIN, 2)).setUnlocalizedName("lotr:legsNexToxin").setTextureName("lotr:legsNexToxin").setCreativeTab(LoECreativeTabs.tabCombatLoE);
bootsNexToxin = (new LOTRItemArmor(MATERIAL_NEX_TOXIN, 3)).setUnlocalizedName("lotr:bootsNexToxin").setTextureName("lotr:bootsNexToxin").setCreativeTab(null); bootsNexToxin = (new LOTRItemArmor(MATERIAL_NEX_TOXIN, 3)).setUnlocalizedName("lotr:bootsNexToxin").setTextureName("lotr:bootsNexToxin").setCreativeTab(LoECreativeTabs.tabCombatLoE);
helmetNexShadow = (new LOTRItemArmor(MATERIAL_NEX_SHADOW, 0)).setUnlocalizedName("lotr:helmetNexShadow").setTextureName("lotr:helmetNexShadow").setCreativeTab(null); helmetNexShadow = (new LOTRItemArmor(MATERIAL_NEX_SHADOW, 0)).setUnlocalizedName("lotr:helmetNexShadow").setTextureName("lotr:helmetNexShadow").setCreativeTab(LoECreativeTabs.tabCombatLoE);
bodyNexShadow = (new LOTRItemArmor(MATERIAL_NEX_SHADOW, 1)).setUnlocalizedName("lotr:bodyNexShadow").setTextureName("lotr:bodyNexShadow").setCreativeTab(null); bodyNexShadow = (new LOTRItemArmor(MATERIAL_NEX_SHADOW, 1)).setUnlocalizedName("lotr:bodyNexShadow").setTextureName("lotr:bodyNexShadow").setCreativeTab(LoECreativeTabs.tabCombatLoE);
legsNexShadow = (new LOTRItemArmor(MATERIAL_NEX_SHADOW, 2)).setUnlocalizedName("lotr:legsNexShadow").setTextureName("lotr:legsNexShadow").setCreativeTab(null); legsNexShadow = (new LOTRItemArmor(MATERIAL_NEX_SHADOW, 2)).setUnlocalizedName("lotr:legsNexShadow").setTextureName("lotr:legsNexShadow").setCreativeTab(null);
bootsNexShadow = (new LOTRItemArmor(MATERIAL_NEX_SHADOW, 3)).setUnlocalizedName("lotr:bootsNexShadow").setTextureName("lotr:bootsNexShadow").setCreativeTab(null); bootsNexShadow = (new LOTRItemArmor(MATERIAL_NEX_SHADOW, 3)).setUnlocalizedName("lotr:bootsNexShadow").setTextureName("lotr:bootsNexShadow").setCreativeTab(LoECreativeTabs.tabCombatLoE);
firstAgeGlaive = (new LOTRItemPolearm(MATERIAL_NEX_SHADOW)).setUnlocalizedName("lotr:firstAgeGlaive").setTextureName("lotr:firstAgeGlaive").setCreativeTab(null); firstAgeGlaive = (new FirstAgeGlaive()).setCreativeTab(LoECreativeTabs.tabCombatLoE);
toxicCore = (new ToxicCore()).setUnlocalizedName("lotr:toxicCore").setTextureName("lotr:toxicCore").setCreativeTab(null); toxicCore = (new ToxicCore());
linkLOTRWeapon(firstAgeGlaive, "firstAgeGlaive"); linkLOTRWeapon(firstAgeGlaive, "firstAgeGlaive");
@ -1058,12 +1063,10 @@ public class CinderLoE {
// RenderingRegistry.registerEntityRenderingHandler(HaradLevy.class, new LOTRRenderNearHaradrim()); // RenderingRegistry.registerEntityRenderingHandler(HaradLevy.class, new LOTRRenderNearHaradrim());
// RenderingRegistry.registerEntityRenderingHandler(DwarfLevy.class, new LOTRRenderDwarf()); // RenderingRegistry.registerEntityRenderingHandler(DwarfLevy.class, new LOTRRenderDwarf());
RenderingRegistry.registerBlockHandler(new RenderIceCage()); RenderingRegistry.registerBlockHandler(new RenderIceCage());
RenderingRegistry.registerEntityRenderingHandler(EntityWarDart.class, new RenderWarDart());
RenderingRegistry.registerEntityRenderingHandler(EntityWarDart.class, new RenderWarDart());
RenderingRegistry.registerEntityRenderingHandler(BladorthinSmith.class, new LOTRRenderDorwinionElfVintner()); RenderingRegistry.registerEntityRenderingHandler(BladorthinSmith.class, new LOTRRenderDorwinionElfVintner());
RenderingRegistry.registerEntityRenderingHandler(DarkSpider.class, new RenderDarkSpider()); RenderingRegistry.registerEntityRenderingHandler(DarkSpider.class, new RenderDarkSpider());
RenderingRegistry.registerEntityRenderingHandler(CorruptDwarf.class, new RenderCorruptDwarf()); RenderingRegistry.registerEntityRenderingHandler(CorruptDwarf.class, new RenderCorruptDwarf());
RenderingRegistry.registerEntityRenderingHandler(CorruptElf.class, new RenderCorruptElf()); RenderingRegistry.registerEntityRenderingHandler(CorruptElf.class, new RenderCorruptElf());
RenderingRegistry.registerEntityRenderingHandler(CorruptEnt.class, new RenderCorruptEnt()); RenderingRegistry.registerEntityRenderingHandler(CorruptEnt.class, new RenderCorruptEnt());

@ -14,6 +14,7 @@ public class LoECreativeTabs extends CreativeTabs {
public static LoECreativeTabs tabMiscLoE = new LoECreativeTabs("tabMiscLoE"); public static LoECreativeTabs tabMiscLoE = new LoECreativeTabs("tabMiscLoE");
public static LoECreativeTabs tabFoodLoE = new LoECreativeTabs("tabFoodLoE"); public static LoECreativeTabs tabFoodLoE = new LoECreativeTabs("tabFoodLoE");
public static LoECreativeTabs tabDecoLoE = new LoECreativeTabs("tabDecoLoE"); public static LoECreativeTabs tabDecoLoE = new LoECreativeTabs("tabDecoLoE");
public static LoECreativeTabs tabCharacterLoE = new LoECreativeTabs("tabCharacterLoE");
public ItemStack theIcon; public ItemStack theIcon;
@ -28,6 +29,7 @@ public class LoECreativeTabs extends CreativeTabs {
tabMiscLoE.theIcon = new ItemStack(CinderLoE.bonemold); tabMiscLoE.theIcon = new ItemStack(CinderLoE.bonemold);
tabFoodLoE.theIcon = new ItemStack(CinderLoE.onion); tabFoodLoE.theIcon = new ItemStack(CinderLoE.onion);
tabDecoLoE.theIcon = new ItemStack(CinderLoE.silverChain); tabDecoLoE.theIcon = new ItemStack(CinderLoE.silverChain);
tabCharacterLoE.theIcon = new ItemStack(CinderLoE.sarumanStaff);
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)

@ -1,6 +1,6 @@
package com.zivilon.cinder_loe.blocks; package com.zivilon.cinder_loe.blocks;
import lotr.common.LOTRCreativeTabs; import com.zivilon.cinder_loe.LoECreativeTabs;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
@ -17,13 +17,7 @@ public class CinderBlock extends Block {
public CinderBlock() { public CinderBlock() {
super(Material.rock); super(Material.rock);
try { this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
Field tabField = LOTRCreativeTabs.class.getDeclaredField("tabBlock"); // Stupid workaround because ForgeGradle tries to obfuscate field LOTRCreativeTabs.tabBlock when it's not supposed to
LOTRCreativeTabs tab = (LOTRCreativeTabs)tabField.get(null);
setCreativeTab((CreativeTabs)tab);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
setHardness(2.0F); setHardness(2.0F);
setResistance(5.0F); setResistance(5.0F);
setBlockTextureName("lotr:cinder_block"); setBlockTextureName("lotr:cinder_block");

@ -0,0 +1,47 @@
package com.zivilon.cinder_loe.blocks;
import com.zivilon.cinder_loe.LoECreativeTabs;
import net.minecraft.block.Block;
import net.minecraft.block.BlockIce;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.lang.reflect.Field;
import java.util.Random;
public class EnchantedIce extends BlockIce {
public IIcon baseIcon;
public EnchantedIce() {
super();
this.setTickRandomly(false);
this.setCreativeTab(LoECreativeTabs.tabBlockLoE);
setBlockTextureName("minecraft:ice");
setBlockName("lotr:enchantedIce");
setLightLevel(0.25F);
}
@Override
public void registerBlockIcons(IIconRegister iconRegister) {
this.baseIcon = iconRegister.registerIcon(this.getTextureName());
}
@Override
public IIcon getIcon(int side, int meta) {
return this.baseIcon;
}
public IIcon getBaseIcon() {
return this.baseIcon;
}
@Override
public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) {}
}

@ -1,6 +1,6 @@
package com.zivilon.cinder_loe.items; package com.zivilon.cinder_loe.items;
import net.minecraft.creativetab.CreativeTabs; import com.zivilon.cinder_loe.LoECreativeTabs;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@ -19,7 +19,7 @@ public class CinderLoESpawnEgg extends Item {
this.entityClass = entityClass; this.entityClass = entityClass;
this.setUnlocalizedName("spawn_egg_" + entityClass.getSimpleName().toLowerCase()); this.setUnlocalizedName("spawn_egg_" + entityClass.getSimpleName().toLowerCase());
this.setTextureName("spawn_egg"); this.setTextureName("spawn_egg");
this.setCreativeTab(CreativeTabs.tabMisc); // Or any other tab you prefer this.setCreativeTab(LoECreativeTabs.tabSpawnLoE);
} }
@Override @Override

@ -0,0 +1,57 @@
package com.zivilon.cinder_loe.items;
import com.zivilon.cinder_loe.CinderLoE;
import com.zivilon.cinder_loe.LoECreativeTabs;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import lotr.common.LOTRBannerProtection;
import lotr.common.LOTRMod;
import lotr.common.enchant.LOTREnchantment;
import lotr.common.enchant.LOTREnchantmentHelper;
import lotr.common.item.LOTRItemSword;
import lotr.common.item.LOTRItemPolearm;
import lotr.common.item.LOTRMaterial;
import lotr.common.item.LOTRWeaponStats;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class FirstAgeGlaive extends LOTRItemPolearm {
public FirstAgeGlaive() {
super(CinderLoE.MATERIAL_NEX_ICE);
this.lotrWeaponDamage = 11.5F;
this.setUnlocalizedName("lotr:firstAgeGlaive");
this.setTextureName("lotr:firstAgeGlaive");
this.setCreativeTab(LoECreativeTabs.tabCombatLoE);
LOTRWeaponStats.registerMeleeReach(FirstAgeGlaive.class, 1.8F);
LOTRWeaponStats.registerMeleeSpeed(FirstAgeGlaive.class, 1.0F);
}
public boolean getIsRepairable(ItemStack itemstack, ItemStack repairItem) {
return (repairItem.getItem() == Item.getItemFromBlock(CinderLoE.enchantedIce));
}
// private void checkIncompatibleModifiers(ItemStack itemstack) {}
public static UUID accessWeaponDamageModifier() {
return null;
}
}

@ -1,10 +1,15 @@
package com.zivilon.cinder_loe.items; package com.zivilon.cinder_loe.items;
import com.zivilon.cinder_loe.LoECreativeTabs;
import net.minecraft.item.Item; import net.minecraft.item.Item;
public class ToxicCore extends Item { public class ToxicCore extends Item {
public ToxicCore() { public ToxicCore() {
this.setUnlocalizedName("lotr:toxicCore");
this.setTextureName("lotr:toxicCore");
setCreativeTab(LoECreativeTabs.tabMiscLoE);
this.setMaxDamage(100); this.setMaxDamage(100);
this.setNoRepair(); this.setNoRepair();
this.setMaxStackSize(1); this.setMaxStackSize(1);

@ -1,5 +1,7 @@
package com.zivilon.cinder_loe.items; package com.zivilon.cinder_loe.items;
import com.zivilon.cinder_loe.LoECreativeTabs;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@ -14,13 +16,13 @@ public class WarDartHeads extends Item {
public WarDartHeads() { public WarDartHeads() {
super(); super();
setCreativeTab(CreativeTabs.tabMisc); this.setCreativeTab(LoECreativeTabs.tabMiscLoE);
setHasSubtypes(true); // Allows for different metadata values setHasSubtypes(true);
} }
@Override @Override
public void registerIcons(IIconRegister iconRegister) { public void registerIcons(IIconRegister iconRegister) {
icons = new IIcon[6]; // 6 icons for 0 to 5 count levels icons = new IIcon[6];
for (int i = 0; i < icons.length; i++) { for (int i = 0; i < icons.length; i++) {
icons[i] = iconRegister.registerIcon("lotr:war_dart_heads_" + i); icons[i] = iconRegister.registerIcon("lotr:war_dart_heads_" + i);
} }
@ -67,4 +69,11 @@ public class WarDartHeads extends Item {
return icons[count]; return icons[count];
} }
} }
@Override
public void getSubItems(Item item, CreativeTabs tab, List list) {
for (int i = 1; i < 14; i++) {
list.add(new ItemStack(item, 1, i));
}
}
} }

@ -1,5 +1,7 @@
package com.zivilon.cinder_loe.items; package com.zivilon.cinder_loe.items;
import com.zivilon.cinder_loe.LoECreativeTabs;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -32,6 +34,7 @@ import net.minecraft.world.World;
public class Whip extends LOTRItemSword { public class Whip extends LOTRItemSword {
public Whip() { public Whip() {
super(LOTRMaterial.FUR); super(LOTRMaterial.FUR);
this.setCreativeTab(LoECreativeTabs.tabCombatLoE);
this.lotrWeaponDamage = 4.0F; this.lotrWeaponDamage = 4.0F;
LOTRWeaponStats.registerMeleeReach(Whip.class, 1.5F); LOTRWeaponStats.registerMeleeReach(Whip.class, 1.5F);
} }

@ -1,11 +1,11 @@
package com.zivilon.cinder_loe.items; package com.zivilon.cinder_loe.items;
import com.zivilon.cinder_loe.LoECreativeTabs;
import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessage;
import lotr.common.LOTRCreativeTabs;
import lotr.common.entity.projectile.LOTREntityGandalfFireball; import lotr.common.entity.projectile.LOTREntityGandalfFireball;
import lotr.common.network.LOTRPacketHandler; import lotr.common.network.LOTRPacketHandler;
import lotr.common.network.LOTRPacketWeaponFX; import lotr.common.network.LOTRPacketWeaponFX;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@ -22,7 +22,7 @@ import com.zivilon.cinder_loe.CinderLoE;
public class WizardStaff extends LOTRItemSword implements LOTRStoryItem { public class WizardStaff extends LOTRItemSword implements LOTRStoryItem {
public WizardStaff() { public WizardStaff() {
super(CinderLoE.getLOTRMaterialByName("WIZARD")); super(CinderLoE.getLOTRMaterialByName("WIZARD"));
setCreativeTab((CreativeTabs)LOTRCreativeTabs.tabStory); this.setCreativeTab(LoECreativeTabs.tabCharacterLoE);
} }
public int getMaxItemUseDuration(ItemStack itemstack) { public int getMaxItemUseDuration(ItemStack itemstack) {

@ -0,0 +1,26 @@
package com.zivilon.cinder_loe.mixins;
import com.zivilon.cinder_loe.util.LOTREnchantmentExclusions;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import lotr.common.enchant.LOTREnchantmentType;
import lotr.common.item.LOTRWeaponStats;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
@Mixin(LOTREnchantmentType.class)
public class MixinLOTREnchantmentType {
@Inject(method = "canApply", at = @At("HEAD"), cancellable = true, remap = false)
public void onCanApply(ItemStack itemstack, boolean considering, CallbackInfoReturnable<Boolean> cir) {
Item item = itemstack.getItem();
if (LOTREnchantmentExclusions.exclusions.contains(item)) {
cir.setReturnValue(false);
}
}
}

@ -8,8 +8,8 @@ import lotr.common.LOTRMod;
import com.zivilon.cinder_loe.CinderLoE; import com.zivilon.cinder_loe.CinderLoE;
public class DurableItemCrafter { public class DurableItemCrafter {
public static final List<Item> customItems = new ArrayList<>(); public static List<Item> customItems = new ArrayList<>();
public static final List<Item> exceptionItems = new ArrayList<>(); public static List<Item> exceptionItems = new ArrayList<>();
static { static {
customItems.add(LOTRMod.chisel); customItems.add(LOTRMod.chisel);
customItems.add(CinderLoE.toxicCore); customItems.add(CinderLoE.toxicCore);

@ -0,0 +1,15 @@
package com.zivilon.cinder_loe.util;
import net.minecraft.item.Item;
import java.util.ArrayList;
import java.util.List;
import lotr.common.LOTRMod;
import com.zivilon.cinder_loe.CinderLoE;
public class LOTREnchantmentExclusions {
public static List<Item> exclusions = new ArrayList<>();
static {
exclusions.add(CinderLoE.firstAgeGlaive);
}
}

@ -31,7 +31,8 @@
"MixinLOTRWorldGenMumakSkeleton", "MixinLOTRWorldGenMumakSkeleton",
"MixinRendererLivingEntity", "MixinRendererLivingEntity",
"MixinRenderItem", "MixinRenderItem",
"MixinSlotCrafting" "MixinSlotCrafting",
"MixinLOTREnchantmentType"
], ],
"client": [] "client": []
} }

Loading…
Cancel
Save