Updated warp armor for 1.10

This commit is contained in:
LemADEC 2017-11-17 10:15:25 +01:00
parent dc10d7af4d
commit c6951e3bdf
9 changed files with 38 additions and 14 deletions

View file

@ -268,7 +268,7 @@ public class BreathingManager {
final ItemStack itemStackChestplate = entityLivingBase.getItemStackFromSlot(EntityEquipmentSlot.CHEST);
if (itemStackChestplate != null) {
final Item itemChestplate = itemStackChestplate.getItem();
if (itemChestplate == WarpDrive.itemWarpArmor[1]) {
if (itemChestplate == WarpDrive.itemWarpArmor[2]) {
return electrolyseIceToAir(entityLivingBase);
}
}
@ -311,7 +311,7 @@ public class BreathingManager {
final ItemStack itemStackChestplate = entityPlayer.getItemStackFromSlot(EntityEquipmentSlot.CHEST);
if (itemStackChestplate != null) {
final Item itemChestplate = itemStackChestplate.getItem();
if (itemChestplate == WarpDrive.itemWarpArmor[1]) {
if (itemChestplate == WarpDrive.itemWarpArmor[2]) {
canElectrolyse = true;
}
}

View file

@ -413,10 +413,10 @@ public class WarpDrive implements LoadingCallback {
// warp armor
itemWarpArmor = new ItemArmor[4];
itemWarpArmor[0] = new ItemWarpArmor("itemWarpArmor_" + ItemWarpArmor.suffixes[0], armorMaterial, 3, EntityEquipmentSlot.HEAD);
itemWarpArmor[0] = new ItemWarpArmor("itemWarpArmor_" + ItemWarpArmor.suffixes[1], armorMaterial, 3, EntityEquipmentSlot.CHEST);
itemWarpArmor[0] = new ItemWarpArmor("itemWarpArmor_" + ItemWarpArmor.suffixes[2], armorMaterial, 3, EntityEquipmentSlot.LEGS);
itemWarpArmor[0] = new ItemWarpArmor("itemWarpArmor_" + ItemWarpArmor.suffixes[3], armorMaterial, 3, EntityEquipmentSlot.FEET);
itemWarpArmor[EntityEquipmentSlot.HEAD.getIndex() ] = new ItemWarpArmor("itemWarpArmor_" + ItemWarpArmor.suffixes[EntityEquipmentSlot.HEAD.getIndex() ], armorMaterial, 3, EntityEquipmentSlot.HEAD );
itemWarpArmor[EntityEquipmentSlot.CHEST.getIndex()] = new ItemWarpArmor("itemWarpArmor_" + ItemWarpArmor.suffixes[EntityEquipmentSlot.CHEST.getIndex()], armorMaterial, 3, EntityEquipmentSlot.CHEST);
itemWarpArmor[EntityEquipmentSlot.LEGS.getIndex() ] = new ItemWarpArmor("itemWarpArmor_" + ItemWarpArmor.suffixes[EntityEquipmentSlot.LEGS.getIndex() ], armorMaterial, 3, EntityEquipmentSlot.LEGS );
itemWarpArmor[EntityEquipmentSlot.FEET.getIndex() ] = new ItemWarpArmor("itemWarpArmor_" + ItemWarpArmor.suffixes[EntityEquipmentSlot.FEET.getIndex() ], armorMaterial, 3, EntityEquipmentSlot.FEET );
itemAirTanks = new ItemAirTank[4];
for (int index = 0; index < 4; index++) {
@ -657,7 +657,7 @@ public class WarpDrive implements LoadingCallback {
break;
case "WarpDrive:helmet":
case "WarpDrive:itemHelmet":
mapping.remap(itemWarpArmor[0]);
mapping.remap(itemWarpArmor[3]);
break;
case "WarpDrive:iridiumBlock":
mapping.remap(Item.getItemFromBlock(blockIridium));

View file

@ -18,7 +18,6 @@ import cr0s.warpdrive.item.ItemUpgrade;
import java.util.List;
import net.minecraft.block.BlockColored;
import net.minecraft.item.EnumDyeColor;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraft.init.Blocks;
@ -1487,14 +1486,14 @@ public class Recipes {
'i', Items.IRON_INGOT));
// Warp helmet
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.itemWarpArmor[0]), false, "ggg", "gig", "wcw",
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.itemWarpArmor[3]), false, "ggg", "gig", "wcw",
'i', Items.IRON_HELMET,
'w', Blocks.WOOL,
'g', "blockGlass",
'c', ItemComponent.getItemStack(EnumComponentType.AIR_CANISTER)));
// Warp chestplate
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.itemWarpArmor[1]), false, "gcg", "wiw", "GmG",
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.itemWarpArmor[2]), false, "gcg", "wiw", "GmG",
'i', Items.IRON_CHESTPLATE,
'w', Blocks.WOOL,
'g', "blockHull3_glass",
@ -1503,14 +1502,14 @@ public class Recipes {
'c', ItemComponent.getItemStack(EnumComponentType.AIR_CANISTER)));
// Warp Leggings
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.itemWarpArmor[2]), false, "gig", "m m", "w w",
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.itemWarpArmor[1]), false, "gig", "m m", "w w",
'i', Items.IRON_LEGGINGS,
'm', ItemComponent.getItemStack(EnumComponentType.MOTOR),
'w', Blocks.WOOL,
'g', "blockHull2_glass"));
// Warp boots
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.itemWarpArmor[3]), false, "wiw", "r r", " ",
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(WarpDrive.itemWarpArmor[0]), false, "wiw", "r r", " ",
'i', Items.IRON_BOOTS,
'w', Blocks.WOOL,
'r', rubberOrLeather));

View file

@ -14,7 +14,8 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class ItemWarpArmor extends ItemArmor implements IBreathingHelmet {
public static final String[] suffixes = { "helmet", "chestplate", "leggings", "boots" };
public static final String[] suffixes = { "boots", "leggings", "chestplate", "helmet" };
public ItemWarpArmor(final String registryName, ArmorMaterial armorMaterial, int renderIndex, EntityEquipmentSlot entityEquipmentSlot) {
super(armorMaterial, renderIndex, entityEquipmentSlot);

View file

@ -567,7 +567,7 @@ public class WorldGenSmallShip extends WorldGenerator {
for (int idx = 0; idx < countMobs; idx++) {
EntityVillager entityVillager = new EntityVillager(world, 0);
entityVillager.setLocationAndAngles(x + 0.5D, y, z + 0.5D, 0.0F, 0.0F);
entityVillager.setItemStackToSlot(EntityEquipmentSlot.HEAD, new ItemStack(WarpDrive.itemWarpArmor[0], 1, 1));
entityVillager.setItemStackToSlot(EntityEquipmentSlot.HEAD, new ItemStack(WarpDrive.itemWarpArmor[3], 1, 1));
world.spawnEntityInWorld(entityVillager);
}
} else if (world.rand.nextBoolean()) {// Zombies

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "warpdrive:items/warp_armor_boots"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "warpdrive:items/warp_armor_chestplate"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "warpdrive:items/warp_armor_helmet"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "warpdrive:items/warp_armor_leggings"
}
}