mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
More jetpacks
This commit is contained in:
parent
96ae5aac4c
commit
0b7c14cb79
@ -1146,6 +1146,11 @@ item.schrabidium_axe.name=Schrabidiumaxt
|
||||
item.schrabidium_shovel.name=Schrabidiumschaufel
|
||||
item.schrabidium_hoe.name=Schrabidiumfeldhacke
|
||||
|
||||
item.jetpack_boost.name=Boosterrucksack
|
||||
item.jetpack_fly.name=Raketenrucksack
|
||||
item.jetpack_break.name=Bremsrucksack
|
||||
item.jetpack_vector.name=Schubvektorgesteuerter Raketenrucksack
|
||||
|
||||
item.chainsaw.name=Kettensäge
|
||||
item.crowbar.name=Mk.V Kistenöffnungsapparat "Brechstange"
|
||||
|
||||
|
||||
@ -1149,6 +1149,11 @@ item.schrabidium_axe.name=Schrabidium Axe
|
||||
item.schrabidium_shovel.name=Schrabidium Shovel
|
||||
item.schrabidium_hoe.name=Schrabidium Hoe
|
||||
|
||||
item.jetpack_boost.name=Boostpack
|
||||
item.jetpack_fly.name=Jetpack
|
||||
item.jetpack_break.name=Breakpack
|
||||
item.jetpack_vector.name=Vectored Jetpack
|
||||
|
||||
item.chainsaw.name=Chainsaw
|
||||
item.crowbar.name=Mk.V Crate Opening Device "Crowbar"
|
||||
|
||||
|
||||
BIN
assets/hbm/textures/items/jetpack_vector.png
Normal file
BIN
assets/hbm/textures/items/jetpack_vector.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 232 B |
|
Before Width: | Height: | Size: 248 B After Width: | Height: | Size: 248 B |
BIN
assets/hbm/textures/models/JetPackGreen.png
Normal file
BIN
assets/hbm/textures/models/JetPackGreen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 608 B |
@ -45,11 +45,11 @@ public class EntityNukeExplosionMK4 extends Entity {
|
||||
|
||||
if(explosion.getStoredSize() < count / length) {
|
||||
//if(!worldObj.isRemote)
|
||||
MainRegistry.logger.info(explosion.getStoredSize() + " / " + count / length);
|
||||
//MainRegistry.logger.info(explosion.getStoredSize() + " / " + count / length);
|
||||
explosion.collectTip(speed * 10);
|
||||
} else if(explosion.getProgress() < count / length) {
|
||||
//if(!worldObj.isRemote)
|
||||
MainRegistry.logger.info(explosion.getProgress() + " / " + count / length);
|
||||
//MainRegistry.logger.info(explosion.getProgress() + " / " + count / length);
|
||||
explosion.processTip(speed);
|
||||
} else {
|
||||
this.setDead();
|
||||
|
||||
@ -913,7 +913,9 @@ public class ModItems {
|
||||
public static Item australium_v;
|
||||
|
||||
public static Item jetpack_boost;
|
||||
public static Item jetpack_break;
|
||||
public static Item jetpack_fly;
|
||||
public static Item jetpack_vector;
|
||||
|
||||
public static Item schrabidium_sword;
|
||||
public static Item schrabidium_pickaxe;
|
||||
@ -2131,7 +2133,9 @@ public class ModItems {
|
||||
australium_v = new ArmorAustralium(MainRegistry.enumArmorMaterialAusV, 9, 1).setUnlocalizedName("australium_v").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":australium_v");
|
||||
|
||||
jetpack_boost = new JetpackBooster(MainRegistry.enumArmorMaterialSteel, 9, 1).setUnlocalizedName("jetpack_boost").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":jetpack_boost");
|
||||
jetpack_break = new JetpackBreak(MainRegistry.enumArmorMaterialSteel, 9, 1).setUnlocalizedName("jetpack_break").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":jetpack_break");
|
||||
jetpack_fly = new JetpackRegular(MainRegistry.enumArmorMaterialSteel, 9, 1).setUnlocalizedName("jetpack_fly").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":jetpack_fly");
|
||||
jetpack_vector = new JetpackVectorized(MainRegistry.enumArmorMaterialSteel, 9, 1).setUnlocalizedName("jetpack_vector").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":jetpack_vector");
|
||||
|
||||
cape_test = new ArmorModel(MainRegistry.enumArmorMaterialEmerald, 9, 1).setUnlocalizedName("cape_test").setCreativeTab(null).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cape_test");
|
||||
cape_radiation = new ArmorModel(ArmorMaterial.CHAIN, 9, 1).setUnlocalizedName("cape_radiation").setCreativeTab(MainRegistry.tabNuke).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cape_radiation");
|
||||
@ -3342,7 +3346,9 @@ public class ModItems {
|
||||
GameRegistry.registerItem(mask_of_infamy, mask_of_infamy.getUnlocalizedName());
|
||||
GameRegistry.registerItem(australium_iii, australium_iii.getUnlocalizedName());
|
||||
GameRegistry.registerItem(jetpack_boost, jetpack_boost.getUnlocalizedName());
|
||||
GameRegistry.registerItem(jetpack_break, jetpack_break.getUnlocalizedName());
|
||||
GameRegistry.registerItem(jetpack_fly, jetpack_fly.getUnlocalizedName());
|
||||
GameRegistry.registerItem(jetpack_vector, jetpack_vector.getUnlocalizedName());
|
||||
//GameRegistry.registerItem(australium_iv, australium_iv.getUnlocalizedName());
|
||||
//GameRegistry.registerItem(australium_v, australium_v.getUnlocalizedName());
|
||||
|
||||
|
||||
68
com/hbm/items/gear/JetpackBreak.java
Normal file
68
com/hbm/items/gear/JetpackBreak.java
Normal file
@ -0,0 +1,68 @@
|
||||
package com.hbm.items.gear;
|
||||
|
||||
import com.hbm.entity.particle.EntityGasFlameFX;
|
||||
import com.hbm.render.model.ModelJetPack;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemArmor.ArmorMaterial;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class JetpackBreak extends ItemArmor {
|
||||
|
||||
private ModelJetPack model;
|
||||
|
||||
public JetpackBreak(ArmorMaterial p_i45325_1_, int p_i45325_2_, int p_i45325_3_) {
|
||||
super(p_i45325_1_, p_i45325_2_, p_i45325_3_);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) {
|
||||
return armorType == 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
|
||||
if (armorSlot == 1) {
|
||||
if (model == null) {
|
||||
this.model = new ModelJetPack();
|
||||
}
|
||||
return this.model;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
return "hbm:textures/models/JetPackBlue.png";
|
||||
}
|
||||
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
|
||||
|
||||
if(player.motionY < -0.25) {
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(player.getLookVec().xCoord, 0, player.getLookVec().zCoord);
|
||||
vec.normalize();
|
||||
player.motionY = -0.25;
|
||||
|
||||
EntityGasFlameFX fx = new EntityGasFlameFX(world);
|
||||
fx.posX = player.posX - vec.xCoord;
|
||||
fx.posY = player.posY - 1;
|
||||
fx.posZ = player.posZ - vec.zCoord;
|
||||
fx.motionY = -0.5;
|
||||
world.spawnEntityInWorld(fx);
|
||||
|
||||
player.fallDistance = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -56,13 +56,13 @@ public class JetpackRegular extends ItemArmor {
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(player.getLookVec().xCoord, 0, player.getLookVec().zCoord);
|
||||
vec.normalize();
|
||||
player.motionY += 0.1;
|
||||
player.motionY += 0.15;
|
||||
|
||||
EntityGasFlameFX fx = new EntityGasFlameFX(world);
|
||||
fx.posX = player.posX - vec.xCoord;
|
||||
fx.posY = player.posY - 1;
|
||||
fx.posZ = player.posZ - vec.zCoord;
|
||||
fx.motionY = -0.1;
|
||||
fx.motionY = -0.15;
|
||||
world.spawnEntityInWorld(fx);
|
||||
|
||||
player.fallDistance = 0;
|
||||
|
||||
73
com/hbm/items/gear/JetpackVectorized.java
Normal file
73
com/hbm/items/gear/JetpackVectorized.java
Normal file
@ -0,0 +1,73 @@
|
||||
package com.hbm.items.gear;
|
||||
|
||||
import com.hbm.entity.particle.EntityGasFlameFX;
|
||||
import com.hbm.render.model.ModelJetPack;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemArmor.ArmorMaterial;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class JetpackVectorized extends ItemArmor {
|
||||
|
||||
private ModelJetPack model;
|
||||
|
||||
public JetpackVectorized(ArmorMaterial p_i45325_1_, int p_i45325_2_, int p_i45325_3_) {
|
||||
super(p_i45325_1_, p_i45325_2_, p_i45325_3_);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) {
|
||||
return armorType == 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
|
||||
if (armorSlot == 1) {
|
||||
if (model == null) {
|
||||
this.model = new ModelJetPack();
|
||||
}
|
||||
return this.model;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
return "hbm:textures/models/JetPackGreen.png";
|
||||
}
|
||||
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
|
||||
|
||||
if(player.isSneaking()) {
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(player.getLookVec().xCoord, 0, player.getLookVec().zCoord);
|
||||
vec.normalize();
|
||||
|
||||
player.motionX += vec.xCoord * 0.2;
|
||||
player.motionY += 0.15;
|
||||
player.motionZ += vec.zCoord * 0.2;
|
||||
|
||||
EntityGasFlameFX fx = new EntityGasFlameFX(world);
|
||||
fx.posX = player.posX - vec.xCoord;
|
||||
fx.posY = player.posY - 1;
|
||||
fx.posZ = player.posZ - vec.zCoord;
|
||||
fx.motionX -= vec.xCoord * 0.2;
|
||||
fx.motionY -= vec.yCoord * 0.2;
|
||||
fx.motionZ -= vec.zCoord * 0.2;
|
||||
world.spawnEntityInWorld(fx);
|
||||
|
||||
player.fallDistance = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -942,6 +942,11 @@ public class CraftingManager {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.desh_shovel, 1), new Object[] { "I", "S", "S", 'I', ModItems.ingot_desh, 'S', Items.stick });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.desh_hoe, 1), new Object[] { "II", " S", " S", 'I', ModItems.ingot_desh, 'S', Items.stick });
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.jetpack_boost, 1), new Object[] { "PTP", "SLS", "W W", 'P', "plateSteel", 'T', ModItems.tank_steel, 'S', ModItems.pipes_steel, 'L', Items.leather, 'W', ModItems.thruster_small }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.jetpack_fly, 1), new Object[] { "PTP", "SLS", "W W", 'P', "plateSteel", 'T', ModItems.cap_aluminium, 'S', ModItems.pipes_steel, 'L', ModItems.jetpack_boost, 'W', ModItems.thruster_small }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.jetpack_break, 1), new Object[] { "PTP", "SLS", "P P", 'P', "plateSteel", 'T', ModItems.cap_aluminium, 'S', ModItems.coil_tungsten, 'L', ModItems.jetpack_boost }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.jetpack_vector, 1), new Object[] { "PTP", "SLS", "W W", 'P', "plateTitanium", 'T', ModItems.circuit_copper, 'S', ModItems.motor, 'L', ModItems.jetpack_fly, 'W', ModItems.thruster_small }));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.chainsaw, 1), new Object[] { "TTG", "SSM", 'T', "plateIron", 'S', "plateSteel", 'M', ModItems.motor, 'G', ModItems.circuit_gold }));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.wiring_red_copper, 1), new Object[] { "PPP", "PIP", "PPP", 'P', "plateSteel", 'I', "ingotSteel" }));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user