mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-03-16 06:35:35 +00:00
backup of master branch after PR
This commit is contained in:
parent
a5c49f6d64
commit
c9298baf81
51
changelog
51
changelog
@ -1,3 +1,52 @@
|
||||
## Added
|
||||
* Nitra
|
||||
* Dropped by the painsaw ability when killing a mob
|
||||
* Can be used to quickly craft standard ammo types in the 2x2 crafting grid
|
||||
* Can also refill empty syringes, making stimpaks
|
||||
* Latex
|
||||
* Can be made from dandelions or from pressing jungle wood
|
||||
* Replaces insulator in many recipes where electrical insulation that is potentially made from brick doesn't make sense, like rubber gas masks, jackets, tools and so on
|
||||
* Latex is interchangable with rubber in all recipes where it's used, but not the other way round
|
||||
* The old insulator is now mainly used for electrical and heat insulation as well as PWR rods
|
||||
* Radar screen
|
||||
* Radars can be linked to one radar screen, which will display all detected blips
|
||||
* Right-clicking the radar screen will open the GUI of the radar that it is linked to
|
||||
|
||||
## Changed
|
||||
* Light oil and cracked light oil can now be reformed into large quantities of aromatic hydrocarbons a well as some reformate gas
|
||||
* The painsaw ability no longer drops ammo and syringes, instead it drops nitra
|
||||
* Radars have been completely rewritten
|
||||
* Dots will now move smoothly across the screen, instead of jittering and being bound to the pixel grid
|
||||
* Radars no longer use CPU-intensive full scans of the map, instead of using an optimized search for nearby scannable entities
|
||||
* There's now a dedicated toggle for detecting artillery shells
|
||||
* Radars now have a local area map that can be enabled
|
||||
* The map scans up to 100 points per tick, the display can show 40,000 points
|
||||
* The map will scan loaded chunks instantly, unloaded chunks have a limit 10 chunkloads per tick to prevent excessive lag. Chunks that have not yet been generated yet will show up as black spots, and will never be loaded
|
||||
* The chunk load limit as well as whether chunks should be generated can be adjusted in the machine config file
|
||||
* The map will show terrain height between Y:50 and Y:128, anything outside that range is truncated
|
||||
* Radars now have a second GUI which allows the use of a battery, as well as linking the radar to other machines
|
||||
* By using the number keys, the radar can now launch missiles, ABMs or artillery at the current aimed at position
|
||||
* Radars can be linked to one additional radar screen which shows part of the radar's GUI in-world
|
||||
* The turbofan's afterburner now adds a 33% efficiency bonus for every level. This means that instead of the efficiency remaining constant between levels, a tier 3 upgrade will yield double efficiency.
|
||||
* Reduced the flarestack's base energy efficiency
|
||||
* Trenchmaster armor is now unbreakable
|
||||
* The arc welder recipe for advanced circuits now uses simple insulator instead of gold dust
|
||||
* The arc welder recipes for enhanced and advanced circuits now use only 100mB of fluid instead of 250mB
|
||||
* Completely rewrote the missile base code, missiles now accelerate smoothly instead of in increments and use interpolated movement, making them less jittery
|
||||
* Missiles now have a slightly higher top-speed
|
||||
* Remodeled tier 1, 2 and 3 missiles as well as the anti-ballistic missile
|
||||
* Anti-ballistic missiles now use predictive targeting as well as a heightened sensor range of 1,000 blocks (instead of 500) which should make them a lot more effective
|
||||
* Anti-ballistic missiles accelerate 4x faster than normal missiles and have a 50% higher top-speed
|
||||
* Anti-ballistic missiles can now load their own chunks, allowing them to get to far away incoming missiles without getting stuck
|
||||
* PWRs that have recently been close to unloaded chunks now have a 40 tick timeframe where they are "frozen", only trying to connect to a fluid network but not doing any fission, this should reduce the amount of meltdowns caused by chunkloading
|
||||
* Glyphid hive blocks now have some color variance
|
||||
* Glpyhid spawners now have a unique texture
|
||||
|
||||
## Fixed
|
||||
* Fixed thorium bedrock ore using the wrong ore dict key, making it unable to be processed via centrifuge or acidizer
|
||||
* Fixed custom machine NEI slots going out of bounds after the third slot
|
||||
* Fixed custom machine NEI slots going out of bounds after the third slot
|
||||
* Fixed bismuth billets not being oredicted, making BFB PWR rods uncraftable
|
||||
* Fixed missile chunkloading having rounding issues, sometimes causing them to get stuck in unloaded chunks while crossing chunk borders
|
||||
* Fixed drones not being listed in the creative tabs
|
||||
* Fixed pre-defined fluid duct items not being being able to be placed where replacable blocks are, eg. water
|
||||
* Fixed horrible gamebreaking bug where the reinforced glass pane has too much blast resistance
|
||||
@ -1,6 +1,6 @@
|
||||
mod_version=1.0.27
|
||||
# Empty build number makes a release type
|
||||
mod_build_number=4775
|
||||
mod_build_number=4795
|
||||
|
||||
credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms),\
|
||||
\ Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models,\
|
||||
@ -8,11 +8,12 @@ credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion al
|
||||
\ (chinese localization), Frooz (models), Minecreep (models), VT-6/24 (models, textures), Pheo (textures,\
|
||||
\ various machines, models, weapons), Vær (gas centrifuges, better worldgen, ZIRNOX, CP-1 parts, starter guide),\
|
||||
\ Adam29 (liquid petroleum, ethanol, electric furnace), Pashtet (russian localization), MartinTheDragon\
|
||||
\ (calculator, chunk-based fallout, bendable cranes), haru315 (spiral point algorithm), Sten89 (models), Pixelguru26\
|
||||
\ (textures), TheBlueHat (textures), Alcater (GUI textures, porting), impbk2002 (project settings), Nos (models),\
|
||||
\ Burningwater202 (laminate glass), OvermindDL1 (project settings), TehTemmie (reacher radiation function),\
|
||||
\ Toshayo (satellite loot system, project settings, gradle curse task), Silly541 (config for safe ME drives),\
|
||||
\ Voxelstice (OpenComputers integration, turbine spinup), BallOfEnergy1 (OpenComputers integration), martemen\
|
||||
\ (project settings), Pvndols (thorium fuel recipe, gas turbine), JamesH2 (blood mechanics, nitric acid,\
|
||||
\ particle emitter), sdddddf80 (recipe configs, chinese localization, custom machine holograms),\
|
||||
\ SuperCraftAlex (tooltips) LePeep (coilgun model, BDCL QC), 70k (textures), Maksymisio (polish localization)
|
||||
\ (calculator, chunk-based fallout, bendable cranes, pipe improvements), haru315 (spiral point algorithm),\
|
||||
\ Sten89 (models), Pixelguru26 (textures), TheBlueHat (textures), Alcater (GUI textures, porting), impbk2002\
|
||||
\ (project settings), Nos (models), Burningwater202 (laminate glass), OvermindDL1 (project settings), TehTemmie\
|
||||
\ (reacher radiation function), Toshayo (satellite loot system, project settings, gradle curse task), Silly541\
|
||||
\ (config for safe ME drives), Voxelstice (OpenComputers integration, turbine spinup), BallOfEnergy1\
|
||||
\ (OpenComputers integration), martemen (project settings), Pvndols (thorium fuel recipe, gas turbine),\
|
||||
\ JamesH2 (blood mechanics, nitric acid, particle emitter), sdddddf80 (recipe configs, chinese localization,\
|
||||
\ custom machine holograms, I18n improvements), SuperCraftAlex (tooltips) LePeep (coilgun model, BDCL QC),\
|
||||
\ 70k (textures), Maksymisio (polish localization) Ice-Arrow (research reactor tweaks)
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package api.hbm.entity;
|
||||
|
||||
@Deprecated //Use IRadarDetectableNT instead, old interface will still work though
|
||||
public interface IRadarDetectable {
|
||||
|
||||
public static enum RadarTargetType {
|
||||
@ -15,7 +16,7 @@ public interface IRadarDetectable {
|
||||
MISSILE_20("Size 20 Custom Missile"), //size 20 custom missiles
|
||||
MISSILE_AB("Anti-Ballistic Missile"), //anti ballistic missile
|
||||
PLAYER("Player"), //airborne players
|
||||
ARTILLERY("Artillery Shell"); //airborne players
|
||||
ARTILLERY("Artillery Shell"); //artillery shells
|
||||
|
||||
public String name;
|
||||
|
||||
|
||||
45
src/main/java/api/hbm/entity/IRadarDetectableNT.java
Normal file
45
src/main/java/api/hbm/entity/IRadarDetectableNT.java
Normal file
@ -0,0 +1,45 @@
|
||||
package api.hbm.entity;
|
||||
|
||||
public interface IRadarDetectableNT {
|
||||
|
||||
public static final int TIER0 = 0;
|
||||
public static final int TIER1 = 1;
|
||||
public static final int TIER2 = 2;
|
||||
public static final int TIER3 = 3;
|
||||
public static final int TIER4 = 4;
|
||||
public static final int TIER10 = 5;
|
||||
public static final int TIER10_15 = 6;
|
||||
public static final int TIER15 = 7;
|
||||
public static final int TIER15_20 = 8;
|
||||
public static final int TIER20 = 9;
|
||||
public static final int TIER_AB = 10;
|
||||
public static final int PLAYER = 11;
|
||||
public static final int ARTY = 12;
|
||||
/** Reserved type that shows a unique purple blip. Used for when nothing else applies. */
|
||||
public static final int SPECIAL = 13;
|
||||
|
||||
/** Name use for radar display, uses I18n for lookup */
|
||||
public String getUnlocalizedName();
|
||||
/** The type of dot to show on the radar as well as the redstone level in tier mode */
|
||||
public int getBlipLevel();
|
||||
/** Whether the object can be seen by this type of radar */
|
||||
public boolean canBeSeenBy(Object radar);
|
||||
/** Whether the object is currently visible, as well as whether the radar's setting allow for picking this up */
|
||||
public boolean paramsApplicable(RadarScanParams params);
|
||||
/** Whether this radar entry should be counted for the redstone output */
|
||||
public boolean suppliesRedstone(RadarScanParams params);
|
||||
|
||||
public static class RadarScanParams {
|
||||
public boolean scanMissiles = true;
|
||||
public boolean scanShells = true;
|
||||
public boolean scanPlayers = true;
|
||||
public boolean smartMode = true;
|
||||
|
||||
public RadarScanParams(boolean m, boolean s, boolean p, boolean smart) {
|
||||
this.scanMissiles = m;
|
||||
this.scanShells = s;
|
||||
this.scanPlayers = p;
|
||||
this.smartMode = smart;
|
||||
}
|
||||
}
|
||||
}
|
||||
66
src/main/java/api/hbm/entity/RadarEntry.java
Normal file
66
src/main/java/api/hbm/entity/RadarEntry.java
Normal file
@ -0,0 +1,66 @@
|
||||
package api.hbm.entity;
|
||||
|
||||
import cpw.mods.fml.common.network.ByteBufUtils;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public class RadarEntry {
|
||||
|
||||
/** Name use for radar display, uses I18n for lookup */
|
||||
public String unlocalizedName;
|
||||
/** The type of dot to show on the radar as well as the redstone level in tier mode */
|
||||
public int blipLevel;
|
||||
public int posX;
|
||||
public int posY;
|
||||
public int posZ;
|
||||
public int dim;
|
||||
public int entityID;
|
||||
/** Whether this radar entry should be counted for the redstone output */
|
||||
public boolean redstone;
|
||||
|
||||
public RadarEntry() { } //blank ctor for packets
|
||||
|
||||
public RadarEntry(String name, int level, int x, int y, int z, int dim, int entityID, boolean redstone) {
|
||||
this.unlocalizedName = name;
|
||||
this.blipLevel = level;
|
||||
this.posX = x;
|
||||
this.posY = y;
|
||||
this.posZ = z;
|
||||
this.dim = dim;
|
||||
this.entityID = entityID;
|
||||
this.redstone = redstone;
|
||||
}
|
||||
|
||||
public RadarEntry(IRadarDetectableNT detectable, Entity entity, boolean redstone) {
|
||||
this(detectable.getUnlocalizedName(), detectable.getBlipLevel(), (int) Math.floor(entity.posX), (int) Math.floor(entity.posY), (int) Math.floor(entity.posZ), entity.dimension, entity.getEntityId(), redstone);
|
||||
}
|
||||
|
||||
public RadarEntry(IRadarDetectable detectable, Entity entity) {
|
||||
this(detectable.getTargetType().name, detectable.getTargetType().ordinal(), (int) Math.floor(entity.posX), (int) Math.floor(entity.posY), (int) Math.floor(entity.posZ), entity.dimension, entity.getEntityId(), entity.motionY < 0);
|
||||
}
|
||||
|
||||
public RadarEntry(EntityPlayer player) {
|
||||
this(player.getDisplayName(), IRadarDetectableNT.PLAYER, (int) Math.floor(player.posX), (int) Math.floor(player.posY), (int) Math.floor(player.posZ), player.dimension, player.getEntityId(), true);
|
||||
}
|
||||
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
this.unlocalizedName = ByteBufUtils.readUTF8String(buf);
|
||||
this.blipLevel = buf.readShort();
|
||||
this.posX = buf.readInt();
|
||||
this.posY = buf.readInt();
|
||||
this.posZ = buf.readInt();
|
||||
this.dim = buf.readShort();
|
||||
this.entityID = buf.readInt();
|
||||
}
|
||||
|
||||
public void toBytes(ByteBuf buf) {
|
||||
ByteBufUtils.writeUTF8String(buf, this.unlocalizedName);
|
||||
buf.writeShort(this.blipLevel);
|
||||
buf.writeInt(this.posX);
|
||||
buf.writeInt(this.posY);
|
||||
buf.writeInt(this.posZ);
|
||||
buf.writeShort(this.dim);
|
||||
buf.writeInt(this.entityID);
|
||||
}
|
||||
}
|
||||
@ -21,9 +21,8 @@ public interface ITooltipProvider {
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
for(String s : I18nUtil.resolveKeyArray(((Block)this).getUnlocalizedName() + ".desc")) list.add(EnumChatFormatting.YELLOW + s);
|
||||
} else {
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +"Hold <" +
|
||||
EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "LSHIFT" +
|
||||
EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "> to display more info");
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +I18nUtil.resolveKey("tooltip.block" ,
|
||||
EnumChatFormatting.YELLOW +"" + EnumChatFormatting.ITALIC + "LSHIFT"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1057,8 +1057,9 @@ public class ModBlocks {
|
||||
public static Block launch_table;
|
||||
|
||||
public static Block soyuz_launcher;
|
||||
|
||||
|
||||
public static Block machine_radar;
|
||||
public static Block radar_screen;
|
||||
|
||||
public static Block machine_turbofan;
|
||||
public static Block machine_turbinegas;
|
||||
@ -1547,8 +1548,8 @@ public class ModBlocks {
|
||||
asphalt_light = new BlockSpeedy(Material.rock, 1.5).setBlockName("asphalt_light").setCreativeTab(MainRegistry.blockTab).setLightLevel(1F).setHardness(15.0F).setResistance(120.0F).setBlockTextureName(RefStrings.MODID + ":asphalt_light");
|
||||
|
||||
reinforced_brick = new BlockGeneric(Material.rock).setBlockName("reinforced_brick").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(300.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_brick");
|
||||
reinforced_glass = new BlockNTMGlassCT(0, RefStrings.MODID + ":reinforced_glass", Material.rock).setBlockName("reinforced_glass").setCreativeTab(MainRegistry.blockTab).setLightOpacity(0).setHardness(15.0F).setResistance(25.0F);
|
||||
reinforced_glass_pane = new BlockNTMGlassPane(0, RefStrings.MODID + ":reinforced_glass_pane", RefStrings.MODID + ":reinforced_glass_pane_edge", Material.rock, false).setBlockName("reinforced_glass_pane").setCreativeTab(MainRegistry.blockTab).setLightOpacity(1).setHardness(15.0F).setResistance(200.0F);
|
||||
reinforced_glass = new BlockNTMGlassCT(0, RefStrings.MODID + ":reinforced_glass", Material.rock).setBlockName("reinforced_glass").setCreativeTab(MainRegistry.blockTab).setLightOpacity(0).setHardness(2.0F).setResistance(25.0F);
|
||||
reinforced_glass_pane = new BlockNTMGlassPane(0, RefStrings.MODID + ":reinforced_glass_pane", RefStrings.MODID + ":reinforced_glass_pane_edge", Material.rock, false).setBlockName("reinforced_glass_pane").setCreativeTab(MainRegistry.blockTab).setLightOpacity(1).setHardness(2.0F).setResistance(25.0F);
|
||||
reinforced_light = new BlockGeneric(Material.rock).setBlockName("reinforced_light").setCreativeTab(MainRegistry.blockTab).setLightLevel(1.0F).setHardness(15.0F).setResistance(80.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_light");
|
||||
reinforced_sand = new BlockGeneric(Material.rock).setBlockName("reinforced_sand").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(40.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_sand");
|
||||
reinforced_lamp_off = new ReinforcedLamp(Material.rock, false).setBlockName("reinforced_lamp_off").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(80.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_lamp_off");
|
||||
@ -1728,8 +1729,8 @@ public class ModBlocks {
|
||||
mush = new BlockMush(Material.plants).setBlockName("mush").setCreativeTab(MainRegistry.blockTab).setLightLevel(0.5F).setStepSound(Block.soundTypeGrass).setBlockTextureName(RefStrings.MODID + ":mush");
|
||||
mush_block = new BlockMushHuge(Material.plants).setBlockName("mush_block").setLightLevel(1.0F).setStepSound(Block.soundTypeGrass).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":mush_block_skin");
|
||||
mush_block_stem = new BlockMushHuge(Material.plants).setBlockName("mush_block_stem").setLightLevel(1.0F).setStepSound(Block.soundTypeGrass).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":mush_block_stem");
|
||||
glyphid_base = new BlockBase(Material.coral).setBlockName("glyphid_base").setStepSound(Block.soundTypeCloth).setHardness(0.5F);
|
||||
glyphid_spawner = new BlockGlyphidSpawner(Material.coral).setBlockName("glyphid_spawner").setStepSound(Block.soundTypeCloth).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":glyphid_base");
|
||||
glyphid_base = new BlockGlyphid(Material.coral).setBlockName("glyphid_base").setStepSound(Block.soundTypeCloth).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":glyphid_base");
|
||||
glyphid_spawner = new BlockGlyphidSpawner(Material.coral).setBlockName("glyphid_spawner").setStepSound(Block.soundTypeCloth).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":glyphid_eggs_alt");
|
||||
|
||||
plant_flower = new BlockNTMFlower().setBlockName("plant_flower").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGrass).setHardness(0.0F);
|
||||
plant_tall = new BlockTallPlant().setBlockName("plant_tall").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGrass).setHardness(0.0F);
|
||||
@ -2164,6 +2165,7 @@ public class ModBlocks {
|
||||
|
||||
launch_pad = new LaunchPad(Material.iron).setBlockName("launch_pad").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":launch_pad");
|
||||
machine_radar = new MachineRadar(Material.iron).setBlockName("machine_radar").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":machine_radar");
|
||||
radar_screen = new MachineRadarScreen(Material.iron).setBlockName("radar_screen").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
|
||||
machine_missile_assembly = new MachineMissileAssembly(Material.iron).setBlockName("machine_missile_assembly").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":machine_missile_assembly");
|
||||
compact_launcher = new CompactLauncher(Material.iron).setBlockName("compact_launcher").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":compact_launcher");
|
||||
@ -3504,6 +3506,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(sat_dock, sat_dock.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(soyuz_capsule, soyuz_capsule.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_radar, machine_radar.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(radar_screen, radar_screen.getUnlocalizedName());
|
||||
|
||||
//Guide
|
||||
GameRegistry.registerBlock(book_guide, book_guide.getUnlocalizedName());
|
||||
|
||||
@ -2,38 +2,27 @@ package com.hbm.blocks.bomb;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.missile.*;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.bomb.TileEntityLaunchPad;
|
||||
|
||||
import api.hbm.item.IDesignatorItem;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class LaunchPad extends BlockContainer implements IBomb {
|
||||
|
||||
public TileEntityLaunchPad tetn = new TileEntityLaunchPad();
|
||||
public static boolean keepInventory = false;
|
||||
private final static Random field_149933_a = new Random();
|
||||
|
||||
@ -46,11 +35,6 @@ public class LaunchPad extends BlockContainer implements IBomb {
|
||||
return new TileEntityLaunchPad();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
return Item.getItemFromBlock(ModBlocks.launch_pad);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) {
|
||||
if(!keepInventory) {
|
||||
@ -132,186 +116,16 @@ public class LaunchPad extends BlockContainer implements IBomb {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
|
||||
if(i == 0) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
}
|
||||
if(i == 1) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
}
|
||||
if(i == 2) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
}
|
||||
if(i == 3) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @Override public void setBlockBoundsBasedOnState(IBlockAccess
|
||||
* p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) { float f
|
||||
* = 0.0625F; 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) { float f = 0.0625F;
|
||||
* this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 8*f, 1.0F); return
|
||||
* AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ,
|
||||
* x + this.maxX, y + this.maxY, z + this.maxZ); }
|
||||
*/
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) {
|
||||
return Item.getItemFromBlock(ModBlocks.launch_pad);
|
||||
}
|
||||
|
||||
@Spaghetti("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA *takes breath* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
|
||||
@Override
|
||||
public BombReturnCode explode(World world, int x, int y, int z) {
|
||||
|
||||
TileEntityLaunchPad entity = (TileEntityLaunchPad) world.getTileEntity(x, y, z);
|
||||
|
||||
if(entity.slots[0] == null || world.isRemote)
|
||||
return BombReturnCode.ERROR_MISSING_COMPONENT;
|
||||
|
||||
if(entity.slots[1] != null && entity.slots[1].getItem() instanceof IDesignatorItem && entity.power >= 75000) {
|
||||
|
||||
if(!((IDesignatorItem)entity.slots[1].getItem()).isReady(world, entity.slots[1], x, y, z))
|
||||
return BombReturnCode.ERROR_MISSING_COMPONENT;
|
||||
|
||||
int xCoord = entity.slots[1].stackTagCompound.getInteger("xCoord");
|
||||
int zCoord = entity.slots[1].stackTagCompound.getInteger("zCoord");
|
||||
|
||||
if(xCoord == entity.xCoord && zCoord == entity.zCoord) {
|
||||
xCoord += 1;
|
||||
}
|
||||
|
||||
Entity missile = null;
|
||||
|
||||
if(entity.slots[0].getItem() == ModItems.missile_generic) {
|
||||
missile = new EntityMissileGeneric(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_incendiary) {
|
||||
missile = new EntityMissileIncendiary(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_cluster) {
|
||||
missile = new EntityMissileCluster(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_buster) {
|
||||
missile = new EntityMissileBunkerBuster(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_strong) {
|
||||
missile = new EntityMissileStrong(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_incendiary_strong) {
|
||||
missile = new EntityMissileIncendiaryStrong(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_cluster_strong) {
|
||||
missile = new EntityMissileClusterStrong(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_buster_strong) {
|
||||
missile = new EntityMissileBusterStrong(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_burst) {
|
||||
missile = new EntityMissileBurst(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_inferno) {
|
||||
missile = new EntityMissileInferno(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_rain) {
|
||||
missile = new EntityMissileRain(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_drill) {
|
||||
missile = new EntityMissileDrill(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_nuclear) {
|
||||
missile = new EntityMissileNuclear(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_endo) {
|
||||
missile = new EntityMissileEndo(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_exo) {
|
||||
missile = new EntityMissileExo(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_nuclear_cluster) {
|
||||
missile = new EntityMissileMirv(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_doomsday) {
|
||||
missile = new EntityMissileDoomsday(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_taint) {
|
||||
missile = new EntityMissileTaint(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_micro) {
|
||||
missile = new EntityMissileMicro(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_bhole) {
|
||||
missile = new EntityMissileBHole(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_schrabidium) {
|
||||
missile = new EntityMissileSchrabidium(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_emp) {
|
||||
missile = new EntityMissileEMP(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_emp_strong) {
|
||||
missile = new EntityMissileEMPStrong(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_volcano) {
|
||||
missile = new EntityMissileVolcano(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
if(entity.slots[0].getItem() == ModItems.missile_shuttle) {
|
||||
missile = new EntityMissileShuttle(world, x + 0.5F, y + 2F, z + 0.5F, xCoord, zCoord);
|
||||
}
|
||||
|
||||
if(missile != null) {
|
||||
world.spawnEntityInWorld(missile);
|
||||
world.playSoundEffect(x, y, z, "hbm:weapon.missileTakeOff", 2.0F, 1.0F);
|
||||
entity.power -= 75000;
|
||||
entity.slots[0] = null;
|
||||
|
||||
if(GeneralConfig.enableExtendedLogging)
|
||||
MainRegistry.logger.log(Level.INFO, "[MISSILE] Tried to launch missile at " + x + " / " + y + " / " + z + " to " + xCoord + " / " + zCoord + "!");
|
||||
return BombReturnCode.LAUNCHED;
|
||||
}
|
||||
}
|
||||
|
||||
if(entity.slots[0] != null && entity.slots[0].getItem() == ModItems.missile_carrier && entity.power >= 75000) {
|
||||
EntityCarrier missile = new EntityCarrier(world);
|
||||
missile.posX = x + 0.5F;
|
||||
missile.posY = y + 1F;
|
||||
missile.posZ = z + 0.5F;
|
||||
|
||||
if(entity.slots[1] != null)
|
||||
missile.setPayload(entity.slots[1]);
|
||||
|
||||
world.spawnEntityInWorld(missile);
|
||||
entity.power -= 75000;
|
||||
|
||||
entity.slots[0] = null;
|
||||
entity.slots[1] = null;
|
||||
world.playSoundEffect(x, y, z, "hbm:entity.rocketTakeoff", 100.0F, 1.0F);
|
||||
return BombReturnCode.LAUNCHED;
|
||||
}
|
||||
|
||||
if(entity.slots[0] != null && entity.slots[0].getItem() == ModItems.missile_anti_ballistic && entity.power >= 75000) {
|
||||
EntityMissileAntiBallistic missile = new EntityMissileAntiBallistic(world);
|
||||
missile.posX = x + 0.5F;
|
||||
missile.posY = y + 0.5F;
|
||||
missile.posZ = z + 0.5F;
|
||||
|
||||
world.spawnEntityInWorld(missile);
|
||||
entity.power -= 75000;
|
||||
|
||||
entity.slots[0] = null;
|
||||
world.playSoundEffect(x, y, z, "hbm:weapon.missileTakeOff", 2.0F, 1.0F);
|
||||
return BombReturnCode.LAUNCHED;
|
||||
}
|
||||
|
||||
return BombReturnCode.ERROR_MISSING_COMPONENT;
|
||||
return entity.launchFromDesignator();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
43
src/main/java/com/hbm/blocks/generic/BlockGlyphid.java
Normal file
43
src/main/java/com/hbm/blocks/generic/BlockGlyphid.java
Normal file
@ -0,0 +1,43 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public class BlockGlyphid extends Block {
|
||||
|
||||
public IIcon[] icons = new IIcon[2];
|
||||
|
||||
public BlockGlyphid(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
long l = (long) (x * 3129871) ^ (long)y * 116129781L ^ (long)z;
|
||||
l = l * l * 42317861L + l * 11L;
|
||||
int i = (int)(l >> 16 & 3L);
|
||||
return icons[(int)(Math.abs(i) % this.icons.length)];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return icons[meta % this.icons.length];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
icons[0] = reg.registerIcon(RefStrings.MODID + ":glyphid_base");
|
||||
icons[1] = reg.registerIcon(RefStrings.MODID + ":glyphid_base_alt");
|
||||
}
|
||||
|
||||
}
|
||||
@ -7,12 +7,15 @@ import java.util.Random;
|
||||
import com.hbm.blocks.IPersistentInfoProvider;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityBarrel;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.Block;
|
||||
@ -27,6 +30,9 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
@ -71,7 +77,19 @@ public class BlockFluidBarrel extends BlockContainer implements ITooltipProvider
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
return true;
|
||||
|
||||
} else {
|
||||
} else if(player.isSneaking()){
|
||||
TileEntityBarrel mileEntity = (TileEntityBarrel) world.getTileEntity(x, y, z);
|
||||
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IItemFluidIdentifier) {
|
||||
FluidType type = ((IItemFluidIdentifier) player.getHeldItem().getItem()).getType(world, x, y, z, player.getHeldItem());
|
||||
|
||||
mileEntity.tank.setTankType(type);
|
||||
mileEntity.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation(type.getConditionalName())).appendSibling(new ChatComponentText("!")));
|
||||
}
|
||||
return true;
|
||||
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -191,47 +209,47 @@ public class BlockFluidBarrel extends BlockContainer implements ITooltipProvider
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
if(this == ModBlocks.barrel_plastic) {
|
||||
list.add(EnumChatFormatting.AQUA + "Capacity: 12,000mB");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store hot fluids");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store corrosive fluids");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store antimatter");
|
||||
list.add(EnumChatFormatting.AQUA + I18nUtil.resolveKey("trait.tile.barrel.capacity","12,000"));
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.hot")[1]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.corrosive")[4]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.antimatter")[1]);
|
||||
}
|
||||
|
||||
if(this == ModBlocks.barrel_corroded) {
|
||||
list.add(EnumChatFormatting.AQUA + "Capacity: 6,000mB");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store hot fluids");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store highly corrosive fluids");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store antimatter");
|
||||
list.add(EnumChatFormatting.RED + "Leaky");
|
||||
list.add(EnumChatFormatting.AQUA + I18nUtil.resolveKey("trait.tile.barrel.capacity","6,000"));
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.hot")[0]);
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.corrosive")[0]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.antimatter")[1]);
|
||||
list.add(EnumChatFormatting.RED + I18nUtil.resolveKey("trait.tile.barrel.leak"));
|
||||
}
|
||||
|
||||
if(this == ModBlocks.barrel_iron) {
|
||||
list.add(EnumChatFormatting.AQUA + "Capacity: 8,000mB");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store hot fluids");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store corrosive fluids properly");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store antimatter");
|
||||
list.add(EnumChatFormatting.AQUA + I18nUtil.resolveKey("trait.tile.barrel.capacity","8,000"));
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.hot")[0]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.corrosive")[3]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.antimatter")[1]);
|
||||
}
|
||||
|
||||
if(this == ModBlocks.barrel_steel) {
|
||||
list.add(EnumChatFormatting.AQUA + "Capacity: 16,000mB");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store hot fluids");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store corrosive fluids");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store highly corrosive fluids properly");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store antimatter");
|
||||
list.add(EnumChatFormatting.AQUA + I18nUtil.resolveKey("trait.tile.barrel.capacity","16,000"));
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.hot")[0]);
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.corrosive")[1]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.corrosive")[2]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.antimatter")[1]);
|
||||
}
|
||||
|
||||
if(this == ModBlocks.barrel_antimatter) {
|
||||
list.add(EnumChatFormatting.AQUA + "Capacity: 16,000mB");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store hot fluids");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store highly corrosive fluids");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store antimatter");
|
||||
list.add(EnumChatFormatting.AQUA + I18nUtil.resolveKey("trait.tile.barrel.capacity","16,000"));
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.hot")[0]);
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.corrosive")[0]);
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.antimatter")[0]);
|
||||
}
|
||||
|
||||
if(this == ModBlocks.barrel_tcalloy) {
|
||||
list.add(EnumChatFormatting.AQUA + "Capacity: 24,000mB");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store hot fluids");
|
||||
list.add(EnumChatFormatting.GREEN + "Can store highly corrosive fluids");
|
||||
list.add(EnumChatFormatting.YELLOW + "Cannot store antimatter");
|
||||
list.add(EnumChatFormatting.AQUA + I18nUtil.resolveKey("trait.tile.barrel.capacity","24,000"));
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.hot")[0]);
|
||||
list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKeyArray("trait.tile.barrel.corrosive")[0]);
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("trait.tile.barrel.antimatter")[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,9 +59,8 @@ public class BlockHadronCooler extends BlockMulti implements ITooltipProvider {
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
for(String s : I18nUtil.resolveKeyArray(this.getUnlocalizedName(stack) + ".desc")) list.add(EnumChatFormatting.YELLOW + s);
|
||||
} else {
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +"Hold <" +
|
||||
EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "LSHIFT" +
|
||||
EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "> to display more info");
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +I18nUtil.resolveKey("tooltip.block" ,
|
||||
EnumChatFormatting.YELLOW +"" + EnumChatFormatting.ITALIC + "LSHIFT"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,8 +6,10 @@ import java.util.List;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.IPersistentInfoProvider;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
@ -19,6 +21,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@ -87,7 +92,26 @@ public class MachineBigAssTank9000 extends BlockDummyable implements IPersistent
|
||||
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, pos[0], pos[1], pos[2]); //we can do this because nobody is stopping me from doing this
|
||||
return true;
|
||||
} else {
|
||||
} else if(player.isSneaking()){
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
return false;
|
||||
|
||||
TileEntityMachineBAT9000 trialEntity = (TileEntityMachineBAT9000) world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
|
||||
if(trialEntity != null) {
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IItemFluidIdentifier) {
|
||||
FluidType type = ((IItemFluidIdentifier) player.getHeldItem().getItem()).getType(world, pos[0], pos[1], pos[2], player.getHeldItem());
|
||||
|
||||
trialEntity.tank.setTankType(type);
|
||||
trialEntity.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation(type.getConditionalName())).appendSibling(new ChatComponentText("!")));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,9 +113,8 @@ public class MachineCapacitor extends BlockContainer implements ILookOverlay, IP
|
||||
if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
for(String s : I18nUtil.resolveKeyArray("tile.capacitor.desc")) list.add(EnumChatFormatting.YELLOW + s);
|
||||
} else {
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +"Hold <" +
|
||||
EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "LSHIFT" +
|
||||
EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "> to display more info");
|
||||
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +I18nUtil.resolveKey("tooltip.block" ,
|
||||
EnumChatFormatting.YELLOW +"" + EnumChatFormatting.ITALIC + "LSHIFT"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -7,9 +7,11 @@ import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.IPersistentInfoProvider;
|
||||
import com.hbm.entity.projectile.EntityBombletZeta;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.fluid.trait.FT_Flammable;
|
||||
import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.IRepairable;
|
||||
@ -27,6 +29,9 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.World;
|
||||
@ -61,7 +66,8 @@ public class MachineFluidTank extends BlockDummyable implements IPersistentInfoP
|
||||
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking()) {
|
||||
}
|
||||
else if(!player.isSneaking()) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
@ -74,9 +80,30 @@ public class MachineFluidTank extends BlockDummyable implements IPersistentInfoP
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, pos[0], pos[1], pos[2]);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
}
|
||||
else if(player.isSneaking()){
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
return false;
|
||||
|
||||
TileEntityMachineFluidTank tank = (TileEntityMachineFluidTank) world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
|
||||
if(tank != null) {
|
||||
if(tank.hasExploded) return false;
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IItemFluidIdentifier) {
|
||||
FluidType type = ((IItemFluidIdentifier) player.getHeldItem().getItem()).getType(world, pos[0], pos[1], pos[2], player.getHeldItem());
|
||||
|
||||
tank.tank.setTankType(type);
|
||||
tank.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation(type.getConditionalName())).appendSibling(new ChatComponentText("!")));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}else {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -7,6 +7,7 @@ import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.oil.TileEntityMachineGasFlare;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -61,13 +62,7 @@ public class MachineGasFlare extends BlockDummyable implements ITooltipProvider
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
list.add(EnumChatFormatting.GOLD + "Can burn fluids and vent gasses");
|
||||
list.add(EnumChatFormatting.GOLD + "Burns up to " + EnumChatFormatting.RED + "10mB/t");
|
||||
list.add(EnumChatFormatting.GOLD + "Vents up to " + EnumChatFormatting.RED + "50mB/t");
|
||||
list.add("");
|
||||
list.add(EnumChatFormatting.YELLOW + "Fuel efficiency:");
|
||||
list.add(EnumChatFormatting.YELLOW + "-Flammable Gasses: " + EnumChatFormatting.RED + "50%");
|
||||
list.add(EnumChatFormatting.YELLOW + "-Flammable Liquids: " + EnumChatFormatting.RED + "10%");
|
||||
for(String s : I18nUtil.resolveKeyArray("tile.machine_flare.desc"))
|
||||
list.add(EnumChatFormatting.GOLD + s);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,8 +5,10 @@ import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.IPersistentInfoProvider;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.IPersistentNBT;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
@ -18,6 +20,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@ -60,7 +65,26 @@ public class MachineOrbus extends BlockDummyable implements IPersistentInfoProvi
|
||||
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, pos[0], pos[1], pos[2]);
|
||||
return true;
|
||||
} else {
|
||||
} else if(player.isSneaking()){
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
return false;
|
||||
|
||||
TileEntityMachineOrbus kyleEntity = (TileEntityMachineOrbus) world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
|
||||
if(kyleEntity != null) {
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IItemFluidIdentifier) {
|
||||
FluidType type = ((IItemFluidIdentifier) player.getHeldItem().getItem()).getType(world, pos[0], pos[1], pos[2], player.getHeldItem());
|
||||
|
||||
kyleEntity.tank.setTankType(type);
|
||||
kyleEntity.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation(type.getConditionalName())).appendSibling(new ChatComponentText("!")));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.config.WeaponConfig;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadar;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadarNT;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
@ -10,6 +9,8 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -21,7 +22,7 @@ public class MachineRadar extends BlockContainer {
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityMachineRadar();
|
||||
return new TileEntityMachineRadarNT();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -42,41 +43,35 @@ public class MachineRadar extends BlockContainer {
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
if(y < WeaponConfig.radarAltitude) {
|
||||
if(y < TileEntityMachineRadarNT.radarAltitude) {
|
||||
if(world.isRemote)
|
||||
player.addChatMessage(new ChatComponentText("[Radar] Error: Radar altitude not sufficient."));
|
||||
player.addChatMessage(new ChatComponentText("[Radar] Error: Radar altitude not sufficient.").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
|
||||
return true;
|
||||
}
|
||||
|
||||
if(world.isRemote)
|
||||
{
|
||||
if(world.isRemote && !player.isSneaking()) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
return true;
|
||||
} else if(!player.isSneaking())
|
||||
{
|
||||
TileEntityMachineRadar entity = (TileEntityMachineRadar) world.getTileEntity(x, y, z);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
}
|
||||
} else if(!player.isSneaking()) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean canProvidePower()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canProvidePower() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int m)
|
||||
{
|
||||
TileEntityMachineRadar entity = (TileEntityMachineRadar) world.getTileEntity(x, y, z);
|
||||
return entity.getRedPower();
|
||||
}
|
||||
@Override
|
||||
public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int m) {
|
||||
TileEntityMachineRadarNT entity = (TileEntityMachineRadarNT) world.getTileEntity(x, y, z);
|
||||
return entity.getRedPower();
|
||||
}
|
||||
|
||||
public int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int m)
|
||||
{
|
||||
return isProvidingWeakPower(world, x, y, z, m);
|
||||
}
|
||||
@Override
|
||||
public int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int m) {
|
||||
return isProvidingWeakPower(world, x, y, z, m);
|
||||
}
|
||||
}
|
||||
|
||||
56
src/main/java/com/hbm/blocks/machine/MachineRadarScreen.java
Normal file
56
src/main/java/com/hbm/blocks/machine/MachineRadarScreen.java
Normal file
@ -0,0 +1,56 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadarNT;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadarScreen;
|
||||
|
||||
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.world.World;
|
||||
|
||||
public class MachineRadarScreen extends BlockDummyable {
|
||||
|
||||
public MachineRadarScreen(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return meta >= 12 ? new TileEntityMachineRadarScreen() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {1, 0, 0, 0, 1, 0};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@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 && !player.isSneaking()) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null) return false;
|
||||
|
||||
TileEntityMachineRadarScreen screen = (TileEntityMachineRadarScreen) world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
|
||||
if(screen.linked && world.getTileEntity(screen.refX, screen.refY, screen.refZ) instanceof TileEntityMachineRadarNT) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, screen.refX, screen.refY, screen.refZ);
|
||||
}
|
||||
|
||||
return false;
|
||||
} else if(!player.isSneaking()) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -197,17 +197,10 @@ public class NTMAnvil extends BlockFallingNT implements ITooltipProvider, IGUIPr
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void overrideRenderer(EntityFallingBlockNT falling, RenderBlocks renderBlocks, Tessellator tessellator) {
|
||||
|
||||
World world = falling.worldObj;
|
||||
float rotation = 0;
|
||||
|
||||
if(falling.getMeta() == 2)
|
||||
rotation = 90F / 180F * (float) Math.PI;
|
||||
|
||||
if(falling.getMeta() == 3)
|
||||
rotation = 270F / 180F * (float) Math.PI;
|
||||
|
||||
if(falling.getMeta() == 4)
|
||||
rotation = 180F / 180F * (float)Math.PI;
|
||||
if(falling.getMeta() == 2) rotation = 90F / 180F * (float) Math.PI;
|
||||
if(falling.getMeta() == 3) rotation = 270F / 180F * (float) Math.PI;
|
||||
if(falling.getMeta() == 4) rotation = 180F / 180F * (float)Math.PI;
|
||||
|
||||
tessellator.addTranslation(0F, -0.5F, 0F);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.anvil, "Top", getIcon(1, 0), tessellator, rotation, true);
|
||||
|
||||
@ -7,6 +7,7 @@ import com.hbm.blocks.IBlockMulti;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.test.TestPipe;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.network.TileEntityPipeBaseNT;
|
||||
@ -18,11 +19,13 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
@ -70,7 +73,42 @@ public class FluidDuctStandard extends FluidDuctBase implements IBlockMulti, ILo
|
||||
public int damageDropped(int meta) {
|
||||
return rectify(meta);
|
||||
}
|
||||
/*
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World world, int x, int y, int z) {
|
||||
Block block = world.getBlock(x, y, z); // Get the block at the specified coordinates
|
||||
int blockMetadata = world.getBlockMetadata(x, y, z); // Get the metadata of the block at the specified coordinates
|
||||
TileEntity tileEntity = world.getTileEntity(x, y, z); // Get the tile entity at the specified coordinates
|
||||
|
||||
TileEntityPipeBaseNT pipe = (TileEntityPipeBaseNT) tileEntity;
|
||||
|
||||
// Get the metadata (FluidType) from the pipe
|
||||
FluidType fluidType = pipe.getType();
|
||||
int metadata = fluidType.getID();
|
||||
|
||||
// Create an ItemStack with the item and metadata
|
||||
ItemStack itemStack = new ItemStack(ModItems.fluid_duct, 1, metadata);
|
||||
System.out.println(metadata);
|
||||
System.out.println(itemStack);
|
||||
|
||||
return new ItemStack(ModItems.fluid_duct, 1, metadata).getItem();
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
|
||||
TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
if (tileEntity instanceof TileEntityPipeBaseNT) {
|
||||
TileEntityPipeBaseNT pipe = (TileEntityPipeBaseNT) tileEntity;
|
||||
FluidType fluidType = pipe.getType();
|
||||
int retadata = fluidType.getID(); //florf
|
||||
|
||||
return new ItemStack(ModItems.fluid_duct, 1, retadata);
|
||||
}
|
||||
return super.getPickBlock(target, world, x, y, z, player);
|
||||
}
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return TestPipe.renderID;
|
||||
|
||||
@ -7,6 +7,7 @@ import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.tileentity.network.TileEntityPylonBase;
|
||||
import com.hbm.tileentity.network.TileEntityPylonLarge;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -33,9 +34,8 @@ public class PylonLarge extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Type: " + EnumChatFormatting.YELLOW + "Quadruple");
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Range: " + EnumChatFormatting.YELLOW + "100m");
|
||||
list.add(EnumChatFormatting.GOLD + "This pylon requires a substation!");
|
||||
for(String s : I18nUtil.resolveKeyArray("tile.red_pylon_large.desc"))
|
||||
list.add(EnumChatFormatting.GOLD + s);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import com.hbm.tileentity.network.TileEntityPylon;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -24,7 +25,7 @@ public class PylonRedWire extends PylonBase {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Type: " + EnumChatFormatting.YELLOW + "Single");
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Range: " + EnumChatFormatting.YELLOW + "25m");
|
||||
for(String s : I18nUtil.resolveKeyArray("tile.red_pylon.desc"))
|
||||
list.add(EnumChatFormatting.GOLD + s);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.tileentity.TileEntityProxyConductor;
|
||||
import com.hbm.tileentity.network.TileEntityPylonBase;
|
||||
import com.hbm.tileentity.network.TileEntitySubstation;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -37,8 +38,8 @@ public class Substation extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Type: " + EnumChatFormatting.YELLOW + "Quadruple");
|
||||
list.add(EnumChatFormatting.GOLD + "Connection Range: " + EnumChatFormatting.YELLOW + "20m");
|
||||
for(String s : I18nUtil.resolveKeyArray("tile.substation.desc"))
|
||||
list.add(EnumChatFormatting.GOLD + s);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -47,15 +47,15 @@ public class ArmorRecipes {
|
||||
addHelmet( ModItems.rag, ModItems.robes_helmet);
|
||||
addChest( ModItems.rag, ModItems.robes_plate);
|
||||
addLegs( ModItems.rag, ModItems.robes_legs);
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.robes_boots, 1), new Object[] { "R R", "P P", 'R', ModItems.rag, 'P', ModItems.plate_polymer });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.robes_boots, 1), new Object[] { "R R", "P P", 'R', ModItems.rag, 'P', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_helmet, 1), new Object[] {"ECE", 'E', CO.billet(), 'C', ModItems.steel_helmet });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_plate, 1), new Object[] { " E ", "ECE"," E ", 'E', CO.billet(), 'C', ModItems.steel_plate });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_legs, 1), new Object[] { "ECE", "E E", 'E', CO.billet(), 'C', ModItems.steel_legs });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cobalt_boots, 1), new Object[] {"ECE", 'E', CO.billet(), 'C', ModItems.steel_boots });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.security_helmet, 1), new Object[] { "SSS", "IGI", 'S', STEEL.plate(), 'I', ModItems.plate_polymer, 'G', KEY_ANYPANE });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.security_helmet, 1), new Object[] { "SSS", "IGI", 'S', STEEL.plate(), 'I', ANY_RUBBER.ingot(), 'G', KEY_ANYPANE });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.security_plate, 1), new Object[] { "KWK", "IKI", "WKW", 'K', ModItems.plate_kevlar, 'I', ANY_PLASTIC.ingot(), 'W', new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.security_legs, 1), new Object[] { "IWI", "K K", "W W", 'K', ModItems.plate_kevlar, 'I', ANY_PLASTIC.ingot(), 'W', new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.security_boots, 1), new Object[] { "P P", "I I", 'P', STEEL.plate(), 'I', ModItems.plate_polymer });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.security_boots, 1), new Object[] { "P P", "I I", 'P', STEEL.plate(), 'I', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.dnt_helmet, 1), new Object[] { "EEE", "EE ", 'E', DNT.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.dnt_plate, 1), new Object[] { "EE ", "EEE", "EEE", 'E', DNT.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.dnt_legs, 1), new Object[] { "EE ", "EEE", "E E", 'E', DNT.ingot() });
|
||||
@ -63,7 +63,7 @@ public class ArmorRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.zirconium_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ZR.ingot() });
|
||||
|
||||
//Power armor
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t45_helmet, 1), new Object[] { "PPC", "PBP", "IXI", 'P', ModItems.plate_armor_titanium, 'C', ModItems.circuit_targeting_tier3, 'I', ModItems.plate_polymer, 'X', ModItems.gas_mask_m65, 'B', ModItems.titanium_helmet });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t45_helmet, 1), new Object[] { "PPC", "PBP", "IXI", 'P', ModItems.plate_armor_titanium, 'C', ModItems.circuit_targeting_tier3, 'I', ANY_RUBBER.ingot(), 'X', ModItems.gas_mask_m65, 'B', ModItems.titanium_helmet });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t45_plate, 1), new Object[] { "MPM", "TBT", "PPP", 'M', ModItems.motor, 'P', ModItems.plate_armor_titanium, 'T', ModItems.gas_empty, 'B', ModItems.titanium_plate });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t45_legs, 1), new Object[] { "MPM", "PBP", "P P", 'M', ModItems.motor, 'P', ModItems.plate_armor_titanium, 'B', ModItems.titanium_legs });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.t45_boots, 1), new Object[] { "P P", "PBP", 'P', ModItems.plate_armor_titanium, 'B', ModItems.titanium_boots });
|
||||
@ -153,19 +153,19 @@ public class ArmorRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.paa_boots, 1), new Object[] { "E E", "N N", 'E', ModItems.plate_paa, 'N', OreDictManager.getReflector() });
|
||||
|
||||
//Liquidator Suit
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.liquidator_helmet, 1), new Object[] { "III", "CBC", "III", 'I', ModItems.plate_polymer, 'C', ModItems.cladding_lead, 'B', ModItems.hazmat_helmet_grey });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.liquidator_plate, 1), new Object[] { "ICI", "TBT", "ICI", 'I', ModItems.plate_polymer, 'C', ModItems.cladding_lead, 'B', ModItems.hazmat_plate_grey, 'T', ModItems.gas_empty });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.liquidator_legs, 1), new Object[] { "III", "CBC", "I I", 'I', ModItems.plate_polymer, 'C', ModItems.cladding_lead, 'B', ModItems.hazmat_legs_grey });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.liquidator_boots, 1), new Object[] { "ICI", "IBI", 'I', ModItems.plate_polymer, 'C', ModItems.cladding_lead, 'B', ModItems.hazmat_boots_grey });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.liquidator_helmet, 1), new Object[] { "III", "CBC", "III", 'I', ANY_RUBBER.ingot(), 'C', ModItems.cladding_lead, 'B', ModItems.hazmat_helmet_grey });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.liquidator_plate, 1), new Object[] { "ICI", "TBT", "ICI", 'I', ANY_RUBBER.ingot(), 'C', ModItems.cladding_lead, 'B', ModItems.hazmat_plate_grey, 'T', ModItems.gas_empty });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.liquidator_legs, 1), new Object[] { "III", "CBC", "I I", 'I', ANY_RUBBER.ingot(), 'C', ModItems.cladding_lead, 'B', ModItems.hazmat_legs_grey });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.liquidator_boots, 1), new Object[] { "ICI", "IBI", 'I', ANY_RUBBER.ingot(), 'C', ModItems.cladding_lead, 'B', ModItems.hazmat_boots_grey });
|
||||
|
||||
//Masks
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.goggles, 1), new Object[] { "P P", "GPG", 'G', KEY_ANYPANE, 'P', STEEL.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gas_mask, 1), new Object[] { "PPP", "GPG", " F ", 'G', KEY_ANYPANE, 'P', STEEL.plate(), 'F', IRON.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gas_mask_m65, 1), new Object[] { "PPP", "GPG", " F ", 'G', KEY_ANYPANE, 'P', ModItems.plate_polymer, 'F', IRON.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gas_mask_m65, 1), new Object[] { "PPP", "GPG", " F ", 'G', KEY_ANYPANE, 'P', ANY_RUBBER.ingot(), 'F', IRON.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gas_mask_olde, 1), new Object[] { "PPP", "GPG", " F ", 'G', KEY_ANYPANE, 'P', Items.leather, 'F', IRON.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gas_mask_mono, 1), new Object[] { " P ", "PPP", " F ", 'P', ModItems.plate_polymer, 'F', IRON.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gas_mask_mono, 1), new Object[] { " P ", "PPP", " F ", 'P', ANY_RUBBER.ingot(), 'F', IRON.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mask_of_infamy, 1), new Object[] { "III", "III", " I ", 'I', IRON.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ashglasses, 1), new Object[] { "I I", "GPG", 'I', ModItems.plate_polymer, 'G', ModBlocks.glass_ash, 'P', ANY_PLASTIC.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ashglasses, 1), new Object[] { "I I", "GPG", 'I', ANY_RUBBER.ingot(), 'G', ModBlocks.glass_ash, 'P', ANY_PLASTIC.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mask_rag, 1), new Object[] { "RRR", 'R', ModItems.rag_damp });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mask_piss, 1), new Object[] { "RRR", 'R', ModItems.rag_piss });
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ public class ConsumableRecipes {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.med_ptsd, 1), new Object[] { ModItems.med_ipecac });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.pancake, 1), new Object[] { REDSTONE.dust(), DIAMOND.dust(), Items.wheat, ModItems.bolt_tungsten, ModItems.wire_copper, STEEL.plate() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.pancake, 1), new Object[] { REDSTONE.dust(), EMERALD.dust(), Items.wheat, ModItems.bolt_tungsten, ModItems.wire_copper, STEEL.plate() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.chocolate_milk, 1), new Object[] { KEY_ANYPANE, new ItemStack(Items.dye, 1, 3), Items.milk_bucket, KNO.block(), S.dust(), S.dust(), S.dust(), P_RED.dust() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.chocolate_milk, 1), new Object[] { KEY_ANYPANE, new ItemStack(Items.dye, 1, 3), Items.milk_bucket, Fluids.NITROGLYCERIN.getDict(1_000) });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.loops), new Object[] { ModItems.flame_pony, Items.wheat, Items.sugar });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.loop_stew), new Object[] { ModItems.loops, ModItems.can_smart, Items.bowl });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.coffee), new Object[] { COAL.dust(), Items.milk_bucket, Items.potionitem, Items.sugar });
|
||||
@ -105,12 +105,13 @@ public class ConsumableRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.syringe_awesome, 1), new Object[] { "SNS", "PCP", "SNS", 'C', ModItems.syringe_empty, 'S', S.dust(), 'P', PU239.nugget(), 'N', PU238.nugget() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.syringe_metal_empty, 6), new Object[] { "P", "C", "B", 'B', Blocks.iron_bars, 'C', ModItems.rod_empty, 'P', IRON.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.syringe_metal_stimpak, 1), new Object[] { " N ", "NSN", " N ", 'N', Items.nether_wart, 'S', ModItems.syringe_metal_empty });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.syringe_metal_stimpak, 1), new Object[] { ModItems.nitra_small, ModItems.nitra_small, ModItems.nitra_small, ModItems.syringe_metal_empty });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.syringe_metal_medx, 1), new Object[] { " N ", "NSN", " N ", 'N', Items.quartz, 'S', ModItems.syringe_metal_empty });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.syringe_metal_psycho, 1), new Object[] { " N ", "NSN", " N ", 'N', Items.glowstone_dust, 'S', ModItems.syringe_metal_empty });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.syringe_metal_super, 1), new Object[] { " N ", "PSP", "L L", 'N', ModItems.bottle_nuka, 'P', STEEL.plate(), 'S', ModItems.syringe_metal_stimpak, 'L', Items.leather });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.syringe_metal_super, 1), new Object[] { " N ", "PSP", "L L", 'N', ModItems.bottle_nuka, 'P', STEEL.plate(), 'S', ModItems.syringe_metal_stimpak, 'L', ModItems.plate_polymer });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.syringe_metal_super, 1), new Object[] { " N ", "PSP", "L L", 'N', ModItems.bottle_nuka, 'P', STEEL.plate(), 'S', ModItems.syringe_metal_stimpak, 'L', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.syringe_metal_super, 1), new Object[] { " N ", "PSP", "L L", 'N', ModItems.bottle_cherry, 'P', STEEL.plate(), 'S', ModItems.syringe_metal_stimpak, 'L', Items.leather });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.syringe_metal_super, 1), new Object[] { " N ", "PSP", "L L", 'N', ModItems.bottle_cherry, 'P', STEEL.plate(), 'S', ModItems.syringe_metal_stimpak, 'L', ModItems.plate_polymer });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.syringe_metal_super, 1), new Object[] { " N ", "PSP", "L L", 'N', ModItems.bottle_cherry, 'P', STEEL.plate(), 'S', ModItems.syringe_metal_stimpak, 'L', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.syringe_taint), new Object[] { ModItems.bottle2_empty, ModItems.syringe_metal_empty, ModItems.ducttape, ModItems.powder_magic, SA326.nugget(), Items.potionitem });
|
||||
|
||||
//Medicine
|
||||
@ -134,12 +135,12 @@ public class ConsumableRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.med_bag, 1), new Object[] { "LLL", "SIS", "LLL", 'L', Items.leather, 'S', ModItems.syringe_metal_stimpak, 'I', ModItems.syringe_antidote });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.med_bag, 1), new Object[] { "LLL", "SIS", "LLL", 'L', Items.leather, 'S', ModItems.syringe_metal_stimpak, 'I', ModItems.pill_iodine });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.med_bag, 1), new Object[] { "LL", "SI", "LL", 'L', Items.leather, 'S', ModItems.syringe_metal_super, 'I', ModItems.radaway });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.med_bag, 1), new Object[] { "LLL", "SIS", "LLL", 'L', ModItems.plate_polymer, 'S', ModItems.syringe_metal_stimpak, 'I', ModItems.syringe_antidote });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.med_bag, 1), new Object[] { "LLL", "SIS", "LLL", 'L', ModItems.plate_polymer, 'S', ModItems.syringe_metal_stimpak, 'I', ModItems.pill_iodine });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.med_bag, 1), new Object[] { "LL", "SI", "LL", 'L', ModItems.plate_polymer, 'S', ModItems.syringe_metal_super, 'I', ModItems.radaway });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.med_bag, 1), new Object[] { "LLL", "SIS", "LLL", 'L', ANY_RUBBER.ingot(), 'S', ModItems.syringe_metal_stimpak, 'I', ModItems.syringe_antidote });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.med_bag, 1), new Object[] { "LLL", "SIS", "LLL", 'L', ANY_RUBBER.ingot(), 'S', ModItems.syringe_metal_stimpak, 'I', ModItems.pill_iodine });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.med_bag, 1), new Object[] { "LL", "SI", "LL", 'L', ANY_RUBBER.ingot(), 'S', ModItems.syringe_metal_super, 'I', ModItems.radaway });
|
||||
|
||||
//IV Bags
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.iv_empty, 4), new Object[] { "S", "I", "S", 'S', ModItems.plate_polymer, 'I', IRON.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.iv_empty, 4), new Object[] { "S", "I", "S", 'S', ANY_RUBBER.ingot(), 'I', IRON.plate() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.iv_xp_empty, 1), new Object[] { ModItems.iv_empty, ModItems.powder_magic });
|
||||
|
||||
//Radaway
|
||||
@ -149,7 +150,7 @@ public class ConsumableRecipes {
|
||||
|
||||
//Cladding
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.cladding_paint, 1), new Object[] { PB.nugget(), PB.nugget(), PB.nugget(), PB.nugget(), Items.clay_ball, Items.glass_bottle });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cladding_rubber, 1), new Object[] { "RCR", "CDC", "RCR", 'R', ModItems.plate_polymer, 'C', COAL.dust(), 'D', ModItems.ducttape });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cladding_rubber, 1), new Object[] { "RCR", "CDC", "RCR", 'R', ANY_RUBBER.ingot(), 'C', COAL.dust(), 'D', ModItems.ducttape });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cladding_lead, 1), new Object[] { "DPD", "PRP", "DPD", 'R', ModItems.cladding_rubber, 'P', PB.plate(), 'D', ModItems.ducttape });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cladding_desh, 1), new Object[] { "DPD", "PRP", "DPD", 'R', ModItems.cladding_lead, 'P', ModItems.plate_desh, 'D', ModItems.ducttape });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.cladding_ghiorsium, 1), new Object[] { "DPD", "PRP", "DPD", 'R', ModItems.cladding_desh, 'P', ModItems.ingot_gh336, 'D', ModItems.ducttape });
|
||||
@ -162,7 +163,7 @@ public class ConsumableRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_ghiorsium, 1), new Object[] { "DPD", "PSP", "DPD", 'D', ModItems.ducttape, 'P', GH336.ingot(), 'S', U238.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_polonium, 1), new Object[] { "DPD", "PSP", "DPD", 'D', ModItems.ducttape, 'P', IRON.plate(), 'S', PO210.block() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_era, 1), new Object[] { "DPD", "PSP", "DPD", 'D', ModItems.ducttape, 'P', IRON.plate(), 'S', ModItems.ingot_semtex });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_kevlar, 1), new Object[] { "KIK", "IDI", "KIK", 'K', ModItems.plate_kevlar, 'I', ModItems.plate_polymer, 'D', ModItems.ducttape });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_kevlar, 1), new Object[] { "KIK", "IDI", "KIK", 'K', ModItems.plate_kevlar, 'I', ANY_RUBBER.ingot(), 'D', ModItems.ducttape });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_sapi, 1), new Object[] { "PKP", "DPD", "PKP", 'P', POLYMER.ingot(), 'K', ModItems.insert_kevlar, 'D', ModItems.ducttape });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_esapi, 1), new Object[] { "PKP", "DSD", "PKP", 'P', POLYMER.ingot(), 'K', ModItems.insert_sapi, 'D', ModItems.ducttape, 'S', BIGMT.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_xsapi, 1), new Object[] { "PKP", "DSD", "PKP", 'P', ASBESTOS.ingot(), 'K', ModItems.insert_esapi, 'D', ModItems.ducttape, 'S', ModItems.ingot_meteorite_forged });
|
||||
@ -173,13 +174,13 @@ public class ConsumableRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.servo_set_desh, 1), new Object[] { "MBM", "PSP", "MBM", 'M', ModItems.motor_desh, 'B', ModItems.bolt_dura_steel, 'P', ALLOY.plate(), 'S', ModItems.servo_set });
|
||||
|
||||
//Helmet Mods
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.attachment_mask, 1), new Object[] { "DID", "IGI", " F ", 'D', ModItems.ducttape, 'I', ModItems.plate_polymer, 'G', KEY_ANYPANE, 'F', IRON.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.attachment_mask_mono, 1), new Object[] { " D ", "DID", " F ", 'D', ModItems.ducttape, 'I', ModItems.plate_polymer, 'F', IRON.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.attachment_mask, 1), new Object[] { "DID", "IGI", " F ", 'D', ModItems.ducttape, 'I', ANY_RUBBER.ingot(), 'G', KEY_ANYPANE, 'F', IRON.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.attachment_mask_mono, 1), new Object[] { " D ", "DID", " F ", 'D', ModItems.ducttape, 'I', ANY_RUBBER.ingot(), 'F', IRON.plate() });
|
||||
|
||||
//Boot Mods
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pads_rubber, 1), new Object[] { "P P", "IDI", "P P", 'P', ModItems.plate_polymer, 'I', IRON.plate(), 'D', ModItems.ducttape });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pads_rubber, 1), new Object[] { "P P", "IDI", "P P", 'P', ANY_RUBBER.ingot(), 'I', IRON.plate(), 'D', ModItems.ducttape });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pads_slime, 1), new Object[] { "SPS", "DSD", "SPS", 'S', KEY_SLIME, 'P', ModItems.pads_rubber, 'D', ModItems.ducttape });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pads_static, 1), new Object[] { "CDC", "ISI", "CDC", 'C', CU.ingot(), 'D', ModItems.ducttape, 'I', ModItems.plate_polymer, 'S', ModItems.pads_slime });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pads_static, 1), new Object[] { "CDC", "ISI", "CDC", 'C', CU.ingot(), 'D', ModItems.ducttape, 'I', ANY_RUBBER.ingot(), 'S', ModItems.pads_slime });
|
||||
|
||||
//Special Mods
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.horseshoe_magnet, 1), new Object[] { "L L", "I I", "ILI", 'L', ModItems.lodestone, 'I', IRON.ingot() });
|
||||
|
||||
@ -418,6 +418,8 @@ public class MineralRecipes {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ingot_mercury, 8), new Object[] { "#", '#', ModItems.bottle_mercury });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.egg_balefire, 1), new Object[] { "###", "###", "###", '#', ModItems.egg_balefire_shard });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.egg_balefire_shard, 9), new Object[] { "#", '#', ModItems.egg_balefire });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.nitra, 1), new Object[] { "##", "##", '#', ModItems.nitra_small });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.nitra_small, 4), new Object[] { "#", '#', ModItems.nitra });
|
||||
add1To9Pair(ModItems.powder_paleogenite, ModItems.powder_paleogenite_tiny);
|
||||
add1To9Pair(ModItems.ingot_osmiridium, ModItems.nugget_osmiridium);
|
||||
|
||||
|
||||
@ -108,6 +108,7 @@ public class SmeltingRecipes {
|
||||
GameRegistry.addSmelting(ModItems.powder_bismuth, new ItemStack(ModItems.ingot_bismuth), 1.0F);
|
||||
GameRegistry.addSmelting(ModItems.powder_calcium, new ItemStack(ModItems.ingot_calcium), 1.0F);
|
||||
GameRegistry.addSmelting(ModItems.powder_cadmium, new ItemStack(ModItems.ingot_cadmium), 1.0F);
|
||||
GameRegistry.addSmelting(ModItems.ball_resin, new ItemStack(ModItems.ingot_biorubber), 0.1F);
|
||||
|
||||
GameRegistry.addSmelting(ModItems.combine_scrap, new ItemStack(ModItems.ingot_combine_steel), 1.0F);
|
||||
GameRegistry.addSmelting(ModItems.rag_damp, new ItemStack(ModItems.rag), 0.1F);
|
||||
|
||||
@ -6,6 +6,7 @@ import com.hbm.inventory.fluid.Fluids;
|
||||
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
|
||||
import com.hbm.items.ItemEnums.EnumPlantType;
|
||||
import com.hbm.items.ItemGenericPart.EnumPartType;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemBattery;
|
||||
@ -88,6 +89,7 @@ public class ToolRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.euphemium_stopper, 1), new Object[] { "I", "S", "S", 'I', EUPH.ingot(), 'S', KEY_STICK });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.crowbar, 1), new Object[] { "II", " I", " I", 'I', STEEL.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bottle_opener, 1), new Object[] { "S", "P", 'S', STEEL.plate(), 'P', KEY_PLANKS });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(Items.saddle, 1), new Object[] { "LLL", "LRL", " S ", 'S', STEEL.ingot(), 'L', Items.leather, 'R', DictFrame.fromOne(ModItems.plant_item, EnumPlantType.ROPE) });
|
||||
|
||||
//Matches
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.matchstick, 16), new Object[] { "I", "S", 'I', S.dust(), 'S', KEY_STICK });
|
||||
@ -115,14 +117,14 @@ public class ToolRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.oil_detector, 1), new Object[] { "W I", "WCI", "PPP", 'W', ModItems.wire_gold, 'I', CU.ingot(), 'C', ModItems.circuit_red_copper, 'P', STEEL.plate528() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.turret_chip, 1), new Object[] { "WWW", "CPC", "WWW", 'W', ModItems.wire_gold, 'P', ANY_PLASTIC.ingot(), 'C', ModItems.circuit_gold, });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.survey_scanner, 1), new Object[] { "SWS", " G ", "PCP", 'W', ModItems.wire_gold, 'P', ANY_PLASTIC.ingot(), 'C', ModItems.circuit_gold, 'S', STEEL.plate528(), 'G', GOLD.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.geiger_counter, 1), new Object[] { "GPP", "WCS", "WBB", 'W', ModItems.wire_gold, 'P', ModItems.plate_polymer, 'C', ModItems.circuit_red_copper, 'G', GOLD.ingot(), 'S', STEEL.plate528(), 'B', ModItems.ingot_beryllium });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.geiger_counter, 1), new Object[] { "GPP", "WCS", "WBB", 'W', ModItems.wire_gold, 'P', ANY_RUBBER.ingot(), 'C', ModItems.circuit_red_copper, 'G', GOLD.ingot(), 'S', STEEL.plate528(), 'B', ModItems.ingot_beryllium });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.dosimeter, 1), new Object[] { "WGW", "WCW", "WBW", 'W', KEY_PLANKS, 'G', KEY_ANYPANE, 'C', ModItems.circuit_aluminium, 'B', BE.ingot() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModBlocks.geiger), new Object[] { ModItems.geiger_counter });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.digamma_diagnostic), new Object[] { ModItems.geiger_counter, PO210.billet(), ASBESTOS.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pollution_detector, 1), new Object[] { "SFS", "SCS", " S ", 'S', STEEL.plate(), 'F', ModItems.filter_coal, 'C', ModItems.circuit_copper });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.defuser, 1), new Object[] { " PS", "P P", " P ", 'P', ANY_PLASTIC.ingot(), 'S', STEEL.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.coltan_tool, 1), new Object[] { "ACA", "CXC", "ACA", 'A', ALLOY.ingot(), 'C', CINNABAR.crystal(), 'X', Items.compass });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.reacher, 1), new Object[] { "BIB", "P P", "B B", 'B', ModItems.bolt_tungsten, 'I', W.ingot(), 'P', ModItems.plate_polymer });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.reacher, 1), new Object[] { "BIB", "P P", "B B", 'B', ModItems.bolt_tungsten, 'I', W.ingot(), 'P', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bismuth_tool, 1), new Object[] { "TBT", "SRS", "SCS", 'T', TA.nugget(), 'B', ModItems.nugget_bismuth, 'S', ANY_RESISTANTALLOY.ingot(), 'R', ModItems.reacher, 'C', ModItems.circuit_aluminium });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.sat_designator, 1), new Object[] { "RRD", "PIC", " P", 'P', GOLD.plate(), 'R', Items.redstone, 'C', ModItems.circuit_gold, 'D', ModItems.sat_chip, 'I', GOLD.ingot() });
|
||||
|
||||
|
||||
@ -46,12 +46,12 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_thruster_15_balefire_large_rad, 1), new Object[] { "CCC", "CTC", "CCC", 'C', ModItems.board_copper, 'T', ModItems.mp_thruster_15_balefire_large });
|
||||
|
||||
//Missile fuselages
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_10_kerosene_insulation, 1), new Object[] { "CCC", "CTC", "CCC", 'C', ModItems.plate_polymer, 'T', ModItems.mp_fuselage_10_kerosene });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_10_long_kerosene_insulation, 1), new Object[] { "CCC", "CTC", "CCC", 'C', ModItems.plate_polymer, 'T', ModItems.mp_fuselage_10_long_kerosene });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_15_kerosene_insulation, 1), new Object[] { "CCC", "CTC", "CCC", 'C', ModItems.plate_polymer, 'T', ModItems.mp_fuselage_15_kerosene });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_10_solid_insulation, 1), new Object[] { "CCC", "CTC", "CCC", 'C', ModItems.plate_polymer, 'T', ModItems.mp_fuselage_10_solid });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_10_long_solid_insulation, 1), new Object[] { "CCC", "CTC", "CCC", 'C', ModItems.plate_polymer, 'T', ModItems.mp_fuselage_10_long_solid });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_15_solid_insulation, 1), new Object[] { "CCC", "CTC", "CCC", 'C', ModItems.plate_polymer, 'T', ModItems.mp_fuselage_15_solid });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_10_kerosene_insulation, 1), new Object[] { "CCC", "CTC", "CCC", 'C', ANY_RUBBER.ingot(), 'T', ModItems.mp_fuselage_10_kerosene });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_10_long_kerosene_insulation, 1), new Object[] { "CCC", "CTC", "CCC", 'C', ANY_RUBBER.ingot(), 'T', ModItems.mp_fuselage_10_long_kerosene });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_15_kerosene_insulation, 1), new Object[] { "CCC", "CTC", "CCC", 'C', ANY_RUBBER.ingot(), 'T', ModItems.mp_fuselage_15_kerosene });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_10_solid_insulation, 1), new Object[] { "CCC", "CTC", "CCC", 'C', ANY_RUBBER.ingot(), 'T', ModItems.mp_fuselage_10_solid });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_10_long_solid_insulation, 1), new Object[] { "CCC", "CTC", "CCC", 'C', ANY_RUBBER.ingot(), 'T', ModItems.mp_fuselage_10_long_solid });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_15_solid_insulation, 1), new Object[] { "CCC", "CTC", "CCC", 'C', ANY_RUBBER.ingot(), 'T', ModItems.mp_fuselage_15_solid });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_15_solid_desh, 1), new Object[] { "CCC", "CTC", "CCC", 'C', DESH.ingot(), 'T', ModItems.mp_fuselage_15_solid });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_10_kerosene_metal, 1), new Object[] { "ICI", "CTC", "ICI", 'C', STEEL.plate(), 'I', IRON.plate(), 'T', ModItems.mp_fuselage_10_kerosene });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_fuselage_10_long_kerosene_metal, 1), new Object[] { "ICI", "CTC", "ICI", 'C', STEEL.plate(), 'I', IRON.plate(), 'T', ModItems.mp_fuselage_10_long_kerosene });
|
||||
@ -61,11 +61,11 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_warhead_15_boxcar, 1), new Object[] { "SNS", "CBC", "SFS", 'S', STAR.ingot(), 'N', ModBlocks.det_nuke, 'C', ModItems.circuit_targeting_tier4, 'B', ModBlocks.boxcar, 'F', ModItems.tritium_deuterium_cake });
|
||||
|
||||
//Missile chips
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_chip_1, 1), new Object[] { "P", "C", "S", 'P', ModItems.plate_polymer, 'C', ModItems.circuit_targeting_tier1, 'S', ModBlocks.steel_scaffold });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_chip_2, 1), new Object[] { "P", "C", "S", 'P', ModItems.plate_polymer, 'C', ModItems.circuit_targeting_tier2, 'S', ModBlocks.steel_scaffold });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_chip_3, 1), new Object[] { "P", "C", "S", 'P', ModItems.plate_polymer, 'C', ModItems.circuit_targeting_tier3, 'S', ModBlocks.steel_scaffold });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_chip_4, 1), new Object[] { "P", "C", "S", 'P', ModItems.plate_polymer, 'C', ModItems.circuit_targeting_tier4, 'S', ModBlocks.steel_scaffold });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_chip_5, 1), new Object[] { "P", "C", "S", 'P', ModItems.plate_polymer, 'C', ModItems.circuit_targeting_tier5, 'S', ModBlocks.steel_scaffold });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_chip_1, 1), new Object[] { "P", "C", "S", 'P', ANY_RUBBER.ingot(), 'C', ModItems.circuit_targeting_tier1, 'S', ModBlocks.steel_scaffold });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_chip_2, 1), new Object[] { "P", "C", "S", 'P', ANY_RUBBER.ingot(), 'C', ModItems.circuit_targeting_tier2, 'S', ModBlocks.steel_scaffold });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_chip_3, 1), new Object[] { "P", "C", "S", 'P', ANY_RUBBER.ingot(), 'C', ModItems.circuit_targeting_tier3, 'S', ModBlocks.steel_scaffold });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_chip_4, 1), new Object[] { "P", "C", "S", 'P', ANY_RUBBER.ingot(), 'C', ModItems.circuit_targeting_tier4, 'S', ModBlocks.steel_scaffold });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mp_chip_5, 1), new Object[] { "P", "C", "S", 'P', ANY_RUBBER.ingot(), 'C', ModItems.circuit_targeting_tier5, 'S', ModBlocks.steel_scaffold });
|
||||
|
||||
//Turrets
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModBlocks.turret_sentry, 1), new Object[] { "PPL", " MD", " SC", 'P', STEEL.plate(), 'M', ModItems.motor, 'L', ModItems.mechanism_rifle_1, 'S', ModBlocks.steel_scaffold, 'C', ModItems.circuit_red_copper, 'D', ModItems.crt_display });
|
||||
@ -97,7 +97,7 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_chemthrower, 1), new Object[] { "RWC", "HHT", "RLC", 'R', RUBBER.ingot(), 'W', ModItems.wrench, 'C', CU.plate(), 'H', ModItems.hull_small_steel, 'T', ModItems.tank_steel, 'L', ModItems.mechanism_launcher_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_fatman, 1), new Object[] { "SSI", "IIM", "WPH", 'S', STEEL.plate(), 'I', STEEL.ingot(), 'W', ModItems.wire_aluminium, 'H', ModItems.hull_small_steel, 'P', Item.getItemFromBlock(Blocks.piston), 'M', ModItems.mechanism_launcher_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_mirv, 1), new Object[] { "LLL", "WFW", "SSS", 'S', STEEL.plate(), 'L', PB.plate(), 'W', ModItems.wire_gold, 'F', ModItems.gun_fatman });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_proto, 1), new Object[] { "LLL", "WFW", "SSS", 'S', ModItems.plate_polymer, 'L', ModItems.plate_desh, 'W', ModItems.wire_tungsten, 'F', ModItems.gun_fatman });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_proto, 1), new Object[] { "LLL", "WFW", "SSS", 'S', ANY_RUBBER.ingot(), 'L', ModItems.plate_desh, 'W', ModItems.wire_tungsten, 'F', ModItems.gun_fatman });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_nuke, 1, AmmoFatman.BALEFIRE.ordinal()), new Object[] { " S ", "EBE", " S ", 'S', ModItems.hull_small_steel, 'E', ModItems.powder_power, 'B', ModItems.egg_balefire_shard });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_mp40, 1), new Object[] { "IIM", " SW", " S ", 'S', STEEL.plate(), 'I', STEEL.ingot(), 'W', KEY_PLANKS, 'M', ModItems.mechanism_rifle_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_thompson, 1), new Object[] { "IIM", " SW", " S ", 'S', IRON.plate(), 'I', STEEL.plate(), 'W', KEY_PLANKS, 'M', ModItems.mechanism_rifle_2 });
|
||||
@ -154,7 +154,7 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_minigun, 1), new Object[] { "PIB", "PCM", "PIB", 'P', ModItems.pipes_steel, 'B', STEEL.block(), 'I', ANY_PLASTIC.ingot(), 'C', ModItems.mechanism_rifle_2, 'M', ModItems.motor });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_avenger, 1), new Object[] { "PIB", "PCM", "PIB", 'P', ModItems.pipes_steel, 'B', BE.block(), 'I', DESH.ingot(), 'C', ModItems.mechanism_rifle_2, 'M', ModItems.motor });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_lacunae, 1), new Object[] { "TIT", "ILI", "PRP", 'T', ModItems.syringe_taint, 'I', STAR.ingot(), 'L', ModItems.gun_minigun, 'P', ModItems.pellet_rtg, 'R', ModBlocks.machine_rtg_grey });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_mymy, 1), new Object[] { "PP ", " WP", 'P', ModItems.plate_polymer, 'W', ModItems.wire_aluminium });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_mymy, 1), new Object[] { "PP ", " WP", 'P', ANY_RUBBER.ingot(), 'W', ModItems.wire_aluminium });
|
||||
//CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_darter, 1), new Object[] { "SST", " P", 'S', STEEL.plate(), 'T', ModItems.gas_empty, 'P', ANY_PLASTIC.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_fireext, 1), new Object[] { "HB", " T", 'H', ModItems.hull_small_steel, 'B', ModItems.bolt_tungsten, 'T', ModItems.tank_steel });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_spas12, 1), new Object[] { "TPS", "HHR", " L", 'T', ModItems.bolt_tungsten, 'P', STEEL.plate(), 'S', STEEL.ingot(), 'H', ModItems.hull_small_steel, 'R', ModItems.mechanism_rifle_1, 'L', ANY_PLASTIC.ingot()});
|
||||
@ -166,6 +166,20 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_coilgun, 16, 0), new Object[] { " T ", "TST", " T ", 'T', W.ingot(), 'S', BIGMT.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_coilgun, 16, 1), new Object[] { " T ", "TST", " T ", 'T', FERRO.ingot(), 'S', BIGMT.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_coilgun, 16, 2), new Object[] { " T ", "TST", " T ", 'T', RUBBER.ingot(), 'S', ANY_PLASTIC.ingot() });
|
||||
|
||||
//TODO: somehow add more variance, 4 gauge is still missing
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_22lr, 16), new Object[] { ModItems.nitra_small });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_9mm, 16), new Object[] { ModItems.nitra_small, ModItems.nitra_small });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_5mm, 16), new Object[] { ModItems.nitra_small, ModItems.nitra_small, ModItems.nitra_small });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_357, 16, Ammo357Magnum.LEAD.ordinal()), new Object[] { ModItems.nitra, ModItems.nitra_small });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_44, 16), new Object[] { ModItems.nitra, ModItems.nitra_small, ModItems.nitra_small });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_45, 16), new Object[] { ModItems.nitra, ModItems.nitra_small, ModItems.nitra_small, ModItems.nitra_small });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_50ae, 16), new Object[] { ModItems.nitra, ModItems.nitra });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_556, 16), new Object[] { ModItems.nitra, ModItems.nitra, ModItems.nitra_small });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_20gauge, 16), new Object[] { ModItems.nitra, ModItems.nitra, ModItems.nitra_small, ModItems.nitra_small });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_12gauge, 16), new Object[] { ModItems.nitra, ModItems.nitra, ModItems.nitra });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_762, 16), new Object[] { ModItems.nitra, ModItems.nitra, ModItems.nitra, ModItems.nitra_small });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ammo_50bmg, 16), new Object[] { ModItems.nitra, ModItems.nitra, ModItems.nitra, ModItems.nitra });
|
||||
|
||||
//Ammo assemblies
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pellet_flechette, 1), new Object[] { " L ", " L ", "LLL", 'L', PB.nugget() });
|
||||
@ -193,15 +207,15 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_lacunae, 1), new Object[] { " I", "GC", 'I', CU.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_9 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_nopip, 1), new Object[] { " I", "GC", 'I', PB.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_44 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_nopip, 1), new Object[] { " I", "GC", 'I', PB.ingot(), 'G', ModItems.ballistite, 'C', ModItems.casing_44 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_12gauge, 12), new Object[] { " I ", "GCL", 'I', ModItems.pellet_buckshot, 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'L', ModItems.plate_polymer });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_12gauge, 12), new Object[] { " I ", "GCL", 'I', ModItems.pellet_buckshot, 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'L', ModItems.plate_polymer });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_12gauge, 12), new Object[] { " I ", "GCL", 'I', ModItems.pellet_buckshot, 'G', ModItems.cordite, 'C', ModItems.casing_buckshot, 'L', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_12gauge, 12), new Object[] { " I ", "GCL", 'I', ModItems.pellet_buckshot, 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot, 'L', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_12gauge.stackFromEnum(12, Ammo12Gauge.PERCUSSION), new Object[] { "G", "C", 'G', ModItems.ballistite, 'C', ModItems.casing_buckshot });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_4gauge, 12), new Object[] { " I ", "GCL", 'I', ModItems.pellet_buckshot, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'L', ModItems.plate_polymer });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_4gauge.stackFromEnum(12, Ammo4Gauge.SLUG), new Object[] { " I ", "GCL", 'I', STEEL.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_50, 'L', ModItems.plate_polymer });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_4gauge.stackFromEnum(12, Ammo4Gauge.FLECHETTE), new Object[] { " I ", "GCL", 'I', ModItems.pellet_flechette, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'L', ModItems.plate_polymer });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_4gauge.stackFromEnum(4, Ammo4Gauge.EXPLOSIVE), new Object[] { " I ", "GCL", 'I', ModBlocks.tnt, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'L', ModItems.plate_polymer });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_4gauge.stackFromEnum(6, Ammo4Gauge.EXPLOSIVE), new Object[] { " I ", "GCL", 'I', ANY_PLASTICEXPLOSIVE.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_50, 'L', ModItems.plate_polymer });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_4gauge.stackFromEnum(4, Ammo4Gauge.MINING), new Object[] { " I ", "GCL", 'I', ModBlocks.det_miner, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'L', ModItems.plate_polymer });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_4gauge, 12), new Object[] { " I ", "GCL", 'I', ModItems.pellet_buckshot, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'L', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_4gauge.stackFromEnum(12, Ammo4Gauge.SLUG), new Object[] { " I ", "GCL", 'I', STEEL.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_50, 'L', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_4gauge.stackFromEnum(12, Ammo4Gauge.FLECHETTE), new Object[] { " I ", "GCL", 'I', ModItems.pellet_flechette, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'L', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_4gauge.stackFromEnum(4, Ammo4Gauge.EXPLOSIVE), new Object[] { " I ", "GCL", 'I', ModBlocks.tnt, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'L', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_4gauge.stackFromEnum(6, Ammo4Gauge.EXPLOSIVE), new Object[] { " I ", "GCL", 'I', ANY_PLASTICEXPLOSIVE.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_50, 'L', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_4gauge.stackFromEnum(4, Ammo4Gauge.MINING), new Object[] { " I ", "GCL", 'I', ModBlocks.det_miner, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'L', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addShapelessAuto(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.QUACK), new Object[] { ModItems.ammo_4gauge, ModItems.nugget_bismuth, ModItems.nugget_tantalium, ModItems.ball_dynamite });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_20gauge.stackFromEnum(12, Ammo20Gauge.STOCK), new Object[] { " I ", "GCL", 'I', ModItems.pellet_buckshot, 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_buckshot, 'L', CU.plate() });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_20gauge.stackFromEnum(12, Ammo20Gauge.SLUG), new Object[] { " I ", "GCL", 'I', PB.ingot(), 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_buckshot, 'L', CU.plate() });
|
||||
@ -211,8 +225,8 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_calamity, 1), new Object[] { " I ", "GCG", 'I', PB.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_50 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_actionexpress, 1), new Object[] { " I", "GC", 'I', PB.ingot(), 'G', ModItems.cordite, 'C', ModItems.casing_50 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_nuke, 1), new Object[] { " WP", "SEP", " WP", 'W', ModItems.wire_aluminium, 'P', STEEL.plate(), 'S', ModItems.hull_small_steel, 'E', ANY_HIGHEXPLOSIVE.ingot() });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_dart.stackFromEnum(16, AmmoDart.GPS), new Object[] { "IPI", "ICI", "IPI", 'I', ModItems.plate_polymer, 'P', IRON.plate(), 'C', new ItemStack(ModItems.fluid_tank_lead_full, 1, Fluids.WATZ.getID()) });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_dart.stackFromEnum(16, AmmoDart.NERF), new Object[] { "I", "I", 'I', ModItems.plate_polymer });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_dart.stackFromEnum(16, AmmoDart.GPS), new Object[] { "IPI", "ICI", "IPI", 'I', ANY_RUBBER.ingot(), 'P', IRON.plate(), 'C', new ItemStack(ModItems.fluid_tank_lead_full, 1, Fluids.WATZ.getID()) });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_dart.stackFromEnum(16, AmmoDart.NERF), new Object[] { "I", "I", 'I', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_45, 1), " I", "GC", 'I', CU.ingot(), 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_44);
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_762, 1), " I", "GC", 'I', CU.ingot(), 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_50);
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_luna, 1), new Object[] { " B ", "GCG", "GPG", 'B', FERRO.ingot(), 'G', ModItems.powder_nitan_mix, 'C', ModItems.casing_50, 'P', ModItems.powder_power});
|
||||
@ -370,7 +384,7 @@ public class WeaponRecipes {
|
||||
//IF Grenades
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.grenade_if_generic, 1), new Object[] { " C ", "PTP", " P ", 'C', ModItems.coil_tungsten, 'P', STEEL.plate(), 'T', Blocks.tnt });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.grenade_if_he, 1), new Object[] { "A", "G", "A", 'G', ModItems.grenade_if_generic, 'A', Items.gunpowder });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.grenade_if_bouncy, 1), new Object[] { "G", "A", 'G', ModItems.grenade_if_generic, 'A', ModItems.plate_polymer });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.grenade_if_bouncy, 1), new Object[] { "G", "A", 'G', ModItems.grenade_if_generic, 'A', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.grenade_if_sticky, 1), new Object[] { "G", "A", 'G', ModItems.grenade_if_generic, 'A', KEY_SLIME });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.grenade_if_impact, 1), new Object[] { "G", "A", 'G', ModItems.grenade_if_generic, 'A', REDSTONE.dust() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.grenade_if_concussion, 1), new Object[] { "G", "A", 'G', ModItems.grenade_if_generic, 'A', Items.glowstone_dust });
|
||||
|
||||
@ -9,6 +9,11 @@ import com.hbm.entity.grenade.*;
|
||||
import com.hbm.entity.item.*;
|
||||
import com.hbm.entity.logic.*;
|
||||
import com.hbm.entity.missile.*;
|
||||
import com.hbm.entity.missile.EntityMissileTier0.*;
|
||||
import com.hbm.entity.missile.EntityMissileTier1.*;
|
||||
import com.hbm.entity.missile.EntityMissileTier2.*;
|
||||
import com.hbm.entity.missile.EntityMissileTier3.*;
|
||||
import com.hbm.entity.missile.EntityMissileTier4.*;
|
||||
import com.hbm.entity.mob.*;
|
||||
import com.hbm.entity.mob.botprime.*;
|
||||
import com.hbm.entity.mob.siege.*;
|
||||
|
||||
@ -1,156 +1,231 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.particle.EntitySmokeFX;
|
||||
import com.hbm.entity.logic.IChunkLoader;
|
||||
import com.hbm.entity.projectile.EntityThrowableInterp;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadarNT;
|
||||
|
||||
import api.hbm.entity.IRadarDetectable;
|
||||
import api.hbm.entity.IRadarDetectableNT;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeChunkManager;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Type;
|
||||
|
||||
public class EntityMissileAntiBallistic extends Entity implements IRadarDetectable {
|
||||
public class EntityMissileAntiBallistic extends EntityThrowableInterp implements IChunkLoader, IRadarDetectable, IRadarDetectableNT {
|
||||
|
||||
int activationTimer;
|
||||
private Ticket loaderTicket;
|
||||
public Entity tracking;
|
||||
public double velocity;
|
||||
protected int activationTimer;
|
||||
|
||||
public static double baseSpeed = 1.5D;
|
||||
|
||||
public EntityMissileAntiBallistic(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
if(activationTimer < 40) {
|
||||
activationTimer++;
|
||||
|
||||
motionY = 1.5D;
|
||||
|
||||
this.setLocationAndAngles(posX + this.motionX, posY + this.motionY, posZ + this.motionZ, 0, 0);
|
||||
this.rotation();
|
||||
|
||||
if(!this.worldObj.isRemote && this.posY < 400)
|
||||
this.worldObj.spawnEntityInWorld(new EntitySmokeFX(this.worldObj, this.posX, this.posY, this.posZ, 0.0, 0.0, 0.0));
|
||||
|
||||
} else {
|
||||
|
||||
if(activationTimer == 40) {
|
||||
ExplosionLarge.spawnParticlesRadial(worldObj, posX, posY, posZ, 15);
|
||||
activationTimer = 100;
|
||||
}
|
||||
|
||||
for(int i = 0; i < 5; i++) {
|
||||
|
||||
targetMissile();
|
||||
|
||||
this.setLocationAndAngles(posX + this.motionX, posY + this.motionY, posZ + this.motionZ, 0, 0);
|
||||
this.rotation();
|
||||
|
||||
if(!this.worldObj.isRemote && this.posY < 400)
|
||||
this.worldObj.spawnEntityInWorld(new EntitySmokeFX(this.worldObj, this.posX, this.posY, this.posZ, 0.0, 0.0, 0.0));
|
||||
|
||||
List<Entity> list = worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(posX - 5, posY - 5, posZ - 5, posX + 5, posY + 5, posZ + 5));
|
||||
|
||||
for(Entity e : list) {
|
||||
if(e instanceof EntityMissileBaseAdvanced || e instanceof EntityMissileCustom) {
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 15F, true, false, true);
|
||||
this.setDead();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(this.posY > 2000)
|
||||
this.setDead();
|
||||
|
||||
if(this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.air && this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.water && this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.flowing_water) {
|
||||
|
||||
if(!this.worldObj.isRemote) {
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 10F, true, true, true);
|
||||
}
|
||||
this.setDead();
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void rotation() {
|
||||
float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
|
||||
for(this.rotationPitch = (float) (Math.atan2(this.motionY, f2) * 180.0D / Math.PI) - 90; 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;
|
||||
}
|
||||
}
|
||||
|
||||
private void targetMissile() {
|
||||
|
||||
List<Entity> list = worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(posX - 500, 0, posZ - 500, posX + 500, 5000, posZ + 500));
|
||||
|
||||
Entity target = null;
|
||||
double closest = 1000D;
|
||||
|
||||
for(Entity e : list) {
|
||||
if(e instanceof EntityMissileBaseAdvanced || e instanceof EntityMissileCustom) {
|
||||
double dis = Math.sqrt(Math.pow(e.posX - posX, 2) + Math.pow(e.posY - posY, 2) + Math.pow(e.posZ - posZ, 2));
|
||||
|
||||
if(dis < closest) {
|
||||
closest = dis;
|
||||
target = e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(target != null) {
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(target.posX - posX, target.posY - posY, target.posZ - posZ);
|
||||
|
||||
vec.normalize();
|
||||
|
||||
this.motionX = vec.xCoord * 0.065D;
|
||||
this.motionY = vec.yCoord * 0.065D;
|
||||
this.motionZ = vec.zCoord * 0.065D;
|
||||
}
|
||||
public EntityMissileAntiBallistic(World world) {
|
||||
super(world);
|
||||
this.setSize(1.5F, 1.5F);
|
||||
this.motionY = baseSpeed;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
|
||||
super.entityInit();
|
||||
init(ForgeChunkManager.requestTicket(MainRegistry.instance, worldObj, Type.ENTITY));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound p_70037_1_) {
|
||||
|
||||
protected double motionMult() {
|
||||
return velocity;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound p_70014_1_) {
|
||||
public boolean doesImpactEntities() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(velocity < 6) velocity += 0.1;
|
||||
|
||||
if(activationTimer < 40) {
|
||||
activationTimer++;
|
||||
motionY = baseSpeed;
|
||||
} else {
|
||||
Entity prevTracking = this.tracking;
|
||||
|
||||
if(this.tracking == null || this.tracking.isDead) this.targetMissile();
|
||||
|
||||
if(prevTracking == null && this.tracking != null) {
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY, posZ, 24, 3F);
|
||||
}
|
||||
|
||||
if(this.tracking != null) {
|
||||
this.aimAtTarget();
|
||||
} else {
|
||||
if(this.ticksExisted > 600) this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
loadNeighboringChunks((int) Math.floor(posX / 16), (int) Math.floor(posZ / 16));
|
||||
|
||||
if(this.posY > 2000 && (this.tracking == null || this.tracking.isDead)) this.setDead();
|
||||
|
||||
} else {
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(motionX, motionY, motionZ).normalize();
|
||||
MainRegistry.proxy.particleControl(posX - vec.xCoord, posY - vec.yCoord, posZ - vec.zCoord, 2);
|
||||
}
|
||||
|
||||
float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
for(this.rotationPitch = (float) (Math.atan2(this.motionY, f2) * 180.0D / Math.PI) - 90; 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;
|
||||
}
|
||||
|
||||
/** Detects and caches nearby EntityMissileBaseNT */
|
||||
protected void targetMissile() {
|
||||
|
||||
Entity closest = null;
|
||||
double dist = 1_000;
|
||||
|
||||
for(Entity e : TileEntityMachineRadarNT.matchingEntities) {
|
||||
if(e.dimension != this.dimension) continue;
|
||||
if(!(e instanceof EntityMissileBaseNT)) continue;
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(e.posX - posX, e.posY - posY, e.posZ - posZ);
|
||||
|
||||
if(vec.lengthVector() < dist) {
|
||||
closest = e;
|
||||
}
|
||||
}
|
||||
|
||||
this.tracking = closest;
|
||||
}
|
||||
|
||||
/** Predictive targeting system */
|
||||
protected void aimAtTarget() {
|
||||
|
||||
Vec3 delta = Vec3.createVectorHelper(tracking.posX - posX, tracking.posY - posY, tracking.posZ - posZ);
|
||||
double intercept = delta.lengthVector() / (this.baseSpeed * this.velocity);
|
||||
Vec3 predicted = Vec3.createVectorHelper(tracking.posX + (tracking.posX - tracking.lastTickPosX) * intercept, tracking.posY + (tracking.posY - tracking.lastTickPosY) * intercept, tracking.posZ + (tracking.posZ - tracking.lastTickPosZ) * intercept);
|
||||
Vec3 motion = Vec3.createVectorHelper(predicted.xCoord - posX, predicted.yCoord - posY, predicted.zCoord - posZ).normalize();
|
||||
|
||||
if(delta.lengthVector() < 10 && activationTimer >= 40) {
|
||||
this.setDead();
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 15F, true, false, false);
|
||||
|
||||
}
|
||||
|
||||
this.motionX = motion.xCoord * baseSpeed;
|
||||
this.motionY = motion.yCoord * baseSpeed;
|
||||
this.motionZ = motion.zCoord * baseSpeed;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onImpact(MovingObjectPosition mop) {
|
||||
if(this.activationTimer >= 40) {
|
||||
this.setDead();
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 20F, true, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getGravityVelocity() {
|
||||
return 0.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getAirDrag() {
|
||||
return 1F;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getWaterDrag() {
|
||||
return 1F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
super.readEntityFromNBT(nbt);
|
||||
this.velocity = nbt.getDouble("veloc");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
super.writeEntityToNBT(nbt);
|
||||
nbt.setDouble("veloc", this.velocity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Ticket ticket) {
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(ticket != null) {
|
||||
|
||||
if(loaderTicket == null) {
|
||||
|
||||
loaderTicket = ticket;
|
||||
loaderTicket.bindEntity(this);
|
||||
loaderTicket.getModData();
|
||||
}
|
||||
|
||||
ForgeChunkManager.forceChunk(loaderTicket, new ChunkCoordIntPair(chunkCoordX, chunkCoordZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<ChunkCoordIntPair> loadedChunks = new ArrayList<ChunkCoordIntPair>();
|
||||
|
||||
public void loadNeighboringChunks(int newChunkX, int newChunkZ) {
|
||||
if(!worldObj.isRemote && loaderTicket != null) {
|
||||
|
||||
clearChunkLoader();
|
||||
|
||||
loadedChunks.clear();
|
||||
for(int i = -1; i <= 1; i++) for(int j = -1; j <= 1; j++) loadedChunks.add(new ChunkCoordIntPair(newChunkX + i, newChunkZ + j));
|
||||
|
||||
for(ChunkCoordIntPair chunk : loadedChunks) {
|
||||
ForgeChunkManager.forceChunk(loaderTicket, chunk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDead() {
|
||||
super.setDead();
|
||||
this.clearChunkLoader();
|
||||
}
|
||||
|
||||
public void clearChunkLoader() {
|
||||
if(!worldObj.isRemote && loaderTicket != null) {
|
||||
for(ChunkCoordIntPair chunk : loadedChunks) {
|
||||
ForgeChunkManager.unforceChunk(loaderTicket, chunk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double distance) {
|
||||
return distance < 500000;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -158,4 +233,28 @@ public class EntityMissileAntiBallistic extends Entity implements IRadarDetectab
|
||||
return RadarTargetType.MISSILE_AB;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "radar.target.abm";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlipLevel() {
|
||||
return IRadarDetectableNT.TIER_AB;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeSeenBy(Object radar) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean paramsApplicable(RadarScanParams params) {
|
||||
return params.scanMissiles;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean suppliesRedstone(RadarScanParams params) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,59 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.effect.EntityBlackHole;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileBHole extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileBHole(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileBHole(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 1.5F, true);
|
||||
|
||||
EntityBlackHole bl = new EntityBlackHole(this.worldObj, 1.5F);
|
||||
bl.posX = this.posX;
|
||||
bl.posY = this.posY;
|
||||
bl.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(bl);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.wire_aluminium, 4));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 4));
|
||||
list.add(new ItemStack(ModItems.hull_small_aluminium, 2));
|
||||
list.add(new ItemStack(ModItems.ducttape, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier1, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.grenade_black_hole, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER0;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,289 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.logic.IChunkLoader;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxParticlePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import api.hbm.entity.IRadarDetectable;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeChunkManager;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Type;
|
||||
|
||||
public abstract class EntityMissileBaseAdvanced extends Entity implements IChunkLoader, IRadarDetectable {
|
||||
|
||||
int startX;
|
||||
int startZ;
|
||||
int targetX;
|
||||
int targetZ;
|
||||
public int velocity;
|
||||
double decelY;
|
||||
double accelXZ;
|
||||
boolean isCluster = false;
|
||||
private Ticket loaderTicket;
|
||||
public int health = 50;
|
||||
|
||||
public EntityMissileBaseAdvanced(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
this.ignoreFrustumCheck = true;
|
||||
startX = (int) posX;
|
||||
startZ = (int) posZ;
|
||||
targetX = (int) posX;
|
||||
targetZ = (int) posZ;
|
||||
}
|
||||
|
||||
public boolean canBeCollidedWith() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_) {
|
||||
if(this.isEntityInvulnerable()) {
|
||||
return false;
|
||||
} else {
|
||||
if(!this.isDead && !this.worldObj.isRemote) {
|
||||
health -= p_70097_2_;
|
||||
|
||||
if(this.health <= 0) {
|
||||
this.setDead();
|
||||
this.killMissile();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private void killMissile() {
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 5, true, false, true);
|
||||
ExplosionLarge.spawnShrapnelShower(worldObj, posX, posY, posZ, motionX, motionY, motionZ, 15, 0.075);
|
||||
ExplosionLarge.spawnMissileDebris(worldObj, posX, posY, posZ, motionX, motionY, motionZ, 0.25, getDebris(), getDebrisRareDrop());
|
||||
}
|
||||
|
||||
public EntityMissileBaseAdvanced(World world, float x, float y, float z, int a, int b) {
|
||||
super(world);
|
||||
this.ignoreFrustumCheck = true;
|
||||
this.setLocationAndAngles(x, y, z, 0, 0);
|
||||
startX = (int) x;
|
||||
startZ = (int) z;
|
||||
targetX = a;
|
||||
targetZ = b;
|
||||
this.motionY = 2;
|
||||
|
||||
Vec3 vector = Vec3.createVectorHelper(targetX - startX, 0, targetZ - startZ);
|
||||
accelXZ = decelY = 1 / vector.lengthVector();
|
||||
decelY *= 2;
|
||||
|
||||
velocity = 1;
|
||||
|
||||
this.setSize(1.5F, 1.5F);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
init(ForgeChunkManager.requestTicket(MainRegistry.instance, worldObj, Type.ENTITY));
|
||||
this.dataWatcher.addObject(8, Integer.valueOf(this.health));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
motionX = nbt.getDouble("moX");
|
||||
motionY = nbt.getDouble("moY");
|
||||
motionZ = nbt.getDouble("moZ");
|
||||
posX = nbt.getDouble("poX");
|
||||
posY = nbt.getDouble("poY");
|
||||
posZ = nbt.getDouble("poZ");
|
||||
decelY = nbt.getDouble("decel");
|
||||
accelXZ = nbt.getDouble("accel");
|
||||
targetX = nbt.getInteger("tX");
|
||||
targetZ = nbt.getInteger("tZ");
|
||||
startX = nbt.getInteger("sX");
|
||||
startZ = nbt.getInteger("sZ");
|
||||
velocity = nbt.getInteger("veloc");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
nbt.setDouble("moX", motionX);
|
||||
nbt.setDouble("moY", motionY);
|
||||
nbt.setDouble("moZ", motionZ);
|
||||
nbt.setDouble("poX", posX);
|
||||
nbt.setDouble("poY", posY);
|
||||
nbt.setDouble("poZ", posZ);
|
||||
nbt.setDouble("decel", decelY);
|
||||
nbt.setDouble("accel", accelXZ);
|
||||
nbt.setInteger("tX", targetX);
|
||||
nbt.setInteger("tZ", targetZ);
|
||||
nbt.setInteger("sX", startX);
|
||||
nbt.setInteger("sZ", startZ);
|
||||
nbt.setInteger("veloc", velocity);
|
||||
}
|
||||
|
||||
protected void rotation() {
|
||||
float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
|
||||
for (this.rotationPitch = (float)(Math.atan2(this.motionY, f2) * 180.0D / Math.PI) - 90; 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;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
if(velocity < 1)
|
||||
velocity = 1;
|
||||
if(this.ticksExisted > 40)
|
||||
velocity = 3;
|
||||
else if(this.ticksExisted > 20)
|
||||
velocity = 2;
|
||||
|
||||
this.dataWatcher.updateObject(8, Integer.valueOf(this.health));
|
||||
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
//TODO: instead of crappy skipping, implement a hitscan
|
||||
for(int i = 0; i < velocity; i++) {
|
||||
//this.posX += this.motionX;
|
||||
//this.posY += this.motionY;
|
||||
//this.posZ += this.motionZ;
|
||||
this.setLocationAndAngles(posX + this.motionX, posY + this.motionY, posZ + this.motionZ, 0, 0);
|
||||
|
||||
this.rotation();
|
||||
|
||||
this.motionY -= decelY;
|
||||
|
||||
Vec3 vector = Vec3.createVectorHelper(targetX - startX, 0, targetZ - startZ);
|
||||
vector = vector.normalize();
|
||||
vector.xCoord *= accelXZ;
|
||||
vector.zCoord *= accelXZ;
|
||||
|
||||
if(motionY > 0) {
|
||||
motionX += vector.xCoord;
|
||||
motionZ += vector.zCoord;
|
||||
}
|
||||
|
||||
if(motionY < 0) {
|
||||
motionX -= vector.xCoord;
|
||||
motionZ -= vector.zCoord;
|
||||
}
|
||||
|
||||
if(!this.worldObj.isRemote)
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacket(posX, posY, posZ, 2),
|
||||
new TargetPoint(worldObj.provider.dimensionId, posX, posY, posZ, 300));
|
||||
|
||||
if(this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ) != Blocks.air &&
|
||||
this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ) != Blocks.water &&
|
||||
this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ) != Blocks.flowing_water) {
|
||||
|
||||
if(!this.worldObj.isRemote) {
|
||||
onImpact();
|
||||
}
|
||||
this.killAndClear();
|
||||
return;
|
||||
}
|
||||
|
||||
loadNeighboringChunks((int) (posX / 16), (int) (posZ / 16));
|
||||
|
||||
if(motionY < -1 && this.isCluster && !worldObj.isRemote) {
|
||||
cluster();
|
||||
this.setDead();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double distance) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public abstract void onImpact();
|
||||
|
||||
public abstract List<ItemStack> getDebris();
|
||||
|
||||
public abstract ItemStack getDebrisRareDrop();
|
||||
|
||||
public void cluster() { }
|
||||
|
||||
public void init(Ticket ticket) {
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(ticket != null) {
|
||||
|
||||
if(loaderTicket == null) {
|
||||
|
||||
loaderTicket = ticket;
|
||||
loaderTicket.bindEntity(this);
|
||||
loaderTicket.getModData();
|
||||
}
|
||||
|
||||
ForgeChunkManager.forceChunk(loaderTicket, new ChunkCoordIntPair(chunkCoordX, chunkCoordZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<ChunkCoordIntPair> loadedChunks = new ArrayList<ChunkCoordIntPair>();
|
||||
|
||||
public void loadNeighboringChunks(int newChunkX, int newChunkZ) {
|
||||
if(!worldObj.isRemote && loaderTicket != null) {
|
||||
|
||||
clearChunkLoader();
|
||||
|
||||
loadedChunks.clear();
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX, newChunkZ));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX + (int) Math.ceil((this.posX + this.motionX) / 16D), newChunkZ + (int) Math.ceil((this.posZ + this.motionZ) / 16D)));
|
||||
|
||||
for(ChunkCoordIntPair chunk : loadedChunks) {
|
||||
ForgeChunkManager.forceChunk(loaderTicket, chunk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void killAndClear() {
|
||||
this.setDead();
|
||||
this.clearChunkLoader();
|
||||
}
|
||||
|
||||
public void clearChunkLoader() {
|
||||
if(!worldObj.isRemote && loaderTicket != null) {
|
||||
for(ChunkCoordIntPair chunk : loadedChunks) {
|
||||
ForgeChunkManager.unforceChunk(loaderTicket, chunk);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
306
src/main/java/com/hbm/entity/missile/EntityMissileBaseNT.java
Normal file
306
src/main/java/com/hbm/entity/missile/EntityMissileBaseNT.java
Normal file
@ -0,0 +1,306 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.logic.IChunkLoader;
|
||||
import com.hbm.entity.projectile.EntityThrowableInterp;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import api.hbm.entity.IRadarDetectable;
|
||||
import api.hbm.entity.IRadarDetectableNT;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeChunkManager;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Type;
|
||||
|
||||
public abstract class EntityMissileBaseNT extends EntityThrowableInterp implements IChunkLoader, IRadarDetectable, IRadarDetectableNT {
|
||||
|
||||
public int startX;
|
||||
public int startZ;
|
||||
public int targetX;
|
||||
public int targetZ;
|
||||
public double velocity;
|
||||
public double decelY;
|
||||
public double accelXZ;
|
||||
public boolean isCluster = false;
|
||||
private Ticket loaderTicket;
|
||||
public int health = 50;
|
||||
|
||||
public EntityMissileBaseNT(World world) {
|
||||
super(world);
|
||||
this.ignoreFrustumCheck = true;
|
||||
startX = (int) posX;
|
||||
startZ = (int) posZ;
|
||||
targetX = (int) posX;
|
||||
targetZ = (int) posZ;
|
||||
}
|
||||
|
||||
public EntityMissileBaseNT(World world, float x, float y, float z, int a, int b) {
|
||||
super(world);
|
||||
this.ignoreFrustumCheck = true;
|
||||
this.setLocationAndAngles(x, y, z, 0, 0);
|
||||
startX = (int) x;
|
||||
startZ = (int) z;
|
||||
targetX = a;
|
||||
targetZ = b;
|
||||
this.motionY = 2;
|
||||
|
||||
Vec3 vector = Vec3.createVectorHelper(targetX - startX, 0, targetZ - startZ);
|
||||
accelXZ = decelY = 1 / vector.lengthVector();
|
||||
decelY *= 2;
|
||||
velocity = 0;
|
||||
|
||||
this.setSize(1.5F, 1.5F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeSeenBy(Object radar) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean paramsApplicable(RadarScanParams params) {
|
||||
if(!params.scanMissiles) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean suppliesRedstone(RadarScanParams params) {
|
||||
if(params.smartMode && this.motionY >= 0) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
super.entityInit();
|
||||
init(ForgeChunkManager.requestTicket(MainRegistry.instance, worldObj, Type.ENTITY));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected double motionMult() {
|
||||
return velocity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesImpactEntities() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(velocity < 4) velocity += 0.025;
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(hasPropulsion()) {
|
||||
this.motionY -= decelY * velocity;
|
||||
|
||||
Vec3 vector = Vec3.createVectorHelper(targetX - startX, 0, targetZ - startZ);
|
||||
vector = vector.normalize();
|
||||
vector.xCoord *= accelXZ;
|
||||
vector.zCoord *= accelXZ;
|
||||
|
||||
if(motionY > 0) {
|
||||
motionX += vector.xCoord * velocity;
|
||||
motionZ += vector.zCoord * velocity;
|
||||
}
|
||||
|
||||
if(motionY < 0) {
|
||||
motionX -= vector.xCoord * velocity;
|
||||
motionZ -= vector.zCoord * velocity;
|
||||
}
|
||||
} else {
|
||||
motionX *= 0.99;
|
||||
motionZ *= 0.99;
|
||||
|
||||
if(motionY > -1.5)
|
||||
motionY -= 0.05;
|
||||
}
|
||||
|
||||
if(motionY < -velocity && this.isCluster) {
|
||||
cluster();
|
||||
this.setDead();
|
||||
return;
|
||||
}
|
||||
|
||||
loadNeighboringChunks((int) Math.floor(posX / 16), (int) Math.floor(posZ / 16));
|
||||
} else {
|
||||
this.spawnContrail();
|
||||
}
|
||||
|
||||
float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
for(this.rotationPitch = (float) (Math.atan2(this.motionY, f2) * 180.0D / Math.PI) - 90; 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;
|
||||
}
|
||||
|
||||
public boolean hasPropulsion() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void spawnContrail() {
|
||||
Vec3 vec = Vec3.createVectorHelper(motionX, motionY, motionZ).normalize();
|
||||
MainRegistry.proxy.particleControl(posX - vec.xCoord, posY - vec.yCoord, posZ - vec.zCoord, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
super.readEntityFromNBT(nbt);
|
||||
motionX = nbt.getDouble("moX");
|
||||
motionY = nbt.getDouble("moY");
|
||||
motionZ = nbt.getDouble("moZ");
|
||||
posX = nbt.getDouble("poX");
|
||||
posY = nbt.getDouble("poY");
|
||||
posZ = nbt.getDouble("poZ");
|
||||
decelY = nbt.getDouble("decel");
|
||||
accelXZ = nbt.getDouble("accel");
|
||||
targetX = nbt.getInteger("tX");
|
||||
targetZ = nbt.getInteger("tZ");
|
||||
startX = nbt.getInteger("sX");
|
||||
startZ = nbt.getInteger("sZ");
|
||||
velocity = nbt.getDouble("veloc");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
super.writeEntityToNBT(nbt);
|
||||
nbt.setDouble("moX", motionX);
|
||||
nbt.setDouble("moY", motionY);
|
||||
nbt.setDouble("moZ", motionZ);
|
||||
nbt.setDouble("poX", posX);
|
||||
nbt.setDouble("poY", posY);
|
||||
nbt.setDouble("poZ", posZ);
|
||||
nbt.setDouble("decel", decelY);
|
||||
nbt.setDouble("accel", accelXZ);
|
||||
nbt.setInteger("tX", targetX);
|
||||
nbt.setInteger("tZ", targetZ);
|
||||
nbt.setInteger("sX", startX);
|
||||
nbt.setInteger("sZ", startZ);
|
||||
nbt.setDouble("veloc", velocity);
|
||||
}
|
||||
|
||||
public boolean canBeCollidedWith() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean attackEntityFrom(DamageSource source, float amount) {
|
||||
if(this.isEntityInvulnerable()) {
|
||||
return false;
|
||||
} else {
|
||||
if(!this.isDead && !this.worldObj.isRemote) {
|
||||
health -= amount;
|
||||
|
||||
if(this.health <= 0) {
|
||||
this.killMissile();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
protected void killMissile() {
|
||||
this.setDead();
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 5, true, false, true);
|
||||
ExplosionLarge.spawnShrapnelShower(worldObj, posX, posY, posZ, motionX, motionY, motionZ, 15, 0.075);
|
||||
ExplosionLarge.spawnMissileDebris(worldObj, posX, posY, posZ, motionX, motionY, motionZ, 0.25, getDebris(), getDebrisRareDrop());
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double distance) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onImpact(MovingObjectPosition mop) {
|
||||
if(mop != null && mop.typeOfHit == mop.typeOfHit.BLOCK) {
|
||||
this.onImpact();
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void onImpact();
|
||||
public abstract List<ItemStack> getDebris();
|
||||
public abstract ItemStack getDebrisRareDrop();
|
||||
public void cluster() { }
|
||||
|
||||
@Override
|
||||
public double getGravityVelocity() {
|
||||
return 0.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getAirDrag() {
|
||||
return 1F;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getWaterDrag() {
|
||||
return 1F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Ticket ticket) {
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(ticket != null) {
|
||||
|
||||
if(loaderTicket == null) {
|
||||
|
||||
loaderTicket = ticket;
|
||||
loaderTicket.bindEntity(this);
|
||||
loaderTicket.getModData();
|
||||
}
|
||||
|
||||
ForgeChunkManager.forceChunk(loaderTicket, new ChunkCoordIntPair(chunkCoordX, chunkCoordZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<ChunkCoordIntPair> loadedChunks = new ArrayList<ChunkCoordIntPair>();
|
||||
|
||||
public void loadNeighboringChunks(int newChunkX, int newChunkZ) {
|
||||
if(!worldObj.isRemote && loaderTicket != null) {
|
||||
|
||||
clearChunkLoader();
|
||||
|
||||
loadedChunks.clear();
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX, newChunkZ));
|
||||
//loadedChunks.add(new ChunkCoordIntPair(newChunkX + (int) Math.floor((this.posX + this.motionX * this.motionMult()) / 16D), newChunkZ + (int) Math.floor((this.posZ + this.motionZ * this.motionMult()) / 16D)));
|
||||
|
||||
for(ChunkCoordIntPair chunk : loadedChunks) {
|
||||
ForgeChunkManager.forceChunk(loaderTicket, chunk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDead() {
|
||||
super.setDead();
|
||||
this.clearChunkLoader();
|
||||
}
|
||||
|
||||
public void clearChunkLoader() {
|
||||
if(!worldObj.isRemote && loaderTicket != null) {
|
||||
for(ChunkCoordIntPair chunk : loadedChunks) {
|
||||
ForgeChunkManager.unforceChunk(loaderTicket, chunk);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,55 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileBunkerBuster extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileBunkerBuster(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileBunkerBuster(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
for(int i = 0; i < 15; i++)
|
||||
{
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY - i, this.posZ, 5F, true);
|
||||
}
|
||||
|
||||
ExplosionLarge.spawnParticles(worldObj, this.posX, this.posY, this.posZ, 5);
|
||||
ExplosionLarge.spawnShrapnels(worldObj, this.posX, this.posY, this.posZ, 5);
|
||||
ExplosionLarge.spawnRubble(worldObj, this.posX, this.posY, this.posZ, 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 4));
|
||||
list.add(new ItemStack(ModItems.thruster_small, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier1, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_buster_small);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER1;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileBurst extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileBurst(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileBurst(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
for(int i = 0; i < 4; i++)
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 50.0F, true);
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 50.0F, true, true, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_steel, 16));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 10));
|
||||
list.add(new ItemStack(ModItems.thruster_large, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier3, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_generic_large);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER3;
|
||||
}
|
||||
}
|
||||
@ -1,54 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileBusterStrong extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileBusterStrong(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileBusterStrong(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
for(int i = 0; i < 20; i++)
|
||||
{
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY - i, this.posZ, 7.5F, true);
|
||||
}
|
||||
ExplosionLarge.spawnParticles(worldObj, this.posX, this.posY, this.posZ, 8);
|
||||
ExplosionLarge.spawnShrapnels(worldObj, this.posX, this.posY, this.posZ, 8);
|
||||
ExplosionLarge.spawnRubble(worldObj, this.posX, this.posY, this.posZ, 8);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_steel, 10));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 6));
|
||||
list.add(new ItemStack(ModItems.thruster_medium, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier2, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_buster_medium);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER2;
|
||||
}
|
||||
}
|
||||
@ -1,54 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileCluster extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileCluster(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileCluster(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
this.isCluster = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 5F, true);
|
||||
ExplosionChaos.cluster(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 25, 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cluster() {
|
||||
this.onImpact();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 4));
|
||||
list.add(new ItemStack(ModItems.thruster_small, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier1, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_cluster_small);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER1;
|
||||
}
|
||||
}
|
||||
@ -1,55 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileClusterStrong extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileClusterStrong(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileClusterStrong(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
this.isCluster = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 15F, true);
|
||||
ExplosionChaos.cluster(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 50, 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cluster() {
|
||||
this.onImpact();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_steel, 10));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 6));
|
||||
list.add(new ItemStack(ModItems.thruster_medium, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier2, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_cluster_medium);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER2;
|
||||
}
|
||||
}
|
||||
@ -21,77 +21,25 @@ import com.hbm.items.weapon.ItemMissile.WarheadType;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import api.hbm.entity.IRadarDetectable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import api.hbm.entity.IRadarDetectableNT;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeChunkManager;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Type;
|
||||
|
||||
public class EntityMissileCustom extends Entity implements IChunkLoader, IRadarDetectable {
|
||||
public class EntityMissileCustom extends EntityMissileBaseNT implements IChunkLoader, IRadarDetectable {
|
||||
|
||||
int startX;
|
||||
int startZ;
|
||||
int targetX;
|
||||
int targetZ;
|
||||
double velocity;
|
||||
double decelY;
|
||||
double accelXZ;
|
||||
float fuel;
|
||||
float consumption;
|
||||
private Ticket loaderTicket;
|
||||
public int health = 50;
|
||||
MissileStruct template;
|
||||
protected float fuel;
|
||||
protected float consumption;
|
||||
|
||||
public EntityMissileCustom(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
this.ignoreFrustumCheck = true;
|
||||
startX = (int) posX;
|
||||
startZ = (int) posZ;
|
||||
targetX = (int) posX;
|
||||
targetZ = (int) posZ;
|
||||
}
|
||||
|
||||
public boolean canBeCollidedWith() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_) {
|
||||
if(this.isEntityInvulnerable()) {
|
||||
return false;
|
||||
} else {
|
||||
if(!this.isDead && !this.worldObj.isRemote) {
|
||||
health -= p_70097_2_;
|
||||
|
||||
if(this.health <= 0) {
|
||||
this.setDead();
|
||||
this.killMissile();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private void killMissile() {
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 5, true, false, true);
|
||||
ExplosionLarge.spawnShrapnelShower(worldObj, posX, posY, posZ, motionX, motionY, motionZ, 15, 0.075);
|
||||
public EntityMissileCustom(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
public EntityMissileCustom(World world, float x, float y, float z, int a, int b, MissileStruct template) {
|
||||
super(world);
|
||||
this.ignoreFrustumCheck = true;
|
||||
/*
|
||||
* this.posX = x; this.posY = y; this.posZ = z;
|
||||
*/
|
||||
this.setLocationAndAngles(x, y, z, 0, 0);
|
||||
startX = (int) x;
|
||||
startZ = (int) z;
|
||||
@ -99,21 +47,19 @@ public class EntityMissileCustom extends Entity implements IChunkLoader, IRadarD
|
||||
targetZ = b;
|
||||
this.motionY = 2;
|
||||
|
||||
this.template = template;
|
||||
|
||||
this.dataWatcher.updateObject(9, Item.getIdFromItem(template.warhead));
|
||||
this.dataWatcher.updateObject(10, Item.getIdFromItem(template.fuselage));
|
||||
if(template.fins != null)
|
||||
this.dataWatcher.updateObject(11, Item.getIdFromItem(template.fins));
|
||||
else
|
||||
this.dataWatcher.updateObject(11, Integer.valueOf(0));
|
||||
this.dataWatcher.updateObject(12, Item.getIdFromItem(template.thruster));
|
||||
|
||||
Vec3 vector = Vec3.createVectorHelper(targetX - startX, 0, targetZ - startZ);
|
||||
accelXZ = decelY = 1 / vector.lengthVector();
|
||||
decelY *= 2;
|
||||
velocity = 0;
|
||||
|
||||
velocity = 0.0;
|
||||
this.dataWatcher.updateObject(9, Item.getIdFromItem(template.warhead));
|
||||
this.dataWatcher.updateObject(10, Item.getIdFromItem(template.fuselage));
|
||||
this.dataWatcher.updateObject(12, Item.getIdFromItem(template.thruster));
|
||||
if(template.fins != null) {
|
||||
this.dataWatcher.updateObject(11, Item.getIdFromItem(template.fins));
|
||||
} else {
|
||||
this.dataWatcher.updateObject(11, Integer.valueOf(0));
|
||||
}
|
||||
|
||||
ItemMissile fuselage = (ItemMissile) template.fuselage;
|
||||
ItemMissile thruster = (ItemMissile) template.thruster;
|
||||
@ -125,43 +71,39 @@ public class EntityMissileCustom extends Entity implements IChunkLoader, IRadarD
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
init(ForgeChunkManager.requestTicket(MainRegistry.instance, worldObj, Type.ENTITY));
|
||||
this.dataWatcher.addObject(8, Integer.valueOf(this.health));
|
||||
|
||||
if(template != null) {
|
||||
this.dataWatcher.addObject(9, Integer.valueOf(Item.getIdFromItem(template.warhead)));
|
||||
this.dataWatcher.addObject(10, Integer.valueOf(Item.getIdFromItem(template.fuselage)));
|
||||
|
||||
if(template.fins != null)
|
||||
this.dataWatcher.addObject(11, Integer.valueOf(Item.getIdFromItem(template.fins)));
|
||||
else
|
||||
this.dataWatcher.addObject(11, Integer.valueOf(0));
|
||||
|
||||
this.dataWatcher.addObject(12, Integer.valueOf(Item.getIdFromItem(template.thruster)));
|
||||
} else {
|
||||
this.dataWatcher.addObject(9, Integer.valueOf(0));
|
||||
this.dataWatcher.addObject(10, Integer.valueOf(0));
|
||||
this.dataWatcher.addObject(11, Integer.valueOf(0));
|
||||
this.dataWatcher.addObject(12, Integer.valueOf(0));
|
||||
protected void killMissile() {
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 5, true, false, true);
|
||||
ExplosionLarge.spawnShrapnelShower(worldObj, posX, posY, posZ, motionX, motionY, motionZ, 15, 0.075);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
if(this.hasPropulsion()) this.fuel -= this.consumption;
|
||||
}
|
||||
|
||||
super.onUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
motionX = nbt.getDouble("moX");
|
||||
motionY = nbt.getDouble("moY");
|
||||
motionZ = nbt.getDouble("moZ");
|
||||
posX = nbt.getDouble("poX");
|
||||
posY = nbt.getDouble("poY");
|
||||
posZ = nbt.getDouble("poZ");
|
||||
decelY = nbt.getDouble("decel");
|
||||
accelXZ = nbt.getDouble("accel");
|
||||
targetX = nbt.getInteger("tX");
|
||||
targetZ = nbt.getInteger("tZ");
|
||||
startX = nbt.getInteger("sX");
|
||||
startZ = nbt.getInteger("sZ");
|
||||
velocity = nbt.getInteger("veloc");
|
||||
public boolean hasPropulsion() {
|
||||
return this.fuel > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
super.entityInit();
|
||||
this.dataWatcher.addObject(8, Integer.valueOf(this.health));
|
||||
this.dataWatcher.addObject(9, Integer.valueOf(0));
|
||||
this.dataWatcher.addObject(10, Integer.valueOf(0));
|
||||
this.dataWatcher.addObject(11, Integer.valueOf(0));
|
||||
this.dataWatcher.addObject(12, Integer.valueOf(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
super.readEntityFromNBT(nbt);
|
||||
fuel = nbt.getFloat("fuel");
|
||||
consumption = nbt.getFloat("consumption");
|
||||
this.dataWatcher.updateObject(9, nbt.getInteger("warhead"));
|
||||
@ -171,20 +113,8 @@ public class EntityMissileCustom extends Entity implements IChunkLoader, IRadarD
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
nbt.setDouble("moX", motionX);
|
||||
nbt.setDouble("moY", motionY);
|
||||
nbt.setDouble("moZ", motionZ);
|
||||
nbt.setDouble("poX", posX);
|
||||
nbt.setDouble("poY", posY);
|
||||
nbt.setDouble("poZ", posZ);
|
||||
nbt.setDouble("decel", decelY);
|
||||
nbt.setDouble("accel", accelXZ);
|
||||
nbt.setInteger("tX", targetX);
|
||||
nbt.setInteger("tZ", targetZ);
|
||||
nbt.setInteger("sX", startX);
|
||||
nbt.setInteger("sZ", startZ);
|
||||
nbt.setDouble("veloc", velocity);
|
||||
public void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
super.writeEntityToNBT(nbt);
|
||||
nbt.setFloat("fuel", fuel);
|
||||
nbt.setFloat("consumption", consumption);
|
||||
nbt.setInteger("warhead", this.dataWatcher.getWatchableObjectInt(9));
|
||||
@ -192,118 +122,28 @@ public class EntityMissileCustom extends Entity implements IChunkLoader, IRadarD
|
||||
nbt.setInteger("fins", this.dataWatcher.getWatchableObjectInt(11));
|
||||
nbt.setInteger("thruster", this.dataWatcher.getWatchableObjectInt(12));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void spawnContrail() {
|
||||
|
||||
protected void rotation() {
|
||||
float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
Vec3 v = Vec3.createVectorHelper(motionX, motionY, motionZ).normalize();
|
||||
String smoke = "";
|
||||
ItemMissile part = (ItemMissile) Item.getItemById(this.dataWatcher.getWatchableObjectInt(10));
|
||||
FuelType type = (FuelType) part.attributes[0];
|
||||
|
||||
for(this.rotationPitch = (float) (Math.atan2(this.motionY, f2) * 180.0D / Math.PI) - 90; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) {
|
||||
;
|
||||
switch(type) {
|
||||
case BALEFIRE: smoke = "exBalefire"; break;
|
||||
case HYDROGEN: smoke = "exHydrogen"; break;
|
||||
case KEROSENE: smoke = "exKerosene"; break;
|
||||
case SOLID: smoke = "exSolid"; break;
|
||||
case XENON: break;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
if(!smoke.isEmpty()) for(int i = 0; i < velocity; i++) MainRegistry.proxy.spawnParticle(posX - v.xCoord * i, posY - v.yCoord * i, posZ - v.zCoord * i, smoke, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
this.dataWatcher.updateObject(8, Integer.valueOf(this.health));
|
||||
|
||||
this.setLocationAndAngles(posX + this.motionX * velocity, posY + this.motionY * velocity, posZ + this.motionZ * velocity, 0, 0);
|
||||
|
||||
this.rotation();
|
||||
|
||||
if(fuel > 0 || worldObj.isRemote) {
|
||||
|
||||
fuel -= consumption;
|
||||
|
||||
this.motionY -= decelY * velocity;
|
||||
|
||||
Vec3 vector = Vec3.createVectorHelper(targetX - startX, 0, targetZ - startZ);
|
||||
vector = vector.normalize();
|
||||
vector.xCoord *= accelXZ * velocity;
|
||||
vector.zCoord *= accelXZ * velocity;
|
||||
|
||||
if(motionY > 0) {
|
||||
motionX += vector.xCoord;
|
||||
motionZ += vector.zCoord;
|
||||
}
|
||||
|
||||
if(motionY < 0) {
|
||||
motionX -= vector.xCoord;
|
||||
motionZ -= vector.zCoord;
|
||||
}
|
||||
|
||||
if(velocity < 5)
|
||||
velocity += 0.01;
|
||||
} else {
|
||||
|
||||
motionX *= 0.99;
|
||||
motionZ *= 0.99;
|
||||
|
||||
if(motionY > -1.5)
|
||||
motionY -= 0.05;
|
||||
}
|
||||
|
||||
if(this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.air && this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.water && this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.flowing_water) {
|
||||
|
||||
if(!this.worldObj.isRemote) {
|
||||
onImpact();
|
||||
}
|
||||
this.setDead();
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.worldObj.isRemote) {
|
||||
|
||||
Vec3 v = Vec3.createVectorHelper(motionX, motionY, motionZ);
|
||||
v = v.normalize();
|
||||
|
||||
String smoke = "";
|
||||
|
||||
ItemMissile part = (ItemMissile) Item.getItemById(this.dataWatcher.getWatchableObjectInt(10));
|
||||
FuelType type = (FuelType) part.attributes[0];
|
||||
|
||||
switch(type) {
|
||||
case BALEFIRE:
|
||||
smoke = "exBalefire";
|
||||
break;
|
||||
case HYDROGEN:
|
||||
smoke = "exHydrogen";
|
||||
break;
|
||||
case KEROSENE:
|
||||
smoke = "exKerosene";
|
||||
break;
|
||||
case SOLID:
|
||||
smoke = "exSolid";
|
||||
break;
|
||||
case XENON:
|
||||
break;
|
||||
}
|
||||
|
||||
for(int i = 0; i < velocity; i++)
|
||||
MainRegistry.proxy.spawnParticle(posX - v.xCoord * i, posY - v.yCoord * i, posZ - v.zCoord * i, smoke, null);
|
||||
}
|
||||
|
||||
loadNeighboringChunks((int) (posX / 16), (int) (posZ / 16));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double distance) {
|
||||
return distance < 2500000;
|
||||
}
|
||||
|
||||
public void onImpact() {
|
||||
public void onImpact() { //TODO: demolish this steaming pile of shit
|
||||
|
||||
ItemMissile part = (ItemMissile) Item.getItemById(this.dataWatcher.getWatchableObjectInt(9));
|
||||
|
||||
@ -378,67 +218,54 @@ public class EntityMissileCustom extends Entity implements IChunkLoader, IRadarD
|
||||
}
|
||||
}
|
||||
|
||||
public void init(Ticket ticket) {
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(ticket != null) {
|
||||
|
||||
if(loaderTicket == null) {
|
||||
|
||||
loaderTicket = ticket;
|
||||
loaderTicket.bindEntity(this);
|
||||
loaderTicket.getModData();
|
||||
}
|
||||
|
||||
ForgeChunkManager.forceChunk(loaderTicket, new ChunkCoordIntPair(chunkCoordX, chunkCoordZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<ChunkCoordIntPair> loadedChunks = new ArrayList<ChunkCoordIntPair>();
|
||||
|
||||
public void loadNeighboringChunks(int newChunkX, int newChunkZ) {
|
||||
if(!worldObj.isRemote && loaderTicket != null) {
|
||||
for(ChunkCoordIntPair chunk : loadedChunks) {
|
||||
ForgeChunkManager.unforceChunk(loaderTicket, chunk);
|
||||
}
|
||||
|
||||
loadedChunks.clear();
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX, newChunkZ));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX + 1, newChunkZ + 1));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX - 1, newChunkZ - 1));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX + 1, newChunkZ - 1));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX - 1, newChunkZ + 1));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX + 1, newChunkZ));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX, newChunkZ + 1));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX - 1, newChunkZ));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX, newChunkZ - 1));
|
||||
|
||||
for(ChunkCoordIntPair chunk : loadedChunks) {
|
||||
ForgeChunkManager.forceChunk(loaderTicket, chunk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
|
||||
ItemMissile part = (ItemMissile) Item.getItemById(this.dataWatcher.getWatchableObjectInt(10));
|
||||
|
||||
PartSize top = part.top;
|
||||
PartSize bottom = part.bottom;
|
||||
|
||||
if(top == PartSize.SIZE_10 && bottom == PartSize.SIZE_10)
|
||||
return RadarTargetType.MISSILE_10;
|
||||
if(top == PartSize.SIZE_10 && bottom == PartSize.SIZE_15)
|
||||
return RadarTargetType.MISSILE_10_15;
|
||||
if(top == PartSize.SIZE_15 && bottom == PartSize.SIZE_15)
|
||||
return RadarTargetType.MISSILE_15;
|
||||
if(top == PartSize.SIZE_15 && bottom == PartSize.SIZE_20)
|
||||
return RadarTargetType.MISSILE_15_20;
|
||||
if(top == PartSize.SIZE_20 && bottom == PartSize.SIZE_20)
|
||||
return RadarTargetType.MISSILE_20;
|
||||
if(top == PartSize.SIZE_10 && bottom == PartSize.SIZE_10) return RadarTargetType.MISSILE_10;
|
||||
if(top == PartSize.SIZE_10 && bottom == PartSize.SIZE_15) return RadarTargetType.MISSILE_10_15;
|
||||
if(top == PartSize.SIZE_15 && bottom == PartSize.SIZE_15) return RadarTargetType.MISSILE_15;
|
||||
if(top == PartSize.SIZE_15 && bottom == PartSize.SIZE_20) return RadarTargetType.MISSILE_15_20;
|
||||
if(top == PartSize.SIZE_20 && bottom == PartSize.SIZE_20) return RadarTargetType.MISSILE_20;
|
||||
|
||||
return RadarTargetType.PLAYER;
|
||||
return RadarTargetType.MISSILE_TIER1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
|
||||
ItemMissile part = (ItemMissile) Item.getItemById(this.dataWatcher.getWatchableObjectInt(10));
|
||||
PartSize top = part.top;
|
||||
PartSize bottom = part.bottom;
|
||||
|
||||
if(top == PartSize.SIZE_10 && bottom == PartSize.SIZE_10) return "radar.target.custom10";
|
||||
if(top == PartSize.SIZE_10 && bottom == PartSize.SIZE_15) return "radar.target.custom1015";
|
||||
if(top == PartSize.SIZE_15 && bottom == PartSize.SIZE_15) return "radar.target.custom15";
|
||||
if(top == PartSize.SIZE_15 && bottom == PartSize.SIZE_20) return "radar.target.custom1520";
|
||||
if(top == PartSize.SIZE_20 && bottom == PartSize.SIZE_20) return "radar.target.custom20";
|
||||
|
||||
return "radar.target.custom";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlipLevel() {
|
||||
|
||||
ItemMissile part = (ItemMissile) Item.getItemById(this.dataWatcher.getWatchableObjectInt(10));
|
||||
PartSize top = part.top;
|
||||
PartSize bottom = part.bottom;
|
||||
|
||||
if(top == PartSize.SIZE_10 && bottom == PartSize.SIZE_10) return IRadarDetectableNT.TIER10;
|
||||
if(top == PartSize.SIZE_10 && bottom == PartSize.SIZE_15) return IRadarDetectableNT.TIER10_15;
|
||||
if(top == PartSize.SIZE_15 && bottom == PartSize.SIZE_15) return IRadarDetectableNT.TIER15;
|
||||
if(top == PartSize.SIZE_15 && bottom == PartSize.SIZE_20) return IRadarDetectableNT.TIER15_20;
|
||||
if(top == PartSize.SIZE_20 && bottom == PartSize.SIZE_20) return IRadarDetectableNT.TIER20;
|
||||
|
||||
return IRadarDetectableNT.TIER1;
|
||||
}
|
||||
|
||||
@Override public List<ItemStack> getDebris() { return new ArrayList(); }
|
||||
@Override public ItemStack getDebrisRareDrop() { return null; }
|
||||
}
|
||||
|
||||
@ -4,10 +4,11 @@ import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
|
||||
import api.hbm.entity.IRadarDetectableNT;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileDoomsday extends EntityMissileBaseAdvanced {
|
||||
public class EntityMissileDoomsday extends EntityMissileBaseNT {
|
||||
|
||||
public EntityMissileDoomsday(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
@ -108,4 +109,14 @@ public class EntityMissileDoomsday extends EntityMissileBaseAdvanced {
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "radar.target.doomsday";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlipLevel() {
|
||||
return IRadarDetectableNT.TIER4;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,58 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
import com.hbm.explosion.ExplosionNT.ExAttrib;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileDrill extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileDrill(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileDrill(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
for(int i = 0; i < 30; i++)
|
||||
{
|
||||
ExplosionNT explosion = new ExplosionNT(worldObj, this, this.posX, this.posY - i, this.posZ, 10F);
|
||||
explosion.addAllAttrib(ExAttrib.ERRODE);
|
||||
explosion.explode(); //an explosion exploded!
|
||||
}
|
||||
ExplosionLarge.spawnParticles(worldObj, this.posX, this.posY, this.posZ, 25);
|
||||
ExplosionLarge.spawnShrapnels(worldObj, this.posX, this.posY, this.posZ, 12);
|
||||
ExplosionLarge.jolt(worldObj, this.posX, this.posY, this.posZ, 10, 50, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_steel, 16));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 10));
|
||||
list.add(new ItemStack(ModItems.thruster_large, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier3, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_buster_large);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER3;
|
||||
}
|
||||
}
|
||||
@ -1,59 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.effect.EntityEMPBlast;
|
||||
import com.hbm.explosion.ExplosionNukeGeneric;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileEMP extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileEMP(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileEMP(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
ExplosionNukeGeneric.empBlast(worldObj, (int)posX, (int)posY, (int)posZ, 50);
|
||||
EntityEMPBlast wave = new EntityEMPBlast(worldObj, 50);
|
||||
wave.posX = posX;
|
||||
wave.posY = posY;
|
||||
wave.posZ = posZ;
|
||||
worldObj.spawnEntityInWorld(wave);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.wire_aluminium, 4));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 4));
|
||||
list.add(new ItemStack(ModItems.hull_small_aluminium, 2));
|
||||
list.add(new ItemStack(ModItems.ducttape, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier1, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModBlocks.emp_bomb, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER0;
|
||||
}
|
||||
}
|
||||
@ -1,54 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.logic.EntityEMP;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileEMPStrong extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileEMPStrong(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileEMPStrong(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
|
||||
EntityEMP emp = new EntityEMP(worldObj);
|
||||
emp.posX = posX;
|
||||
emp.posY = posY;
|
||||
emp.posZ = posZ;
|
||||
|
||||
worldObj.spawnEntityInWorld(emp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_steel, 10));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 6));
|
||||
list.add(new ItemStack(ModItems.thruster_medium, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier2, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_generic_medium);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER2;
|
||||
}
|
||||
}
|
||||
@ -1,51 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionThermo;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileEndo extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileEndo(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileEndo(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 10.0F, true);
|
||||
ExplosionThermo.freeze(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 30);
|
||||
ExplosionThermo.freezer(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 40);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 10));
|
||||
list.add(new ItemStack(ModItems.plate_steel, 14));
|
||||
list.add(new ItemStack(ModItems.plate_aluminium, 8));
|
||||
list.add(new ItemStack(ModItems.thruster_large, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier4, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_thermo_exo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER3;
|
||||
}
|
||||
}
|
||||
@ -1,51 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionThermo;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileExo extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileExo(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileExo(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 10.0F, true);
|
||||
ExplosionThermo.scorch(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 30);
|
||||
ExplosionThermo.setEntitiesOnFire(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 40);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 10));
|
||||
list.add(new ItemStack(ModItems.plate_steel, 14));
|
||||
list.add(new ItemStack(ModItems.plate_aluminium, 8));
|
||||
list.add(new ItemStack(ModItems.thruster_large, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier4, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_thermo_exo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER3;
|
||||
}
|
||||
}
|
||||
@ -1,190 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileGeneric extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileGeneric(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileGeneric(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 10.0F, true, true, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 4));
|
||||
list.add(new ItemStack(ModItems.thruster_small, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier1, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_generic_small);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER1;
|
||||
}
|
||||
|
||||
/*public EntityMissileGeneric(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileGeneric(World p_i1582_1_, int x, int z, double a, double b, double c) {
|
||||
super(p_i1582_1_, x, z, a, b, c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;
|
||||
|
||||
this.rotation();
|
||||
|
||||
switch(phase)
|
||||
{
|
||||
case 0:
|
||||
if(loc0 != null)
|
||||
{
|
||||
freePizzaGoddammit(loc0);
|
||||
if(loc0.posX + 2 > this.posX && loc0.posX - 2 < this.posX &&
|
||||
loc0.posY + 2 > this.posY && loc0.posY - 2 < this.posY &&
|
||||
loc0.posZ + 2 > this.posZ && loc0.posZ - 2 < this.posZ)
|
||||
{
|
||||
this.phase = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if(loc1 != null)
|
||||
{
|
||||
freePizzaGoddammit(loc1);
|
||||
if(loc1.posX + 2 > this.posX && loc1.posX - 2 < this.posX &&
|
||||
loc1.posY + 2 > this.posY && loc1.posY - 2 < this.posY &&
|
||||
loc1.posZ + 2 > this.posZ && loc1.posZ - 2 < this.posZ)
|
||||
{
|
||||
this.phase = 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if(loc2 != null)
|
||||
{
|
||||
freePizzaGoddammit(loc2);
|
||||
if(loc2.posX + 2 > this.posX && loc2.posX - 2 < this.posX &&
|
||||
loc2.posY + 2 > this.posY && loc2.posY - 2 < this.posY &&
|
||||
loc2.posZ + 2 > this.posZ && loc2.posZ - 2 < this.posZ)
|
||||
{
|
||||
this.phase = 3;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if(loc3 != null)
|
||||
{
|
||||
freePizzaGoddammit(loc3);
|
||||
if(loc3.posX + 2 > this.posX && loc3.posX - 2 < this.posX &&
|
||||
loc3.posY + 2 > this.posY && loc3.posY - 2 < this.posY &&
|
||||
loc3.posZ + 2 > this.posZ && loc3.posZ - 2 < this.posZ)
|
||||
{
|
||||
this.phase = 4;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if(loc4 != null)
|
||||
{
|
||||
freePizzaGoddammit(loc4);
|
||||
if(loc4.posX + 2 > this.posX && loc4.posX - 2 < this.posX &&
|
||||
loc4.posY + 2 > this.posY && loc4.posY - 2 < this.posY &&
|
||||
loc4.posZ + 2 > this.posZ && loc4.posZ - 2 < this.posZ)
|
||||
{
|
||||
this.phase = 5;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if(loc5 != null)
|
||||
{
|
||||
freePizzaGoddammit(loc5);
|
||||
if(loc5.posX + 2 > this.posX && loc5.posX - 2 < this.posX &&
|
||||
loc5.posY + 2 > this.posY && loc5.posY - 2 < this.posY &&
|
||||
loc5.posZ + 2 > this.posZ && loc5.posZ - 2 < this.posZ)
|
||||
{
|
||||
this.phase = 6;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if(loc6 != null)
|
||||
{
|
||||
freePizzaGoddammit(loc6);
|
||||
if(loc6.posX + 2 > this.posX && loc6.posX - 2 < this.posX &&
|
||||
loc6.posY + 2 > this.posY && loc6.posY - 2 < this.posY &&
|
||||
loc6.posZ + 2 > this.posZ && loc6.posZ - 2 < this.posZ)
|
||||
{
|
||||
this.phase = 7;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if(loc7 != null)
|
||||
{
|
||||
freePizzaGoddammit(loc7);
|
||||
if(loc7.posX + 2 > this.posX && loc7.posX - 2 < this.posX &&
|
||||
loc7.posY + 2 > this.posY && loc7.posY - 2 < this.posY &&
|
||||
loc7.posZ + 2 > this.posZ && loc7.posZ - 2 < this.posZ)
|
||||
{
|
||||
this.phase = 8;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if(target != null)
|
||||
{
|
||||
freePizzaGoddammit(target);
|
||||
if(target.posX + 2 > this.posX && target.posX - 2 < this.posX &&
|
||||
target.posY + 2 > this.posY && target.posY - 2 < this.posY &&
|
||||
target.posZ + 2 > this.posZ && target.posZ - 2 < this.posZ)
|
||||
{
|
||||
this.phase = -1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
this.worldObj.spawnEntityInWorld(new EntitySmokeFX(this.worldObj, this.posX, this.posY, this.posZ, 0.0, 0.0, 0.0));
|
||||
|
||||
if(this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ) != Blocks.air && this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ) != Blocks.water && this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ) != Blocks.flowing_water)
|
||||
{
|
||||
if(!this.worldObj.isRemote)
|
||||
{
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 10.0F, true, true, true);
|
||||
}
|
||||
this.setDead();
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
@ -1,47 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileIncendiary extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileIncendiary(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileIncendiary(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
ExplosionLarge.explodeFire(worldObj, this.posX + 0.5F, this.posY + 0.5F, this.posZ + 0.5F, 10.0F, true, true, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 4));
|
||||
list.add(new ItemStack(ModItems.thruster_small, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier1, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_incendiary_small);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER1;
|
||||
}
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileIncendiaryStrong extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileIncendiaryStrong(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileIncendiaryStrong(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
ExplosionLarge.explodeFire(worldObj, this.posX + 0.5F, this.posY + 0.5F, this.posZ + 0.5F, 25.0F, true, true, true);
|
||||
ExplosionChaos.flameDeath(this.worldObj, (int)((float)this.posX + 0.5F), (int)((float)this.posY + 0.5F), (int)((float)this.posZ + 0.5F), 25);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_steel, 10));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 6));
|
||||
list.add(new ItemStack(ModItems.thruster_medium, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier2, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_incendiary_medium);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER2;
|
||||
}
|
||||
}
|
||||
@ -1,51 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileInferno extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileInferno(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileInferno(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
ExplosionLarge.explodeFire(worldObj, this.posX + 0.5F, this.posY + 0.5F, this.posZ + 0.5F, 35.0F, true, true, true);
|
||||
ExplosionChaos.burn(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 10);
|
||||
ExplosionChaos.flameDeath(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 25);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_steel, 16));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 10));
|
||||
list.add(new ItemStack(ModItems.thruster_large, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier3, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_incendiary_large);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER3;
|
||||
}
|
||||
}
|
||||
@ -1,52 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionNukeSmall;
|
||||
import com.hbm.items.ItemAmmoEnums.AmmoFatman;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileMicro extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileMicro(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileMicro(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
if(!this.worldObj.isRemote) {
|
||||
ExplosionNukeSmall.explode(worldObj, posX, posY + 0.5, posZ, ExplosionNukeSmall.PARAMS_HIGH);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.wire_aluminium, 4));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 4));
|
||||
list.add(new ItemStack(ModItems.hull_small_aluminium, 2));
|
||||
list.add(new ItemStack(ModItems.ducttape, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier1, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return ModItems.ammo_nuke.stackFromEnum(AmmoFatman.HIGH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER0;
|
||||
}
|
||||
}
|
||||
@ -1,53 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeTorex;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileMirv extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileMirv(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileMirv(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, BombConfig.missileRadius * 2, posX, posY, posZ));
|
||||
EntityNukeTorex.statFac(worldObj, posX, posY, posZ, BombConfig.missileRadius * 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 16));
|
||||
list.add(new ItemStack(ModItems.plate_steel, 20));
|
||||
list.add(new ItemStack(ModItems.plate_aluminium, 12));
|
||||
list.add(new ItemStack(ModItems.thruster_large, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier5, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_mirv);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER4;
|
||||
}
|
||||
}
|
||||
@ -1,53 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeTorex;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileNuclear extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileNuclear(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileNuclear(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
|
||||
this.worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, BombConfig.missileRadius, posX, posY, posZ));
|
||||
EntityNukeTorex.statFac(worldObj, posX, posY, posZ, BombConfig.missileRadius);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 16));
|
||||
list.add(new ItemStack(ModItems.plate_steel, 20));
|
||||
list.add(new ItemStack(ModItems.plate_aluminium, 12));
|
||||
list.add(new ItemStack(ModItems.thruster_large, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier4, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_nuclear);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER4;
|
||||
}
|
||||
}
|
||||
@ -1,55 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileRain extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileRain(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileRain(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
this.isCluster = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 25F, true);
|
||||
ExplosionChaos.cluster(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 100, 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cluster() {
|
||||
this.onImpact();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_steel, 16));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 10));
|
||||
list.add(new ItemStack(ModItems.thruster_large, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier3, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_cluster_large);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER3;
|
||||
}
|
||||
}
|
||||
@ -1,62 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityCloudFleija;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileSchrabidium extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileSchrabidium(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileSchrabidium(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
if(!this.worldObj.isRemote) {
|
||||
EntityNukeExplosionMK3 ex = EntityNukeExplosionMK3.statFacFleija(worldObj, posX, posY, posZ, BombConfig.aSchrabRadius);
|
||||
if(!ex.isDead) {
|
||||
worldObj.spawnEntityInWorld(ex);
|
||||
|
||||
EntityCloudFleija cloud = new EntityCloudFleija(this.worldObj, BombConfig.aSchrabRadius);
|
||||
cloud.posX = this.posX;
|
||||
cloud.posY = this.posY;
|
||||
cloud.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(cloud);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.wire_aluminium, 4));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 4));
|
||||
list.add(new ItemStack(ModItems.hull_small_aluminium, 2));
|
||||
list.add(new ItemStack(ModItems.ducttape, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier1, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.powder_schrabidium, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER0;
|
||||
}
|
||||
}
|
||||
@ -11,13 +11,14 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import api.hbm.entity.IRadarDetectableNT;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileShuttle extends EntityMissileBaseAdvanced {
|
||||
public class EntityMissileShuttle extends EntityMissileBaseNT {
|
||||
|
||||
public EntityMissileShuttle(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
@ -64,4 +65,14 @@ public class EntityMissileShuttle extends EntityMissileBaseAdvanced {
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "radar.target.shuttle";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlipLevel() {
|
||||
return IRadarDetectableNT.TIER3;
|
||||
}
|
||||
}
|
||||
@ -1,48 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileStrong extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileStrong(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileStrong(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 25.0F, true, true, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_steel, 10));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 6));
|
||||
list.add(new ItemStack(ModItems.thruster_medium, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier2, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_generic_medium);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER2;
|
||||
}
|
||||
}
|
||||
@ -1,58 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.bomb.BlockTaint;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileTaint extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileTaint(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileTaint(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 10.0F, true);
|
||||
|
||||
for(int i = 0; i < 100; i++) {
|
||||
int a = rand.nextInt(11) + (int)this.posX - 5;
|
||||
int b = rand.nextInt(11) + (int)this.posY - 5;
|
||||
int c = rand.nextInt(11) + (int)this.posZ - 5;
|
||||
if(worldObj.getBlock(a, b, c).isReplaceable(worldObj, a, b, c) && BlockTaint.hasPosNeightbour(worldObj, a, b, c))
|
||||
worldObj.setBlock(a, b, c, ModBlocks.taint);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.wire_aluminium, 4));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 4));
|
||||
list.add(new ItemStack(ModItems.hull_small_aluminium, 2));
|
||||
list.add(new ItemStack(ModItems.powder_magic, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier1, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.powder_spark_mix, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER0;
|
||||
}
|
||||
}
|
||||
121
src/main/java/com/hbm/entity/missile/EntityMissileTier0.java
Normal file
121
src/main/java/com/hbm/entity/missile/EntityMissileTier0.java
Normal file
@ -0,0 +1,121 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.bomb.BlockTaint;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityBlackHole;
|
||||
import com.hbm.entity.effect.EntityCloudFleija;
|
||||
import com.hbm.entity.effect.EntityEMPBlast;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.explosion.ExplosionNukeGeneric;
|
||||
import com.hbm.explosion.ExplosionNukeSmall;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.entity.IRadarDetectableNT;
|
||||
|
||||
import com.hbm.items.ItemAmmoEnums.AmmoFatman;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class EntityMissileTier0 extends EntityMissileBaseNT {
|
||||
|
||||
public EntityMissileTier0(World world) { super(world); }
|
||||
public EntityMissileTier0(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
list.add(new ItemStack(ModItems.wire_aluminium, 4));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 4));
|
||||
list.add(new ItemStack(ModItems.hull_small_aluminium, 2));
|
||||
list.add(new ItemStack(ModItems.ducttape, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier1, 1));
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "radar.target.tier0";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlipLevel() {
|
||||
return IRadarDetectableNT.TIER0;
|
||||
}
|
||||
|
||||
public static class EntityMissileMicro extends EntityMissileTier0 {
|
||||
public EntityMissileMicro(World world) { super(world); }
|
||||
public EntityMissileMicro(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() { ExplosionNukeSmall.explode(worldObj, posX, posY + 0.5, posZ, ExplosionNukeSmall.PARAMS_HIGH); }
|
||||
@Override public ItemStack getDebrisRareDrop() { return ModItems.ammo_nuke.stackFromEnum(AmmoFatman.HIGH); }
|
||||
}
|
||||
|
||||
public static class EntityMissileSchrabidium extends EntityMissileTier0 {
|
||||
public EntityMissileSchrabidium(World world) { super(world); }
|
||||
public EntityMissileSchrabidium(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
EntityNukeExplosionMK3 ex = EntityNukeExplosionMK3.statFacFleija(worldObj, posX, posY, posZ, BombConfig.aSchrabRadius);
|
||||
if(!ex.isDead) {
|
||||
worldObj.spawnEntityInWorld(ex);
|
||||
EntityCloudFleija cloud = new EntityCloudFleija(this.worldObj, BombConfig.aSchrabRadius);
|
||||
cloud.posX = this.posX;
|
||||
cloud.posY = this.posY;
|
||||
cloud.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(cloud);
|
||||
}
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.powder_schrabidium, 1); }
|
||||
}
|
||||
|
||||
public static class EntityMissileBHole extends EntityMissileTier0 {
|
||||
public EntityMissileBHole(World world) { super(world); }
|
||||
public EntityMissileBHole(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 1.5F, true);
|
||||
EntityBlackHole bl = new EntityBlackHole(this.worldObj, 1.5F);
|
||||
bl.posX = this.posX;
|
||||
bl.posY = this.posY;
|
||||
bl.posZ = this.posZ;
|
||||
this.worldObj.spawnEntityInWorld(bl);
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.grenade_black_hole, 1); }
|
||||
}
|
||||
|
||||
public static class EntityMissileTaint extends EntityMissileTier0 {
|
||||
public EntityMissileTaint(World world) { super(world); }
|
||||
public EntityMissileTaint(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 10.0F, true);
|
||||
for(int i = 0; i < 100; i++) {
|
||||
int a = rand.nextInt(11) + (int) this.posX - 5;
|
||||
int b = rand.nextInt(11) + (int) this.posY - 5;
|
||||
int c = rand.nextInt(11) + (int) this.posZ - 5;
|
||||
if(worldObj.getBlock(a, b, c).isReplaceable(worldObj, a, b, c) && BlockTaint.hasPosNeightbour(worldObj, a, b, c)) worldObj.setBlock(a, b, c, ModBlocks.taint);
|
||||
}
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.powder_spark_mix, 1); }
|
||||
}
|
||||
|
||||
public static class EntityMissileEMP extends EntityMissileTier0 {
|
||||
public EntityMissileEMP(World world) { super(world); }
|
||||
public EntityMissileEMP(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
ExplosionNukeGeneric.empBlast(worldObj, (int)posX, (int)posY, (int)posZ, 50);
|
||||
EntityEMPBlast wave = new EntityEMPBlast(worldObj, 50);
|
||||
wave.posX = posX;
|
||||
wave.posY = posY;
|
||||
wave.posZ = posZ;
|
||||
worldObj.spawnEntityInWorld(wave);
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModBlocks.emp_bomb, 1); }
|
||||
}
|
||||
}
|
||||
79
src/main/java/com/hbm/entity/missile/EntityMissileTier1.java
Normal file
79
src/main/java/com/hbm/entity/missile/EntityMissileTier1.java
Normal file
@ -0,0 +1,79 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.entity.IRadarDetectableNT;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class EntityMissileTier1 extends EntityMissileBaseNT {
|
||||
|
||||
public EntityMissileTier1(World world) { super(world); }
|
||||
public EntityMissileTier1(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 4));
|
||||
list.add(new ItemStack(ModItems.thruster_small, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier1, 1));
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "radar.target.tier1";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlipLevel() {
|
||||
return IRadarDetectableNT.TIER1;
|
||||
}
|
||||
|
||||
public static class EntityMissileGeneric extends EntityMissileTier1 {
|
||||
public EntityMissileGeneric(World world) { super(world); }
|
||||
public EntityMissileGeneric(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() { ExplosionLarge.explode(worldObj, posX, posY, posZ, 10.0F, true, true, true); }
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_generic_small); }
|
||||
}
|
||||
|
||||
public static class EntityMissileIncendiary extends EntityMissileTier1 {
|
||||
public EntityMissileIncendiary(World world) { super(world); }
|
||||
public EntityMissileIncendiary(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() { ExplosionLarge.explodeFire(worldObj, this.posX + 0.5F, this.posY + 0.5F, this.posZ + 0.5F, 10.0F, true, true, true); }
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_incendiary_small); }
|
||||
}
|
||||
|
||||
public static class EntityMissileCluster extends EntityMissileTier1 {
|
||||
public EntityMissileCluster(World world) { super(world); }
|
||||
public EntityMissileCluster(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); this.isCluster = true; }
|
||||
@Override public void onImpact() {
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 5F, true);
|
||||
ExplosionChaos.cluster(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 25, 100);
|
||||
}
|
||||
@Override public void cluster() { this.onImpact(); }
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_cluster_small); }
|
||||
}
|
||||
|
||||
public static class EntityMissileBunkerBuster extends EntityMissileTier1 {
|
||||
public EntityMissileBunkerBuster(World world) { super(world); }
|
||||
public EntityMissileBunkerBuster(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
for(int i = 0; i < 15; i++) this.worldObj.createExplosion(this, this.posX, this.posY - i, this.posZ, 5F, true);
|
||||
ExplosionLarge.spawnParticles(worldObj, this.posX, this.posY, this.posZ, 5);
|
||||
ExplosionLarge.spawnShrapnels(worldObj, this.posX, this.posY, this.posZ, 5);
|
||||
ExplosionLarge.spawnRubble(worldObj, this.posX, this.posY, this.posZ, 5);
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_buster_small); }
|
||||
}
|
||||
}
|
||||
99
src/main/java/com/hbm/entity/missile/EntityMissileTier2.java
Normal file
99
src/main/java/com/hbm/entity/missile/EntityMissileTier2.java
Normal file
@ -0,0 +1,99 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.logic.EntityEMP;
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.entity.IRadarDetectableNT;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class EntityMissileTier2 extends EntityMissileBaseNT {
|
||||
|
||||
public EntityMissileTier2(World world) { super(world); }
|
||||
public EntityMissileTier2(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_steel, 10));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 6));
|
||||
list.add(new ItemStack(ModItems.thruster_medium, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier2, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "radar.target.tier2";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlipLevel() {
|
||||
return IRadarDetectableNT.TIER2;
|
||||
}
|
||||
|
||||
public static class EntityMissileStrong extends EntityMissileTier2 {
|
||||
public EntityMissileStrong(World world) { super(world); }
|
||||
public EntityMissileStrong(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() { ExplosionLarge.explode(worldObj, posX, posY, posZ, 25.0F, true, true, true); }
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_generic_medium); }
|
||||
}
|
||||
|
||||
public static class EntityMissileIncendiaryStrong extends EntityMissileTier2 {
|
||||
public EntityMissileIncendiaryStrong(World world) { super(world); }
|
||||
public EntityMissileIncendiaryStrong(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
ExplosionLarge.explodeFire(worldObj, this.posX + 0.5F, this.posY + 0.5F, this.posZ + 0.5F, 25.0F, true, true, true);
|
||||
ExplosionChaos.flameDeath(this.worldObj, (int)((float)this.posX + 0.5F), (int)((float)this.posY + 0.5F), (int)((float)this.posZ + 0.5F), 25);
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_incendiary_medium); }
|
||||
}
|
||||
|
||||
public static class EntityMissileClusterStrong extends EntityMissileTier2 {
|
||||
public EntityMissileClusterStrong(World world) { super(world); }
|
||||
public EntityMissileClusterStrong(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); this.isCluster = true; }
|
||||
@Override public void onImpact() {
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 15F, true);
|
||||
ExplosionChaos.cluster(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 50, 100);
|
||||
}
|
||||
@Override public void cluster() { this.onImpact(); }
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_cluster_medium); }
|
||||
}
|
||||
|
||||
public static class EntityMissileBusterStrong extends EntityMissileTier2 {
|
||||
public EntityMissileBusterStrong(World world) { super(world); }
|
||||
public EntityMissileBusterStrong(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
for(int i = 0; i < 20; i++) this.worldObj.createExplosion(this, this.posX, this.posY - i, this.posZ, 7.5F, true);
|
||||
ExplosionLarge.spawnParticles(worldObj, this.posX, this.posY, this.posZ, 8);
|
||||
ExplosionLarge.spawnShrapnels(worldObj, this.posX, this.posY, this.posZ, 8);
|
||||
ExplosionLarge.spawnRubble(worldObj, this.posX, this.posY, this.posZ, 8);
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_buster_medium); }
|
||||
}
|
||||
|
||||
public static class EntityMissileEMPStrong extends EntityMissileTier2 {
|
||||
public EntityMissileEMPStrong(World world) { super(world); }
|
||||
public EntityMissileEMPStrong(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
EntityEMP emp = new EntityEMP(worldObj);
|
||||
emp.posX = posX;
|
||||
emp.posY = posY;
|
||||
emp.posZ = posZ;
|
||||
worldObj.spawnEntityInWorld(emp);
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_generic_medium); }
|
||||
}
|
||||
}
|
||||
136
src/main/java/com/hbm/entity/missile/EntityMissileTier3.java
Normal file
136
src/main/java/com/hbm/entity/missile/EntityMissileTier3.java
Normal file
@ -0,0 +1,136 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
import com.hbm.explosion.ExplosionThermo;
|
||||
import com.hbm.explosion.ExplosionNT.ExAttrib;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.entity.IRadarDetectableNT;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class EntityMissileTier3 extends EntityMissileBaseNT {
|
||||
|
||||
public EntityMissileTier3(World world) { super(world); }
|
||||
public EntityMissileTier3(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_steel, 16));
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 10));
|
||||
list.add(new ItemStack(ModItems.thruster_large, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier3, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "radar.target.tier3";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlipLevel() {
|
||||
return IRadarDetectableNT.TIER3;
|
||||
}
|
||||
|
||||
public static class EntityMissileBurst extends EntityMissileTier3 {
|
||||
public EntityMissileBurst(World world) { super(world); }
|
||||
public EntityMissileBurst(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
for(int i = 0; i < 4; i++) this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 50.0F, true);
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 50.0F, true, true, true);
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_generic_large); }
|
||||
}
|
||||
|
||||
public static class EntityMissileInferno extends EntityMissileTier3 {
|
||||
public EntityMissileInferno(World world) { super(world); }
|
||||
public EntityMissileInferno(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
ExplosionLarge.explodeFire(worldObj, this.posX + 0.5F, this.posY + 0.5F, this.posZ + 0.5F, 35.0F, true, true, true);
|
||||
ExplosionChaos.burn(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 10);
|
||||
ExplosionChaos.flameDeath(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 25);
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_incendiary_large); }
|
||||
}
|
||||
|
||||
public static class EntityMissileRain extends EntityMissileTier3 {
|
||||
public EntityMissileRain(World world) { super(world); }
|
||||
public EntityMissileRain(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); this.isCluster = true; }
|
||||
@Override public void onImpact() {
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 25F, true);
|
||||
ExplosionChaos.cluster(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 100, 100);
|
||||
}
|
||||
@Override public void cluster() { this.onImpact(); }
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_cluster_large); }
|
||||
}
|
||||
|
||||
public static class EntityMissileDrill extends EntityMissileTier3 {
|
||||
public EntityMissileDrill(World world) { super(world); }
|
||||
public EntityMissileDrill(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
for(int i = 0; i < 30; i++) {
|
||||
ExplosionNT explosion = new ExplosionNT(worldObj, this, this.posX, this.posY - i, this.posZ, 10F);
|
||||
explosion.addAllAttrib(ExAttrib.ERRODE);
|
||||
explosion.explode(); //an explosion exploded!
|
||||
}
|
||||
ExplosionLarge.spawnParticles(worldObj, this.posX, this.posY, this.posZ, 25);
|
||||
ExplosionLarge.spawnShrapnels(worldObj, this.posX, this.posY, this.posZ, 12);
|
||||
ExplosionLarge.jolt(worldObj, this.posX, this.posY, this.posZ, 10, 50, 1);
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_buster_large); }
|
||||
}
|
||||
|
||||
public static class EntityMissileEndo extends EntityMissileTier3 {
|
||||
public EntityMissileEndo(World world) { super(world); }
|
||||
public EntityMissileEndo(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 10.0F, true);
|
||||
ExplosionThermo.freeze(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 30);
|
||||
ExplosionThermo.freezer(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 40);
|
||||
}
|
||||
@Override public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 10));
|
||||
list.add(new ItemStack(ModItems.plate_steel, 14));
|
||||
list.add(new ItemStack(ModItems.plate_aluminium, 8));
|
||||
list.add(new ItemStack(ModItems.thruster_large, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier4, 1));
|
||||
return list;
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_thermo_exo); }
|
||||
}
|
||||
|
||||
public static class EntityMissileExo extends EntityMissileTier3 {
|
||||
public EntityMissileExo(World world) { super(world); }
|
||||
public EntityMissileExo(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 10.0F, true);
|
||||
ExplosionThermo.scorch(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 30);
|
||||
ExplosionThermo.setEntitiesOnFire(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, 40);
|
||||
}
|
||||
@Override public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 10));
|
||||
list.add(new ItemStack(ModItems.plate_steel, 14));
|
||||
list.add(new ItemStack(ModItems.plate_aluminium, 8));
|
||||
list.add(new ItemStack(ModItems.thruster_large, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier4, 1));
|
||||
return list;
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_thermo_exo); }
|
||||
}
|
||||
}
|
||||
87
src/main/java/com/hbm/entity/missile/EntityMissileTier4.java
Normal file
87
src/main/java/com/hbm/entity/missile/EntityMissileTier4.java
Normal file
@ -0,0 +1,87 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.BombConfig;
|
||||
import com.hbm.entity.effect.EntityNukeTorex;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.entity.IRadarDetectableNT;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class EntityMissileTier4 extends EntityMissileBaseNT {
|
||||
|
||||
public EntityMissileTier4(World world) { super(world); }
|
||||
public EntityMissileTier4(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 16));
|
||||
list.add(new ItemStack(ModItems.plate_steel, 20));
|
||||
list.add(new ItemStack(ModItems.plate_aluminium, 12));
|
||||
list.add(new ItemStack(ModItems.thruster_large, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier4, 1));
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "radar.target.tier4";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBlipLevel() {
|
||||
return IRadarDetectableNT.TIER4;
|
||||
}
|
||||
|
||||
public static class EntityMissileNuclear extends EntityMissileTier4 {
|
||||
public EntityMissileNuclear(World world) { super(world); }
|
||||
public EntityMissileNuclear(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
this.worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, BombConfig.missileRadius, posX, posY, posZ));
|
||||
EntityNukeTorex.statFac(worldObj, posX, posY, posZ, BombConfig.missileRadius);
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_nuclear); }
|
||||
}
|
||||
|
||||
public static class EntityMissileMirv extends EntityMissileTier4 {
|
||||
public EntityMissileMirv(World world) { super(world); }
|
||||
public EntityMissileMirv(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, BombConfig.missileRadius * 2, posX, posY, posZ));
|
||||
EntityNukeTorex.statFac(worldObj, posX, posY, posZ, BombConfig.missileRadius * 2);
|
||||
}
|
||||
@Override public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 16));
|
||||
list.add(new ItemStack(ModItems.plate_steel, 20));
|
||||
list.add(new ItemStack(ModItems.plate_aluminium, 12));
|
||||
list.add(new ItemStack(ModItems.thruster_large, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier5, 1));
|
||||
return list;
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_mirv); }
|
||||
}
|
||||
|
||||
public static class EntityMissileVolcano extends EntityMissileTier4 {
|
||||
public EntityMissileVolcano(World world) { super(world); }
|
||||
public EntityMissileVolcano(World world, float x, float y, float z, int a, int b) { super(world, x, y, z, a, b); }
|
||||
@Override public void onImpact() {
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 10.0F, true, true, true);
|
||||
for(int x = -1; x <= 1; x++) for(int y = -1; y <= 1; y++) for(int z = -1; z <= 1; z++) worldObj.setBlock((int)Math.floor(posX + x), (int)Math.floor(posY + y), (int)Math.floor(posZ + z), ModBlocks.volcanic_lava_block);
|
||||
worldObj.setBlock((int)Math.floor(posX), (int)Math.floor(posY), (int)Math.floor(posZ), ModBlocks.volcano_core);
|
||||
}
|
||||
@Override public ItemStack getDebrisRareDrop() { return new ItemStack(ModItems.warhead_volcano); }
|
||||
}
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileVolcano extends EntityMissileBaseAdvanced {
|
||||
|
||||
public EntityMissileVolcano(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
|
||||
public EntityMissileVolcano(World world, float x, float y, float z, int a, int b) {
|
||||
super(world, x, y, z, a, b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onImpact() {
|
||||
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 10.0F, true, true, true);
|
||||
|
||||
for(int x = -1; x <= 1; x++) {
|
||||
for(int y = -1; y <= 1; y++) {
|
||||
for(int z = -1; z <= 1; z++) {
|
||||
worldObj.setBlock((int)Math.floor(posX + x), (int)Math.floor(posY + y), (int)Math.floor(posZ + z), ModBlocks.volcanic_lava_block);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
worldObj.setBlock((int)Math.floor(posX), (int)Math.floor(posY), (int)Math.floor(posZ), ModBlocks.volcano_core);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDebris() {
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
|
||||
list.add(new ItemStack(ModItems.plate_titanium, 16));
|
||||
list.add(new ItemStack(ModItems.plate_steel, 20));
|
||||
list.add(new ItemStack(ModItems.plate_aluminium, 12));
|
||||
list.add(new ItemStack(ModItems.thruster_large, 1));
|
||||
list.add(new ItemStack(ModItems.circuit_targeting_tier4, 1));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getDebrisRareDrop() {
|
||||
return new ItemStack(ModItems.warhead_volcano);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER4;
|
||||
}
|
||||
}
|
||||
@ -150,7 +150,7 @@ public class EntityArtilleryRocket extends EntityThrowableInterp implements IChu
|
||||
|
||||
loadedChunks.clear();
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX, newChunkZ));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX + (int) Math.ceil((this.posX + this.motionX) / 16D), newChunkZ + (int) Math.ceil((this.posZ + this.motionZ) / 16D)));
|
||||
//loadedChunks.add(new ChunkCoordIntPair(newChunkX + (int) Math.floor((this.posX + this.motionX) / 16D), newChunkZ + (int) Math.floor((this.posZ + this.motionZ) / 16D)));
|
||||
|
||||
for(ChunkCoordIntPair chunk : loadedChunks) {
|
||||
ForgeChunkManager.forceChunk(loaderTicket, chunk);
|
||||
|
||||
@ -198,7 +198,7 @@ public class EntityArtilleryShell extends EntityThrowableNT implements IChunkLoa
|
||||
|
||||
loadedChunks.clear();
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX, newChunkZ));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX + (int) Math.ceil((this.posX + this.motionX) / 16D), newChunkZ + (int) Math.ceil((this.posZ + this.motionZ) / 16D)));
|
||||
//loadedChunks.add(new ChunkCoordIntPair(newChunkX + (int) Math.floor((this.posX + this.motionX) / 16D), newChunkZ + (int) Math.floor((this.posZ + this.motionZ) / 16D)));
|
||||
|
||||
for(ChunkCoordIntPair chunk : loadedChunks) {
|
||||
ForgeChunkManager.forceChunk(loaderTicket, chunk);
|
||||
|
||||
@ -185,7 +185,7 @@ public abstract class EntityThrowableNT extends Entity implements IProjectile {
|
||||
nextPos = Vec3.createVectorHelper(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord);
|
||||
}
|
||||
|
||||
if(!this.worldObj.isRemote) {
|
||||
if(!this.worldObj.isRemote && this.doesImpactEntities()) {
|
||||
|
||||
Entity hitEntity = null;
|
||||
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX * motionMult(), this.motionY * motionMult(), this.motionZ * motionMult()).expand(1.0D, 1.0D, 1.0D));
|
||||
@ -282,6 +282,10 @@ public abstract class EntityThrowableNT extends Entity implements IProjectile {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean doesImpactEntities() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean doesPenetrate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2,14 +2,12 @@ package com.hbm.handler;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockBobble.BobbleType;
|
||||
import com.hbm.items.ItemAmmoEnums.*;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.tool.IItemAbility;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.WeightedRandomObject;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
|
||||
@ -36,7 +34,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.WeightedRandom;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class WeaponAbility {
|
||||
@ -208,28 +205,10 @@ public abstract class WeaponAbility {
|
||||
|
||||
if(living.getHealth() <= 0.0F) {
|
||||
|
||||
WeightedRandomObject[] ammo = new WeightedRandomObject[] {
|
||||
new WeightedRandomObject(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.STOCK), 10),
|
||||
new WeightedRandomObject(ModItems.ammo_12gauge.stackFromEnum(Ammo12Gauge.SHRAPNEL), 5),
|
||||
new WeightedRandomObject(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.STOCK), 10),
|
||||
new WeightedRandomObject(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.FLECHETTE), 5),
|
||||
new WeightedRandomObject(ModItems.ammo_20gauge.stackFromEnum(Ammo20Gauge.SLUG), 5),
|
||||
new WeightedRandomObject(ModItems.ammo_9mm.stackFromEnum(Ammo9mm.STOCK), 10),
|
||||
new WeightedRandomObject(ModItems.ammo_5mm.stackFromEnum(Ammo5mm.STOCK), 10),
|
||||
new WeightedRandomObject(ModItems.ammo_556.stackFromEnum(Ammo556mm.STOCK), 10),
|
||||
new WeightedRandomObject(ModItems.ammo_556.stackFromEnum(Ammo556mm.FLECHETTE), 10),
|
||||
new WeightedRandomObject(ModItems.ammo_50bmg.stackFromEnum(Ammo50BMG.STOCK), 3),
|
||||
new WeightedRandomObject(ModItems.ammo_grenade.stackFromEnum(AmmoGrenade.STOCK), 3),
|
||||
new WeightedRandomObject(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.STOCK), 1),
|
||||
new WeightedRandomObject(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.GLARE), 1),
|
||||
new WeightedRandomObject(new ItemStack(ModItems.syringe_metal_stimpak), 20),
|
||||
};
|
||||
|
||||
int count = Math.min((int)Math.ceil(living.getMaxHealth() / divider), 250); //safeguard to prevent funnies from bosses with obscene health
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
|
||||
living.entityDropItem(((WeightedRandomObject)WeightedRandom.getRandomItem(living.getRNG(), ammo)).asStack(), 1);
|
||||
living.entityDropItem(new ItemStack(ModItems.nitra_small), 1);
|
||||
world.spawnEntityInWorld(new EntityXPOrb(world, living.posX, living.posY, living.posZ, 1));
|
||||
}
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ import com.hbm.inventory.recipes.CustomMachineRecipes;
|
||||
import com.hbm.inventory.recipes.CustomMachineRecipes.CustomMachineRecipe;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.ItemStackUtil;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
|
||||
@ -104,7 +105,7 @@ public class CustomMachineHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return conf.localizedName;
|
||||
return (I18nUtil.resolveKey("tile.cm_" + conf.unlocalizedName + ".name").startsWith("tile.cm_")) ? conf.localizedName : I18nUtil.resolveKey("tile.cm_" + conf.unlocalizedName + ".name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -185,6 +185,7 @@ public class OreDictManager {
|
||||
public static final DictFrame PET = new DictFrame("PET");
|
||||
public static final DictFrame PC = new DictFrame("Polycarbonate");
|
||||
public static final DictFrame PVC = new DictFrame("PVC");
|
||||
public static final DictFrame LATEX = new DictFrame("Latex");
|
||||
public static final DictFrame RUBBER = new DictFrame("Rubber");
|
||||
public static final DictFrame MAGTUNG = new DictFrame("MagnetizedTungsten");
|
||||
public static final DictFrame CMB = new DictFrame("CMBSteel");
|
||||
@ -277,6 +278,8 @@ public class OreDictManager {
|
||||
/*
|
||||
* COLLECTIONS
|
||||
*/
|
||||
/** Any form of elastic polymer */
|
||||
public static final DictGroup ANY_RUBBER = new DictGroup("AnyRubber", LATEX, RUBBER);
|
||||
/** Any post oil polymer like teflon ("polymer") or bakelite */
|
||||
public static final DictGroup ANY_PLASTIC = new DictGroup("AnyPlastic", POLYMER, BAKELITE); //using the Any prefix means that it's just the secondary prefix, and that shape prefixes are applicable
|
||||
/** Any post vacuum polymer like PET or PVC */
|
||||
@ -356,7 +359,7 @@ public class OreDictManager {
|
||||
TCALLOY .ingot(ingot_tcalloy) .dust(powder_tcalloy) .block(block_tcalloy);
|
||||
CDALLOY .ingot(ingot_cdalloy) .block(block_cdalloy);
|
||||
PB .nugget(nugget_lead) .ingot(ingot_lead) .dust(powder_lead) .plate(plate_lead) .block(block_lead) .ore(ore_lead, ore_meteor_lead);
|
||||
BI .nugget(nugget_bismuth) .ingot(ingot_bismuth) .dust(powder_bismuth);
|
||||
BI .nugget(nugget_bismuth) .billet(billet_bismuth) .ingot(ingot_bismuth) .dust(powder_bismuth);
|
||||
AS .nugget(nugget_arsenic) .ingot(ingot_arsenic);
|
||||
CA .ingot(ingot_calcium) .dust(powder_calcium);
|
||||
CD .ingot(ingot_cadmium) .dust(powder_cadmium) .block(block_cadmium);
|
||||
@ -370,6 +373,7 @@ public class OreDictManager {
|
||||
DURA .ingot(ingot_dura_steel) .dust(powder_dura_steel) .block(block_dura_steel);
|
||||
POLYMER .ingot(ingot_polymer) .dust(powder_polymer) .block(block_polymer);
|
||||
BAKELITE .ingot(ingot_bakelite) .dust(powder_bakelite) .block(block_bakelite);
|
||||
LATEX .gem(ball_resin) .ingot(ingot_biorubber);
|
||||
RUBBER .ingot(ingot_rubber) .block(block_rubber);
|
||||
//PET .ingot(ingot_pet);
|
||||
PC .ingot(ingot_pc);
|
||||
@ -604,6 +608,7 @@ public class OreDictManager {
|
||||
}
|
||||
|
||||
public static void registerGroups() {
|
||||
ANY_RUBBER.addPrefix(INGOT, true);
|
||||
ANY_PLASTIC.addPrefix(INGOT, true).addPrefix(DUST, true).addPrefix(BLOCK, true);
|
||||
ANY_HARDPLASTIC.addPrefix(INGOT, true);
|
||||
ANY_RESISTANTALLOY.addPrefix(INGOT, true).addPrefix(DUST, true).addPrefix(PLATECAST, true).addPrefix(PLATEWELDED, true).addPrefix(HEAVY_COMPONENT, true).addPrefix(BLOCK, true);
|
||||
|
||||
@ -21,57 +21,43 @@ public class ContainerLaunchPadTier1 extends Container {
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 80, 17));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 134, 17));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
|
||||
if(var4 != null && var4.getHasStack()) {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 2) {
|
||||
if (!this.mergeItemStack(var5, 3, this.inventorySlots.size(), true))
|
||||
{
|
||||
|
||||
if(par2 <= 2) {
|
||||
if(!this.mergeItemStack(var5, 3, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
|
||||
if(var5.stackSize == 0) {
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return var3;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.tileentity.IRadioisotopeFuel;
|
||||
import com.hbm.items.machine.ItemRTGPellet;
|
||||
import com.hbm.tileentity.machine.TileEntityDiFurnaceRTG;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -45,6 +45,25 @@ public class ContainerMachineDiFurnaceRTG extends Container {
|
||||
return bFurnace.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack slotClick(int index, int button, int mode, EntityPlayer player) {
|
||||
|
||||
if(index >= 0 && index < 2 && button == 1 && mode == 0) {
|
||||
Slot slot = this.getSlot(index);
|
||||
if(!slot.getHasStack() && player.inventory.getItemStack() == null) {
|
||||
if(!player.worldObj.isRemote) {
|
||||
if(index == 0) bFurnace.sideUpper = (byte) ((bFurnace.sideUpper + 1) % 6);
|
||||
if(index == 1) bFurnace.sideLower = (byte) ((bFurnace.sideLower + 1) % 6);
|
||||
|
||||
bFurnace.markDirty();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return super.slotClick(index, button, mode, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
ItemStack var3 = null;
|
||||
@ -58,7 +77,7 @@ public class ContainerMachineDiFurnaceRTG extends Container {
|
||||
if(!this.mergeItemStack(var5, 9, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else if(var5.getItem() instanceof IRadioisotopeFuel) {
|
||||
} else if(var5.getItem() instanceof ItemRTGPellet) {
|
||||
if(!this.mergeItemStack(var5, 3, 9, false))
|
||||
return null;
|
||||
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadar;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
|
||||
public class ContainerMachineRadar extends Container {
|
||||
|
||||
public ContainerMachineRadar(InventoryPlayer invPlayer, TileEntityMachineRadar tedf) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadarNT;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerMachineRadarNT extends Container {
|
||||
|
||||
private TileEntityMachineRadarNT radar;
|
||||
|
||||
public ContainerMachineRadarNT(InventoryPlayer invPlayer, TileEntityMachineRadarNT tedf) {
|
||||
this.radar = tedf;
|
||||
|
||||
for(int i = 0; i < 8; i++) this.addSlotToContainer(new Slot(tedf, i, 26 + i * 18, 17));
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 8, 26, 44));
|
||||
this.addSlotToContainer(new Slot(tedf, 9, 152, 44));
|
||||
|
||||
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, 103 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 161));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if(var4 != null && var4.getHasStack()) {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if(par2 <= 9) {
|
||||
if(!this.mergeItemStack(var5, 10, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(var3.getItem() instanceof IBatteryItem || var3.getItem() == ModItems.battery_creative) {
|
||||
if(!this.mergeItemStack(var5, 9, 10, false)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
if(!this.mergeItemStack(var5, 0, 9, false)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(var5.stackSize == 0) {
|
||||
var4.putStack((ItemStack) null);
|
||||
} else {
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return radar.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
@ -218,9 +218,8 @@ public class FluidType {
|
||||
info.addAll(hidden);
|
||||
} else {
|
||||
|
||||
info.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +"Hold <" +
|
||||
EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "LSHIFT" +
|
||||
EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "> to display more info");
|
||||
info.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC +I18nUtil.resolveKey("tooltip.block" ,
|
||||
EnumChatFormatting.YELLOW +"" + EnumChatFormatting.ITALIC + "LSHIFT"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class FT_Combustible extends FluidTrait {
|
||||
@ -25,11 +26,11 @@ public class FT_Combustible extends FluidTrait {
|
||||
public void addInfo(List<String> info) {
|
||||
super.addInfo(info);
|
||||
|
||||
info.add(EnumChatFormatting.GOLD + "[Combustible]");
|
||||
info.add(EnumChatFormatting.GOLD + I18nUtil.resolveKeyArray("hbmfluid.Trait.Combustible","","")[0]);
|
||||
|
||||
if(combustionEnergy > 0) {
|
||||
info.add(EnumChatFormatting.GOLD + "Provides " + EnumChatFormatting.RED + "" + BobMathUtil.getShortNumber(combustionEnergy) + "HE " + EnumChatFormatting.GOLD + "per bucket");
|
||||
info.add(EnumChatFormatting.GOLD + "Fuel grade: " + EnumChatFormatting.RED + this.fuelGrade.getGrade());
|
||||
info.add(EnumChatFormatting.GOLD + I18nUtil.resolveKeyArray("hbmfluid.Trait.Combustible",BobMathUtil.getShortNumber(combustionEnergy),"")[1]);
|
||||
info.add(EnumChatFormatting.GOLD + I18nUtil.resolveKeyArray("hbmfluid.Trait.Combustible","",this.fuelGrade.getGrade())[2]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@ import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class FT_Coolable extends FluidTrait {
|
||||
@ -42,14 +43,14 @@ public class FT_Coolable extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.AQUA + "Thermal capacity: " + heatEnergy + " TU");
|
||||
info.add(EnumChatFormatting.AQUA + I18nUtil.resolveKeyArray("hbmfluid.Trait.Coolable",heatEnergy,"")[0]);
|
||||
for(CoolingType type : CoolingType.values()) {
|
||||
|
||||
double eff = getEfficiency(type);
|
||||
|
||||
if(eff > 0) {
|
||||
info.add(EnumChatFormatting.AQUA + "[" + type.name + "]");
|
||||
info.add(EnumChatFormatting.AQUA + "Efficiency: " + ((int) (eff * 100D)) + "%");
|
||||
info.add(EnumChatFormatting.AQUA + I18nUtil.resolveKeyArray("hbmfluid.Trait.Coolable","",((int) (eff * 100D)))[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class FT_Corrosive extends FluidTrait {
|
||||
@ -31,9 +32,9 @@ public class FT_Corrosive extends FluidTrait {
|
||||
public void addInfo(List<String> info) {
|
||||
|
||||
if(isHighlyCorrosive())
|
||||
info.add(EnumChatFormatting.GOLD + "[Strongly Corrosive]");
|
||||
info.add(EnumChatFormatting.GOLD + I18nUtil.resolveKeyArray("hbmfluid.Trait.Corrosive")[0]);
|
||||
else
|
||||
info.add(EnumChatFormatting.YELLOW + "[Corrosive]");
|
||||
info.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("hbmfluid.Trait.Corrosive")[1]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -7,6 +7,7 @@ import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class FT_Flammable extends FluidTrait {
|
||||
@ -28,10 +29,10 @@ public class FT_Flammable extends FluidTrait {
|
||||
public void addInfo(List<String> info) {
|
||||
super.addInfo(info);
|
||||
|
||||
info.add(EnumChatFormatting.YELLOW + "[Flammable]");
|
||||
info.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("hbmfluid.Trait.Flammable","")[0]);
|
||||
|
||||
if(energy > 0)
|
||||
info.add(EnumChatFormatting.YELLOW + "Provides " + EnumChatFormatting.RED + "" + BobMathUtil.getShortNumber(energy) + "TU " + EnumChatFormatting.YELLOW + "per bucket");
|
||||
info.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKeyArray("hbmfluid.Trait.Flammable",BobMathUtil.getShortNumber(energy))[1]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -6,6 +6,7 @@ import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -42,14 +43,14 @@ public class FT_Heatable extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.AQUA + "Thermal capacity: " + this.getFirstStep().heatReq + " TU");
|
||||
info.add(EnumChatFormatting.AQUA + I18nUtil.resolveKeyArray("hbmfluid.Trait.Coolable",this.getFirstStep().heatReq,"")[0]);
|
||||
for(HeatingType type : HeatingType.values()) {
|
||||
|
||||
double eff = getEfficiency(type);
|
||||
|
||||
if(eff > 0) {
|
||||
info.add(EnumChatFormatting.AQUA + "[" + type.name + "]");
|
||||
info.add(EnumChatFormatting.AQUA + "Efficiency: " + ((int) (eff * 100D)) + "%");
|
||||
info.add(EnumChatFormatting.AQUA + I18nUtil.resolveKeyArray("hbmfluid.Trait.Coolable","",((int) (eff * 100D)))[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class FT_PWRModerator extends FluidTrait {
|
||||
@ -22,13 +23,13 @@ public class FT_PWRModerator extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfo(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + "[PWR Flux Multiplier]");
|
||||
info.add(EnumChatFormatting.BLUE + I18nUtil.resolveKeyArray("hbmfluid.Trait.PWRModerator","","")[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInfoHidden(List<String> info) {
|
||||
int mult = (int) (multiplier * 100 - 100);
|
||||
info.add(EnumChatFormatting.BLUE + "Core flux " + (mult >= 0 ? "+" : "") + mult + "%");
|
||||
info.add(EnumChatFormatting.BLUE + I18nUtil.resolveKeyArray("hbmfluid.Trait.PWRModerator",(mult >= 0 ? "+" : ""),mult)[1]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
@Deprecated //use FT_Toxin instead
|
||||
@ -31,7 +32,7 @@ public class FT_Poison extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.GREEN + "[Toxic Fumes]");
|
||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey("hbmfluid.Trait.Poison"));
|
||||
}
|
||||
|
||||
@Override public void serializeJSON(JsonWriter writer) throws IOException {
|
||||
|
||||
@ -31,7 +31,7 @@ public class FT_Toxin extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.LIGHT_PURPLE + "[Toxin]");
|
||||
info.add(EnumChatFormatting.LIGHT_PURPLE + I18nUtil.resolveKey("hbmfluid.Trait.Toxin"));
|
||||
|
||||
for(ToxinEntry entry : entries) {
|
||||
entry.addInfo(info);
|
||||
|
||||
@ -8,6 +8,7 @@ import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -32,7 +33,7 @@ public class FT_VentRadiation extends FluidTrait {
|
||||
|
||||
@Override
|
||||
public void addInfo(List<String> info) {
|
||||
info.add(EnumChatFormatting.YELLOW + "[Radioactive]");
|
||||
info.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("hbmfluid.Trait.VentRadiation"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -2,63 +2,64 @@ package com.hbm.inventory.fluid.trait;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class FluidTraitSimple {
|
||||
|
||||
public static class FT_Gaseous extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + "[Gaseous]");
|
||||
info.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("hbmfluid.TraitSimple.Gaseous"));
|
||||
}
|
||||
}
|
||||
|
||||
/** gaseous at room temperature, for cryogenic hydrogen for example */
|
||||
public static class FT_Gaseous_ART extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + "[Gaseous at Room Temperature]");
|
||||
info.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("hbmfluid.TraitSimple.Gaseous_ART"));
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_Liquid extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + "[Liquid]");
|
||||
info.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("hbmfluid.TraitSimple.Liquid"));
|
||||
}
|
||||
}
|
||||
|
||||
/** to viscous to be sprayed/turned into a mist */
|
||||
public static class FT_Viscous extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + "[Viscous]");
|
||||
info.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("hbmfluid.TraitSimple.Viscous"));
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_Plasma extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.LIGHT_PURPLE + "[Plasma]");
|
||||
info.add(EnumChatFormatting.LIGHT_PURPLE + I18nUtil.resolveKey("hbmfluid.TraitSimple.Plasma"));
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_Amat extends FluidTrait {
|
||||
@Override public void addInfo(List<String> info) {
|
||||
info.add(EnumChatFormatting.DARK_RED + "[Antimatter]");
|
||||
info.add(EnumChatFormatting.DARK_RED + I18nUtil.resolveKey("hbmfluid.TraitSimple.Amat"));
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_LeadContainer extends FluidTrait {
|
||||
@Override public void addInfo(List<String> info) {
|
||||
info.add(EnumChatFormatting.DARK_RED + "[Requires hazardous material tank to hold]");
|
||||
info.add(EnumChatFormatting.DARK_RED + I18nUtil.resolveKey("hbmfluid.TraitSimple.LeadContainer"));
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_Delicious extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.DARK_GREEN + "[Delicious]");
|
||||
info.add(EnumChatFormatting.DARK_GREEN + I18nUtil.resolveKey("hbmfluid.TraitSimple.Delicious"));
|
||||
}
|
||||
}
|
||||
|
||||
public static class FT_Leaded extends FluidTrait {
|
||||
@Override public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.BLUE + "[Leaded Fuel]");
|
||||
info.add(EnumChatFormatting.BLUE + I18nUtil.resolveKey("hbmfluid.TraitSimple.Leaded"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@ -14,8 +15,11 @@ import com.hbm.util.I18nUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class GUIMachineDiFurnaceRTG extends GuiInfoContainer {
|
||||
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID, "textures/gui/processing/gui_rtg_difurnace.png");
|
||||
@ -47,6 +51,23 @@ public class GUIMachineDiFurnaceRTG extends GuiInfoContainer {
|
||||
}
|
||||
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 15, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, pelletText);
|
||||
|
||||
if(this.mc.thePlayer.inventory.getItemStack() == null) {
|
||||
for(int i = 0; i < 2; i++) {
|
||||
Slot slot = (Slot) this.inventorySlots.inventorySlots.get(i);
|
||||
|
||||
if(this.isMouseOverSlot(slot, mouseX, mouseY)) {
|
||||
|
||||
String label = EnumChatFormatting.YELLOW + "Accepts items from: ";
|
||||
byte dir = i == 0 ? bFurnace.sideUpper : bFurnace.sideLower;
|
||||
label += ForgeDirection.getOrientation(dir);
|
||||
|
||||
this.func_146283_a(Arrays.asList(new String[] { label }), mouseX, mouseY - (slot.getHasStack() ? 15 : 0));
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,143 +0,0 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.config.WeaponConfig;
|
||||
import com.hbm.inventory.container.ContainerMachineRadar;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.AuxButtonPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadar;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import api.hbm.entity.IRadarDetectable.RadarTargetType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIMachineRadar extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_radar.png");
|
||||
private TileEntityMachineRadar diFurnace;
|
||||
|
||||
public GUIMachineRadar(InventoryPlayer invPlayer, TileEntityMachineRadar tedf) {
|
||||
super(new ContainerMachineRadar(invPlayer, tedf));
|
||||
diFurnace = tedf;
|
||||
texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_radar.png");
|
||||
|
||||
this.xSize = 216;
|
||||
this.ySize = 234;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 221, 200, 7, diFurnace.power, diFurnace.maxPower);
|
||||
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 10, guiTop + 98, 8, 8, mouseX, mouseY, I18nUtil.resolveKeyArray("radar.detectMissiles") );
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 10, guiTop + 108, 8, 8, mouseX, mouseY, I18nUtil.resolveKeyArray("radar.detectPlayers"));
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 10, guiTop + 118, 8, 8, mouseX, mouseY, I18nUtil.resolveKeyArray("radar.smartMode"));
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 10, guiTop + 128, 8, 8, mouseX, mouseY, I18nUtil.resolveKeyArray("radar.redMode"));
|
||||
|
||||
if(!diFurnace.nearbyMissiles.isEmpty()) {
|
||||
for(int[] m : diFurnace.nearbyMissiles) {
|
||||
int x = guiLeft + (int)((m[0] - diFurnace.xCoord) / ((double)WeaponConfig.radarRange * 2 + 1) * (200D - 8D)) + 108;
|
||||
int z = guiTop + (int)((m[1] - diFurnace.zCoord) / ((double)WeaponConfig.radarRange * 2 + 1) * (200D - 8D)) + 117;
|
||||
|
||||
if(mouseX + 4 > x && mouseX - 4 < x &&
|
||||
mouseY + 4 > z && mouseY - 4 < z) {
|
||||
|
||||
|
||||
String[] text = new String[] { RadarTargetType.values()[m[2]].name, m[0] + " / " + m[1], "Alt.: " + m[3] };
|
||||
|
||||
this.func_146283_a(Arrays.asList(text), x, z);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
|
||||
if(guiLeft -10 <= x && guiLeft + -10 + 8 > x && guiTop + 98 < y && guiTop + 98 + 8 >= y) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord, 0, 0));
|
||||
}
|
||||
|
||||
if(guiLeft -10 <= x && guiLeft + -10 + 8 > x && guiTop + 108 < y && guiTop + 108 + 8 >= y) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord, 0, 1));
|
||||
}
|
||||
|
||||
if(guiLeft -10 <= x && guiLeft + -10 + 8 > x && guiTop + 118 < y && guiTop + 118 + 8 >= y) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord, 0, 2));
|
||||
}
|
||||
|
||||
if(guiLeft -10 <= x && guiLeft + -10 + 8 > x && guiTop + 128 < y && guiTop + 128 + 8 >= y) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(diFurnace.xCoord, diFurnace.yCoord, diFurnace.zCoord, 0, 3));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = I18n.format("container.radar");
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 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);
|
||||
drawTexturedModalRect(guiLeft - 14, guiTop + 94, 216, 198, 14, 46);
|
||||
|
||||
if(diFurnace.scanMissiles || (diFurnace.jammed && diFurnace.getWorldObj().rand.nextBoolean()))
|
||||
drawTexturedModalRect(guiLeft - 10, guiTop + 98, 230, 202, 8, 8);
|
||||
|
||||
if(diFurnace.scanPlayers || (diFurnace.jammed && diFurnace.getWorldObj().rand.nextBoolean()))
|
||||
drawTexturedModalRect(guiLeft - 10, guiTop + 108, 230, 212, 8, 8);
|
||||
|
||||
if(diFurnace.smartMode || (diFurnace.jammed && diFurnace.getWorldObj().rand.nextBoolean()))
|
||||
drawTexturedModalRect(guiLeft - 10, guiTop + 118, 230, 222, 8, 8);
|
||||
|
||||
if(diFurnace.redMode || (diFurnace.jammed && diFurnace.getWorldObj().rand.nextBoolean()))
|
||||
drawTexturedModalRect(guiLeft - 10, guiTop + 128, 230, 232, 8, 8);
|
||||
|
||||
if(diFurnace.power > 0) {
|
||||
int i = (int)diFurnace.getPowerScaled(200);
|
||||
drawTexturedModalRect(guiLeft + 8, guiTop + 221, 0, 234, i, 16);
|
||||
}
|
||||
|
||||
if(diFurnace.jammed) {
|
||||
|
||||
for(int i = 0; i < 5; i++) {
|
||||
for(int j = 0; j < 5; j++) {
|
||||
drawTexturedModalRect(guiLeft + 8 + i * 40, guiTop + 17 + j * 40, 216, 118 + diFurnace.getWorldObj().rand.nextInt(41), 40, 40);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(!diFurnace.nearbyMissiles.isEmpty()) {
|
||||
for(int[] m : diFurnace.nearbyMissiles) {
|
||||
int x = (int)((m[0] - diFurnace.xCoord) / ((double)WeaponConfig.radarRange * 2 + 1) * (200D - 8D)) - 4;
|
||||
int z = (int)((m[1] - diFurnace.zCoord) / ((double)WeaponConfig.radarRange * 2 + 1) * (200D - 8D)) - 4;
|
||||
int t = m[2];
|
||||
|
||||
drawTexturedModalRect(guiLeft + 108 + x, guiTop + 117 + z, 216, 8 * t, 8, 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
265
src/main/java/com/hbm/inventory/gui/GUIMachineRadarNT.java
Normal file
265
src/main/java/com/hbm/inventory/gui/GUIMachineRadarNT.java
Normal file
@ -0,0 +1,265 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.NBTControlPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadarNT;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import api.hbm.entity.RadarEntry;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
public class GUIMachineRadarNT extends GuiScreen {
|
||||
|
||||
public static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_radar_nt.png");
|
||||
|
||||
protected TileEntityMachineRadarNT radar;
|
||||
protected int xSize = 216;
|
||||
protected int ySize = 234;
|
||||
protected int guiLeft;
|
||||
protected int guiTop;
|
||||
|
||||
public int lastMouseX;
|
||||
public int lastMouseY;
|
||||
|
||||
public GUIMachineRadarNT(TileEntityMachineRadarNT tile) {
|
||||
this.radar = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
this.guiLeft = (this.width - this.xSize) / 2;
|
||||
this.guiTop = (this.height - this.ySize) / 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
|
||||
String cmd = null;
|
||||
|
||||
if(checkClick(x, y, -10, 88, 8, 8)) cmd = "missiles";
|
||||
if(checkClick(x, y, -10, 98, 8, 8)) cmd = "shells";
|
||||
if(checkClick(x, y, -10, 108, 8, 8)) cmd = "players";
|
||||
if(checkClick(x, y, -10, 118, 8, 8)) cmd = "smart";
|
||||
if(checkClick(x, y, -10, 128, 8, 8)) cmd = "red";
|
||||
if(checkClick(x, y, -10, 138, 8, 8)) cmd = "map";
|
||||
if(checkClick(x, y, -10, 158, 8, 8)) cmd = "gui1";
|
||||
if(checkClick(x, y, -10, 178, 8, 8)) cmd = "clear";
|
||||
|
||||
if(cmd != null) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setBoolean(cmd, true);
|
||||
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, radar.xCoord, radar.yCoord, radar.zCoord));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
this.drawDefaultBackground();
|
||||
this.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
this.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
this.lastMouseX = mouseX;
|
||||
this.lastMouseY = mouseY;
|
||||
}
|
||||
|
||||
private void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
|
||||
|
||||
if(checkClick(mouseX, mouseY, 8, 221, 200, 7)) this.func_146283_a(Arrays.asList(BobMathUtil.getShortNumber(radar.power) + "/" + BobMathUtil.getShortNumber(radar.maxPower) + "HE"), mouseX, mouseY);
|
||||
|
||||
if(checkClick(mouseX, mouseY, -10, 88, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.detectMissiles")), mouseX, mouseY);
|
||||
if(checkClick(mouseX, mouseY, -10, 98, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.detectShells")), mouseX, mouseY);
|
||||
if(checkClick(mouseX, mouseY, -10, 108, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.detectPlayers")), mouseX, mouseY);
|
||||
if(checkClick(mouseX, mouseY, -10, 118, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.smartMode")), mouseX, mouseY);
|
||||
if(checkClick(mouseX, mouseY, -10, 128, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.redMode")), mouseX, mouseY);
|
||||
if(checkClick(mouseX, mouseY, -10, 138, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.showMap")), mouseX, mouseY);
|
||||
if(checkClick(mouseX, mouseY, -10, 158, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.toggleGui")), mouseX, mouseY);
|
||||
if(checkClick(mouseX, mouseY, -10, 178, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.clearMap")), mouseX, mouseY);
|
||||
|
||||
if(!radar.entries.isEmpty()) {
|
||||
for(RadarEntry m : radar.entries) {
|
||||
int x = guiLeft + (int)((m.posX - radar.xCoord) / ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) * (200D - 8D)) + 108;
|
||||
int z = guiTop + (int)((m.posZ - radar.zCoord) / ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) * (200D - 8D)) + 117;
|
||||
|
||||
if(mouseX + 5 > x && mouseX - 4 <= x && mouseY + 5 > z && mouseY - 4 <= z) {
|
||||
|
||||
String[] text = new String[] { I18nUtil.resolveKey(m.unlocalizedName), m.posX + " / " + m.posZ, "Alt.: " + m.posY };
|
||||
this.func_146283_a(Arrays.asList(text), x, z);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(checkClick(mouseX, mouseY, 8, 17, 200, 200)) {
|
||||
int tX = (int) ((lastMouseX - guiLeft - 108) * ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) / 192D + radar.xCoord);
|
||||
int tZ = (int) ((lastMouseY - guiTop - 117) * ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) / 192D + radar.zCoord);
|
||||
this.func_146283_a(Arrays.asList(tX + " / " + tZ), lastMouseX, lastMouseY);
|
||||
}
|
||||
}
|
||||
|
||||
private void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
drawTexturedModalRect(guiLeft - 14, guiTop + 84, 224, 0, 14, 66);
|
||||
drawTexturedModalRect(guiLeft - 14, guiTop + 154, 224, 66, 14, 36);
|
||||
|
||||
if(radar.power > 0) {
|
||||
int i = (int) (radar.power * 200 / radar.maxPower);
|
||||
drawTexturedModalRect(guiLeft + 8, guiTop + 221, 0, 234, i, 16);
|
||||
}
|
||||
|
||||
if(radar.scanMissiles ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 88, 238, 4, 8, 8);
|
||||
if(radar.scanShells ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 98, 238, 14, 8, 8);
|
||||
if(radar.scanPlayers ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 108, 238, 24, 8, 8);
|
||||
if(radar.smartMode ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 118, 238, 34, 8, 8);
|
||||
if(radar.redMode ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 128, 238, 44, 8, 8);
|
||||
if(radar.showMap ^ (radar.jammed && radar.getWorldObj().rand.nextBoolean())) drawTexturedModalRect(guiLeft - 10, guiTop + 138, 238, 54, 8, 8);
|
||||
|
||||
if(radar.power < radar.consumption) return;
|
||||
|
||||
if(radar.jammed) {
|
||||
for(int i = 0; i < 5; i++) {
|
||||
for(int j = 0; j < 5; j++) {
|
||||
drawTexturedModalRect(guiLeft + 8 + i * 40, guiTop + 17 + j * 40, 216, 118 + radar.getWorldObj().rand.nextInt(81), 40, 40);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(radar.showMap) {
|
||||
Tessellator tess = Tessellator.instance;
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
tess.startDrawingQuads();
|
||||
for(int i = 0; i < 40_000; i++) {
|
||||
int iX = i % 200;
|
||||
int iZ = i / 200;
|
||||
byte b = radar.map[i];
|
||||
if(b > 0) {
|
||||
int color = ((b - 50) * 255 / 78) << 8;
|
||||
tess.setColorOpaque_I(color);
|
||||
tess.addVertex(guiLeft + 8 + iX, guiTop + 18 + iZ, this.zLevel);
|
||||
tess.addVertex(guiLeft + 9 + iX, guiTop + 18 + iZ, this.zLevel);
|
||||
tess.addVertex(guiLeft + 9 + iX, guiTop + 17 + iZ, this.zLevel);
|
||||
tess.addVertex(guiLeft + 8 + iX, guiTop + 17 + iZ, this.zLevel);
|
||||
}
|
||||
}
|
||||
tess.draw();
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
Vec3 tr = Vec3.createVectorHelper(100, 0, 0);
|
||||
Vec3 tl = Vec3.createVectorHelper(100, 0, 0);
|
||||
Vec3 bl = Vec3.createVectorHelper(0, -5, 0);
|
||||
float rot = (float) -Math.toRadians(radar.prevRotation + (radar.rotation - radar.prevRotation) * f + 180F);
|
||||
tr.rotateAroundZ(rot);
|
||||
tl.rotateAroundZ(rot + 0.25F);
|
||||
bl.rotateAroundZ(rot);
|
||||
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
tess.setColorRGBA_I(0x00ff00, 0); tess.addVertex(guiLeft + 108, guiTop + 117, this.zLevel);
|
||||
tess.setColorRGBA_I(0x00ff00, 255); tess.addVertex(guiLeft + 108 + tr.xCoord, guiTop + 117 + tr.yCoord, this.zLevel);
|
||||
tess.setColorRGBA_I(0x00ff00, 0); tess.addVertex(guiLeft + 108 + tl.xCoord, guiTop + 117 + tl.yCoord, this.zLevel);
|
||||
tess.setColorRGBA_I(0x00ff00, 0); tess.addVertex(guiLeft + 108 + bl.xCoord, guiTop + 117 + bl.yCoord, this.zLevel);
|
||||
tess.draw();
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
if(!radar.entries.isEmpty()) {
|
||||
for(RadarEntry m : radar.entries) {
|
||||
double x = (m.posX - radar.xCoord) / ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) * (200D - 8D) - 4D;
|
||||
double z = (m.posZ - radar.zCoord) / ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) * (200D - 8D) - 4D;
|
||||
int t = m.blipLevel;
|
||||
drawTexturedModalRectDouble(guiLeft + 108 + x, guiTop + 117 + z, 216, 8 * t, 8, 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void drawTexturedModalRectDouble(double x, double y, int sourceX, int sourceY, int sizeX, int sizeY) {
|
||||
float f = 0.00390625F;
|
||||
float f1 = 0.00390625F;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(x, y + sizeY, this.zLevel, (sourceX + 0) * f, (sourceY + sizeY) * f1);
|
||||
tessellator.addVertexWithUV(x + sizeX, y + sizeY, this.zLevel, (sourceX + sizeX) * f, (sourceY + sizeY) * f1);
|
||||
tessellator.addVertexWithUV(x + sizeX, y, this.zLevel, (sourceX + sizeX) * f, (sourceY + 0) * f1);
|
||||
tessellator.addVertexWithUV(x, y, this.zLevel, (sourceX + 0) * f, (sourceY + 0) * f1);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
protected boolean checkClick(int x, int y, int left, int top, int sizeX, int sizeY) {
|
||||
return guiLeft + left <= x && guiLeft + left + sizeX > x && guiTop + top < y && guiTop + top + sizeY >= y;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped(char c, int key) {
|
||||
if(key == 1 || key == this.mc.gameSettings.keyBindInventory.getKeyCode()) {
|
||||
this.mc.thePlayer.closeScreen();
|
||||
}
|
||||
|
||||
if(checkClick(lastMouseX, lastMouseY, 8, 17, 200, 200) && c >= '1' && c <= '8') {
|
||||
|
||||
int id = c - '1';
|
||||
|
||||
if(!radar.entries.isEmpty()) {
|
||||
for(RadarEntry m : radar.entries) {
|
||||
int x = guiLeft + (int) ((m.posX - radar.xCoord) / ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) * (200D - 8D)) + 108;
|
||||
int z = guiTop + (int) ((m.posZ - radar.zCoord) / ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) * (200D - 8D)) + 117;
|
||||
|
||||
if(lastMouseX + 5 > x && lastMouseX - 4 <= x && lastMouseY + 5 > z && lastMouseY - 4 <= z) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setInteger("launchEntity", m.entityID);
|
||||
data.setInteger("link", id);
|
||||
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, radar.xCoord, radar.yCoord, radar.zCoord));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int tX = (int) ((lastMouseX - guiLeft - 108) * ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) / 192D + radar.xCoord);
|
||||
int tZ = (int) ((lastMouseY - guiTop - 117) * ((double) TileEntityMachineRadarNT.radarRange * 2 + 1) / 192D + radar.zCoord);
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setInteger("launchPosX", tX);
|
||||
data.setInteger("launchPosZ", tZ);
|
||||
data.setInteger("link", id);
|
||||
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, radar.xCoord, radar.yCoord, radar.zCoord));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesGuiPauseGame() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateScreen() {
|
||||
super.updateScreen();
|
||||
|
||||
if(!this.mc.thePlayer.isEntityAlive() || this.mc.thePlayer.isDead) {
|
||||
this.mc.thePlayer.closeScreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerMachineRadarNT;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadarNT;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.network.play.client.C0DPacketCloseWindow;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIMachineRadarNTSlots extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/machine/gui_radar_link.png");
|
||||
private TileEntityMachineRadarNT radar;
|
||||
|
||||
public GUIMachineRadarNTSlots(InventoryPlayer invPlayer, TileEntityMachineRadarNT tedf) {
|
||||
super(new ContainerMachineRadarNT(invPlayer, tedf));
|
||||
radar = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 184;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
|
||||
if(checkClick(x, y, 5, 5, 8, 8)) {
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
this.mc.thePlayer.sendQueue.addToSendQueue(new C0DPacketCloseWindow(this.mc.thePlayer.openContainer.windowId)); // closes the server-side GUI component without resetting the client's cursor position
|
||||
FMLNetworkHandler.openGui(this.mc.thePlayer, MainRegistry.instance, 0, radar.getWorldObj(), radar.xCoord, radar.yCoord, radar.zCoord);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
if(checkClick(mouseX, mouseY, 5, 5, 8, 8)) this.func_146283_a(Arrays.asList(I18nUtil.resolveKeyArray("radar.toggleGui")), mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.radar.hasCustomInventoryName() ? this.radar.getInventoryName() : I18n.format(this.radar.getInventoryName());
|
||||
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);
|
||||
|
||||
if(radar.power > 0) {
|
||||
int i = (int) (radar.power * 160 / radar.maxPower);
|
||||
drawTexturedModalRect(guiLeft + 8, guiTop + 64, 0, 185, i, 16);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -75,6 +75,10 @@ public abstract class GuiInfoContainer extends GuiContainer {
|
||||
return this.func_146978_c(slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, x, y);
|
||||
}
|
||||
|
||||
protected boolean checkClick(int x, int y, int left, int top, int sizeX, int sizeY) {
|
||||
return guiLeft + left <= x && guiLeft + left + sizeX > x && guiTop + top < y && guiTop + top + sizeY >= y;
|
||||
}
|
||||
|
||||
/* Getters for external use of the GUI's rect rendering, such as NumberDisplay */
|
||||
public int getGuiTop() {
|
||||
return this.guiTop;
|
||||
|
||||
@ -40,10 +40,10 @@ public class ArcWelderRecipes extends SerializableRecipe {
|
||||
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.wire_dense, 1, Mats.MAT_GOLD.id), 100, 10_000L,
|
||||
new ComparableStack(ModItems.wire_gold, 8)));
|
||||
|
||||
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.circuit_copper), 100, 1_000L, new FluidStack(Fluids.GAS, 250),
|
||||
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.circuit_copper), 100, 1_000L, new FluidStack(Fluids.GAS, 100),
|
||||
new ComparableStack(ModItems.circuit_aluminium, 1), new OreDictStack(NETHERQUARTZ.dust()), new ComparableStack(ModItems.wire_copper, 8)));
|
||||
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.circuit_red_copper), 100, 2_500L, new FluidStack(Fluids.PETROLEUM, 250),
|
||||
new ComparableStack(ModItems.circuit_copper, 1), new OreDictStack(GOLD.dust()), new ComparableStack(ModItems.wire_red_copper, 8)));
|
||||
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.circuit_red_copper), 100, 2_500L, new FluidStack(Fluids.PETROLEUM, 100),
|
||||
new ComparableStack(ModItems.circuit_copper, 1), new ComparableStack(ModItems.plate_polymer), new ComparableStack(ModItems.wire_red_copper, 8)));
|
||||
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.circuit_gold), 100, 10_000L, new FluidStack(Fluids.UNSATURATEDS, 250),
|
||||
new ComparableStack(ModItems.circuit_red_copper, 1), new OreDictStack(ANY_PLASTIC.ingot()), new ComparableStack(ModItems.wire_gold, 8)));
|
||||
recipes.add(new ArcWelderRecipe(new ItemStack(ModItems.circuit_schrabidium), 100, 50_000L, new FluidStack(Fluids.SOURGAS, 250),
|
||||
|
||||
@ -179,7 +179,7 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModItems.entanglement_kit, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new OreDictStack(DURA.ingot(), 4), new OreDictStack(CU.plate(), 24), new ComparableStack(ModBlocks.hadron_coil_gold, 4), new OreDictStack(Fluids.XENON.getDict(1_000))},200);
|
||||
makeRecipe(new ComparableStack(ModItems.dysfunctional_reactor, 1), new AStack[] {new OreDictStack(STEEL.plate(), 15), new OreDictStack(PB.ingot(), 5), new ComparableStack(ModItems.rod_quad_empty, 10), new OreDictStack("dyeBrown", 3), },200);
|
||||
makeRecipe(new ComparableStack(ModItems.missile_assembly, 1), new AStack[] {new ComparableStack(ModItems.hull_small_steel, 1), new ComparableStack(ModItems.hull_small_aluminium, 4), new OreDictStack(STEEL.ingot(), 2), new OreDictStack(TI.plate(), 6), new ComparableStack(ModItems.wire_aluminium, 6), new ComparableStack(ModItems.canister_full, 3, Fluids.KEROSENE.getID()), new ComparableStack(ModItems.circuit_targeting_tier1, 1), },200);
|
||||
makeRecipe(new ComparableStack(ModItems.missile_carrier, 1), new AStack[] {new ComparableStack(ModItems.fluid_barrel_full, 16, Fluids.KEROSENE.getID()), new ComparableStack(ModItems.thruster_medium, 4), new ComparableStack(ModItems.thruster_large, 1), new ComparableStack(ModItems.hull_big_titanium, 6), new ComparableStack(ModItems.hull_big_steel, 2), new ComparableStack(ModItems.hull_small_aluminium, 12), new OreDictStack(TI.plate(), 24), new ComparableStack(ModItems.plate_polymer, 128), new ComparableStack(ModBlocks.det_cord, 8), new ComparableStack(ModItems.circuit_targeting_tier3, 12), new ComparableStack(ModItems.circuit_targeting_tier4, 3), },4800);
|
||||
makeRecipe(new ComparableStack(ModItems.missile_carrier, 1), new AStack[] {new ComparableStack(ModItems.fluid_barrel_full, 16, Fluids.KEROSENE.getID()), new ComparableStack(ModItems.thruster_medium, 4), new ComparableStack(ModItems.thruster_large, 1), new ComparableStack(ModItems.hull_big_titanium, 6), new ComparableStack(ModItems.hull_big_steel, 2), new ComparableStack(ModItems.hull_small_aluminium, 12), new OreDictStack(TI.plate(), 24), new OreDictStack(ANY_RUBBER.ingot(), 128), new ComparableStack(ModBlocks.det_cord, 8), new ComparableStack(ModItems.circuit_targeting_tier3, 12), new ComparableStack(ModItems.circuit_targeting_tier4, 3), },4800);
|
||||
makeRecipe(new ComparableStack(ModItems.warhead_generic_small, 1), new AStack[] {new OreDictStack(TI.plate(), 5), new OreDictStack(STEEL.plate(), 3), new ComparableStack(Blocks.tnt, 2), },100);
|
||||
makeRecipe(new ComparableStack(ModItems.warhead_generic_medium, 1), new AStack[] {new OreDictStack(TI.plate(), 8), new OreDictStack(STEEL.plate(), 5), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 4), },150);
|
||||
makeRecipe(new ComparableStack(ModItems.warhead_generic_large, 1), new AStack[] {new OreDictStack(TI.plate(), 15), new OreDictStack(STEEL.plate(), 8), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 8), },200);
|
||||
@ -259,11 +259,11 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModItems.upgrade_overdrive_3, 1), new AStack[] {new ComparableStack(ModItems.upgrade_overdrive_2, 1), new ComparableStack(ModItems.upgrade_afterburn_1, 1), new ComparableStack(ModItems.upgrade_speed_3, 1), new ComparableStack(ModItems.upgrade_effect_3, 1), new ComparableStack(ModItems.crystal_lithium, 16), new OreDictStack(KEY_CIRCUIT_BISMUTH), }, 500);
|
||||
makeRecipe(new ComparableStack(ModItems.redcoil_capacitor, 1), new AStack[] {new OreDictStack(GOLD.plate(), 3), new ComparableStack(ModItems.fuse, 1), new ComparableStack(ModItems.wire_advanced_alloy, 4), new ComparableStack(ModItems.coil_advanced_alloy, 6), new ComparableStack(Blocks.redstone_block, 2), },200);
|
||||
makeRecipe(new ComparableStack(ModItems.titanium_filter, 1), new AStack[] {new OreDictStack(PB.plate(), 3), new ComparableStack(ModItems.fuse, 1), new ComparableStack(ModItems.wire_tungsten, 4), new OreDictStack(TI.plate(), 6), new OreDictStack(U238.ingot(), 2), },200);
|
||||
makeRecipe(new ComparableStack(ModItems.part_lithium, 1), new AStack[] {new ComparableStack(ModItems.plate_polymer, 1), new OreDictStack(LI.dust(), 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.part_beryllium, 1), new AStack[] {new ComparableStack(ModItems.plate_polymer, 1), new OreDictStack(BE.dust(), 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.part_carbon, 1), new AStack[] {new ComparableStack(ModItems.plate_polymer, 1), new OreDictStack(COAL.dust(), 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.part_copper, 1), new AStack[] {new ComparableStack(ModItems.plate_polymer, 1), new OreDictStack(CU.dust(), 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.part_plutonium, 1), new AStack[] {new ComparableStack(ModItems.plate_polymer, 1), new ComparableStack(ModItems.powder_plutonium, 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.part_lithium, 1), new AStack[] {new OreDictStack(ANY_RUBBER.ingot(), 1), new OreDictStack(LI.dust(), 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.part_beryllium, 1), new AStack[] {new OreDictStack(ANY_RUBBER.ingot(), 1), new OreDictStack(BE.dust(), 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.part_carbon, 1), new AStack[] {new OreDictStack(ANY_RUBBER.ingot(), 1), new OreDictStack(COAL.dust(), 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.part_copper, 1), new AStack[] {new OreDictStack(ANY_RUBBER.ingot(), 1), new OreDictStack(CU.dust(), 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.part_plutonium, 1), new AStack[] {new OreDictStack(ANY_RUBBER.ingot(), 1), new ComparableStack(ModItems.powder_plutonium, 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.thermo_element, 1), new AStack[] {new OreDictStack(STEEL.plate(), 1), new ComparableStack(ModItems.wire_red_copper, 2), new OreDictStack(NETHERQUARTZ.dust(), 2), }, 60);
|
||||
makeRecipe(new ComparableStack(ModItems.plate_dalekanium, 1), new AStack[] {new ComparableStack(ModBlocks.block_meteor, 1), },50);
|
||||
makeRecipe(new ComparableStack(ModBlocks.block_meteor, 1), new AStack[] {new ComparableStack(ModItems.fragment_meteorite, 100), },500);
|
||||
@ -287,7 +287,7 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_flare, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(IRON.ingot(), 12), new OreDictStack(CU.plate528(), 4), new ComparableStack(ModItems.tank_steel, 1), new ComparableStack(ModBlocks.deco_pipe_quad, 8), new ComparableStack(ModItems.hull_small_steel, 4), new ComparableStack(ModItems.thermo_element, 3), },200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_coker, 1), new AStack[] {!exp ? new OreDictStack(STEEL.plateWelded(), 3) : new OreDictStack(STEEL.heavyComp(), 2), new OreDictStack(IRON.ingot(), 16), new OreDictStack(CU.plate528(), 8), new OreDictStack(RUBBER.ingot(), 4), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModBlocks.steel_grate, 4) },200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_refinery, 1), new AStack[] {!exp ? new OreDictStack(STEEL.plateWelded(), 3) : new OreDictStack(STEEL.heavyComp(), 1), new OreDictStack(CU.plate528(), 16), new ComparableStack(ModItems.hull_big_steel, 6), new ComparableStack(ModItems.pipes_steel, 2), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.circuit_red_copper, 1) },350);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_epress, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new ComparableStack(ModItems.plate_polymer, 4), new ComparableStack(ModItems.part_generic, 2, EnumPartType.PISTON_HYDRAULIC.ordinal()), new ComparableStack(ModItems.circuit_copper, 1) }, 100);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_epress, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new OreDictStack(ANY_RUBBER.ingot(), 4), new ComparableStack(ModItems.part_generic, 2, EnumPartType.PISTON_HYDRAULIC.ordinal()), new ComparableStack(ModItems.circuit_copper, 1) }, 100);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_chemplant, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 8), new OreDictStack(CU.plate528(), 6), new ComparableStack(ModItems.tank_steel, 4), new ComparableStack(ModItems.hull_big_steel, 1), new ComparableStack(ModItems.coil_tungsten, 3), new ComparableStack(ModItems.circuit_copper, 2), new ComparableStack(ModItems.circuit_red_copper, 1), new ComparableStack(ModItems.plate_polymer, 8), },200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_crystallizer, 1), new AStack[] {new ComparableStack(ModItems.hull_big_steel, 4), new ComparableStack(ModItems.pipes_steel, 1), new OreDictStack(DESH.ingot(), 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.blades_advanced_alloy, 2), new OreDictStack(STEEL.plateWelded(), 4), new OreDictStack(TI.plate(), 16), new ComparableStack(Blocks.glass, 4), new ComparableStack(ModItems.circuit_gold, 1), },400);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_fluidtank, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 2), new OreDictStack(STEEL.plate528(), 6), new ComparableStack(ModItems.hull_big_steel, 4), new OreDictStack(ANY_TAR.any(), 4), },150);
|
||||
@ -384,7 +384,7 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModBlocks.ams_limiter, 1), new AStack[] {new ComparableStack(ModItems.board_copper, 6), new OreDictStack(STEEL.plate(), 24), new ComparableStack(ModBlocks.steel_scaffold, 20), new ComparableStack(ModItems.crystal_diamond, 1)}, 600);
|
||||
makeRecipe(new ComparableStack(ModBlocks.ams_emitter, 1), new AStack[] {new ComparableStack(ModItems.board_copper, 24), new OreDictStack(STEEL.plate(), 32), new ComparableStack(ModBlocks.steel_scaffold, 40), new ComparableStack(ModItems.crystal_redstone, 5), new ComparableStack(ModBlocks.machine_lithium_battery)}, 600);
|
||||
makeRecipe(new ComparableStack(ModBlocks.ams_base, 1), new AStack[] {new ComparableStack(ModItems.board_copper, 12), new OreDictStack(STEEL.plate(), 28), new ComparableStack(ModBlocks.steel_scaffold, 30), new ComparableStack(ModBlocks.steel_grate, 8), new ComparableStack(ModBlocks.barrel_steel, 2)}, 600);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_radar, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 16), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.plate_polymer, 24), new ComparableStack(ModItems.magnetron, 10), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit_gold, 4), new ComparableStack(ModItems.coil_copper, 12), new ComparableStack(ModItems.crt_display, 4), },300);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_radar, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 16), new OreDictStack(ANY_PLASTIC.ingot(), 8), new OreDictStack(ANY_RUBBER.ingot(), 8), new ComparableStack(ModItems.magnetron, 10), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit_gold, 4), new ComparableStack(ModItems.coil_copper, 12), new ComparableStack(ModItems.crt_display, 4), },300);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_forcefield, 1), new AStack[] {new OreDictStack(ALLOY.plate528(), 8), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.coil_gold_torus, 6), new ComparableStack(ModItems.coil_magnetized_tungsten, 12), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.upgrade_radius, 1), new ComparableStack(ModItems.upgrade_health, 1), new ComparableStack(ModItems.circuit_targeting_tier5, 1), new ComparableStack(ModBlocks.machine_transformer, 1), },1000);
|
||||
makeRecipe(new ComparableStack(ModItems.mp_thruster_10_kerosene, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new ComparableStack(ModBlocks.deco_pipe_quad, 1), new OreDictStack(W.ingot(), 4), new OreDictStack(STEEL.plate(), 4), },100);
|
||||
makeRecipe(new ComparableStack(ModItems.mp_thruster_10_solid, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new ComparableStack(ModItems.coil_tungsten, 1), new OreDictStack(DURA.ingot(), 4), new OreDictStack(STEEL.plate(), 4), },100);
|
||||
@ -433,7 +433,7 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModItems.mp_warhead_15_n2, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 8), new OreDictStack(TI.plate(), 20), new ComparableStack(ModBlocks.det_charge, 24), new ComparableStack(Blocks.redstone_block, 12), new OreDictStack(MAGTUNG.dust(), 6), new ComparableStack(ModItems.circuit_targeting_tier4, 1), },400);
|
||||
makeRecipe(new ComparableStack(ModItems.mp_warhead_15_balefire, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(OreDictManager.getReflector(), 16), new ComparableStack(ModItems.powder_magic, 6), new ComparableStack(ModItems.egg_balefire_shard, 4), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 8), new ComparableStack(ModItems.circuit_targeting_tier4, 1), }, 60);
|
||||
makeRecipe(new ComparableStack(ModItems.missile_soyuz, 1), new AStack[] {new ComparableStack(ModItems.rocket_fuel, 40), new ComparableStack(ModBlocks.det_cord, 20), new ComparableStack(ModItems.thruster_medium, 12), new ComparableStack(ModItems.thruster_small, 12), new ComparableStack(ModItems.tank_steel, 10), new ComparableStack(ModItems.circuit_targeting_tier4, 2), new ComparableStack(ModItems.circuit_targeting_tier3, 8), new OreDictStack(RUBBER.ingot(), 64), new ComparableStack(ModItems.fins_small_steel, 4), new ComparableStack(ModItems.hull_big_titanium, 32), new ComparableStack(ModItems.hull_big_steel, 18), new OreDictStack(FIBER.ingot(), 64), },600);
|
||||
makeRecipe(new ComparableStack(ModItems.missile_soyuz_lander, 1), new AStack[] {new ComparableStack(ModItems.rocket_fuel, 10), new ComparableStack(ModItems.thruster_small, 3), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModItems.circuit_targeting_tier3, 4), new ComparableStack(ModItems.plate_polymer, 32), new ComparableStack(ModItems.hull_big_aluminium, 2), new ComparableStack(ModItems.sphere_steel, 1), new OreDictStack(FIBER.ingot(), 12), },600);
|
||||
makeRecipe(new ComparableStack(ModItems.missile_soyuz_lander, 1), new AStack[] {new ComparableStack(ModItems.rocket_fuel, 10), new ComparableStack(ModItems.thruster_small, 3), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModItems.circuit_targeting_tier3, 4), new OreDictStack(ANY_RUBBER.ingot(), 32), new ComparableStack(ModItems.hull_big_aluminium, 2), new ComparableStack(ModItems.sphere_steel, 1), new OreDictStack(FIBER.ingot(), 12), },600);
|
||||
makeRecipe(new ComparableStack(ModItems.fusion_shield_tungsten, 1), new AStack[] {new OreDictStack(W.block(), 32), new OreDictStack(OreDictManager.getReflector(), 96)}, 600);
|
||||
makeRecipe(new ComparableStack(ModItems.fusion_shield_desh, 1), new AStack[] {new OreDictStack(DESH.block(), 16), new OreDictStack(CO.block(), 16), new OreDictStack(BIGMT.plate(), 96)}, 600);
|
||||
makeRecipe(new ComparableStack(ModItems.fusion_shield_chlorophyte, 1), new AStack[] {new OreDictStack(W.block(), 16), new OreDictStack(DURA.block(), 16), new OreDictStack(OreDictManager.getReflector(), 48), new ComparableStack(ModItems.powder_chlorophyte, 48)}, 600);
|
||||
@ -695,7 +695,7 @@ public class AssemblerRecipes {
|
||||
new OreDictStack(W.ingot(), 32),
|
||||
new OreDictStack(PB.plate(), 16),
|
||||
new OreDictStack(ALLOY.plate(), 4),
|
||||
new ComparableStack(ModItems.plate_polymer, 4),
|
||||
new OreDictStack(ANY_RUBBER.ingot(), 4),
|
||||
new ComparableStack(ModItems.bolt_tungsten, 8),
|
||||
new ComparableStack(ModItems.bolt_dura_steel, 8),
|
||||
new ComparableStack(ModItems.motor, 3),
|
||||
@ -706,7 +706,7 @@ public class AssemblerRecipes {
|
||||
new OreDictStack(W.ingot(), 8),
|
||||
new OreDictStack(PB.plate(), 6),
|
||||
new OreDictStack(ALLOY.plate(), 3),
|
||||
new ComparableStack(ModItems.plate_polymer, 3),
|
||||
new OreDictStack(ANY_RUBBER.ingot(), 3),
|
||||
new ComparableStack(ModItems.bolt_tungsten, 3),
|
||||
new ComparableStack(ModItems.bolt_dura_steel, 3),
|
||||
new ComparableStack(ModItems.motor, 1),
|
||||
@ -1088,7 +1088,7 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModBlocks.rbmk_console, 1), new AStack[] {
|
||||
new OreDictStack(STEEL.ingot(), 16),
|
||||
new OreDictStack(AL.plate528(), 32),
|
||||
new ComparableStack(ModItems.plate_polymer, 16),
|
||||
new OreDictStack(ANY_RUBBER.ingot(), 16),
|
||||
new ComparableStack(ModItems.circuit_gold, 5),
|
||||
new ComparableStack(ModItems.circuit_tantalium, 20),
|
||||
new ComparableStack(ModItems.crt_display, 8),
|
||||
@ -1097,7 +1097,7 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModBlocks.rbmk_crane_console, 1), new AStack[] {
|
||||
new OreDictStack(STEEL.ingot(), 16),
|
||||
new OreDictStack(AL.plate528(), 8),
|
||||
new ComparableStack(ModItems.plate_polymer, 4),
|
||||
new OreDictStack(ANY_RUBBER.ingot(), 4),
|
||||
new ComparableStack(ModItems.circuit_gold, 1),
|
||||
new ComparableStack(ModItems.circuit_tantalium, 10),
|
||||
}, 300);
|
||||
@ -1199,7 +1199,7 @@ public class AssemblerRecipes {
|
||||
new ComparableStack(ModBlocks.cmb_brick_reinforced, 16),
|
||||
new OreDictStack(STEEL.plate(), 64),
|
||||
new OreDictStack(ALLOY.plate(), 40),
|
||||
new ComparableStack(ModItems.plate_polymer, 36),
|
||||
new OreDictStack(ANY_RUBBER.ingot(), 36),
|
||||
new OreDictStack(STEEL.block(), 24),
|
||||
new ComparableStack(ModItems.motor_desh, 16),
|
||||
new ComparableStack(ModItems.bolt_dura_steel, 12),
|
||||
@ -1210,7 +1210,7 @@ public class AssemblerRecipes {
|
||||
new OreDictStack(STEEL.plate(), 16),
|
||||
new OreDictStack(W.ingot(), 8),
|
||||
new ComparableStack(ModBlocks.reinforced_glass, 4),
|
||||
new ComparableStack(ModItems.plate_polymer, 4),
|
||||
new OreDictStack(ANY_RUBBER.ingot(), 4),
|
||||
new ComparableStack(ModItems.bolt_dura_steel, 8),
|
||||
new ComparableStack(ModItems.motor, 2)
|
||||
}, 200);
|
||||
|
||||
@ -7,6 +7,7 @@ import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
@ -16,63 +17,47 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class GasCentrifugeRecipes {
|
||||
|
||||
public static enum PseudoFluidType {
|
||||
NONE (0, 0, null, false, (ItemStack[])null),
|
||||
public static class PseudoFluidType {
|
||||
|
||||
HEUF6 (300, 0, NONE, true, new ItemStack(ModItems.nugget_u238, 2), new ItemStack(ModItems.nugget_u235, 1), new ItemStack(ModItems.fluorite, 1)),
|
||||
MEUF6 (200, 100, HEUF6, false, new ItemStack(ModItems.nugget_u238, 1)),
|
||||
LEUF6 (300, 200, MEUF6, false, new ItemStack(ModItems.nugget_u238, 1), new ItemStack(ModItems.fluorite, 1)),
|
||||
NUF6 (400, 300, LEUF6, false, new ItemStack(ModItems.nugget_u238, 1)),
|
||||
public static HashMap<String, PseudoFluidType> types = new HashMap();
|
||||
|
||||
PF6 (300, 0, NONE, false, new ItemStack(ModItems.nugget_pu238, 1), new ItemStack(ModItems.nugget_pu_mix, 2), new ItemStack(ModItems.fluorite, 1)),
|
||||
public static PseudoFluidType NONE = new PseudoFluidType("NONE", 0, 0, null, false, (ItemStack[])null);
|
||||
|
||||
MUD_HEAVY (500, 0, NONE, false, new ItemStack(ModItems.powder_iron, 1), new ItemStack(ModItems.dust, 1), new ItemStack(ModItems.nuclear_waste_tiny, 1)),
|
||||
MUD (1000, 500, MUD_HEAVY, false, new ItemStack(ModItems.powder_lead, 1), new ItemStack(ModItems.dust, 1));
|
||||
public static PseudoFluidType HEUF6 = new PseudoFluidType("HEUF6", 300, 0, NONE, true, new ItemStack(ModItems.nugget_u238, 2), new ItemStack(ModItems.nugget_u235, 1), new ItemStack(ModItems.fluorite, 1));
|
||||
public static PseudoFluidType MEUF6 = new PseudoFluidType("MEUF6", 200, 100, HEUF6, false, new ItemStack(ModItems.nugget_u238, 1));
|
||||
public static PseudoFluidType LEUF6 = new PseudoFluidType("LEUF6", 300, 200, MEUF6, false, new ItemStack(ModItems.nugget_u238, 1), new ItemStack(ModItems.fluorite, 1));
|
||||
public static PseudoFluidType NUF6 = new PseudoFluidType("NUF6", 400, 300, LEUF6, false, new ItemStack(ModItems.nugget_u238, 1));
|
||||
|
||||
//TODO for bob: consider more fluid types
|
||||
//Schraranium Trisulfide for more schrab-containing, pre-SILEX processing using the crystals?
|
||||
//Gaseous Nuclear Waste: because why not? Large inputs could output Xe-135 and maybe some other fun stuff...
|
||||
//
|
||||
public static PseudoFluidType PF6 = new PseudoFluidType("PF6", 300, 0, NONE, false, new ItemStack(ModItems.nugget_pu238, 1), new ItemStack(ModItems.nugget_pu_mix, 2), new ItemStack(ModItems.fluorite, 1));
|
||||
|
||||
public static PseudoFluidType MUD_HEAVY = new PseudoFluidType("MUD_HEAVY", 500, 0, NONE, false, new ItemStack(ModItems.powder_iron, 1), new ItemStack(ModItems.dust, 1), new ItemStack(ModItems.nuclear_waste_tiny, 1));
|
||||
public static PseudoFluidType MUD = new PseudoFluidType("MUD", 1000, 500, MUD_HEAVY, false, new ItemStack(ModItems.powder_lead, 1), new ItemStack(ModItems.dust, 1));
|
||||
|
||||
public String name;
|
||||
int fluidConsumed;
|
||||
int fluidProduced;
|
||||
PseudoFluidType outputFluid;
|
||||
boolean isHighSpeed;
|
||||
ItemStack[] output;
|
||||
|
||||
PseudoFluidType(int fluidConsumed, int fluidProduced, PseudoFluidType outputFluid, boolean isHighSpeed, ItemStack... output) {
|
||||
PseudoFluidType(String name, int fluidConsumed, int fluidProduced, PseudoFluidType outputFluid, boolean isHighSpeed, ItemStack... output) {
|
||||
this.name = name;
|
||||
this.fluidConsumed = fluidConsumed;
|
||||
this.fluidProduced = fluidProduced;
|
||||
this.outputFluid = outputFluid;
|
||||
this.isHighSpeed = isHighSpeed;
|
||||
this.output = output;
|
||||
types.put(name, this);
|
||||
}
|
||||
|
||||
public int getFluidConsumed() {
|
||||
return this.fluidConsumed;
|
||||
}
|
||||
public int getFluidConsumed() { return this.fluidConsumed; }
|
||||
public int getFluidProduced() { return this.fluidProduced; }
|
||||
public PseudoFluidType getOutputType() { return this.outputFluid; }
|
||||
public ItemStack[] getOutput() { return this.output; }
|
||||
public boolean getIfHighSpeed() { return this.isHighSpeed; }
|
||||
public String getName() { return I18nUtil.resolveKey("hbmpseudofluid.".concat(this.name.toLowerCase(Locale.US))); }
|
||||
|
||||
public int getFluidProduced() {
|
||||
return this.fluidProduced;
|
||||
}
|
||||
|
||||
public PseudoFluidType getOutputType() {
|
||||
return this.outputFluid;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return I18nUtil.resolveKey("hbmpseudofluid.".concat(this.toString().toLowerCase(Locale.US)));
|
||||
}
|
||||
|
||||
public boolean getIfHighSpeed() {
|
||||
return this.isHighSpeed;
|
||||
}
|
||||
|
||||
public ItemStack[] getOutput() {
|
||||
return this.output;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
/* Recipe NEI Handler */
|
||||
//Fluid input; ItemStack[] outputs, isHighSpeed, # of centrifuges
|
||||
@ -102,14 +87,17 @@ public class GasCentrifugeRecipes {
|
||||
return recipes;
|
||||
}
|
||||
|
||||
public static HashMap<FluidType, PseudoFluidType> fluidConversions = new HashMap();
|
||||
|
||||
public static void register() {
|
||||
gasCent.put(new FluidStack(1200, Fluids.UF6), new Object[] { new ItemStack[]
|
||||
{new ItemStack(ModItems.nugget_u238, 11), new ItemStack(ModItems.nugget_u235, 1), new ItemStack(ModItems.fluorite, 4)}, true, 4 });
|
||||
gasCent.put(new FluidStack(1200, Fluids.UF6), new Object[] { new ItemStack[]
|
||||
{new ItemStack(ModItems.nugget_u238, 6), new ItemStack(ModItems.nugget_uranium_fuel, 6), new ItemStack(ModItems.fluorite, 4)}, false, 2 });
|
||||
gasCent.put(new FluidStack(900, Fluids.PUF6), new Object[] { new ItemStack[]
|
||||
{new ItemStack(ModItems.nugget_pu238, 3), new ItemStack(ModItems.nugget_pu_mix, 6), new ItemStack(ModItems.fluorite, 3)}, false, 1 });
|
||||
gasCent.put(new FluidStack(1000, Fluids.WATZ), new Object[] { new ItemStack[]
|
||||
{new ItemStack(ModItems.powder_iron, 1), new ItemStack(ModItems.powder_lead, 1), new ItemStack(ModItems.nuclear_waste_tiny, 1), new ItemStack(ModItems.dust, 2)}, false, 2 });
|
||||
|
||||
fluidConversions.put(Fluids.UF6, PseudoFluidType.NUF6);
|
||||
fluidConversions.put(Fluids.PUF6, PseudoFluidType.PF6);
|
||||
fluidConversions.put(Fluids.WATZ, PseudoFluidType.MUD);
|
||||
|
||||
gasCent.put(new FluidStack(1200, Fluids.UF6), new Object[] { new ItemStack[] {new ItemStack(ModItems.nugget_u238, 11), new ItemStack(ModItems.nugget_u235, 1), new ItemStack(ModItems.fluorite, 4)}, true, 4 });
|
||||
gasCent.put(new FluidStack(1200, Fluids.UF6), new Object[] { new ItemStack[] {new ItemStack(ModItems.nugget_u238, 6), new ItemStack(ModItems.nugget_uranium_fuel, 6), new ItemStack(ModItems.fluorite, 4)}, false, 2 });
|
||||
gasCent.put(new FluidStack(900, Fluids.PUF6), new Object[] { new ItemStack[] {new ItemStack(ModItems.nugget_pu238, 3), new ItemStack(ModItems.nugget_pu_mix, 6), new ItemStack(ModItems.fluorite, 3)}, false, 1 });
|
||||
gasCent.put(new FluidStack(1000, Fluids.WATZ), new Object[] { new ItemStack[] {new ItemStack(ModItems.powder_iron, 1), new ItemStack(ModItems.powder_lead, 1), new ItemStack(ModItems.nuclear_waste_tiny, 1), new ItemStack(ModItems.dust, 2)}, false, 2 });
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ public class MagicRecipes {
|
||||
new OreDictStack(GOLD.plate())));
|
||||
|
||||
recipes.add(new MagicRecipe(new ItemStack(ModItems.ammo_dart, 4, ItemAmmoEnums.AmmoDart.NUCLEAR.ordinal()),
|
||||
new ComparableStack(ModItems.plate_polymer),
|
||||
new OreDictStack(ANY_RUBBER.ingot()),
|
||||
new ComparableStack(ModItems.nugget_pu239),
|
||||
new ComparableStack(ModItems.circuit_aluminium)));
|
||||
}
|
||||
|
||||
@ -23,6 +23,7 @@ import com.hbm.items.machine.ItemStamp;
|
||||
import com.hbm.items.machine.ItemStamp.StampType;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -61,6 +62,7 @@ public class PressRecipes extends SerializableRecipe {
|
||||
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.biomass), ModItems.biomass_compressed);
|
||||
makeRecipe(StampType.FLAT, new OreDictStack(ANY_COKE.gem()), ModItems.ingot_graphite);
|
||||
makeRecipe(StampType.FLAT, new ComparableStack(ModItems.meteorite_sword_reforged), ModItems.meteorite_sword_hardened);
|
||||
makeRecipe(StampType.FLAT, new ComparableStack(Blocks.log, 1, 3), ModItems.ball_resin);
|
||||
|
||||
makeRecipe(StampType.FLAT, new OreDictStack(COAL.dust()), DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.COAL));
|
||||
makeRecipe(StampType.FLAT, new OreDictStack(LIGNITE.dust()), DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.LIGNITE));
|
||||
|
||||
@ -32,6 +32,16 @@ public class ReformingRecipes extends SerializableRecipe {
|
||||
new FluidStack(Fluids.AROMATICS, 10),
|
||||
new FluidStack(Fluids.HYDROGEN, 5)
|
||||
));
|
||||
recipes.put(Fluids.LIGHTOIL, new Triplet(
|
||||
new FluidStack(Fluids.AROMATICS, 50),
|
||||
new FluidStack(Fluids.REFORMGAS, 10),
|
||||
new FluidStack(Fluids.HYDROGEN, 15)
|
||||
));
|
||||
recipes.put(Fluids.LIGHTOIL_CRACK, new Triplet(
|
||||
new FluidStack(Fluids.AROMATICS, 50),
|
||||
new FluidStack(Fluids.REFORMGAS, 5),
|
||||
new FluidStack(Fluids.HYDROGEN, 20)
|
||||
));
|
||||
recipes.put(Fluids.PETROLEUM, new Triplet(
|
||||
new FluidStack(Fluids.UNSATURATEDS, 85),
|
||||
new FluidStack(Fluids.REFORMGAS, 10),
|
||||
|
||||
@ -103,6 +103,8 @@ public class ModItems {
|
||||
public static Item ingot_titanium;
|
||||
public static Item ingot_cobalt;
|
||||
public static Item sulfur;
|
||||
public static Item nitra;
|
||||
public static Item nitra_small;
|
||||
|
||||
public static Item coke;
|
||||
public static Item lignite;
|
||||
@ -343,10 +345,12 @@ public class ModItems {
|
||||
public static Item crayon;
|
||||
|
||||
public static Item undefined;
|
||||
|
||||
|
||||
public static Item ball_resin;
|
||||
public static Item ingot_dura_steel;
|
||||
public static Item ingot_polymer;
|
||||
public static Item ingot_bakelite;
|
||||
public static Item ingot_biorubber;
|
||||
public static Item ingot_rubber;
|
||||
public static Item ingot_pet;
|
||||
public static Item ingot_pc;
|
||||
@ -1261,6 +1265,7 @@ public class ModItems {
|
||||
public static Item analysis_tool;
|
||||
public static Item coupling_tool;
|
||||
public static Item drone_linker;
|
||||
public static Item radar_linker;
|
||||
|
||||
public static Item template_folder;
|
||||
public static Item journal_pip;
|
||||
@ -2524,6 +2529,8 @@ public class ModItems {
|
||||
ingot_firebrick = new Item().setUnlocalizedName("ingot_firebrick").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_firebrick");
|
||||
ingot_smore = new ItemFood(10, 20F, false).setUnlocalizedName("ingot_smore").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_smore");
|
||||
sulfur = new Item().setUnlocalizedName("sulfur").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":sulfur");
|
||||
nitra = new Item().setUnlocalizedName("nitra").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nitra");
|
||||
nitra_small = new Item().setUnlocalizedName("nitra_small").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nitra_small");
|
||||
|
||||
ingot_uranium_fuel = new Item().setUnlocalizedName("ingot_uranium_fuel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_uranium_fuel");
|
||||
ingot_plutonium_fuel = new Item().setUnlocalizedName("ingot_plutonium_fuel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_plutonium_fuel");
|
||||
@ -2652,9 +2659,11 @@ public class ModItems {
|
||||
billet_zfb_am_mix = new Item().setUnlocalizedName("billet_zfb_am_mix").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_zfb_am_mix");
|
||||
billet_nuclear_waste = new Item().setUnlocalizedName("billet_nuclear_waste").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":billet_nuclear_waste");
|
||||
|
||||
ball_resin = new ItemCustomLore().setUnlocalizedName("ball_resin").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ball_resin");
|
||||
ingot_dura_steel = new ItemCustomLore().setUnlocalizedName("ingot_dura_steel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_dura_steel");
|
||||
ingot_polymer = new ItemCustomLore().setUnlocalizedName("ingot_polymer").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_polymer");
|
||||
ingot_bakelite = new ItemCustomLore().setUnlocalizedName("ingot_bakelite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_bakelite");
|
||||
ingot_biorubber = new ItemCustomLore().setUnlocalizedName("ingot_biorubber").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_biorubber");
|
||||
ingot_rubber = new ItemCustomLore().setUnlocalizedName("ingot_rubber").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_rubber");
|
||||
//ingot_pet = new ItemCustomLore().setUnlocalizedName("ingot_pet").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_pet");
|
||||
ingot_pc = new ItemCustomLore().setUnlocalizedName("ingot_pc").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_pc");
|
||||
@ -4596,6 +4605,7 @@ public class ModItems {
|
||||
analysis_tool = new ItemAnalysisTool().setUnlocalizedName("analysis_tool").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":analysis_tool");
|
||||
coupling_tool = new ItemCouplingTool().setUnlocalizedName("coupling_tool").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":coupling_tool");
|
||||
drone_linker = new ItemDroneLinker().setUnlocalizedName("drone_linker").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":drone_linker");
|
||||
radar_linker = new ItemRadarLinker().setUnlocalizedName("radar_linker").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":radar_linker");
|
||||
|
||||
key = new ItemKey().setUnlocalizedName("key").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":key");
|
||||
key_red = new ItemCustomLore().setUnlocalizedName("key_red").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":key_red");
|
||||
@ -4969,7 +4979,7 @@ public class ModItems {
|
||||
Fluids.DIESEL, Fluids.DIESEL_CRACK, Fluids.KEROSENE, Fluids.BIOFUEL, Fluids.GASOLINE, Fluids.GASOLINE_LEADED, Fluids.PETROIL, Fluids.PETROIL_LEADED, Fluids.COALGAS, Fluids.COALGAS_LEADED)
|
||||
.addBreakAbility(new ToolAbility.SilkAbility())
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(5))
|
||||
.addHitAbility(new WeaponAbility.ChainsawAbility(4))
|
||||
.addHitAbility(new WeaponAbility.ChainsawAbility(10))
|
||||
.addHitAbility(new WeaponAbility.BeheaderAbility()).setShears().setUnlocalizedName("chainsaw").setTextureName(RefStrings.MODID + ":chainsaw");
|
||||
|
||||
schrabidium_sword = new ItemSwordAbility(150, 0, MainRegistry.tMatSchrab)
|
||||
@ -5077,7 +5087,7 @@ public class ModItems {
|
||||
.addBreakAbility(new ToolAbility.RecursionAbility(5))
|
||||
.addBreakAbility(new ToolAbility.SilkAbility())
|
||||
.addBreakAbility(new LuckAbility(2))
|
||||
.addHitAbility(new WeaponAbility.ChainsawAbility(6))
|
||||
.addHitAbility(new WeaponAbility.ChainsawAbility(15))
|
||||
.addHitAbility(new WeaponAbility.BeheaderAbility()).setShears().setUnlocalizedName("elec_axe").setTextureName(RefStrings.MODID + ":elec_chainsaw_anim");
|
||||
|
||||
elec_shovel = new ItemToolAbilityPower(7.5F, 0, MainRegistry.tMatElec, EnumToolType.SHOVEL, 500000, 1000, 100)
|
||||
@ -5592,6 +5602,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ingot_dura_steel, ingot_dura_steel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_polymer, ingot_polymer.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_bakelite, ingot_bakelite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_biorubber, ingot_biorubber.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_rubber, ingot_rubber.getUnlocalizedName());
|
||||
//GameRegistry.registerItem(ingot_pet, ingot_pet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_pc, ingot_pc.getUnlocalizedName());
|
||||
@ -5721,6 +5732,8 @@ public class ModItems {
|
||||
GameRegistry.registerItem(briquette, briquette.getUnlocalizedName());
|
||||
GameRegistry.registerItem(sulfur, sulfur.getUnlocalizedName());
|
||||
GameRegistry.registerItem(niter, niter.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nitra, nitra.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nitra_small, nitra_small.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fluorite, fluorite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_coal, powder_coal.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_coal_tiny, powder_coal_tiny.getUnlocalizedName());
|
||||
@ -5844,6 +5857,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ball_dynamite, ball_dynamite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ball_tnt, ball_tnt.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ball_tatb, ball_tatb.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ball_resin, ball_resin.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ball_fireclay, ball_fireclay.getUnlocalizedName());
|
||||
|
||||
//Ores
|
||||
@ -6767,6 +6781,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(mirror_tool, mirror_tool.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rbmk_tool, rbmk_tool.getUnlocalizedName());
|
||||
GameRegistry.registerItem(drone_linker, drone_linker.getUnlocalizedName());
|
||||
GameRegistry.registerItem(radar_linker, radar_linker.getUnlocalizedName());
|
||||
GameRegistry.registerItem(coltan_tool, coltan_tool.getUnlocalizedName());
|
||||
GameRegistry.registerItem(power_net_tool, power_net_tool.getUnlocalizedName());
|
||||
GameRegistry.registerItem(analysis_tool, analysis_tool.getUnlocalizedName());
|
||||
|
||||
@ -173,7 +173,7 @@ public class ArmorDNT extends ArmorFSBPowered {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add("Charge: " + BobMathUtil.getShortNumber(getCharge(stack)) + " / " + BobMathUtil.getShortNumber(maxPower));
|
||||
list.add(I18nUtil.resolveKey("armor.charge",BobMathUtil.getShortNumber(getCharge(stack)),BobMathUtil.getShortNumber(maxPower)));
|
||||
|
||||
list.add(EnumChatFormatting.GOLD + I18nUtil.resolveKey("armor.fullSetBonus"));
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -31,7 +32,7 @@ public class ArmorFSBPowered extends ArmorFSB implements IBatteryItem {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
list.add("Charge: " + BobMathUtil.getShortNumber(getCharge(stack)) + " / " + BobMathUtil.getShortNumber(maxPower));
|
||||
list.add(I18nUtil.resolveKey("armor.charge",BobMathUtil.getShortNumber(getCharge(stack)),BobMathUtil.getShortNumber(maxPower)));
|
||||
|
||||
super.addInformation(stack, player, list, ext);
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ public class ArmorTrenchmaster extends ArmorFSB {
|
||||
|
||||
public ArmorTrenchmaster(ArmorMaterial material, int slot, String texture) {
|
||||
super(material, slot, texture);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user