Skip to content

Commit

Permalink
Remove default enchantments
Browse files Browse the repository at this point in the history
  • Loading branch information
IcarussOne committed Jan 13, 2025
1 parent b895da0 commit 8127a34
Show file tree
Hide file tree
Showing 31 changed files with 20 additions and 242 deletions.
27 changes: 0 additions & 27 deletions src/main/java/twilightforest/item/ItemTFIronwoodArmor.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package twilightforest.item;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.init.Enchantments;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import twilightforest.TwilightForestMod;
import twilightforest.client.ModelRegisterCallback;

Expand All @@ -25,28 +22,4 @@ public String getArmorTexture(ItemStack itemstack, Entity entity, EntityEquipmen
return TwilightForestMod.ARMOR_DIR + "ironwood_1.png";
}
}

@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
if (isInCreativeTab(tab)) {
ItemStack istack = new ItemStack(this);
switch (this.armorType) {
case HEAD:
istack.addEnchantment(Enchantments.AQUA_AFFINITY, 1);
break;
case CHEST:
istack.addEnchantment(Enchantments.PROTECTION, 1);
break;
case LEGS:
istack.addEnchantment(Enchantments.PROTECTION, 1);
break;
case FEET:
istack.addEnchantment(Enchantments.FEATHER_FALLING, 1);
break;
default:
break;
}
list.add(istack);
}
}
}
13 changes: 0 additions & 13 deletions src/main/java/twilightforest/item/ItemTFIronwoodAxe.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package twilightforest.item;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Enchantments;
import net.minecraft.item.Item;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import twilightforest.client.ModelRegisterCallback;

public class ItemTFIronwoodAxe extends ItemAxe implements ModelRegisterCallback {
Expand All @@ -14,13 +10,4 @@ protected ItemTFIronwoodAxe(Item.ToolMaterial material) {
super(material, 6F + material.getAttackDamage(), material.getEfficiency() * 0.05f - 3.4f);
this.setCreativeTab(TFItems.creativeTab);
}

@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
if (isInCreativeTab(tab)) {
ItemStack istack = new ItemStack(this);
istack.addEnchantment(Enchantments.FORTUNE, 1);
list.add(istack);
}
}
}
13 changes: 0 additions & 13 deletions src/main/java/twilightforest/item/ItemTFIronwoodPick.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package twilightforest.item;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Enchantments;
import net.minecraft.item.Item;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import twilightforest.client.ModelRegisterCallback;

public class ItemTFIronwoodPick extends ItemPickaxe implements ModelRegisterCallback {
Expand All @@ -14,13 +10,4 @@ protected ItemTFIronwoodPick(Item.ToolMaterial material) {
super(material);
this.setCreativeTab(TFItems.creativeTab);
}

@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
if (isInCreativeTab(tab)) {
ItemStack istack = new ItemStack(this);
istack.addEnchantment(Enchantments.EFFICIENCY, 1);
list.add(istack);
}
}
}
13 changes: 0 additions & 13 deletions src/main/java/twilightforest/item/ItemTFIronwoodShovel.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package twilightforest.item;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Enchantments;
import net.minecraft.item.Item;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import twilightforest.client.ModelRegisterCallback;

public class ItemTFIronwoodShovel extends ItemSpade implements ModelRegisterCallback {
Expand All @@ -14,13 +10,4 @@ public ItemTFIronwoodShovel(Item.ToolMaterial toolMaterial) {
super(toolMaterial);
this.setCreativeTab(TFItems.creativeTab);
}

@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
if (isInCreativeTab(tab)) {
ItemStack istack = new ItemStack(this);
istack.addEnchantment(Enchantments.UNBREAKING, 1);
list.add(istack);
}
}
}
13 changes: 0 additions & 13 deletions src/main/java/twilightforest/item/ItemTFIronwoodSword.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package twilightforest.item;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Enchantments;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.util.NonNullList;
import twilightforest.client.ModelRegisterCallback;

public class ItemTFIronwoodSword extends ItemSword implements ModelRegisterCallback {
Expand All @@ -14,13 +10,4 @@ public ItemTFIronwoodSword(Item.ToolMaterial material) {
super(material);
this.setCreativeTab(TFItems.creativeTab);
}

@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
if (isInCreativeTab(tab)) {
ItemStack istack = new ItemStack(this);
istack.addEnchantment(Enchantments.KNOCKBACK, 1);
list.add(istack);
}
}
}
27 changes: 0 additions & 27 deletions src/main/java/twilightforest/item/ItemTFSteeleafArmor.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package twilightforest.item;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.init.Enchantments;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import twilightforest.TwilightForestMod;
import twilightforest.client.ModelRegisterCallback;

Expand All @@ -26,28 +23,4 @@ public String getArmorTexture(ItemStack itemstack, Entity entity, EntityEquipmen
return TwilightForestMod.ARMOR_DIR + "steeleaf_1.png";
}
}

@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
if (isInCreativeTab(tab)) {
ItemStack istack = new ItemStack(this);
switch (this.armorType) {
case HEAD:
istack.addEnchantment(Enchantments.PROJECTILE_PROTECTION, 2);
break;
case CHEST:
istack.addEnchantment(Enchantments.BLAST_PROTECTION, 2);
break;
case LEGS:
istack.addEnchantment(Enchantments.FIRE_PROTECTION, 2);
break;
case FEET:
istack.addEnchantment(Enchantments.FEATHER_FALLING, 2);
break;
default:
break;
}
list.add(istack);
}
}
}
13 changes: 0 additions & 13 deletions src/main/java/twilightforest/item/ItemTFSteeleafAxe.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package twilightforest.item;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Enchantments;
import net.minecraft.item.Item;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import twilightforest.client.ModelRegisterCallback;

public class ItemTFSteeleafAxe extends ItemAxe implements ModelRegisterCallback {
Expand All @@ -14,13 +10,4 @@ protected ItemTFSteeleafAxe(Item.ToolMaterial material) {
super(material, 6F + material.getAttackDamage(), material.getEfficiency() * 0.05f - 3.4f);
this.setCreativeTab(TFItems.creativeTab);
}

@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
if (isInCreativeTab(tab)) {
ItemStack istack = new ItemStack(this);
istack.addEnchantment(Enchantments.EFFICIENCY, 2);
list.add(istack);
}
}
}
13 changes: 0 additions & 13 deletions src/main/java/twilightforest/item/ItemTFSteeleafPick.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package twilightforest.item;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Enchantments;
import net.minecraft.item.Item;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import twilightforest.client.ModelRegisterCallback;

public class ItemTFSteeleafPick extends ItemPickaxe implements ModelRegisterCallback {
Expand All @@ -14,13 +10,4 @@ protected ItemTFSteeleafPick(Item.ToolMaterial material) {
super(material);
this.setCreativeTab(TFItems.creativeTab);
}

@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
if (isInCreativeTab(tab)) {
ItemStack istack = new ItemStack(this);
istack.addEnchantment(Enchantments.FORTUNE, 2);
list.add(istack);
}
}
}
13 changes: 0 additions & 13 deletions src/main/java/twilightforest/item/ItemTFSteeleafShovel.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package twilightforest.item;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Enchantments;
import net.minecraft.item.Item;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import twilightforest.client.ModelRegisterCallback;

public class ItemTFSteeleafShovel extends ItemSpade implements ModelRegisterCallback {
Expand All @@ -14,13 +10,4 @@ public ItemTFSteeleafShovel(Item.ToolMaterial toolMaterial) {
super(toolMaterial);
this.setCreativeTab(TFItems.creativeTab);
}

@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
if (isInCreativeTab(tab)) {
ItemStack istack = new ItemStack(this);
istack.addEnchantment(Enchantments.EFFICIENCY, 2);
list.add(istack);
}
}
}
13 changes: 0 additions & 13 deletions src/main/java/twilightforest/item/ItemTFSteeleafSword.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package twilightforest.item;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Enchantments;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.util.NonNullList;
import twilightforest.client.ModelRegisterCallback;

public class ItemTFSteeleafSword extends ItemSword implements ModelRegisterCallback {
Expand All @@ -14,13 +10,4 @@ public ItemTFSteeleafSword(Item.ToolMaterial material) {
super(material);
this.setCreativeTab(TFItems.creativeTab);
}

@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
if (isInCreativeTab(tab)) {
ItemStack istack = new ItemStack(this);
istack.addEnchantment(Enchantments.LOOTING, 2);
list.add(istack);
}
}
}
24 changes: 0 additions & 24 deletions src/main/java/twilightforest/item/ItemTFYetiArmor.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@

import net.minecraft.client.resources.I18n;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Enchantments;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
Expand All @@ -36,27 +33,6 @@ public String getArmorTexture(ItemStack itemstack, Entity entity, EntityEquipmen
}
}

@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
if (isInCreativeTab(tab)) {
ItemStack istack = new ItemStack(this);
switch (this.armorType) {
case HEAD:
case CHEST:
case LEGS:
istack.addEnchantment(Enchantments.PROTECTION, 2);
break;
case FEET:
istack.addEnchantment(Enchantments.PROTECTION, 2);
istack.addEnchantment(Enchantments.FEATHER_FALLING, 4);
break;
default:
break;
}
list.add(istack);
}
}

@SideOnly(Side.CLIENT)
@Override
public net.minecraft.client.model.ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, EntityEquipmentSlot armorSlot, net.minecraft.client.model.ModelBiped _default) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"result": {
"nbt": "{ench:[{lvl:1s,id:35s}]}",
"item": "twilightforest:ironwood_axe",
"type": "minecraft:item_nbt"
"item": "twilightforest:ironwood_axe"
},
"group": "ironwood_tool",
"pattern": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"result": {
"nbt": "{ench:[{lvl:1s,id:2s}]}",
"item": "twilightforest:ironwood_boots",
"type": "minecraft:item_nbt"
"item": "twilightforest:ironwood_boots"
},
"group": "ironwood_armor",
"pattern": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"result": {
"nbt": "{ench:[{lvl:1s,id:0s}]}",
"item": "twilightforest:ironwood_chestplate",
"type": "minecraft:item_nbt"
"item": "twilightforest:ironwood_chestplate"
},
"group": "ironwood_armor",
"pattern": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"result": {
"nbt": "{ench:[{lvl:1s,id:6s}]}",
"item": "twilightforest:ironwood_helmet",
"type": "minecraft:item_nbt"
"item": "twilightforest:ironwood_helmet"
},
"group": "ironwood_armor",
"pattern": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"result": {
"nbt": "{ench:[{lvl:1s,id:0s}]}",
"item": "twilightforest:ironwood_leggings",
"type": "minecraft:item_nbt"
"item": "twilightforest:ironwood_leggings"
},
"group": "ironwood_armor",
"pattern": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"result": {
"nbt": "{ench:[{lvl:1s,id:32s}]}",
"item": "twilightforest:ironwood_pickaxe",
"type": "minecraft:item_nbt"
"item": "twilightforest:ironwood_pickaxe"
},
"group": "ironwood_tool",
"pattern": [
Expand Down
Loading

0 comments on commit 8127a34

Please sign in to comment.