rocket launcher turret, SILEX GUI overhaul, lasers
5175
src/main/java/assets/hbm/models/machines/fel.obj
Normal file
2559
src/main/java/assets/hbm/models/turrets/turret_richard.obj
Normal file
@ -152,6 +152,7 @@
|
||||
"turret.chekhov_fire": {"category": "block", "sounds": [{"name": "turret/chekhov_fire", "stream": false}]},
|
||||
"turret.jeremy_fire": {"category": "block", "sounds": ["turret/jeremy_fire1", "turret/jeremy_fire2", "turret/jeremy_fire3", "turret/jeremy_fire4", "turret/jeremy_fire5"]},
|
||||
"turret.jeremy_reload": {"category": "block", "sounds": [{"name": "turret/jeremy_reload", "stream": false}]},
|
||||
"turret.richard_fire": {"category": "block", "sounds": [{"name": "turret/richard_fire", "stream": false}]},
|
||||
|
||||
"entity.chopperFlyingLoop": {"category": "hostile", "sounds": [{"name": "entity/chopperFlyingLoop", "stream": true}]},
|
||||
"entity.chopperDrop": {"category": "hostile", "sounds": [{"name": "entity/chopperDrop", "stream": false}]},
|
||||
|
||||
BIN
src/main/java/assets/hbm/sounds/turret/richard_fire.ogg
Normal file
BIN
src/main/java/assets/hbm/textures/blocks/test_charge_bottom.png
Normal file
|
After Width: | Height: | Size: 141 B |
BIN
src/main/java/assets/hbm/textures/blocks/test_charge_side.png
Normal file
|
After Width: | Height: | Size: 136 B |
BIN
src/main/java/assets/hbm/textures/blocks/test_charge_top.png
Normal file
|
After Width: | Height: | Size: 157 B |
BIN
src/main/java/assets/hbm/textures/blocks/test_core.png
Normal file
|
After Width: | Height: | Size: 155 B |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
BIN
src/main/java/assets/hbm/textures/gui/machine/gui_fel.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/main/java/assets/hbm/textures/items/gun_mymy.png
Normal file
|
After Width: | Height: | Size: 280 B |
BIN
src/main/java/assets/hbm/textures/models/machines/fel.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 3.0 KiB |
BIN
src/main/java/assets/hbm/textures/models/turrets/richard.png
Normal file
|
After Width: | Height: | Size: 883 B |
@ -437,7 +437,9 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_gascent;
|
||||
public static final int guiID_gascent = 71;
|
||||
|
||||
|
||||
public static Block machine_fel;
|
||||
public static final int guiID_fel = 71;
|
||||
public static Block machine_silex;
|
||||
public static final int guiID_silex = 71;
|
||||
|
||||
@ -805,6 +807,8 @@ public class ModBlocks {
|
||||
public static final int guiID_jeremy = 105;
|
||||
public static Block turret_tauon;
|
||||
public static final int guiID_tauon = 106;
|
||||
public static Block turret_richard;
|
||||
public static final int guiID_richard = 108;
|
||||
|
||||
public static Block book_guide;
|
||||
|
||||
@ -1247,7 +1251,8 @@ public class ModBlocks {
|
||||
|
||||
machine_centrifuge = new MachineCentrifuge(Material.iron).setBlockName("machine_centrifuge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_gascent = new MachineGasCent(Material.iron).setBlockName("machine_gascent").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_silex = new MachineSILEX(Material.iron).setBlockName("machine_silex").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");;
|
||||
machine_fel = new MachineFEL(Material.iron).setBlockName("machine_fel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_silex = new MachineSILEX(Material.iron).setBlockName("machine_silex").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_crystallizer = new MachineCrystallizer(Material.iron).setBlockName("machine_crystallizer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_crystallizer");
|
||||
|
||||
machine_uf6_tank = new MachineUF6Tank(Material.iron).setBlockName("machine_uf6_tank").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
@ -1479,10 +1484,11 @@ public class ModBlocks {
|
||||
turret_cwis = new TurretCIWS(Material.iron).setBlockName("turret_cwis").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":turret_cwis");
|
||||
turret_cheapo = new TurretCheapo(Material.iron).setBlockName("turret_cheapo").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":turret_cheapo");
|
||||
|
||||
turret_chekhov = new TurretChekhov(Material.iron).setBlockName("turret_chekhov").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":turret_chekhov");
|
||||
turret_friendly = new TurretFriendly(Material.iron).setBlockName("turret_friendly").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":turret_friendly");
|
||||
turret_jeremy = new TurretJeremy(Material.iron).setBlockName("turret_jeremy").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":turret_jeremy");
|
||||
turret_tauon = new TurretTauon(Material.iron).setBlockName("turret_tauon").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":turret_tauon");
|
||||
turret_chekhov = new TurretChekhov(Material.iron).setBlockName("turret_chekhov").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
turret_friendly = new TurretFriendly(Material.iron).setBlockName("turret_friendly").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
turret_jeremy = new TurretJeremy(Material.iron).setBlockName("turret_jeremy").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
turret_tauon = new TurretTauon(Material.iron).setBlockName("turret_tauon").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
turret_richard = new TurretRichard(Material.iron).setBlockName("turret_richard").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
|
||||
book_guide = new Guide(Material.iron).setBlockName("book_guide").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.nukeTab);
|
||||
|
||||
@ -1981,6 +1987,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(turret_friendly, turret_friendly.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(turret_jeremy, turret_jeremy.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(turret_tauon, turret_tauon.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(turret_richard, turret_richard.getUnlocalizedName());
|
||||
|
||||
//Mines
|
||||
GameRegistry.registerBlock(mine_ap, mine_ap.getUnlocalizedName());
|
||||
@ -2064,6 +2071,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_difurnace_on, machine_difurnace_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_centrifuge, machine_centrifuge.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_gascent, machine_gascent.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_fel, machine_fel.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_silex, machine_silex.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_crystallizer, machine_crystallizer.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_uf6_tank, machine_uf6_tank.getUnlocalizedName());
|
||||
|
||||
34
src/main/java/com/hbm/blocks/machine/MachineFEL.java
Normal file
@ -0,0 +1,34 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.machine.TileEntityFEL;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachineFEL extends BlockDummyable {
|
||||
|
||||
public MachineFEL(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityFEL();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {2, 0, 4, 2, 1, 1};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
}
|
||||
68
src/main/java/com/hbm/blocks/turret/TurretRichard.java
Normal file
@ -0,0 +1,68 @@
|
||||
package com.hbm.blocks.turret;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.turret.TileEntityTurretRichard;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TurretRichard extends BlockDummyable {
|
||||
|
||||
public TurretRichard(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityTurretRichard();
|
||||
return new TileEntityProxyCombo(true, true, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] { 0, 0, 1, 0, 1, 0 };
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) {
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
|
||||
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking()) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
return false;
|
||||
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_richard, world, pos[0], pos[1], pos[2]);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -11,6 +11,7 @@ import com.hbm.tileentity.machine.*;
|
||||
import com.hbm.tileentity.turret.TileEntityTurretChekhov;
|
||||
import com.hbm.tileentity.turret.TileEntityTurretFriendly;
|
||||
import com.hbm.tileentity.turret.TileEntityTurretJeremy;
|
||||
import com.hbm.tileentity.turret.TileEntityTurretRichard;
|
||||
import com.hbm.tileentity.turret.TileEntityTurretTauon;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -759,6 +760,13 @@ public class GUIHandler implements IGuiHandler {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_richard: {
|
||||
if(entity instanceof TileEntityTurretRichard) {
|
||||
return new ContainerTurretBase(player.inventory, (TileEntityTurretRichard) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// NON-TE CONTAINERS
|
||||
|
||||
@ -1503,6 +1511,13 @@ public class GUIHandler implements IGuiHandler {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_richard: {
|
||||
if(entity instanceof TileEntityTurretRichard) {
|
||||
return new GUITurretRichard(player.inventory, (TileEntityTurretRichard) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// ITEM GUIS
|
||||
|
||||
|
||||
20
src/main/java/com/hbm/inventory/gui/GUITurretRichard.java
Normal file
@ -0,0 +1,20 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.turret.TileEntityTurretBaseNT;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUITurretRichard extends GUITurretBase {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/weapon/gui_turret_richard.png");
|
||||
|
||||
public GUITurretRichard(InventoryPlayer invPlayer, TileEntityTurretBaseNT tedf) {
|
||||
super(invPlayer, tedf);
|
||||
}
|
||||
|
||||
protected ResourceLocation getTexture() {
|
||||
return texture;
|
||||
}
|
||||
}
|
||||
@ -4288,20 +4288,20 @@ public class ModItems {
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(6))
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(2))
|
||||
.addBreakAbility(new ToolAbility.SilkAbility())
|
||||
.addBreakAbility(new LuckAbility(1))
|
||||
.addBreakAbility(new LuckAbility(5))
|
||||
.addHitAbility(new WeaponAbility.StunAbility(3)).setUnlocalizedName("starmetal_pickaxe").setTextureName(RefStrings.MODID + ":starmetal_pickaxe");
|
||||
starmetal_axe = new ItemToolAbility(12F, 0, matStarmetal, EnumToolType.AXE)
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(6))
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(2))
|
||||
.addBreakAbility(new ToolAbility.SilkAbility())
|
||||
.addBreakAbility(new LuckAbility(1))
|
||||
.addBreakAbility(new LuckAbility(5))
|
||||
.addHitAbility(new WeaponAbility.BeheaderAbility())
|
||||
.addHitAbility(new WeaponAbility.StunAbility(3)).setUnlocalizedName("starmetal_axe").setTextureName(RefStrings.MODID + ":starmetal_axe");
|
||||
starmetal_shovel = new ItemToolAbility(7F, 0, matStarmetal, EnumToolType.SHOVEL)
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(6))
|
||||
.addBreakAbility(new ToolAbility.HammerAbility(2))
|
||||
.addBreakAbility(new ToolAbility.SilkAbility())
|
||||
.addBreakAbility(new LuckAbility(1))
|
||||
.addBreakAbility(new LuckAbility(5))
|
||||
.addHitAbility(new WeaponAbility.StunAbility(3)).setUnlocalizedName("starmetal_shovel").setTextureName(RefStrings.MODID + ":starmetal_shovel");
|
||||
starmetal_hoe = new ModHoe(matStarmetal).setUnlocalizedName("starmetal_hoe").setTextureName(RefStrings.MODID + ":starmetal_hoe");
|
||||
|
||||
|
||||
@ -75,6 +75,7 @@ public class Library {
|
||||
public static String ShimmeringBlaze = "061bc566-ec74-4307-9614-ac3a70d2ef38";
|
||||
public static String FifeMiner = "37e5eb63-b9a2-4735-9007-1c77d703daa3";
|
||||
public static String lag_add = "259785a0-20e9-4c63-9286-ac2f93ff528f";
|
||||
public static String Pu_238 = "c95fdfd3-bea7-4255-a44b-d21bc3df95e3";
|
||||
|
||||
public static Set<String> contributors = Sets.newHashSet(new String[] {
|
||||
"06ab7c03-55ce-43f8-9d3c-2850e3c652de", //mustang_rudolf
|
||||
|
||||
@ -127,6 +127,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretFriendly.class, new RenderTurretFriendly());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretJeremy.class, new RenderTurretJeremy());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretTauon.class, new RenderTurretTauon());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretRichard.class, new RenderTurretRichard());
|
||||
//mines
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLandmine.class, new RenderLandmine());
|
||||
//cel prime
|
||||
@ -138,6 +139,7 @@ public class ClientProxy extends ServerProxy {
|
||||
//machines
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineCentrifuge.class, new RenderCentrifuge());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineGasCent.class, new RenderCentrifuge());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFEL.class, new RenderFEL());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySILEX.class, new RenderSILEX());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineUF6Tank.class, new RenderUF6Tank());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePuF6Tank.class, new RenderPuF6Tank());
|
||||
|
||||
@ -455,6 +455,9 @@ public class MainRegistry {
|
||||
GameRegistry.registerTileEntity(TileEntityTurretJeremy.class, "tileentity_turret_jeremy");
|
||||
GameRegistry.registerTileEntity(TileEntityTurretTauon.class, "tileentity_turret_tauon");
|
||||
GameRegistry.registerTileEntity(TileEntityTurretFriendly.class, "tileentity_turret_friendly");
|
||||
GameRegistry.registerTileEntity(TileEntityTurretRichard.class, "tileentity_turret_richard");
|
||||
GameRegistry.registerTileEntity(TileEntitySILEX.class, "tileentity_silex");
|
||||
GameRegistry.registerTileEntity(TileEntityFEL.class, "tileentity_fel");
|
||||
|
||||
EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true);
|
||||
|
||||
@ -44,6 +44,7 @@ import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.PlayerInformPacket;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.saveddata.AuxSavedData;
|
||||
import com.hbm.saveddata.RadiationSavedData;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
@ -658,6 +659,22 @@ public class ModEventHandler
|
||||
}
|
||||
}
|
||||
/// BETA HEALTH END ///
|
||||
|
||||
/// PU RADIATION START ///
|
||||
|
||||
if(player.getUniqueID().toString().equals(Library.Pu_238)) {
|
||||
|
||||
List<EntityLivingBase> entities = player.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, player.boundingBox.expand(3, 3, 3));
|
||||
|
||||
for(EntityLivingBase e : entities) {
|
||||
|
||||
if(e != player) {
|
||||
e.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 300, 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// PU RADIATION END ///
|
||||
}
|
||||
|
||||
//TODO: rewrite this so it doesn't look like shit
|
||||
@ -677,6 +694,16 @@ public class ModEventHandler
|
||||
player.worldObj.spawnParticle("townaura", player.posX + vec.xCoord, player.posY + 1 + player.worldObj.rand.nextDouble() * 0.05, player.posZ + vec.zCoord, 0.0, 0.0, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
if(player.getUniqueID().toString().equals(Library.Pu_238)) {
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(3 * rand.nextDouble(), 0, 0);
|
||||
|
||||
vec.rotateAroundZ((float) (rand.nextDouble() * Math.PI));
|
||||
vec.rotateAroundY((float) (rand.nextDouble() * Math.PI * 2));
|
||||
|
||||
player.worldObj.spawnParticle("townaura", player.posX + vec.xCoord, player.posY + 1 + vec.yCoord, player.posZ + vec.zCoord, 0.0, 0.0, 0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -41,6 +41,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom turret_chekhov = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_chekhov.obj"));
|
||||
public static final IModelCustom turret_jeremy = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_jeremy.obj"));
|
||||
public static final IModelCustom turret_tauon = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_tauon.obj"));
|
||||
public static final IModelCustom turret_richard = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_richard.obj"));
|
||||
|
||||
//Landmines
|
||||
public static final IModelCustom mine_ap = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mine_ap.obj"));
|
||||
@ -104,6 +105,7 @@ public class ResourceManager {
|
||||
//Centrifuge
|
||||
public static final IModelCustom centrifuge_new = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/centrifuge_new.obj"));
|
||||
public static final IModelCustom silex = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/silex.obj"));
|
||||
public static final IModelCustom fel = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/fel.obj"));
|
||||
|
||||
//Magnusson Device
|
||||
public static final IModelCustom microwave = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/microwave.obj"));
|
||||
@ -273,6 +275,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation turret_chekhov_barrels_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/chekhov_barrels.png");
|
||||
public static final ResourceLocation turret_jeremy_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/jeremy.png");
|
||||
public static final ResourceLocation turret_tauon_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/tauon.png");
|
||||
public static final ResourceLocation turret_richard_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/richard.png");
|
||||
|
||||
//Landmines
|
||||
public static final ResourceLocation mine_ap_tex = new ResourceLocation(RefStrings.MODID, "textures/models/mine_ap.png");
|
||||
@ -342,6 +345,7 @@ public class ResourceManager {
|
||||
//Centrifuge
|
||||
public static final ResourceLocation centrifuge_new_tex = new ResourceLocation(RefStrings.MODID, "textures/models/centrifuge_new.png");
|
||||
public static final ResourceLocation centrifuge_gas_tex = new ResourceLocation(RefStrings.MODID, "textures/models/centrifuge_gas.png");
|
||||
public static final ResourceLocation fel_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/fel.png");
|
||||
public static final ResourceLocation silex_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/silex.png");
|
||||
|
||||
//Magnusson Device
|
||||
|
||||
@ -873,6 +873,19 @@ public class ItemRenderLibrary {
|
||||
ResourceManager.turret_tauon.renderPart("Rotor");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.turret_richard), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2, 0);
|
||||
GL11.glScaled(5, 5, 5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.turret_base_tex); ResourceManager.turret_chekhov.renderPart("Base");
|
||||
bindTexture(ResourceManager.turret_carriage_tex); ResourceManager.turret_chekhov.renderPart("Carriage");
|
||||
bindTexture(ResourceManager.turret_richard_tex); ResourceManager.turret_richard.renderPart("Launcher");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
}
|
||||
|
||||
private static void bindTexture(ResourceLocation res) {
|
||||
|
||||
43
src/main/java/com/hbm/render/tileentity/RenderFEL.java
Normal file
@ -0,0 +1,43 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.BeamPronter;
|
||||
import com.hbm.render.util.BeamPronter.EnumBeamType;
|
||||
import com.hbm.render.util.BeamPronter.EnumWaveType;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
public class RenderFEL extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(tileEntity.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 4: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 2: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.fel_tex);
|
||||
ResourceManager.fel.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glTranslated(0, 1.5, -2.5 + 0.0625);
|
||||
BeamPronter.prontBeam(Vec3.createVectorHelper(0, 0, -8), EnumWaveType.SPIRAL, EnumBeamType.SOLID, 0x400000, 0x400000, 0, 1, 0F, 2, 0.0625F);
|
||||
BeamPronter.prontBeam(Vec3.createVectorHelper(0, 0, -8), EnumWaveType.RANDOM, EnumBeamType.SOLID, 0x400000, 0x400000, (int)(tileEntity.getWorldObj().getTotalWorldTime() % 1000 / 2), 24, 0.0625F, 2, 0.0625F);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -16,6 +16,7 @@ public class RenderSILEX extends TileEntitySpecialRenderer {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(tileEntity.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 4: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.turret.TileEntityTurretRichard;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
public class RenderTurretRichard extends RenderTurretBase {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float interp) {
|
||||
|
||||
TileEntityTurretRichard turret = (TileEntityTurretRichard)te;
|
||||
Vec3 pos = turret.getHorizontalOffset();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + pos.xCoord, y, z + pos.zCoord);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
this.renderConnectors(turret, true, false, FluidType.NONE);
|
||||
|
||||
bindTexture(ResourceManager.turret_base_tex);
|
||||
ResourceManager.turret_chekhov.renderPart("Base");
|
||||
double yaw = -Math.toDegrees(turret.lastRotationYaw + (turret.rotationYaw - turret.lastRotationYaw) * interp) - 90D;
|
||||
double pitch = Math.toDegrees(turret.lastRotationPitch + (turret.rotationPitch - turret.lastRotationPitch) * interp);
|
||||
|
||||
GL11.glRotated(yaw, 0, 1, 0);
|
||||
bindTexture(ResourceManager.turret_carriage_tex);
|
||||
ResourceManager.turret_chekhov.renderPart("Carriage");
|
||||
|
||||
GL11.glTranslated(0, 1.5, 0);
|
||||
GL11.glRotated(pitch, 0, 0, 1);
|
||||
GL11.glTranslated(0, -1.5, 0);
|
||||
bindTexture(ResourceManager.turret_richard_tex);
|
||||
ResourceManager.turret_richard.renderPart("Launcher");
|
||||
|
||||
GL11.glTranslated(0, 0.375, 0.1875);
|
||||
|
||||
for(int i = 0; i < turret.loaded; i++) {
|
||||
ResourceManager.turret_richard.renderPart("MissileLoaded");
|
||||
|
||||
if(i == 2 || i == 6 || i == 9 || i == 13) {
|
||||
GL11.glTranslated(0, -0.1875, 0.1875 * 2 + 0.09375);
|
||||
} else {
|
||||
|
||||
GL11.glTranslated(0, 0, -0.1875);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
28
src/main/java/com/hbm/tileentity/machine/TileEntityFEL.java
Normal file
@ -0,0 +1,28 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntityFEL extends TileEntity {
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 4,
|
||||
yCoord,
|
||||
zCoord - 4,
|
||||
xCoord + 5,
|
||||
yCoord + 3,
|
||||
zCoord + 5
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared()
|
||||
{
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||
@ -1,11 +1,28 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
public class TileEntitySILEX extends TileEntityMachineBase {
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcceptor {
|
||||
|
||||
public FluidTank tank;
|
||||
public ItemStack current;
|
||||
public int currentFill;
|
||||
public int progress;
|
||||
public final int processTime = 100;
|
||||
|
||||
public TileEntitySILEX() {
|
||||
super(15);
|
||||
super(11);
|
||||
tank = new FluidTank(FluidType.ACID, 16000, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -16,6 +33,57 @@ public class TileEntitySILEX extends TileEntityMachineBase {
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 1,
|
||||
yCoord,
|
||||
zCoord - 1,
|
||||
xCoord + 2,
|
||||
yCoord + 3,
|
||||
zCoord + 2
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared()
|
||||
{
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,9 +20,12 @@ import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.INpc;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.entity.monster.IMob;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.passive.EntityVillager;
|
||||
import net.minecraft.entity.passive.IAnimals;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -508,8 +511,13 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
|
||||
if(e.isDead || !e.isEntityAlive())
|
||||
return false;
|
||||
|
||||
if(targetAnimals && e instanceof EntityAnimal)
|
||||
return true;
|
||||
if(targetAnimals) {
|
||||
|
||||
if(e instanceof IAnimals)
|
||||
return true;
|
||||
if(e instanceof INpc)
|
||||
return true;
|
||||
}
|
||||
|
||||
if(targetMobs && e instanceof IMob)
|
||||
return true;
|
||||
|
||||
@ -0,0 +1,166 @@
|
||||
package com.hbm.tileentity.turret;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
public class TileEntityTurretRichard extends TileEntityTurretBaseNT {
|
||||
|
||||
static List<Integer> configs = new ArrayList();
|
||||
|
||||
static {
|
||||
configs.add(BulletConfigSyncingUtil.ROCKET_NORMAL);
|
||||
configs.add(BulletConfigSyncingUtil.ROCKET_HE);
|
||||
configs.add(BulletConfigSyncingUtil.ROCKET_INCENDIARY);
|
||||
configs.add(BulletConfigSyncingUtil.ROCKET_SHRAPNEL);
|
||||
configs.add(BulletConfigSyncingUtil.ROCKET_EMP);
|
||||
configs.add(BulletConfigSyncingUtil.ROCKET_GLARE);
|
||||
configs.add(BulletConfigSyncingUtil.ROCKET_SLEEK);
|
||||
configs.add(BulletConfigSyncingUtil.ROCKET_NUKE);
|
||||
configs.add(BulletConfigSyncingUtil.ROCKET_CHAINSAW);
|
||||
configs.add(BulletConfigSyncingUtil.ROCKET_TOXIC);
|
||||
configs.add(BulletConfigSyncingUtil.ROCKET_PHOSPHORUS);
|
||||
configs.add(BulletConfigSyncingUtil.ROCKET_CANISTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<Integer> getAmmoList() {
|
||||
return configs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.turretRichard";
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getTurretDepression() {
|
||||
return 25D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getTurretElevation() {
|
||||
return 25D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getBarrelLength() {
|
||||
return 1.25D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return 10000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDecetorGrace() {
|
||||
return 8D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDecetorRange() {
|
||||
return 80D;
|
||||
}
|
||||
|
||||
int timer;
|
||||
public int loaded;
|
||||
int reload;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(reload > 0) {
|
||||
reload--;
|
||||
|
||||
if(reload == 0)
|
||||
this.loaded = 17;
|
||||
}
|
||||
|
||||
if(loaded <= 0 && reload <= 0 && this.getFirstConfigLoaded() != null) {
|
||||
reload = 100;
|
||||
}
|
||||
|
||||
if(this.getFirstConfigLoaded() == null) {
|
||||
this.loaded = 0;
|
||||
}
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setInteger("loaded", this.loaded);
|
||||
this.networkPack(data, 250);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
|
||||
if(nbt.hasKey("loaded"))
|
||||
this.loaded = nbt.getInteger("loaded");
|
||||
else
|
||||
super.networkUnpack(nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFiringTick() {
|
||||
|
||||
if(reload > 0)
|
||||
return;
|
||||
|
||||
timer++;
|
||||
|
||||
if(timer > 0 && timer % 10 == 0) {
|
||||
|
||||
BulletConfiguration conf = this.getFirstConfigLoaded();
|
||||
|
||||
if(conf != null) {
|
||||
this.spawnBullet(conf);
|
||||
this.conusmeAmmo(conf.ammo);
|
||||
this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:turret.richard_fire", 2.0F, 1.0F);
|
||||
this.loaded--;
|
||||
|
||||
if(conf.ammo == ModItems.ammo_rocket_nuclear)
|
||||
timer = -50;
|
||||
|
||||
} else {
|
||||
this.loaded = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnBullet(BulletConfiguration bullet) {
|
||||
|
||||
Vec3 pos = this.getTurretPos();
|
||||
Vec3 vec = Vec3.createVectorHelper(this.getBarrelLength(), 0, 0);
|
||||
vec.rotateAroundZ((float) -this.rotationPitch);
|
||||
vec.rotateAroundY((float) -(this.rotationYaw + Math.PI * 0.75));
|
||||
|
||||
EntityBulletBase proj = new EntityBulletBase(worldObj, BulletConfigSyncingUtil.getKey(bullet));
|
||||
proj.setPositionAndRotation(pos.xCoord + vec.xCoord, pos.yCoord + vec.yCoord, pos.zCoord + vec.zCoord, 0.0F, 0.0F);
|
||||
|
||||
proj.setThrowableHeading(vec.xCoord, vec.yCoord, vec.zCoord, bullet.velocity * 0.5F, bullet.spread);
|
||||
worldObj.spawnEntityInWorld(proj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
this.loaded = nbt.getInteger("loaded");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setInteger("loaded", this.loaded);
|
||||
}
|
||||
}
|
||||