Work on items, added AT
This commit is contained in:
parent
37f5c35892
commit
25bf0013ce
6 changed files with 49 additions and 42 deletions
|
@ -48,6 +48,11 @@ repositories {
|
|||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes 'FMLAT': 'gregtech_at.cfg'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "codechicken:CodeChickenCore:${mc_ver}-${ccc_version}:dev"
|
||||
|
|
|
@ -4,14 +4,14 @@ import gregtechmod.api.GregTech_API;
|
|||
import gregtechmod.api.enums.GT_ToolDictNames;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class GT_Saw_Item extends GT_Tool_Item {
|
||||
public GT_Saw_Item(int aID, String aName, int aMaxDamage, int aEntityDamage, int aToolQuality, float aToolStrength, int aEnergyConsumptionPerBlockBreak, int aDisChargedGTID) {
|
||||
super(aID, aName, "For sawing Logs into Planks", aMaxDamage, aEntityDamage, -1, aDisChargedGTID, aToolQuality, aToolStrength);
|
||||
public GT_Saw_Item(String aName, int aMaxDamage, int aEntityDamage, int aToolQuality, float aToolStrength, int aEnergyConsumptionPerBlockBreak, int aDisChargedGTID) {
|
||||
super(aName, "For sawing Logs into Planks", aMaxDamage, aEntityDamage, -1, aDisChargedGTID, aToolQuality, aToolStrength);
|
||||
//GregTech_API.registerSaw(new ItemStack(this, 1, GregTech_API.ITEM_WILDCARD_DAMAGE));
|
||||
GT_OreDictUnificator.registerOre(GT_ToolDictNames.craftingToolSaw, new ItemStack(this, 1, GregTech_API.ITEM_WILDCARD_DAMAGE));
|
||||
addToBlockList(GT_ModHandler.getIC2Item("rubberLeaves", 1));
|
||||
|
@ -23,10 +23,10 @@ public class GT_Saw_Item extends GT_Tool_Item {
|
|||
addToOreDictList("treeLeaves");
|
||||
addToOreDictList("logRubber");
|
||||
setPrimaryToolClass("axe");
|
||||
addToBlockList(Block.sponge);
|
||||
addToBlockList(Block.hay);
|
||||
addToBlockList(Block.tnt);
|
||||
addToBlockList(Block.bed);
|
||||
addToBlockList(Blocks.sponge);
|
||||
addToBlockList(Blocks.hay_block);
|
||||
addToBlockList(Blocks.tnt);
|
||||
addToBlockList(Blocks.bed);
|
||||
setElectricConsumptionPerBrokenBlock(aEnergyConsumptionPerBlockBreak);
|
||||
setUsageAmounts(1, 3, 1);
|
||||
}
|
||||
|
|
|
@ -4,11 +4,8 @@ import gregtechmod.api.util.GT_OreDictUnificator;
|
|||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.item.EnumToolMaterial;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
|
@ -17,8 +14,8 @@ public class GT_Vanilla_Sword extends ItemSword {
|
|||
protected final String mMaterialName;
|
||||
protected final float efficiencyOnProperMaterial, damageVsEntity;
|
||||
|
||||
public GT_Vanilla_Sword(int aID, String aUnlocalizedName, String aMaterialName, int aHarvestLevel, int aEnchantability, int aMaxDamage, float aEfficiency, float aEntityDamage) {
|
||||
super(aID, EnumToolMaterial.STONE);
|
||||
public GT_Vanilla_Sword(String aUnlocalizedName, String aMaterialName, int aHarvestLevel, int aEnchantability, int aMaxDamage, float aEfficiency, float aEntityDamage) {
|
||||
super(ToolMaterial.STONE);
|
||||
mHarvestLevel = aHarvestLevel;
|
||||
mEnchantability = aEnchantability;
|
||||
efficiencyOnProperMaterial = aEfficiency;
|
||||
|
@ -29,11 +26,11 @@ public class GT_Vanilla_Sword extends ItemSword {
|
|||
setTextureName(aUnlocalizedName);
|
||||
setMaxDamage(aMaxDamage);
|
||||
setMaxStackSize(1);
|
||||
MinecraftForge.setToolClass(this, "sword", mHarvestLevel);
|
||||
setHarvestLevel("sword", mHarvestLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float func_82803_g() {
|
||||
public float func_150931_i() {
|
||||
return damageVsEntity - 4.0F;
|
||||
}
|
||||
|
||||
|
@ -49,6 +46,7 @@ public class GT_Vanilla_Sword extends ItemSword {
|
|||
return GT_OreDictUnificator.isItemStackInstanceOf(aStack2, "ingot" + mMaterialName) || GT_OreDictUnificator.isItemStackInstanceOf(aStack2, "gem" + mMaterialName);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public Multimap getItemAttributeModifiers() {
|
||||
Multimap multimap = HashMultimap.create();
|
||||
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", (double)this.damageVsEntity, 0));
|
||||
|
|
|
@ -3,9 +3,11 @@ package gregtechmod.common.items;
|
|||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.EnumToolMaterial;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemTool;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -13,8 +15,8 @@ public class GT_Vanilla_Tool extends ItemTool {
|
|||
protected final int mHarvestLevel, mEnchantability;
|
||||
protected final String mMaterialName;
|
||||
|
||||
public GT_Vanilla_Tool(int aID, String aUnlocalizedName, String aMaterialName, int aHarvestLevel, int aEnchantability, int aMaxDamage, float aEfficiency, float aEntityDamage, Block[] aBlockList) {
|
||||
super(aID, 0.0F, EnumToolMaterial.STONE, aBlockList);
|
||||
public GT_Vanilla_Tool(int aID, String aUnlocalizedName, String aMaterialName, int aHarvestLevel, int aEnchantability, int aMaxDamage, float aEfficiency, float aEntityDamage, Set<Block> aBlockList) {
|
||||
super(0.0F, ToolMaterial.STONE, aBlockList);
|
||||
mHarvestLevel = aHarvestLevel;
|
||||
mEnchantability = aEnchantability;
|
||||
efficiencyOnProperMaterial = aEfficiency;
|
||||
|
|
|
@ -575,30 +575,30 @@ public class GT_ItemLoader implements Runnable {
|
|||
GregTech_API.sItemList[ 99] = new GT_Spray_Color_Item (GT_LanguageManager.mNameListItem[ 99], 2048, 0, (byte) 3);
|
||||
GregTech_API.sItemList[100] = new GT_Spray_Color_Item (GT_LanguageManager.mNameListItem[100], 2048, 0, (byte) 4);
|
||||
GregTech_API.sItemList[101] = new GT_Spray_Color_Item (GT_LanguageManager.mNameListItem[101], 2048, 0, (byte) 5);
|
||||
// GregTech_API.sItemList[102] = new GT_Spray_Color_Item (GT_Mod.sItemIDs[102], GT_LanguageManager.mNameListItem[102], 2048, 0, (byte) 6);
|
||||
// GregTech_API.sItemList[103] = new GT_Spray_Color_Item (GT_Mod.sItemIDs[103], GT_LanguageManager.mNameListItem[103], 2048, 0, (byte) 7);
|
||||
// GregTech_API.sItemList[104] = new GT_Spray_Color_Item (GT_Mod.sItemIDs[104], GT_LanguageManager.mNameListItem[104], 2048, 0, (byte) 8);
|
||||
// GregTech_API.sItemList[105] = new GT_Spray_Color_Item (GT_Mod.sItemIDs[105], GT_LanguageManager.mNameListItem[105], 2048, 0, (byte) 9);
|
||||
// GregTech_API.sItemList[106] = new GT_Spray_Color_Item (GT_Mod.sItemIDs[106], GT_LanguageManager.mNameListItem[106], 2048, 0, (byte)10);
|
||||
// GregTech_API.sItemList[107] = new GT_Spray_Color_Item (GT_Mod.sItemIDs[107], GT_LanguageManager.mNameListItem[107], 2048, 0, (byte)11);
|
||||
// GregTech_API.sItemList[108] = new GT_Spray_Color_Item (GT_Mod.sItemIDs[108], GT_LanguageManager.mNameListItem[108], 2048, 0, (byte)12);
|
||||
// GregTech_API.sItemList[109] = new GT_Spray_Color_Item (GT_Mod.sItemIDs[109], GT_LanguageManager.mNameListItem[109], 2048, 0, (byte)13);
|
||||
// GregTech_API.sItemList[110] = new GT_Spray_Color_Item (GT_Mod.sItemIDs[110], GT_LanguageManager.mNameListItem[110], 2048, 0, (byte)14);
|
||||
// GregTech_API.sItemList[111] = new GT_Spray_Color_Item (GT_Mod.sItemIDs[111], GT_LanguageManager.mNameListItem[111], 2048, 0, (byte)15);
|
||||
// GregTech_API.sItemList[112] = GregTech_API.constructEmptyElectricToolItem (GT_Mod.sItemIDs[112], GT_LanguageManager.mNameListItem[112], 16, 70);
|
||||
// GregTech_API.sItemList[113] = GregTech_API.constructEmptyElectricToolItem (GT_Mod.sItemIDs[113], GT_LanguageManager.mNameListItem[113], 128, 71);
|
||||
// GregTech_API.sItemList[114] = GregTech_API.constructEmptyElectricToolItem (GT_Mod.sItemIDs[114], GT_LanguageManager.mNameListItem[114], 10, 77);
|
||||
// GregTech_API.sItemList[115] = new GT_Saw_Item (GT_Mod.sItemIDs[115], GT_LanguageManager.mNameListItem[115], 128, 2, 2, 3.0F, 0, -1);
|
||||
// GregTech_API.sItemList[116] = new GT_Saw_Item (GT_Mod.sItemIDs[116], GT_LanguageManager.mNameListItem[116], 256, 3, 2, 4.0F, 0, -1);
|
||||
// GregTech_API.sItemList[117] = new GT_Saw_Item (GT_Mod.sItemIDs[117], GT_LanguageManager.mNameListItem[117], 1280, 4, 3, 6.0F, 0, -1);
|
||||
// GregTech_API.sItemList[118] = new GT_Saw_Item (GT_Mod.sItemIDs[118], GT_LanguageManager.mNameListItem[118], 5120, 5, 4, 8.0F, 0, -1);
|
||||
// GregTech_API.sItemList[119] = GregTech_API.constructElectricSawItem (GT_Mod.sItemIDs[119], GT_LanguageManager.mNameListItem[119], 16, 9, 3,10.0F, 100, 121).setCraftingSound(GregTech_API.sSoundList.get(104)).setBreakingSound(GregTech_API.sSoundList.get(104)).setBlockBreakSound(GregTech_API.sSoundList.get(104)).setEntityHitSound(GregTech_API.sSoundList.get(105));
|
||||
// GregTech_API.sItemList[120] = GregTech_API.constructElectricSawItem (GT_Mod.sItemIDs[120], GT_LanguageManager.mNameListItem[120], 128,12, 4,12.0F, 200, 122).setCraftingSound(GregTech_API.sSoundList.get(104)).setBreakingSound(GregTech_API.sSoundList.get(104)).setBlockBreakSound(GregTech_API.sSoundList.get(104)).setEntityHitSound(GregTech_API.sSoundList.get(105));
|
||||
// GregTech_API.sItemList[121] = GregTech_API.constructEmptyElectricToolItem (GT_Mod.sItemIDs[121], GT_LanguageManager.mNameListItem[121], 10, 119);
|
||||
// GregTech_API.sItemList[122] = GregTech_API.constructEmptyElectricToolItem (GT_Mod.sItemIDs[122], GT_LanguageManager.mNameListItem[122], 10, 120);
|
||||
// GregTech_API.sItemList[123] = GregTech_API.constructElectricDrillItem (GT_Mod.sItemIDs[123], GT_LanguageManager.mNameListItem[123], 128, 8, 5,35.0F, 250, -1).addToMaterialList(Material.anvil).addToMaterialList(Material.iron).addToMaterialList(Material.rock).setPrimaryToolClass("pickaxe").setSecondaryToolClass("shovel").setBlockBreakSound(GregTech_API.sSoundList.get(106)).setEntityHitSound(GregTech_API.sSoundList.get(106));
|
||||
// GregTech_API.sItemList[124] = new GT_Vanilla_Sword (GT_Mod.sItemIDs[124], GT_LanguageManager.mNameListItem[124], "Flint" , 1, 5, GT_Mod.sNerfedStoneTools?128:256 , 4.0F, 1.0F);
|
||||
// GregTech_API.sItemList[125] = new GT_Vanilla_Pickaxe (GT_Mod.sItemIDs[125], GT_LanguageManager.mNameListItem[125], "Flint" , 1, 5, GT_Mod.sNerfedStoneTools?128:256 , 4.0F, 1.0F);
|
||||
GregTech_API.sItemList[102] = new GT_Spray_Color_Item (GT_LanguageManager.mNameListItem[102], 2048, 0, (byte) 6);
|
||||
GregTech_API.sItemList[103] = new GT_Spray_Color_Item (GT_LanguageManager.mNameListItem[103], 2048, 0, (byte) 7);
|
||||
GregTech_API.sItemList[104] = new GT_Spray_Color_Item (GT_LanguageManager.mNameListItem[104], 2048, 0, (byte) 8);
|
||||
GregTech_API.sItemList[105] = new GT_Spray_Color_Item (GT_LanguageManager.mNameListItem[105], 2048, 0, (byte) 9);
|
||||
GregTech_API.sItemList[106] = new GT_Spray_Color_Item (GT_LanguageManager.mNameListItem[106], 2048, 0, (byte)10);
|
||||
GregTech_API.sItemList[107] = new GT_Spray_Color_Item (GT_LanguageManager.mNameListItem[107], 2048, 0, (byte)11);
|
||||
GregTech_API.sItemList[108] = new GT_Spray_Color_Item (GT_LanguageManager.mNameListItem[108], 2048, 0, (byte)12);
|
||||
GregTech_API.sItemList[109] = new GT_Spray_Color_Item (GT_LanguageManager.mNameListItem[109], 2048, 0, (byte)13);
|
||||
GregTech_API.sItemList[110] = new GT_Spray_Color_Item (GT_LanguageManager.mNameListItem[110], 2048, 0, (byte)14);
|
||||
GregTech_API.sItemList[111] = new GT_Spray_Color_Item (GT_LanguageManager.mNameListItem[111], 2048, 0, (byte)15);
|
||||
GregTech_API.sItemList[112] = GregTech_API.constructEmptyElectricToolItem (GT_LanguageManager.mNameListItem[112], 16, 70);
|
||||
GregTech_API.sItemList[113] = GregTech_API.constructEmptyElectricToolItem (GT_LanguageManager.mNameListItem[113], 128, 71);
|
||||
GregTech_API.sItemList[114] = GregTech_API.constructEmptyElectricToolItem (GT_LanguageManager.mNameListItem[114], 10, 77);
|
||||
GregTech_API.sItemList[115] = new GT_Saw_Item (GT_LanguageManager.mNameListItem[115], 128, 2, 2, 3.0F, 0, -1);
|
||||
GregTech_API.sItemList[116] = new GT_Saw_Item (GT_LanguageManager.mNameListItem[116], 256, 3, 2, 4.0F, 0, -1);
|
||||
GregTech_API.sItemList[117] = new GT_Saw_Item (GT_LanguageManager.mNameListItem[117], 1280, 4, 3, 6.0F, 0, -1);
|
||||
GregTech_API.sItemList[118] = new GT_Saw_Item (GT_LanguageManager.mNameListItem[118], 5120, 5, 4, 8.0F, 0, -1);
|
||||
GregTech_API.sItemList[119] = GregTech_API.constructElectricSawItem (GT_LanguageManager.mNameListItem[119], 16, 9, 3,10.0F, 100, 121).setCraftingSound(GregTech_API.sSoundList.get(104)).setBreakingSound(GregTech_API.sSoundList.get(104)).setBlockBreakSound(GregTech_API.sSoundList.get(104)).setEntityHitSound(GregTech_API.sSoundList.get(105));
|
||||
GregTech_API.sItemList[120] = GregTech_API.constructElectricSawItem (GT_LanguageManager.mNameListItem[120], 128,12, 4,12.0F, 200, 122).setCraftingSound(GregTech_API.sSoundList.get(104)).setBreakingSound(GregTech_API.sSoundList.get(104)).setBlockBreakSound(GregTech_API.sSoundList.get(104)).setEntityHitSound(GregTech_API.sSoundList.get(105));
|
||||
GregTech_API.sItemList[121] = GregTech_API.constructEmptyElectricToolItem (GT_LanguageManager.mNameListItem[121], 10, 119);
|
||||
GregTech_API.sItemList[122] = GregTech_API.constructEmptyElectricToolItem (GT_LanguageManager.mNameListItem[122], 10, 120);
|
||||
GregTech_API.sItemList[123] = GregTech_API.constructElectricDrillItem (GT_LanguageManager.mNameListItem[123], 128, 8, 5,35.0F, 250, -1).addToMaterialList(Material.anvil).addToMaterialList(Material.iron).addToMaterialList(Material.rock).setPrimaryToolClass("pickaxe").setSecondaryToolClass("shovel").setBlockBreakSound(GregTech_API.sSoundList.get(106)).setEntityHitSound(GregTech_API.sSoundList.get(106));
|
||||
GregTech_API.sItemList[124] = new GT_Vanilla_Sword (GT_LanguageManager.mNameListItem[124], "Flint" , 1, 5, GT_Mod.sNerfedStoneTools ? 128 : 256 , 4.0F, 1.0F);
|
||||
GregTech_API.sItemList[125] = new GT_Vanilla_Pickaxe (GT_LanguageManager.mNameListItem[125], "Flint" , 1, 5, GT_Mod.sNerfedStoneTools?128:256 , 4.0F, 1.0F);
|
||||
// GregTech_API.sItemList[126] = new GT_Vanilla_Shovel (GT_Mod.sItemIDs[126], GT_LanguageManager.mNameListItem[126], "Flint" , 1, 5, GT_Mod.sNerfedStoneTools?128:256 , 4.0F, 1.0F);
|
||||
// GregTech_API.sItemList[127] = new GT_Vanilla_Axe (GT_Mod.sItemIDs[127], GT_LanguageManager.mNameListItem[127], "Flint" , 1, 5, GT_Mod.sNerfedStoneTools?128:256 , 4.0F, 1.0F);
|
||||
// GregTech_API.sItemList[128] = new GT_Vanilla_Hoe (GT_Mod.sItemIDs[128], GT_LanguageManager.mNameListItem[128], "Flint" , 1, 5, GT_Mod.sNerfedStoneTools?128:256 , 4.0F, 1.0F);
|
||||
|
|
2
src/main/resources/META-INF/gregtech_at.cfg
Normal file
2
src/main/resources/META-INF/gregtech_at.cfg
Normal file
|
@ -0,0 +1,2 @@
|
|||
# GregTech Access Transformers
|
||||
protected net.minecraft.item.ItemTool field_77865_bY
|
Loading…
Reference in a new issue