fixed turrets not saving players, more bulletbase work, wild P, bullets
@ -1087,6 +1087,7 @@ item.flame_opinion.name=Eigene Meinung
|
||||
|
||||
item.pellet_cluster.name=Explosive Pellets
|
||||
item.pellet_buckshot.name=Schrotkugeln
|
||||
item.pellet_flechette.name=Flechets
|
||||
item.powder_fire.name=Flammenpulver
|
||||
item.powder_ice.name=Kryopulver
|
||||
item.powder_poison.name=Giftpulver
|
||||
@ -1310,6 +1311,7 @@ item.gun_hp.name=HPP Lazerjet
|
||||
item.gun_euthanasia.name=Euthanasia
|
||||
item.gun_defabricator.name=Defabrikator
|
||||
item.gun_dampfmaschine.name=Garantiert keine Scherzwaffe
|
||||
item.gun_folly.name=Prototyp Digamma "Irrsinn"
|
||||
|
||||
item.gun_revolver_iron_ammo.name=Patrone
|
||||
item.gun_revolver_ammo.name=Bleipatrone
|
||||
@ -1370,6 +1372,18 @@ item.ammo_folly_du.name=Silbernes Geschoss (DU, Nicht-Explosiv)
|
||||
item.ammo_44.name=.44 Magnum Patrone
|
||||
item.ammo_44_ap.name=.44 Magnum Patrone (Panzerbrechend)
|
||||
item.ammo_44_pip.name=.44 Magnum Patrone (Güterwagon)
|
||||
item.ammo_44_bj.name=.44 Magnum Patrone (Boot)
|
||||
item.ammo_rocket.name=84mm Rakete
|
||||
item.ammo_rocket_he.name=84mm Rakete (HE)
|
||||
item.ammo_rocket_incendiary.name=84mm Rakete (Brand)
|
||||
item.ammo_rocket_shrapnel.name=84mm Rakete (Schrapnell)
|
||||
item.ammo_rocket_emp.name=84mm Rakete (Impuls)
|
||||
item.ammo_rocket_glare.name=84mm Rakete (Roter Schein)
|
||||
|
||||
item.folly_shell.name=Silberne Kanonenhülse
|
||||
item.folly_bullet.name=12,8cm Sternenmetall-Hochenergiegeschoss
|
||||
item.folly_bullet_nuclear.name=12,8cm Atomares Geschoss
|
||||
item.folly_bullet_du.name=12,8cm DU-Geschoss
|
||||
|
||||
item.cordite.name=Kordit
|
||||
|
||||
|
||||
@ -1087,6 +1087,7 @@ item.flame_opinion.name=Own Opinion
|
||||
|
||||
item.pellet_cluster.name=Explosive Pellets
|
||||
item.pellet_buckshot.name=Lead Pellets
|
||||
item.pellet_flechette.name=Flechettes
|
||||
item.powder_fire.name=Flame Powder
|
||||
item.powder_ice.name=Cryo Powder
|
||||
item.powder_poison.name=Poison Powder
|
||||
@ -1310,6 +1311,7 @@ item.gun_hp.name=HPP Lazerjet
|
||||
item.gun_euthanasia.name=Euthanasia
|
||||
item.gun_defabricator.name=Defabricator
|
||||
item.gun_dampfmaschine.name=Totally Not a Joke Weapon
|
||||
item.gun_folly.name=Prototype Digamma "Folly"
|
||||
|
||||
item.gun_revolver_iron_ammo.name=Bullet
|
||||
item.gun_revolver_ammo.name=Lead Bullet
|
||||
@ -1370,6 +1372,18 @@ item.ammo_folly_du.name=Silver Bullet (DU, Non-Explosive)
|
||||
item.ammo_44.name=.44 Magnum Bullet
|
||||
item.ammo_44_ap.name=.44 Magnum Bullet (Armor Piercing)
|
||||
item.ammo_44_pip.name=.44 Magnum Bullet (Boxcar)
|
||||
item.ammo_44_bj.name=.44 Magnum Bullet (Boat)
|
||||
item.ammo_rocket.name=84mm Rocket
|
||||
item.ammo_rocket_he.name=84mm Rocket (HE)
|
||||
item.ammo_rocket_incendiary.name=84mm Rocket (Incendiary)
|
||||
item.ammo_rocket_shrapnel.name=84mm Rocket (Shrapnel)
|
||||
item.ammo_rocket_emp.name=84mm Rocket (Pulse)
|
||||
item.ammo_rocket_glare.name=84mm Rocket (Red Glare)
|
||||
|
||||
item.folly_shell.name=Silver Bullet Casing
|
||||
item.folly_bullet.name=12.8cm Starmetal High-Energy Shell
|
||||
item.folly_bullet_nuclear.name=12.8cm Nuclear Shell
|
||||
item.folly_bullet_du.name=12.8cm DU-Shell
|
||||
|
||||
item.cordite.name=Cordite
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
assets/hbm/textures/items/ammo_44_bj.png
Normal file
|
After Width: | Height: | Size: 232 B |
BIN
assets/hbm/textures/items/ammo_rocket.png
Normal file
|
After Width: | Height: | Size: 327 B |
BIN
assets/hbm/textures/items/ammo_rocket_emp.png
Normal file
|
After Width: | Height: | Size: 265 B |
BIN
assets/hbm/textures/items/ammo_rocket_glare.png
Normal file
|
After Width: | Height: | Size: 328 B |
BIN
assets/hbm/textures/items/ammo_rocket_he.png
Normal file
|
After Width: | Height: | Size: 275 B |
BIN
assets/hbm/textures/items/ammo_rocket_incendiary.png
Normal file
|
After Width: | Height: | Size: 292 B |
BIN
assets/hbm/textures/items/ammo_rocket_shrapnel.png
Normal file
|
After Width: | Height: | Size: 283 B |
BIN
assets/hbm/textures/items/gun_folly.png
Normal file
|
After Width: | Height: | Size: 244 B |
BIN
assets/hbm/textures/items/wild_p.png
Normal file
|
After Width: | Height: | Size: 230 B |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 22 KiB |
@ -2,6 +2,8 @@ package com.hbm.entity.projectile;
|
||||
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
@ -14,12 +16,16 @@ public class EntityBulletBase extends Entity implements IProjectile {
|
||||
private BulletConfiguration config;
|
||||
private EntityLivingBase shooter;
|
||||
|
||||
private EntityBulletBase(World world) { super(world); }
|
||||
public EntityBulletBase(World world) {
|
||||
super(world);
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.setSize(0.5F, 0.5F);
|
||||
}
|
||||
|
||||
private EntityBulletBase(World world, BulletConfiguration config) {
|
||||
public EntityBulletBase(World world, BulletConfiguration config) {
|
||||
super(world);
|
||||
this.config = config;
|
||||
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.setSize(0.5F, 0.5F);
|
||||
}
|
||||
|
||||
@ -38,7 +44,8 @@ public class EntityBulletBase extends Entity implements IProjectile {
|
||||
this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI);
|
||||
this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI);
|
||||
this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI));
|
||||
|
||||
|
||||
this.renderDistanceWeight = 10.0D;
|
||||
this.setSize(0.5F, 0.5F);
|
||||
|
||||
this.dataWatcher.updateObject(16, (byte)config.style);
|
||||
@ -70,7 +77,30 @@ public class EntityBulletBase extends Entity implements IProjectile {
|
||||
float f3 = MathHelper.sqrt_double(moX * moX + moZ * moZ);
|
||||
this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(moX, moZ) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(moY, f3) * 180.0D / Math.PI);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setPositionAndRotation2(double x, double y, double z, float r0, float r1, int i) {
|
||||
this.setPosition(x, y, z);
|
||||
this.setRotation(r0, r1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setVelocity(double x, double y, double z) {
|
||||
this.motionX = x;
|
||||
this.motionY = y;
|
||||
this.motionZ = z;
|
||||
|
||||
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {
|
||||
float f = MathHelper.sqrt_double(x * x + z * z);
|
||||
this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(x, z) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(y, f) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch;
|
||||
this.prevRotationYaw = this.rotationYaw;
|
||||
this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -86,11 +116,44 @@ public class EntityBulletBase extends Entity implements IProjectile {
|
||||
|
||||
super.onUpdate();
|
||||
|
||||
if(config == null) {
|
||||
this.setDead();
|
||||
if(config == null)
|
||||
return;
|
||||
|
||||
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {
|
||||
float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI);
|
||||
}
|
||||
|
||||
motionY -= config.gravity;
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
|
||||
float f2;
|
||||
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f2) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
while(this.rotationPitch - this.prevRotationPitch >= 180.0F) {
|
||||
this.prevRotationPitch += 360.0F;
|
||||
}
|
||||
|
||||
while(this.rotationYaw - this.prevRotationYaw < -180.0F) {
|
||||
this.prevRotationYaw -= 360.0F;
|
||||
}
|
||||
|
||||
while(this.rotationYaw - this.prevRotationYaw >= 180.0F) {
|
||||
this.prevRotationYaw += 360.0F;
|
||||
}
|
||||
|
||||
|
||||
//this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
|
||||
//this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
34
com/hbm/handler/BulletConfigFactory.java
Normal file
@ -0,0 +1,34 @@
|
||||
package com.hbm.handler;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
public class BulletConfigFactory {
|
||||
|
||||
public static BulletConfiguration getTestConfig() {
|
||||
|
||||
BulletConfiguration bullet = new BulletConfiguration();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_lead_ammo;
|
||||
bullet.spread = 0F;
|
||||
bullet.dmgMin = 15;
|
||||
bullet.dmgMax = 17;
|
||||
bullet.gravity = 0D;
|
||||
bullet.maxAge = 100;
|
||||
bullet.doesRicochet = true;
|
||||
bullet.ricochetAngle = 15;
|
||||
bullet.doesPenetrate = true;
|
||||
bullet.doesBreakGlass = true;
|
||||
bullet.incendiary = 0;
|
||||
bullet.emp = 0;
|
||||
bullet.rainbow = 0;
|
||||
bullet.nuke = 0;
|
||||
bullet.boxcar = false;
|
||||
bullet.destroysBlocks = false;
|
||||
bullet.style = 0;
|
||||
bullet.plink = 1;
|
||||
|
||||
return bullet;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -720,7 +720,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
switch(ID)
|
||||
{
|
||||
case ModItems.guiID_item_box:
|
||||
return new ContainerLeadBox();
|
||||
return new ContainerLeadBox(player.inventory);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1439,7 +1439,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
case ModItems.guiID_item_sat_interface:
|
||||
return new GUIScreenSatInterface(player);
|
||||
case ModItems.guiID_item_box:
|
||||
return new GUILeadBox();
|
||||
return new GUILeadBox(player.inventory);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
@ -8,27 +8,6 @@ public class GunConfigFactory {
|
||||
|
||||
public static GunConfiguration getRevolverConfig() {
|
||||
|
||||
BulletConfiguration bullet = new BulletConfiguration();
|
||||
|
||||
bullet.ammo = ModItems.gun_revolver_lead_ammo;
|
||||
bullet.spread = 0F;
|
||||
bullet.dmgMin = 15;
|
||||
bullet.dmgMax = 17;
|
||||
bullet.gravity = 0D;
|
||||
bullet.maxAge = 100;
|
||||
bullet.doesRicochet = true;
|
||||
bullet.ricochetAngle = 15;
|
||||
bullet.doesPenetrate = true;
|
||||
bullet.doesBreakGlass = true;
|
||||
bullet.incendiary = 0;
|
||||
bullet.emp = 0;
|
||||
bullet.rainbow = 0;
|
||||
bullet.nuke = 0;
|
||||
bullet.boxcar = false;
|
||||
bullet.destroysBlocks = false;
|
||||
bullet.style = 0;
|
||||
bullet.plink = 1;
|
||||
|
||||
GunConfiguration config = new GunConfiguration();
|
||||
|
||||
config.rateOfFire = 20;
|
||||
@ -47,7 +26,7 @@ public class GunConfigFactory {
|
||||
config.allowsInfinity = true;
|
||||
|
||||
config.config = new ArrayList<BulletConfiguration>();
|
||||
config.config.add(bullet);
|
||||
config.config.add(BulletConfigFactory.getTestConfig());
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
@ -138,8 +138,8 @@ public class MachineRecipes {
|
||||
ItemStack[] moxF = new ItemStack[] { new ItemStack(ModItems.nugget_pu239, 1),
|
||||
new ItemStack(ModItems.nugget_neptunium, 1), new ItemStack(ModItems.nugget_u238, 2),
|
||||
new ItemStack(ModItems.nuclear_waste_tiny, 2) };
|
||||
ItemStack[] schrabidiumF = new ItemStack[] { new ItemStack(ModItems.nugget_schrabidium_fuel, 1),
|
||||
new ItemStack(ModItems.nugget_lead, 1), new ItemStack(ModItems.nugget_schrabidium, 1),
|
||||
ItemStack[] schrabidiumF = new ItemStack[] { new ItemStack(ModItems.nugget_beryllium, 1),
|
||||
new ItemStack(ModItems.nugget_lead, 1), new ItemStack(ModItems.nugget_solinium, 1),
|
||||
new ItemStack(ModItems.nuclear_waste_tiny, 3) };
|
||||
ItemStack[] thoriumF = new ItemStack[] { new ItemStack(ModItems.nugget_u238, 1),
|
||||
new ItemStack(ModItems.nugget_th232, 1), new ItemStack(ModItems.nugget_u233, 3),
|
||||
|
||||
@ -1,5 +1,50 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
public class ContainerLeadBox {
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.tool.ItemLeadBox;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
|
||||
public class ContainerLeadBox extends Container {
|
||||
|
||||
public ContainerLeadBox(InventoryPlayer invPlayer) {
|
||||
|
||||
/*IInventory inv =
|
||||
|
||||
this.addSlotToContainer(new Slot(inv, 0, 71, 18));
|
||||
this.addSlotToContainer(new Slot(inv, 1, 71, 18));
|
||||
this.addSlotToContainer(new Slot(inv, 2, 71, 18));
|
||||
this.addSlotToContainer(new Slot(inv, 3, 71, 18));
|
||||
this.addSlotToContainer(new Slot(inv, 4, 71, 18));
|
||||
this.addSlotToContainer(new Slot(inv, 5, 71, 18));
|
||||
this.addSlotToContainer(new Slot(inv, 6, 71, 18));
|
||||
this.addSlotToContainer(new Slot(inv, 7, 71, 18));
|
||||
this.addSlotToContainer(new Slot(inv, 8, 71, 18));
|
||||
this.addSlotToContainer(new Slot(inv, 9, 71, 18));
|
||||
this.addSlotToContainer(new Slot(inv, 10, 71, 18));
|
||||
this.addSlotToContainer(new Slot(inv, 11, 71, 18));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 20));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 20));
|
||||
}*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,45 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
public class GUILeadBox {
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerLeadBox;
|
||||
import com.hbm.inventory.container.ContainerWasteDrum;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.tool.ItemLeadBox;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityWasteDrum;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUILeadBox extends GuiContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_containment.png");
|
||||
|
||||
public GUILeadBox(InventoryPlayer invPlayer) {
|
||||
super(new ContainerLeadBox(invPlayer));
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 186;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = "";//ItemLeadBox.getGuiName();
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -714,6 +714,17 @@ public class ModItems {
|
||||
public static Item waste_schrabidium_hot;
|
||||
|
||||
public static Item containment_box;
|
||||
|
||||
public static Item recycled_ground;
|
||||
public static Item recycled_rock;
|
||||
public static Item recycled_metal;
|
||||
public static Item recycled_refined;
|
||||
public static Item recycled_organic;
|
||||
public static Item recycled_crystal;
|
||||
public static Item recycled_explosive;
|
||||
public static Item recycled_electronic;
|
||||
public static Item recycled_nuclear;
|
||||
public static Item recycled_misc;
|
||||
|
||||
public static Item rod_lithium;
|
||||
public static Item rod_dual_lithium;
|
||||
@ -808,6 +819,7 @@ public class ModItems {
|
||||
public static Item ammo_44;
|
||||
public static Item ammo_44_ap;
|
||||
public static Item ammo_44_pip;
|
||||
public static Item ammo_44_bj;
|
||||
public static Item ammo_5mm;
|
||||
public static Item ammo_5mm_explosive;
|
||||
public static Item ammo_9mm;
|
||||
@ -820,6 +832,12 @@ public class ModItems {
|
||||
public static Item ammo_folly;
|
||||
public static Item ammo_folly_nuclear;
|
||||
public static Item ammo_folly_du;
|
||||
public static Item ammo_rocket;
|
||||
public static Item ammo_rocket_he;
|
||||
public static Item ammo_rocket_incendiary;
|
||||
public static Item ammo_rocket_shrapnel;
|
||||
public static Item ammo_rocket_emp;
|
||||
public static Item ammo_rocket_glare;
|
||||
|
||||
public static Item gun_rpg;
|
||||
public static Item gun_rpg_ammo;
|
||||
@ -2035,6 +2053,17 @@ public class ModItems {
|
||||
cap_star = new Item().setUnlocalizedName("cap_star").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_star");
|
||||
ring_pull = new Item().setUnlocalizedName("ring_pull").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":ring_pull");
|
||||
|
||||
recycled_ground = new Item().setUnlocalizedName("recycled_ground").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":recycled_ground");
|
||||
recycled_rock = new Item().setUnlocalizedName("recycled_rock").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":recycled_rock");
|
||||
recycled_metal = new Item().setUnlocalizedName("recycled_metal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":recycled_metal");
|
||||
recycled_refined = new Item().setUnlocalizedName("recycled_refined").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":recycled_refined");
|
||||
recycled_organic = new Item().setUnlocalizedName("recycled_organic").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":recycled_organic");
|
||||
recycled_crystal = new Item().setUnlocalizedName("recycled_crystal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":recycled_crystal");
|
||||
recycled_explosive = new Item().setUnlocalizedName("recycled_explosive").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":recycled_explosive");
|
||||
recycled_electronic = new Item().setUnlocalizedName("recycled_electronic").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":recycled_electronic");
|
||||
recycled_nuclear = new Item().setUnlocalizedName("recycled_nuclear").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":recycled_nuclear");
|
||||
recycled_misc = new Item().setUnlocalizedName("recycled_misc").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":recycled_misc");
|
||||
|
||||
rod_empty = new Item().setUnlocalizedName("rod_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":rod_empty");
|
||||
rod_th232 = new ItemCustomLore().setUnlocalizedName("rod_th232").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_th232");
|
||||
rod_uranium = new ItemCustomLore().setUnlocalizedName("rod_uranium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.rod_empty).setTextureName(RefStrings.MODID + ":rod_uranium");
|
||||
@ -2230,11 +2259,18 @@ public class ModItems {
|
||||
ammo_44 = new Item().setUnlocalizedName("ammo_44").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44");
|
||||
ammo_44_ap = new Item().setUnlocalizedName("ammo_44_ap").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44_ap");
|
||||
ammo_44_pip = new Item().setUnlocalizedName("ammo_44_pip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44_pip");
|
||||
ammo_44_bj = new Item().setUnlocalizedName("ammo_44_bj").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_44_bj");
|
||||
ammo_22lr = new Item().setUnlocalizedName("ammo_22lr").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_22lr");
|
||||
ammo_22lr_ap = new Item().setUnlocalizedName("ammo_22lr_ap").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_22lr_ap");
|
||||
ammo_folly = new ItemCustomLore().setUnlocalizedName("ammo_folly").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_folly");
|
||||
ammo_folly_nuclear = new ItemCustomLore().setUnlocalizedName("ammo_folly_nuclear").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_folly_nuclear");
|
||||
ammo_folly_du = new ItemCustomLore().setUnlocalizedName("ammo_folly_du").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_folly_du");
|
||||
ammo_rocket = new Item().setUnlocalizedName("ammo_rocket").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket");
|
||||
ammo_rocket_he = new Item().setUnlocalizedName("ammo_rocket_he").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_he");
|
||||
ammo_rocket_incendiary = new Item().setUnlocalizedName("ammo_rocket_incendiary").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_incendiary");
|
||||
ammo_rocket_shrapnel = new Item().setUnlocalizedName("ammo_rocket_shrapnel").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_shrapnel");
|
||||
ammo_rocket_emp = new Item().setUnlocalizedName("ammo_rocket_emp").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_emp");
|
||||
ammo_rocket_glare = new Item().setUnlocalizedName("ammo_rocket_glare").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_rocket_glare");
|
||||
|
||||
gun_rpg = new GunRpg().setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg_new");
|
||||
gun_rpg_ammo = new Item().setUnlocalizedName("gun_rpg_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg_ammo_alt");
|
||||
@ -2259,16 +2295,16 @@ public class ModItems {
|
||||
gun_revolver_nightmare = new GunNightmare().setMaxDamage(6).setUnlocalizedName("gun_revolver_nightmare").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare");
|
||||
gun_revolver_nightmare2_ammo = new ItemCustomLore().setUnlocalizedName("gun_revolver_nightmare2_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare2_ammo");
|
||||
gun_revolver_nightmare2 = new GunNightmare().setMaxDamage(6).setUnlocalizedName("gun_revolver_nightmare2").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare2");
|
||||
gun_revolver_pip_ammo = new ItemCustomLore().setUnlocalizedName("gun_revolver_pip_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_pip_ammo");
|
||||
gun_revolver_pip_ammo = new ItemCustomLore().setUnlocalizedName("gun_revolver_pip_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_pip_ammo");
|
||||
gun_revolver_pip = new GunRevolver(gun_revolver_pip_ammo, 25, 35, false, false).setMaxDamage(1000).setUnlocalizedName("gun_revolver_pip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_pip");
|
||||
gun_revolver_nopip_ammo = new Item().setUnlocalizedName("gun_revolver_nopip_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nopip_ammo");
|
||||
gun_revolver_nopip_ammo = new Item().setUnlocalizedName("gun_revolver_nopip_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_revolver_nopip_ammo");
|
||||
gun_revolver_nopip = new GunRevolver(gun_revolver_nopip_ammo, 25, 35, false, false).setMaxDamage(1000).setUnlocalizedName("gun_revolver_nopip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nopip");
|
||||
gun_revolver_blackjack = new GunRevolver(gun_revolver_nopip_ammo, 35, 45, false, false).setMaxDamage(1000).setUnlocalizedName("gun_revolver_blackjack").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_blackjack");
|
||||
gun_revolver_red = new GunRevolver(gun_revolver_nopip_ammo, 100, 105, false, false).setMaxDamage(1000).setUnlocalizedName("gun_revolver_red").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_red");
|
||||
gun_calamity_ammo = new ItemCustomLore().setUnlocalizedName("gun_calamity_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_calamity_ammo");
|
||||
gun_calamity_ammo = new ItemCustomLore().setUnlocalizedName("gun_calamity_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_calamity_ammo");
|
||||
gun_calamity = new GunCalamity().setUnlocalizedName("gun_calamity").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_calamity");
|
||||
gun_calamity_dual = new GunCalamity().setUnlocalizedName("gun_calamity_dual").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_calamity_dual");
|
||||
gun_lacunae_ammo = new ItemCustomLore().setUnlocalizedName("gun_lacunae_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lacunae_ammo");
|
||||
gun_lacunae_ammo = new ItemCustomLore().setUnlocalizedName("gun_lacunae_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_lacunae_ammo");
|
||||
gun_minigun = new GunLacunae().setUnlocalizedName("gun_minigun").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_minigun");
|
||||
gun_avenger = new GunLacunae().setUnlocalizedName("gun_avenger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_avenger");
|
||||
gun_lacunae = new GunLacunae().setUnlocalizedName("gun_lacunae").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lacunae");
|
||||
@ -2280,20 +2316,20 @@ public class ModItems {
|
||||
gun_mirv = new GunMIRV().setMaxDamage(2500).setUnlocalizedName("gun_mirv").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mirv");
|
||||
gun_bf_ammo = new Item().setUnlocalizedName("gun_bf_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bf_ammo");
|
||||
gun_bf = new GunBaleFlare().setMaxDamage(2500).setUnlocalizedName("gun_bf").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bf");
|
||||
gun_mp40_ammo = new Item().setUnlocalizedName("gun_mp40_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mp40_ammo");
|
||||
gun_mp40_ammo = new Item().setUnlocalizedName("gun_mp40_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_mp40_ammo");
|
||||
gun_mp40 = new GunSMG().setUnlocalizedName("gun_mp40").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mp40");
|
||||
gun_uzi_ammo = new Item().setUnlocalizedName("gun_uzi_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_ammo");
|
||||
gun_uzi_ammo = new Item().setUnlocalizedName("gun_uzi_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_uzi_ammo");
|
||||
gun_uzi = new GunUZI().setUnlocalizedName("gun_uzi").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi");
|
||||
gun_uzi_silencer = new GunUZI().setUnlocalizedName("gun_uzi_silencer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_silencer");
|
||||
gun_uzi_saturnite = new GunUZI().setUnlocalizedName("gun_uzi_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_saturnite");
|
||||
gun_uzi_saturnite_silencer = new GunUZI().setUnlocalizedName("gun_uzi_saturnite_silencer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_saturnite_silencer");
|
||||
gun_uboinik_ammo = new Item().setUnlocalizedName("gun_uboinik_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik_ammo");
|
||||
gun_uboinik_ammo = new Item().setUnlocalizedName("gun_uboinik_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_uboinik_ammo");
|
||||
gun_uboinik = new GunShotgun().setUnlocalizedName("gun_uboinik").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
|
||||
gun_lever_action_ammo = new Item().setUnlocalizedName("gun_lever_action_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action_ammo");
|
||||
gun_lever_action_ammo = new Item().setUnlocalizedName("gun_lever_action_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_lever_action_ammo");
|
||||
gun_lever_action = new GunLeverAction().setUnlocalizedName("gun_lever_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action");
|
||||
gun_lever_action_dark = new GunLeverAction().setUnlocalizedName("gun_lever_action_dark").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action_dark");
|
||||
gun_lever_action_sonata = new GunLeverActionS().setUnlocalizedName("gun_lever_action_sonata").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action_sonata");
|
||||
gun_bolt_action_ammo = new Item().setUnlocalizedName("gun_bolt_action_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_ammo");
|
||||
gun_bolt_action_ammo = new Item().setUnlocalizedName("gun_bolt_action_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bolt_action_ammo");
|
||||
gun_bolt_action = new GunBoltAction().setUnlocalizedName("gun_bolt_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action");
|
||||
gun_bolt_action_green = new GunBoltAction().setUnlocalizedName("gun_bolt_action_green").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_green");
|
||||
gun_bolt_action_saturnite = new GunBoltAction().setUnlocalizedName("gun_bolt_action_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_saturnite");
|
||||
@ -3559,6 +3595,18 @@ public class ModItems {
|
||||
GameRegistry.registerItem(part_copper, part_copper.getUnlocalizedName());
|
||||
GameRegistry.registerItem(part_plutonium, part_plutonium.getUnlocalizedName());
|
||||
|
||||
//Recycled Units
|
||||
GameRegistry.registerItem(recycled_ground, recycled_ground.getUnlocalizedName());
|
||||
GameRegistry.registerItem(recycled_rock, recycled_rock.getUnlocalizedName());
|
||||
GameRegistry.registerItem(recycled_metal, recycled_metal.getUnlocalizedName());
|
||||
GameRegistry.registerItem(recycled_refined, recycled_refined.getUnlocalizedName());
|
||||
GameRegistry.registerItem(recycled_organic, recycled_organic.getUnlocalizedName());
|
||||
GameRegistry.registerItem(recycled_crystal, recycled_crystal.getUnlocalizedName());
|
||||
GameRegistry.registerItem(recycled_explosive, recycled_explosive.getUnlocalizedName());
|
||||
GameRegistry.registerItem(recycled_electronic, recycled_electronic.getUnlocalizedName());
|
||||
GameRegistry.registerItem(recycled_nuclear, recycled_nuclear.getUnlocalizedName());
|
||||
GameRegistry.registerItem(recycled_misc, recycled_misc.getUnlocalizedName());
|
||||
|
||||
//Catalyst Rune Sigils
|
||||
GameRegistry.registerItem(rune_blank, rune_blank.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rune_isa, rune_isa.getUnlocalizedName());
|
||||
@ -3927,6 +3975,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ammo_44, ammo_44.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_44_ap, ammo_44_ap.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_44_pip, ammo_44_pip.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_44_bj, ammo_44_bj.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_5mm, ammo_5mm.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_5mm_explosive, ammo_5mm_explosive.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_9mm, ammo_9mm.getUnlocalizedName());
|
||||
@ -3936,6 +3985,12 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ammo_50bmg, ammo_50bmg.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_50bmg_incendiary, ammo_50bmg_incendiary.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_50bmg_explosive, ammo_50bmg_explosive.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_rocket, ammo_rocket.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_rocket_he, ammo_rocket_he.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_rocket_incendiary, ammo_rocket_incendiary.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_rocket_shrapnel, ammo_rocket_shrapnel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_rocket_emp, ammo_rocket_emp.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_rocket_glare, ammo_rocket_glare.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_folly, ammo_folly.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_folly_nuclear, ammo_folly_nuclear.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_folly_du, ammo_folly_du.getUnlocalizedName());
|
||||
|
||||
@ -10,10 +10,11 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class ItemCustomLore extends ItemRadioactive {
|
||||
public class ItemCustomLore extends Item {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
|
||||
@ -15,7 +15,7 @@ import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemRadioactive extends Item {
|
||||
public class ItemRadioactive extends ItemCustomLore {
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int i, boolean b) {
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
package com.hbm.items.tool;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemRadioactive;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
@ -18,5 +20,4 @@ public class ItemLeadBox extends Item {
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,10 @@
|
||||
package com.hbm.items.weapon;
|
||||
|
||||
import com.hbm.entity.particle.EntityGasFlameFX;
|
||||
import com.hbm.entity.particle.EntitySSmokeFX;
|
||||
import com.hbm.entity.projectile.EntityBullet;
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.handler.BulletConfigFactory;
|
||||
import com.hbm.interfaces.IHoldableWeapon;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.render.misc.RenderScreenOverlay.Crosshair;
|
||||
@ -52,6 +57,31 @@ public class GunFolly extends Item implements IHoldableWeapon {
|
||||
|
||||
setState(stack, 0);
|
||||
world.playSoundAtEntity(player, "hbm:weapon.follyFire", 1.0F, 1.0F);
|
||||
|
||||
double mult = 1.75D;
|
||||
|
||||
player.motionX -= player.getLookVec().xCoord * mult;
|
||||
player.motionY -= player.getLookVec().yCoord * mult;
|
||||
player.motionZ -= player.getLookVec().zCoord * mult;
|
||||
|
||||
if (!world.isRemote) {
|
||||
EntityBulletBase bullet = new EntityBulletBase(world, BulletConfigFactory.getTestConfig(), player, 3.0F);
|
||||
world.spawnEntityInWorld(bullet);
|
||||
|
||||
for(int i = 0; i < 25; i++) {
|
||||
EntitySSmokeFX flame = new EntitySSmokeFX(world);
|
||||
|
||||
flame.motionX = player.getLookVec().xCoord;
|
||||
flame.motionY = player.getLookVec().yCoord;
|
||||
flame.motionZ = player.getLookVec().zCoord;
|
||||
|
||||
flame.posX = player.posX + flame.motionX + world.rand.nextGaussian() * 0.35;
|
||||
flame.posY = player.posY + flame.motionY + world.rand.nextGaussian() * 0.35 + player.eyeHeight;
|
||||
flame.posZ = player.posZ + flame.motionZ + world.rand.nextGaussian() * 0.35;
|
||||
|
||||
world.spawnEntityInWorld(flame);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,20 +91,24 @@ public class GunFolly extends Item implements IHoldableWeapon {
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean isCurrentItem) {
|
||||
|
||||
if(getState(stack) == 3 && isCurrentItem) {
|
||||
if(getState(stack) == 3) {
|
||||
|
||||
int timer = getTimer(stack);
|
||||
|
||||
if(timer > 0) {
|
||||
timer--;
|
||||
|
||||
if(timer % 20 == 0 && timer != 0)
|
||||
world.playSoundAtEntity(entity, "hbm:weapon.follyBuzzer", 1.0F, 1.0F);
|
||||
if(isCurrentItem) {
|
||||
int timer = getTimer(stack);
|
||||
|
||||
if(timer == 0)
|
||||
world.playSoundAtEntity(entity, "hbm:weapon.follyAquired", 1.0F, 1.0F);
|
||||
|
||||
setTimer(stack, timer);
|
||||
if(timer > 0) {
|
||||
timer--;
|
||||
|
||||
if(timer % 20 == 0 && timer != 0)
|
||||
world.playSoundAtEntity(entity, "hbm:weapon.follyBuzzer", 1.0F, 1.0F);
|
||||
|
||||
if(timer == 0)
|
||||
world.playSoundAtEntity(entity, "hbm:weapon.follyAquired", 1.0F, 1.0F);
|
||||
|
||||
setTimer(stack, timer);
|
||||
}
|
||||
} else {
|
||||
setTimer(stack, 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,8 @@ import java.util.Random;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.hbm.entity.projectile.EntityBullet;
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.handler.BulletConfigFactory;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
@ -56,20 +58,19 @@ public class GunSMG extends Item {
|
||||
|| EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, stack) > 0;
|
||||
if ((player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.gun_mp40_ammo))
|
||||
&& count % 2 == 0) {
|
||||
EntityBullet entityarrow = new EntityBullet(world, player, 3.0F, 2, 8, false, false);
|
||||
entityarrow.setDamage(1 + rand.nextInt(8));
|
||||
|
||||
EntityBulletBase bullet = new EntityBulletBase(world, BulletConfigFactory.getTestConfig(), player, 3.0F);
|
||||
|
||||
//world.playSoundAtEntity(player, "random.explode", 1.0F, 1.5F + (rand.nextFloat() / 4));
|
||||
world.playSoundAtEntity(player, "hbm:weapon.rifleShoot", 1.0F, 0.8F + (rand.nextFloat() * 0.4F));
|
||||
|
||||
if (flag) {
|
||||
entityarrow.canBePickedUp = 2;
|
||||
} else {
|
||||
player.inventory.consumeInventoryItem(ModItems.gun_mp40_ammo);
|
||||
}
|
||||
|
||||
if (!world.isRemote) {
|
||||
world.spawnEntityInWorld(entityarrow);
|
||||
world.spawnEntityInWorld(bullet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -272,6 +272,7 @@ public class ClientProxy extends ServerProxy
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_brimstone, new ItemRenderObj());
|
||||
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBullet.class, new RenderRocket());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBulletBase.class, new RenderBullet());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMiniNuke.class, new RenderMiniNuke());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMiniMIRV.class, new RenderMiniMIRV());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBaleflare.class, new RenderBaleflare());
|
||||
|
||||
@ -166,6 +166,7 @@ import com.hbm.entity.projectile.EntityBaleflare;
|
||||
import com.hbm.entity.projectile.EntityBombletZeta;
|
||||
import com.hbm.entity.projectile.EntityBoxcar;
|
||||
import com.hbm.entity.projectile.EntityBullet;
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.entity.projectile.EntityBurningFOEQ;
|
||||
import com.hbm.entity.projectile.EntityChopperMine;
|
||||
import com.hbm.entity.projectile.EntityCombineBall;
|
||||
@ -883,6 +884,7 @@ public class MainRegistry
|
||||
EntityRegistry.registerModEntity(EntityGrenadeIFHopwire.class, "entity_grenade_ironshod", 128, this, 250, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityGrenadeIFNull.class, "entity_grenade_ironshod", 129, this, 250, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityFallingNuke.class, "entity_falling_bomb", 130, this, 1000, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityBulletBase.class, "entity_bullet_mk2", 131, this, 250, 1, true);
|
||||
|
||||
EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00);
|
||||
EntityRegistry.registerGlobalEntityID(EntityTaintedCreeper.class, "entity_mob_tainted_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x813b9b, 0xd71fdd);
|
||||
|
||||
268
com/hbm/render/entity/RenderBullet.java
Normal file
@ -0,0 +1,268 @@
|
||||
package com.hbm.render.entity;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.entity.projectile.EntityBullet;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.model.ModelBullet;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderBullet extends Render {
|
||||
|
||||
private ModelBullet bullet;
|
||||
|
||||
public RenderBullet() {
|
||||
bullet = new ModelBullet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(Entity bullet, double x, double y, double z, float f0, float f1) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
GL11.glRotatef(bullet.prevRotationYaw + (bullet.rotationYaw - bullet.prevRotationYaw) * f1 - 90.0F,
|
||||
0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(bullet.prevRotationPitch + (bullet.rotationPitch - bullet.prevRotationPitch) * f1 + 180,
|
||||
0.0F, 0.0F, 1.0F);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
|
||||
GL11.glRotatef(new Random(bullet.getEntityId()).nextInt(360), 1.0F, 0.0F, 0.0F);
|
||||
|
||||
renderFlechette();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
private void renderBullet(int type) {
|
||||
|
||||
if (type == 2) {
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/emplacer.png"));
|
||||
} else if (type == 1) {
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/tau.png"));
|
||||
} else if (type == 0) {
|
||||
bindTexture(new ResourceLocation(RefStrings.MODID + ":textures/models/bullet.png"));
|
||||
}
|
||||
|
||||
bullet.renderAll(0.0625F);
|
||||
}
|
||||
|
||||
private void renderFlechette() {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glScalef(1F/16F, 1F/16F, 1F/16F);
|
||||
GL11.glScalef(-1, 1, 1);
|
||||
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
//back
|
||||
GL11.glColor3f(0.15F, 0.15F, 0.15F);
|
||||
tess.startDrawingQuads();
|
||||
tess.addVertex(0, -1, -1);
|
||||
tess.addVertex(0, 1, -1);
|
||||
tess.addVertex(0, 1, 1);
|
||||
tess.addVertex(0, -1, 1);
|
||||
tess.draw();
|
||||
|
||||
//base
|
||||
tess.startDrawingQuads();
|
||||
tess.addVertex(0, -1, -1);
|
||||
tess.addVertex(1, -0.5, -0.5);
|
||||
tess.addVertex(1, 0.5, -0.5);
|
||||
tess.addVertex(0, 1, -1);
|
||||
tess.draw();
|
||||
|
||||
tess.startDrawingQuads();
|
||||
tess.addVertex(1, -0.5, 0.5);
|
||||
tess.addVertex(0, -1, 1);
|
||||
tess.addVertex(0, 1, 1);
|
||||
tess.addVertex(1, 0.5, 0.5);
|
||||
tess.draw();
|
||||
|
||||
tess.startDrawingQuads();
|
||||
tess.addVertex(1, -0.5, -0.5);
|
||||
tess.addVertex(0, -1, -1);
|
||||
tess.addVertex(0, -1, 1);
|
||||
tess.addVertex(1, -0.5, 0.5);
|
||||
tess.draw();
|
||||
|
||||
tess.startDrawingQuads();
|
||||
tess.addVertex(0, 1, -1);
|
||||
tess.addVertex(1, 0.5, -0.5);
|
||||
tess.addVertex(1, 0.5, 0.5);
|
||||
tess.addVertex(0, 1, 1);
|
||||
tess.draw();
|
||||
|
||||
//pin
|
||||
tess.startDrawing(4);
|
||||
tess.addVertex(1, 0.5, -0.5);
|
||||
tess.addVertex(1, -0.5, -0.5);
|
||||
tess.addVertex(6, 0, 0);
|
||||
tess.draw();
|
||||
|
||||
tess.startDrawing(4);
|
||||
tess.addVertex(6, 0, 0);
|
||||
tess.addVertex(1, -0.5, 0.5);
|
||||
tess.addVertex(1, 0.5, 0.5);
|
||||
tess.draw();
|
||||
|
||||
tess.startDrawing(4);
|
||||
tess.addVertex(6, 0, 0);
|
||||
tess.addVertex(1, -0.5, -0.5);
|
||||
tess.addVertex(1, -0.5, 0.5);
|
||||
tess.draw();
|
||||
|
||||
tess.startDrawing(4);
|
||||
tess.addVertex(1, 0.5, 0.5);
|
||||
tess.addVertex(1, 0.5, -0.5);
|
||||
tess.addVertex(6, 0, 0);
|
||||
tess.draw();
|
||||
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
private void renderDart(float red, float green, float blue) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
GL11.glScalef(1F/4F, 1F/8F, 1F/8F);
|
||||
GL11.glScalef(-1, 1, 1);
|
||||
|
||||
GL11.glScalef(2, 2, 2);
|
||||
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
//front
|
||||
tess.startDrawing(4);
|
||||
tess.setColorRGBA_F(red, green, blue, 1);
|
||||
tess.addVertex(6, 0, 0);
|
||||
tess.setColorRGBA_F(red, green, blue, 0);
|
||||
tess.addVertex(3, -1, -1);
|
||||
tess.addVertex(3, 1, -1);
|
||||
tess.draw();
|
||||
|
||||
tess.startDrawing(4);
|
||||
tess.setColorRGBA_F(red, green, blue, 0);
|
||||
tess.addVertex(3, -1, 1);
|
||||
tess.setColorRGBA_F(red, green, blue, 1);
|
||||
tess.addVertex(6, 0, 0);
|
||||
tess.setColorRGBA_F(red, green, blue, 0);
|
||||
tess.addVertex(3, 1, 1);
|
||||
tess.draw();
|
||||
|
||||
tess.startDrawing(4);
|
||||
tess.setColorRGBA_F(red, green, blue, 0);
|
||||
tess.addVertex(3, -1, -1);
|
||||
tess.setColorRGBA_F(red, green, blue, 1);
|
||||
tess.addVertex(6, 0, 0);
|
||||
tess.setColorRGBA_F(red, green, blue, 0);
|
||||
tess.addVertex(3, -1, 1);
|
||||
tess.draw();
|
||||
|
||||
tess.startDrawing(4);
|
||||
tess.setColorRGBA_F(red, green, blue, 1);
|
||||
tess.addVertex(6, 0, 0);
|
||||
tess.setColorRGBA_F(red, green, blue, 0);
|
||||
tess.addVertex(3, 1, -1);
|
||||
tess.setColorRGBA_F(red, green, blue, 0);
|
||||
tess.addVertex(3, 1, 1);
|
||||
tess.draw();
|
||||
|
||||
//mid
|
||||
tess.startDrawing(4);
|
||||
tess.setColorRGBA_F(red, green, blue, 1);
|
||||
tess.addVertex(6, 0, 0);
|
||||
tess.addVertex(4, -0.5, -0.5);
|
||||
tess.addVertex(4, 0.5, -0.5);
|
||||
tess.draw();
|
||||
|
||||
tess.startDrawing(4);
|
||||
tess.setColorRGBA_F(red, green, blue, 1);
|
||||
tess.addVertex(4, -0.5, 0.5);
|
||||
tess.addVertex(6, 0, 0);
|
||||
tess.addVertex(4, 0.5, 0.5);
|
||||
tess.draw();
|
||||
|
||||
tess.startDrawing(4);
|
||||
tess.setColorRGBA_F(red, green, blue, 1);
|
||||
tess.addVertex(4, -0.5, -0.5);
|
||||
tess.addVertex(6, 0, 0);
|
||||
tess.addVertex(4, -0.5, 0.5);
|
||||
tess.draw();
|
||||
|
||||
tess.startDrawing(4);
|
||||
tess.setColorRGBA_F(red, green, blue, 1);
|
||||
tess.addVertex(6, 0, 0);
|
||||
tess.addVertex(4, 0.5, -0.5);
|
||||
tess.addVertex(4, 0.5, 0.5);
|
||||
tess.draw();
|
||||
|
||||
//tail
|
||||
tess.startDrawingQuads();
|
||||
tess.setColorRGBA_F(red, green, blue, 1);
|
||||
tess.addVertex(4, 0.5, -0.5);
|
||||
tess.addVertex(4, 0.5, 0.5);
|
||||
tess.setColorRGBA_F(red, green, blue, 0);
|
||||
tess.addVertex(0, 0.5, 0.5);
|
||||
tess.addVertex(0, 0.5, -0.5);
|
||||
tess.draw();
|
||||
|
||||
tess.startDrawingQuads();
|
||||
tess.setColorRGBA_F(red, green, blue, 1);
|
||||
tess.addVertex(4, -0.5, -0.5);
|
||||
tess.addVertex(4, -0.5, 0.5);
|
||||
tess.setColorRGBA_F(red, green, blue, 0);
|
||||
tess.addVertex(0, -0.5, 0.5);
|
||||
tess.addVertex(0, -0.5, -0.5);
|
||||
tess.draw();
|
||||
|
||||
tess.startDrawingQuads();
|
||||
tess.setColorRGBA_F(red, green, blue, 1);
|
||||
tess.addVertex(4, -0.5, 0.5);
|
||||
tess.addVertex(4, 0.5, 0.5);
|
||||
tess.setColorRGBA_F(red, green, blue, 0);
|
||||
tess.addVertex(0, 0.5, 0.5);
|
||||
tess.addVertex(0, -0.5, 0.5);
|
||||
tess.draw();
|
||||
|
||||
tess.startDrawingQuads();
|
||||
tess.setColorRGBA_F(red, green, blue, 1);
|
||||
tess.addVertex(4, -0.5, -0.5);
|
||||
tess.addVertex(4, 0.5, -0.5);
|
||||
tess.setColorRGBA_F(red, green, blue, 0);
|
||||
tess.addVertex(0, 0.5, -0.5);
|
||||
tess.addVertex(0, -0.5, -0.5);
|
||||
tess.draw();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return new ResourceLocation(RefStrings.MODID + ":textures/models/bullet.png");
|
||||
}
|
||||
|
||||
}
|
||||
@ -154,17 +154,18 @@ public class RenderRocket extends Render {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
GL11.glScalef(1F/4F, 1F/8F, 1F/8F);
|
||||
GL11.glScalef(-1, 1, 1);
|
||||
|
||||
GL11.glScalef(2, 2, 2);
|
||||
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
float red = 0.25F;
|
||||
float green = 0.0F;
|
||||
float blue = 1.0F;
|
||||
float red = 0.5F;
|
||||
float green = 0.5F;
|
||||
float blue = 0.0F;
|
||||
|
||||
//front
|
||||
tess.startDrawing(4);
|
||||
@ -271,8 +272,7 @@ public class RenderRocket extends Render {
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -275,6 +275,9 @@ public class ItemRenderOverkill implements IItemRenderer {
|
||||
GL11.glRotatef(185, 0, 1, 0);
|
||||
GL11.glTranslatef(0.5F, 0.6F, 0.2F);
|
||||
}
|
||||
if(item.getItem() == ModItems.gun_folly) {
|
||||
GL11.glTranslatef(0.6F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_jack)
|
||||
powerJack.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
|
||||
@ -155,7 +155,7 @@ public abstract class TileEntityTurretBase extends TileEntity {
|
||||
int playercount = nbt.getInteger("playercount");
|
||||
|
||||
for(int i = 0; i < playercount; i++) {
|
||||
players.add(nbt.getString("player_") + i);
|
||||
players.add(nbt.getString("player_" + i));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||