Armored Jetpack…done. Also made Charcoal Blocks fuel sources
This commit is contained in:
parent
03ab491ce2
commit
28459b134e
5 changed files with 53 additions and 3 deletions
|
@ -200,7 +200,7 @@ public class ModelCustomArmor extends ModelBiped
|
|||
public static enum ArmorModel
|
||||
{
|
||||
JETPACK(1, MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png")),
|
||||
ARMOREDJETPACK(1, MekanismUtils.getResource(ResourceType.RENDER, "ArmoredJetpack.png")),
|
||||
ARMOREDJETPACK(1, MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png")),
|
||||
SCUBATANK(1, MekanismUtils.getResource(ResourceType.RENDER, "ScubaSet.png")),
|
||||
GASMASK(0, MekanismUtils.getResource(ResourceType.RENDER, "ScubaSet.png")),
|
||||
FREERUNNERS(3, MekanismUtils.getResource(ResourceType.RENDER, "FreeRunners.png"));
|
||||
|
|
|
@ -338,7 +338,7 @@ public class ItemRenderingHandler implements IItemRenderer
|
|||
GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(90, 0.0F, -1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.2F, -0.35F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ArmoredJetpack.png"));
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png"));
|
||||
armoredJetpack.render(0.0625F);
|
||||
}
|
||||
else if(item.getItem() instanceof ItemGasMask)
|
||||
|
|
|
@ -139,6 +139,7 @@ import rebelkeithy.mods.metallurgy.api.IOreInfo;
|
|||
import rebelkeithy.mods.metallurgy.api.MetallurgyAPI;
|
||||
import codechicken.multipart.handler.MultipartProxy;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.IFuelHandler;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
|
@ -754,6 +755,20 @@ public class Mekanism
|
|||
InfuseRegistry.registerInfuseObject(new ItemStack(CompressedRedstone), new InfuseObject(InfuseRegistry.get("REDSTONE"), 100));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(Block.mushroomRed), new InfuseObject(InfuseRegistry.get("FUNGI"), 10));
|
||||
InfuseRegistry.registerInfuseObject(new ItemStack(Block.mushroomBrown), new InfuseObject(InfuseRegistry.get("FUNGI"), 10));
|
||||
|
||||
//Fuels
|
||||
GameRegistry.registerFuelHandler(new IFuelHandler() {
|
||||
@Override
|
||||
public int getBurnTime(ItemStack fuel)
|
||||
{
|
||||
if(fuel.isItemEqual(new ItemStack(BasicBlock, 1, 3)))
|
||||
{
|
||||
return 1800;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -20,11 +20,13 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraftforge.common.EnumHelper;
|
||||
import net.minecraftforge.common.ISpecialArmor;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemJetpack extends ItemArmor implements IGasItem
|
||||
public class ItemJetpack extends ItemArmor implements IGasItem, ISpecialArmor
|
||||
{
|
||||
public int MAX_GAS = 24000;
|
||||
public int TRANSFER_RATE = 16;
|
||||
|
@ -270,4 +272,37 @@ public class ItemJetpack extends ItemArmor implements IGasItem
|
|||
return color + MekanismUtils.localize(unlocalized);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot)
|
||||
{
|
||||
if(this == Mekanism.Jetpack)
|
||||
{
|
||||
return new ArmorProperties(0, 0, 0);
|
||||
}
|
||||
else if(this == Mekanism.ArmoredJetpack)
|
||||
{
|
||||
return new ArmorProperties(1, 0.8, 5);
|
||||
}
|
||||
|
||||
return new ArmorProperties(0, 0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot)
|
||||
{
|
||||
if(armor.getItem() == Mekanism.Jetpack)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if(armor.getItem() == Mekanism.ArmoredJetpack)
|
||||
{
|
||||
return 12;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {}
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in a new issue