mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
25e8893556
25
changelog
25
changelog
@ -1,21 +1,10 @@
|
||||
## Added
|
||||
* ???
|
||||
|
||||
## Changed
|
||||
* Adjusted the model for the mining helmet
|
||||
* The ladders on the acidizer and fluid tanks are now climbable
|
||||
* Removed those unused blue dungeon bricks
|
||||
* Red phosphorus is no longer pyrophoric, meaning that multi purpose bomb kits no longer instantly explode
|
||||
* Adjusted M2's rotations
|
||||
* The watz now cools up to 20% of its current heat level instead of 10%, making reactors a lot cooler and therefore react faster, which means more energy and faster depletion rates
|
||||
* Mud production rates have been halved, to prevent currently working setups from exploding instantly
|
||||
* This is your reminder that you can achieve more power, mud and depletion by building larger watz powerplants, i.e. stacking more watz segments on top of each other. Your tiny poo reactors make me sick.
|
||||
* Watz pellets now have a 50% smaller yield, halving the expected time until depletion
|
||||
* Adjusted the nuclear flash's intensity, the flash will now deal less and less radiation the longer it goes on
|
||||
* The nuclear flash now bypasses radiation resistance, being only affected by blocks and distance
|
||||
|
||||
## Fixed
|
||||
* Fixed recipe conflict in the arc welder with the medium and large missile fuel tanks
|
||||
* Fixed doomsday missile not being launchable
|
||||
* Fixed rocket artillery turret power connectors not working with cables
|
||||
* Fixed arc welder energy consumption check not taking upgrades into account
|
||||
* Fixed glyphid gland and 16k item barrels not having a proper container item set, effectively voiding the emtpy container when used in crafting
|
||||
* Fixed confusing item quantity display in the exposure chamber's NEI handler
|
||||
* Fixed pheromone being tagged as viscous and therefore not being dispersable, making modified pheromone useless
|
||||
* Fixed mobs not being able to pathfind through open doors
|
||||
* Fixed the benelli ejecting the casings wrong
|
||||
* Fixed casing ejection in general being inconsistent, sometimes flying off into the wrong direction
|
||||
* Fixed a rare crash caused by radars force-loading chunks conflicting with certain mods' chunk loading changes
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
mod_version=1.0.27
|
||||
# Empty build number makes a release type
|
||||
mod_build_number=4824
|
||||
mod_build_number=4837
|
||||
|
||||
credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms),\
|
||||
\ Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models,\
|
||||
|
||||
@ -138,10 +138,17 @@ public class PowerNet implements IPowerNet {
|
||||
cleanup(this.subscribers);
|
||||
lastCleanup = System.currentTimeMillis();
|
||||
}*/
|
||||
|
||||
List<PowerNet> cache = new ArrayList();
|
||||
if(trackingInstances != null && !trackingInstances.isEmpty()) {
|
||||
cache.addAll(trackingInstances);
|
||||
}
|
||||
|
||||
trackingInstances = new ArrayList();
|
||||
trackingInstances.add(this);
|
||||
return fairTransfer(this.subscribers, power);
|
||||
long result = fairTransfer(this.subscribers, power);
|
||||
trackingInstances.addAll(cache);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void cleanup(List<IEnergyConnector> subscribers) {
|
||||
@ -215,6 +222,8 @@ public class PowerNet implements IPowerNet {
|
||||
PowerNet net = trackingInstances.get(i);
|
||||
net.totalTransfer = net.totalTransfer.add(BigInteger.valueOf(totalTransfer));
|
||||
}
|
||||
|
||||
trackingInstances.clear();
|
||||
}
|
||||
|
||||
return power;
|
||||
|
||||
@ -664,7 +664,6 @@ public class ModBlocks {
|
||||
public static Block nuke_custom;
|
||||
public static Block nuke_solinium;
|
||||
public static Block nuke_n2;
|
||||
public static Block nuke_n45;
|
||||
public static Block nuke_fstbmb;
|
||||
public static Block bomb_multi;
|
||||
|
||||
@ -1105,8 +1104,9 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_waste_drum;
|
||||
public static Block machine_storage_drum;
|
||||
|
||||
|
||||
public static Block machine_autocrafter;
|
||||
public static Block machine_funnel;
|
||||
|
||||
public static Block anvil_iron;
|
||||
public static Block anvil_lead;
|
||||
@ -1171,10 +1171,14 @@ public class ModBlocks {
|
||||
public static Block rail_narrow_straight;
|
||||
public static Block rail_narrow_curve;
|
||||
public static Block rail_large_straight;
|
||||
public static Block rail_large_straight_short;
|
||||
public static Block rail_large_curve;
|
||||
public static Block rail_large_curve_7;
|
||||
public static Block rail_large_curve_9;
|
||||
public static Block rail_large_ramp;
|
||||
public static Block rail_large_buffer;
|
||||
public static Block rail_large_switch;
|
||||
public static Block rail_large_switch_flipped;
|
||||
|
||||
public static Block statue_elb;
|
||||
public static Block statue_elb_g;
|
||||
@ -1799,7 +1803,6 @@ public class ModBlocks {
|
||||
nuke_custom = new NukeCustom(Material.iron).setBlockName("nuke_custom").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":custom");
|
||||
nuke_solinium = new NukeSolinium(Material.iron).setBlockName("nuke_solinium").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":nuke_solinium");
|
||||
nuke_n2 = new NukeN2(Material.iron).setBlockName("nuke_n2").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":nuke_n2");
|
||||
nuke_n45 = new NukeN45(Material.iron).setBlockName("nuke_n45").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":code");
|
||||
nuke_fstbmb = new NukeBalefire(Material.iron).setBlockName("nuke_fstbmb").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":nuke_fstbmb");
|
||||
|
||||
bomb_multi = new BombMulti(Material.iron).setBlockName("bomb_multi").setCreativeTab(MainRegistry.nukeTab).setResistance(200.0F).setBlockTextureName(RefStrings.MODID + ":bomb_multi1");
|
||||
@ -1901,7 +1904,7 @@ public class ModBlocks {
|
||||
hadron_plating_yellow = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_yellow").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating_yellow");
|
||||
hadron_plating_striped = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_striped").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating_striped");
|
||||
hadron_plating_voltz = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_voltz").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating_voltz");
|
||||
hadron_plating_glass = new BlockNTMGlass(0, RefStrings.MODID + ":hadron_plating_glass", Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_glass").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating_glass");
|
||||
hadron_plating_glass = new BlockNTMGlass(0, RefStrings.MODID + ":hadron_plating_glass", Material.iron, true).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_glass").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating_glass");
|
||||
hadron_coil_alloy = new BlockHadronCoil(Material.iron, 10).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_alloy").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_alloy");
|
||||
hadron_coil_gold = new BlockHadronCoil(Material.iron, 25).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_gold").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_gold");
|
||||
hadron_coil_neodymium = new BlockHadronCoil(Material.iron, 50).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_neodymium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_neodymium");
|
||||
@ -1918,7 +1921,7 @@ public class ModBlocks {
|
||||
hadron_power_10g = new BlockHadronPower(Material.iron, 10000000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power_10g").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_power");
|
||||
hadron_diode = new BlockHadronDiode(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_diode").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
hadron_analysis = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_analysis").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_analysis");
|
||||
hadron_analysis_glass = new BlockNTMGlass(0, RefStrings.MODID + ":hadron_analysis_glass", Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_analysis_glass").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_analysis_glass");
|
||||
hadron_analysis_glass = new BlockNTMGlass(0, RefStrings.MODID + ":hadron_analysis_glass", Material.iron, true).setStepSound(Block.soundTypeMetal).setBlockName("hadron_analysis_glass").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_analysis_glass");
|
||||
hadron_access = new BlockHadronAccess(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_access").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_access");
|
||||
hadron_core = new BlockHadronCore(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_core");
|
||||
hadron_cooler = new BlockHadronCooler(Material.iron).setBlockName("hadron_cooler").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F);
|
||||
@ -2248,11 +2251,15 @@ public class ModBlocks {
|
||||
rail_booster = new RailBooster().setBlockName("rail_booster").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_booster");
|
||||
rail_narrow_straight = new RailNarrowStraight().setBlockName("rail_narrow_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_narrow_neo");
|
||||
rail_narrow_curve = new RailNarrowCurve().setBlockName("rail_narrow_curve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_narrow_neo");
|
||||
rail_large_straight = new RailStandardStraight().setBlockName("rail_large_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_curve = new RailStandardCurve().setBlockName("rail_large_curve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_ramp = new RailStandardRamp().setBlockName("rail_large_ramp").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_buffer = new RailStandardBuffer().setBlockName("rail_large_buffer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_buffer");
|
||||
rail_large_switch = new RailStandardSwitch().setBlockName("rail_large_switch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_straight = new RailStandardStraight().setBlockName("rail_large_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_straight_short = new RailStandardStraightShort().setBlockName("rail_large_straight_short").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_curve = new RailStandardCurveBase().setBlockName("rail_large_curve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_curve_7 = new RailStandardCurveWide7().setBlockName("rail_large_curve_7").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_curve_9 = new RailStandardCurveWide9().setBlockName("rail_large_curve_9").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_ramp = new RailStandardRamp().setBlockName("rail_large_ramp").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_buffer = new RailStandardBuffer().setBlockName("rail_large_buffer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_buffer");
|
||||
rail_large_switch = new RailStandardSwitch().setBlockName("rail_large_switch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_switch_flipped = new RailStandardSwitchFlipped().setBlockName("rail_large_switch_flipped").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
|
||||
crate = new BlockCrate(Material.wood).setBlockName("crate").setStepSound(Block.soundTypeWood).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":crate");
|
||||
crate_weapon = new BlockCrate(Material.wood).setBlockName("crate_weapon").setStepSound(Block.soundTypeWood).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":crate_weapon");
|
||||
@ -2338,6 +2345,7 @@ public class ModBlocks {
|
||||
machine_electrolyser = new MachineElectrolyser().setBlockName("machine_electrolyser").setHardness(10.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel_machine");
|
||||
|
||||
machine_autocrafter = new MachineAutocrafter().setBlockName("machine_autocrafter").setHardness(10.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_funnel = new MachineFunnel().setBlockName("machine_funnel").setHardness(10.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
|
||||
anvil_iron = new NTMAnvil(Material.iron, 1).setBlockName("anvil_iron").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_iron");
|
||||
anvil_lead = new NTMAnvil(Material.iron, 1).setBlockName("anvil_lead").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_lead");
|
||||
@ -2986,7 +2994,6 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(nuke_fleija, nuke_fleija.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(nuke_solinium, nuke_solinium.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(nuke_n2, nuke_n2.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(nuke_n45, nuke_n45.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(nuke_fstbmb, nuke_fstbmb.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(nuke_custom, nuke_custom.getUnlocalizedName());
|
||||
|
||||
@ -3116,7 +3123,8 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(boat, boat.getUnlocalizedName());
|
||||
|
||||
//Machines
|
||||
GameRegistry.registerBlock(machine_autocrafter, ItemBlockBase.class, machine_autocrafter.getUnlocalizedName());
|
||||
register(machine_autocrafter);
|
||||
register(machine_funnel);
|
||||
|
||||
GameRegistry.registerBlock(anvil_iron, ItemBlockBase.class, anvil_iron.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(anvil_lead, ItemBlockBase.class, anvil_lead.getUnlocalizedName());
|
||||
@ -3550,10 +3558,14 @@ public class ModBlocks {
|
||||
register(rail_narrow_straight);
|
||||
register(rail_narrow_curve);
|
||||
register(rail_large_straight);
|
||||
register(rail_large_straight_short);
|
||||
register(rail_large_curve);
|
||||
register(rail_large_curve_7);
|
||||
register(rail_large_curve_9);
|
||||
register(rail_large_ramp);
|
||||
register(rail_large_buffer);
|
||||
register(rail_large_switch);
|
||||
register(rail_large_switch_flipped);
|
||||
|
||||
//Crate
|
||||
GameRegistry.registerBlock(crate, crate.getUnlocalizedName());
|
||||
|
||||
@ -1,137 +0,0 @@
|
||||
package com.hbm.blocks.bomb;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeN45;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class NukeN45 extends BlockContainer implements IBomb {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory = false;
|
||||
|
||||
public NukeN45(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityNukeN45();
|
||||
}
|
||||
|
||||
@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) {
|
||||
ISidedInventory tileentityfurnace = (ISidedInventory) p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
||||
|
||||
if(tileentityfurnace != null) {
|
||||
for(int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1) {
|
||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
||||
|
||||
if(itemstack != null) {
|
||||
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
while(itemstack.stackSize > 0) {
|
||||
int j1 = this.field_149933_a.nextInt(21) + 10;
|
||||
|
||||
if(j1 > itemstack.stackSize) {
|
||||
j1 = itemstack.stackSize;
|
||||
}
|
||||
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
|
||||
if(itemstack.hasTagCompound()) {
|
||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float) this.field_149933_a.nextGaussian() * f3;
|
||||
entityitem.motionY = (float) this.field_149933_a.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float) this.field_149933_a.nextGaussian() * f3;
|
||||
p_149749_1_.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
|
||||
}
|
||||
}
|
||||
|
||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking()) {
|
||||
TileEntityNukeN45 entity = (TileEntityNukeN45) world.getTileEntity(x, y, z);
|
||||
if(entity != null) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
return Item.getItemFromBlock(ModBlocks.nuke_n45);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BombReturnCode explode(World world, int x, int y, int z) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
TileEntityNukeN45 entity = (TileEntityNukeN45) world.getTileEntity(x, y, z);
|
||||
|
||||
if(entity.getType() == 100) {
|
||||
entity.primed = true;
|
||||
return BombReturnCode.TRIGGERED;
|
||||
} else if(!entity.primed && entity.getType() > 0) {
|
||||
int t = entity.getType();
|
||||
entity.clearSlots();
|
||||
entity.explode(world, x, y, z, t);
|
||||
return BombReturnCode.DETONATED;
|
||||
}
|
||||
|
||||
return BombReturnCode.ERROR_MISSING_COMPONENT;
|
||||
}
|
||||
|
||||
return BombReturnCode.UNDEFINED;
|
||||
}
|
||||
}
|
||||
@ -12,6 +12,7 @@ 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.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
@ -38,11 +39,31 @@ public class BlockAmmoCrate extends Block {
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return side == 0 ? this.iconBottom : (side == 1 ? this.iconTop : this.blockIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem().equals(ModItems.crowbar)) {
|
||||
if(!world.isRemote) {
|
||||
dropContents(world, x, y, z);
|
||||
world.setBlockToAir(x, y, z);
|
||||
world.playSoundEffect(x, y, z, "hbm:block.crateBreak", 0.5F, 1.0F);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Random rand = new Random();
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
public void dropContents(World world, int x, int y, int z) {
|
||||
ArrayList<ItemStack> items = getContents(world, x, y, z);
|
||||
|
||||
for(ItemStack item : items) {
|
||||
this.dropBlockAsItem(world, x, y, z, item);
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<ItemStack> getContents(World world, int x, int y, int z) {
|
||||
|
||||
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
|
||||
|
||||
@ -11,9 +11,7 @@ import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockCanCrate extends Block {
|
||||
@ -21,79 +19,77 @@ public class BlockCanCrate extends Block {
|
||||
public BlockCanCrate(Material p_i45394_1_) {
|
||||
super(p_i45394_1_);
|
||||
}
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
public int getRenderType() {
|
||||
return renderID;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
|
||||
|
||||
if(world.isRemote)
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText("The one crate you are allowed to smash!"));
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem().equals(ModItems.crowbar)) {
|
||||
if(!world.isRemote) {
|
||||
dropContents(world, x, y, z);
|
||||
world.setBlockToAir(x, y, z);
|
||||
world.playSoundEffect(x, y, z, "hbm:block.crateBreak", 0.5F, 1.0F);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
|
||||
int count = quantityDropped(metadata, fortune, world.rand);
|
||||
for(int i = 0; i < count; i++) {
|
||||
Item item = getItemDropped(metadata, world.rand, fortune);
|
||||
if(item != null)
|
||||
ret.add(new ItemStack(item, 1, damageDropped(metadata, world.rand, item)));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
//pain
|
||||
public int damageDropped(int meta, Random rand, Item item) {
|
||||
if(item != ModItems.canned_conserve)
|
||||
return damageDropped(meta);
|
||||
else
|
||||
return Math.abs(rand.nextInt() % EnumFoodType.values().length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int i, Random rand, int j) {
|
||||
|
||||
List<Item> items = new ArrayList();
|
||||
for(int a = 0; a < EnumFoodType.values().length; a++)
|
||||
items.add(ModItems.canned_conserve);
|
||||
items.add(ModItems.can_smart);
|
||||
items.add(ModItems.can_creature);
|
||||
items.add(ModItems.can_redbomb);
|
||||
items.add(ModItems.can_mrsugar);
|
||||
items.add(ModItems.can_overcharge);
|
||||
items.add(ModItems.can_luna);
|
||||
items.add(ModItems.can_breen);
|
||||
items.add(ModItems.can_bepis);
|
||||
items.add(ModItems.pudding);
|
||||
|
||||
return items.get(rand.nextInt(items.size()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random rand) {
|
||||
|
||||
return 5 + rand.nextInt(4);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Random rand = new Random();
|
||||
|
||||
public void dropContents(World world, int x, int y, int z) {
|
||||
ArrayList<ItemStack> items = getContents(world, x, y, z);
|
||||
|
||||
for(ItemStack item : items) {
|
||||
this.dropBlockAsItem(world, x, y, z, item);
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<ItemStack> getContents(World world, int x, int y, int z) {
|
||||
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
|
||||
int count = getContentAmount(world.rand);
|
||||
for(int i = 0; i < count; i++) {
|
||||
ret.add(getRandomItem(world.rand));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public ItemStack getRandomItem(Random rand) {
|
||||
|
||||
List<ItemStack> items = new ArrayList();
|
||||
for(int a = 0; a < EnumFoodType.values().length; a++)
|
||||
items.add(new ItemStack(ModItems.canned_conserve, 1, a));
|
||||
items.add(new ItemStack(ModItems.can_smart));
|
||||
items.add(new ItemStack(ModItems.can_creature));
|
||||
items.add(new ItemStack(ModItems.can_redbomb));
|
||||
items.add(new ItemStack(ModItems.can_mrsugar));
|
||||
items.add(new ItemStack(ModItems.can_overcharge));
|
||||
items.add(new ItemStack(ModItems.can_luna));
|
||||
items.add(new ItemStack(ModItems.can_breen));
|
||||
items.add(new ItemStack(ModItems.can_bepis));
|
||||
items.add(new ItemStack(ModItems.pudding));
|
||||
|
||||
return items.get(rand.nextInt(items.size()));
|
||||
}
|
||||
|
||||
public int getContentAmount(Random rand) {
|
||||
return 5 + rand.nextInt(4);
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,6 @@ 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.util.ChatComponentText;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockCrate extends BlockFalling {
|
||||
@ -29,25 +28,17 @@ public class BlockCrate extends BlockFalling {
|
||||
super(p_i45394_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem().equals(ModItems.crowbar)) {
|
||||
dropItems(world, x, y, z);
|
||||
world.setBlockToAir(x, y, z);
|
||||
world.playSoundEffect(x, y, z, "hbm:block.crateBreak", 0.5F, 1.0F);
|
||||
return true;
|
||||
} else {
|
||||
if(world.isRemote) {
|
||||
player.addChatMessage(new ChatComponentText("I'll need a crate opening device to get the loot, smashing the whole thing won't work..."));
|
||||
if(!world.isRemote) {
|
||||
dropItems(world, x, y, z);
|
||||
world.setBlockToAir(x, y, z);
|
||||
world.playSoundEffect(x, y, z, "hbm:block.crateBreak", 0.5F, 1.0F);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setDrops() {
|
||||
|
||||
@ -58,9 +58,9 @@ public class BlockDecoContainer extends BlockDecoModel implements ITileEntityPro
|
||||
} else {
|
||||
TileEntity entity = world.getTileEntity(x, y, z);
|
||||
if(entity instanceof TileEntityLockableBase) { //annoying accommodations for the filing cabinet, but whatever, could potentially be useful
|
||||
if(player.getHeldItem() != null && (player.getHeldItem().getItem() instanceof ItemLock || player.getHeldItem().getItem() == ModItems.key_kit))
|
||||
if(player.getHeldItem() != null && (player.getHeldItem().getItem() instanceof ItemLock || player.getHeldItem().getItem() == ModItems.key_kit)) {
|
||||
return false;
|
||||
else if(!player.isSneaking() && ((TileEntityLockableBase) entity).canAccess(player)) {
|
||||
} else if(!player.isSneaking() && ((TileEntityLockableBase) entity).canAccess(player)) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
@ -99,13 +99,13 @@ public class BlockDecoContainer extends BlockDecoModel implements ITileEntityPro
|
||||
|
||||
if(itemstack.hasTagCompound()) {
|
||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float) rand.nextGaussian() * f3;
|
||||
entityitem.motionY = (float) rand.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float) rand.nextGaussian() * f3;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float) rand.nextGaussian() * f3;
|
||||
entityitem.motionY = (float) rand.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float) rand.nextGaussian() * f3;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -240,5 +240,6 @@ public class BlockKeyhole extends BlockStone {
|
||||
pedestalItems.add(new WeightedRandomObject(new ItemStack(ModItems.flask_infusion), 5));
|
||||
pedestalItems.add(new WeightedRandomObject(new ItemStack(ModBlocks.boxcar), 5));
|
||||
pedestalItems.add(new WeightedRandomObject(new ItemStack(ModItems.book_of_), 5));
|
||||
pedestalItems.add(new WeightedRandomObject(new ItemStack(ModItems.gun_revolver_pip), 5));
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,6 +18,7 @@ import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockPedestal extends BlockContainer {
|
||||
@ -62,6 +63,12 @@ public class BlockPedestal extends BlockContainer {
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
@ -13,7 +13,6 @@ import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.MetaBlock;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
@ -151,7 +150,7 @@ public class BlockToolConversion extends BlockMulti implements IToolable, ILookO
|
||||
public static HashMap<Pair<ToolType, MetaBlock>, Pair<AStack[], MetaBlock>> conversions = new HashMap();
|
||||
|
||||
public static void registerRecipes() {
|
||||
conversions.put(new Pair(ToolType.BOLT, new MetaBlock(ModBlocks.watz_end, 0)), new Pair(new AStack[] {new ComparableStack(ModItems.bolt_dura_steel, 4)}, new MetaBlock(ModBlocks.watz_end, 1)));
|
||||
conversions.put(new Pair(ToolType.BOLT, new MetaBlock(ModBlocks.watz_end, 0)), new Pair(new AStack[] {new OreDictStack(OreDictManager.DURA.bolt(), 4)}, new MetaBlock(ModBlocks.watz_end, 1)));
|
||||
conversions.put(new Pair(ToolType.TORCH, new MetaBlock(ModBlocks.fusion_conductor, 0)), new Pair(new AStack[] {new OreDictStack(OreDictManager.STEEL.plateCast())}, new MetaBlock(ModBlocks.fusion_conductor, 1)));
|
||||
}
|
||||
|
||||
|
||||
@ -24,10 +24,8 @@ import net.minecraft.world.World;
|
||||
|
||||
public class MachineAutocrafter extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT) private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT) private IIcon iconBottom;
|
||||
|
||||
public MachineAutocrafter() {
|
||||
super(Material.iron);
|
||||
@ -67,48 +65,48 @@ public class MachineAutocrafter extends BlockContainer {
|
||||
}
|
||||
}
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private final Random rand = new Random();
|
||||
|
||||
@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_) {
|
||||
ISidedInventory tileentityfurnace = (ISidedInventory) p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||
ISidedInventory tile = (ISidedInventory) world.getTileEntity(x, y, z);
|
||||
|
||||
if(tileentityfurnace != null) {
|
||||
if(tile != null) {
|
||||
|
||||
for(int i1 = 10; i1 < tileentityfurnace.getSizeInventory(); ++i1) {
|
||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
||||
for(int i1 = 10; i1 < tile.getSizeInventory(); ++i1) {
|
||||
ItemStack itemstack = tile.getStackInSlot(i1);
|
||||
|
||||
if(itemstack != null) {
|
||||
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
while(itemstack.stackSize > 0) {
|
||||
int j1 = this.field_149933_a.nextInt(21) + 10;
|
||||
int j1 = this.rand.nextInt(21) + 10;
|
||||
|
||||
if(j1 > itemstack.stackSize) {
|
||||
j1 = itemstack.stackSize;
|
||||
}
|
||||
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
|
||||
if(itemstack.hasTagCompound()) {
|
||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float) this.field_149933_a.nextGaussian() * f3;
|
||||
entityitem.motionY = (float) this.field_149933_a.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float) this.field_149933_a.nextGaussian() * f3;
|
||||
p_149749_1_.spawnEntityInWorld(entityitem);
|
||||
entityitem.motionX = (float) this.rand.nextGaussian() * f3;
|
||||
entityitem.motionY = (float) this.rand.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float) this.rand.nextGaussian() * f3;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
|
||||
world.func_147453_f(x, y, z, block);
|
||||
}
|
||||
|
||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
||||
super.breakBlock(world, x, y, z, block, meta);
|
||||
}
|
||||
}
|
||||
|
||||
138
src/main/java/com/hbm/blocks/machine/MachineFunnel.java
Normal file
138
src/main/java/com/hbm/blocks/machine/MachineFunnel.java
Normal file
@ -0,0 +1,138 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.blocks.rail.IRenderBlock;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineFunnel;
|
||||
|
||||
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.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
|
||||
public class MachineFunnel extends BlockContainer implements ITooltipProvider, IRenderBlock {
|
||||
|
||||
@SideOnly(Side.CLIENT) private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT) private IIcon iconBottom;
|
||||
|
||||
public MachineFunnel() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override public int getRenderType() { return renderID; }
|
||||
@Override public boolean isOpaqueCube() { return false; }
|
||||
@Override public boolean renderAsNormalBlock() { return false; }
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_funnel_top");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_funnel_side");
|
||||
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + ":machine_funnel_bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return side == 1 ? this.iconTop : (side == 0 ? this.iconBottom : this.blockIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityMachineFunnel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking()) {
|
||||
TileEntity entity = world.getTileEntity(x, y, z);
|
||||
if(entity instanceof TileEntityMachineFunnel) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private final Random rand = new Random();
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||
ISidedInventory tile = (ISidedInventory) world.getTileEntity(x, y, z);
|
||||
if(tile != null) {
|
||||
for(int i1 = 0; i1 < tile.getSizeInventory(); ++i1) {
|
||||
ItemStack itemstack = tile.getStackInSlot(i1);
|
||||
if(itemstack != null) {
|
||||
float f = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||
while(itemstack.stackSize > 0) {
|
||||
int j1 = this.rand.nextInt(21) + 10;
|
||||
if(j1 > itemstack.stackSize) j1 = itemstack.stackSize;
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
if(itemstack.hasTagCompound()) entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float) this.rand.nextGaussian() * f3;
|
||||
entityitem.motionY = (float) this.rand.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float) this.rand.nextGaussian() * f3;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.func_147453_f(x, y, z, block);
|
||||
}
|
||||
super.breakBlock(world, x, y, z, block, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
this.addStandardInfo(stack, player, list, ext);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(Tessellator tessellator, Block block, int metadata) {
|
||||
GL11.glTranslatef(0F, -0.5F, 0F);
|
||||
tessellator.startDrawingQuads();
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Top", block.getIcon(1, 0), tessellator, 0, false);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Bottom", block.getIcon(0, 0), tessellator, 0, false);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Side", block.getIcon(2, 0), tessellator, 0, false);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderWorld(Tessellator tessellator, Block block, int meta, IBlockAccess world, int x, int y, int z) {
|
||||
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Top", block.getIcon(1, 0), tessellator, 0, true);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Bottom", block.getIcon(0, 0), tessellator, 0, true);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Side", block.getIcon(2, 0), tessellator, 0, true);
|
||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||
}
|
||||
}
|
||||
@ -5,6 +5,7 @@ import java.util.Random;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.inventory.material.Mats;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityWatz;
|
||||
@ -93,7 +94,7 @@ public class Watz extends BlockDummyable {
|
||||
if(i >= 12 && drop) {
|
||||
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.watz_end, 48)));
|
||||
for(int j = 0; j < 3; j++) world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.bolt_dura_steel, 64)));
|
||||
for(int j = 0; j < 3; j++) world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, Mats.MAT_DURA.make(ModItems.bolt)));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.watz_element, 36)));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.watz_cooler, 26)));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.struct_watz_core, 1)));
|
||||
|
||||
@ -158,8 +158,6 @@ public abstract class BlockRailWaypointSystem extends BlockDummyable implements
|
||||
currentPos = nextNode;
|
||||
}
|
||||
|
||||
if(!world.isRemote) PacketDispatcher.wrapper.sendToAllAround(new PlayerInformPacket(ChatBuilder.start("" + distRemaining).color(EnumChatFormatting.RED).flush(), 1), new TargetPoint(world.provider.dimensionId, x, y, z, 50));
|
||||
|
||||
info.overshoot = distRemaining;
|
||||
info.pos = new BlockPos(currentPos.xCoord, currentPos.yCoord, currentPos.zCoord);
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public interface IRenderRail {
|
||||
public interface IRenderBlock {
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@ -22,7 +22,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailNarrowCurve extends BlockDummyable implements IRailNTM, IRenderRail {
|
||||
public class RailNarrowCurve extends BlockDummyable implements IRailNTM, IRenderBlock {
|
||||
|
||||
public RailNarrowCurve() {
|
||||
super(Material.iron);
|
||||
|
||||
@ -22,7 +22,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailNarrowStraight extends BlockDummyable implements IRailNTM, IRenderRail {
|
||||
public class RailNarrowStraight extends BlockDummyable implements IRailNTM, IRenderBlock {
|
||||
|
||||
public RailNarrowStraight() {
|
||||
super(Material.iron);
|
||||
|
||||
@ -21,7 +21,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardBuffer extends BlockDummyable implements IRailNTM, IRenderRail {
|
||||
public class RailStandardBuffer extends BlockDummyable implements IRailNTM, IRenderBlock {
|
||||
|
||||
public RailStandardBuffer() {
|
||||
super(Material.iron);
|
||||
|
||||
@ -22,9 +22,11 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardCurve extends BlockDummyable implements IRailNTM, IRenderRail {
|
||||
public class RailStandardCurveBase extends BlockDummyable implements IRailNTM, IRenderBlock {
|
||||
|
||||
protected int width = 4;
|
||||
|
||||
public RailStandardCurve() {
|
||||
public RailStandardCurveBase() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@ -59,8 +61,8 @@ public class RailStandardCurve extends BlockDummyable implements IRailNTM, IRend
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(meta);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
double turnRadius = 4D;
|
||||
double axisDist = 4.5D;
|
||||
double turnRadius = width;
|
||||
double axisDist = width + 0.5D;
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(trainX, trainY, trainZ);
|
||||
double axisX = cX + 0.5 + dir.offsetX * 0.5 + rot.offsetX * axisDist;
|
||||
@ -105,7 +107,7 @@ public class RailStandardCurve extends BlockDummyable implements IRailNTM, IRend
|
||||
double angleOvershoot = effAngle - 90D;
|
||||
moveAngle -= angleOvershoot;
|
||||
double lengthOvershoot = angleOvershoot * length90Deg / 90D;
|
||||
info.dist(lengthOvershoot * Math.signum(speed * angularChange)).pos(new BlockPos(cX - dir.offsetX * 4 + rot.offsetX * 5, y, cZ - dir.offsetZ * 4 + rot.offsetZ * 5)).yaw((float) moveAngle);
|
||||
info.dist(lengthOvershoot * Math.signum(speed * angularChange)).pos(new BlockPos(cX - dir.offsetX * width + rot.offsetX * (width + 1), y, cZ - dir.offsetZ * width + rot.offsetZ * (width + 1))).yaw((float) moveAngle);
|
||||
return Vec3.createVectorHelper(axisX - dir.offsetX * turnRadius, y + 0.1875, axisZ - dir.offsetZ * turnRadius);
|
||||
}
|
||||
|
||||
@ -130,7 +132,7 @@ public class RailStandardCurve extends BlockDummyable implements IRailNTM, IRend
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {0, 0, 4, 0, 4, 0};
|
||||
return new int[] {0, 0, width, 0, width, 0};
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -208,9 +210,10 @@ public class RailStandardCurve extends BlockDummyable implements IRailNTM, IRend
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(Tessellator tessellator, Block block, int metadata) {
|
||||
GL11.glScaled(0.2, 0.2, 0.2);
|
||||
GL11.glTranslated(2.5, -0.0625, -1.5);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(0.3, 0.3, 0.3);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glRotated(60, 1, 0, 0);
|
||||
GL11.glTranslated(2, 0, 2);
|
||||
tessellator.startDrawingQuads();
|
||||
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_curve, block.getIcon(1, 0), tessellator, 0, false);
|
||||
tessellator.draw();
|
||||
113
src/main/java/com/hbm/blocks/rail/RailStandardCurveWide7.java
Normal file
113
src/main/java/com/hbm/blocks/rail/RailStandardCurveWide7.java
Normal file
@ -0,0 +1,113 @@
|
||||
package com.hbm.blocks.rail;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardCurveWide7 extends RailStandardCurveBase {
|
||||
|
||||
public RailStandardCurveWide7() {
|
||||
super();
|
||||
this.width = 6;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
dir = dir.getOpposite();
|
||||
|
||||
int dX = dir.offsetX;
|
||||
int dZ = dir.offsetZ;
|
||||
int rX = rot.offsetX;
|
||||
int rZ = rot.offsetZ;
|
||||
|
||||
return world.getBlock(x + dX, y, z + dZ).isReplaceable(world, x + dX, y, z + dZ) &&
|
||||
world.getBlock(x + rX, y, z + rZ).isReplaceable(world, x + rX, y, z + rZ) &&
|
||||
world.getBlock(x + dX + rX, y, z + dZ + rZ).isReplaceable(world, x + dX + rX, y, z + dZ + rZ) &&
|
||||
world.getBlock(x + dX + rX * 2, y, z + dZ + rZ * 2).isReplaceable(world, x + dX + rX * 2, y, z + dZ + rZ * 2) &&
|
||||
world.getBlock(x + dX * 2 + rX, y, z + dZ * 2 + rZ).isReplaceable(world, x + dX * 2 + rX, y, z + dZ * 2 + rZ) &&
|
||||
world.getBlock(x + dX * 2 + rX * 2, y, z + dZ * 2 + rZ * 2).isReplaceable(world, x + dX * 2 + rX * 2, y, z + dZ * 2 + rZ * 2) &&
|
||||
world.getBlock(x + dX * 3 + rX, y, z + dZ * 3 + rZ).isReplaceable(world, x + dX * 3 + rX, y, z + dZ * 3 + rZ) &&
|
||||
world.getBlock(x + dX * 3 + rX * 2, y, z + dZ * 3 + rZ * 2).isReplaceable(world, x + dX * 3 + rX * 2, y, z + dZ * 3 + rZ * 2) &&
|
||||
world.getBlock(x + dX * 2 + rX * 3, y, z + dZ * 2 + rZ * 3).isReplaceable(world, x + dX * 2 + rX * 3, y, z + dZ * 2 + rZ * 3) &&
|
||||
world.getBlock(x + dX * 3 + rX * 3, y, z + dZ * 3 + rZ * 3).isReplaceable(world, x + dX * 3 + rX * 3, y, z + dZ * 3 + rZ * 3) &&
|
||||
world.getBlock(x + dX * 4 + rX * 3, y, z + dZ * 4 + rZ * 3).isReplaceable(world, x + dX * 4 + rX * 3, y, z + dZ * 4 + rZ * 3) &&
|
||||
world.getBlock(x + dX * 3 + rX * 4, y, z + dZ * 3 + rZ * 4).isReplaceable(world, x + dX * 3 + rX * 4, y, z + dZ * 3 + rZ * 4) &&
|
||||
world.getBlock(x + dX * 4 + rX * 4, y, z + dZ * 4 + rZ * 4).isReplaceable(world, x + dX * 4 + rX * 4, y, z + dZ * 4 + rZ * 4);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
BlockDummyable.safeRem = true;
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
dir = dir.getOpposite();
|
||||
|
||||
int dX = dir.offsetX;
|
||||
int dZ = dir.offsetZ;
|
||||
int rX = rot.offsetX;
|
||||
int rZ = rot.offsetZ;
|
||||
|
||||
world.setBlock(x + dX, y, z + dZ, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 2, y, z + dZ * 2, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + rX, y, z + rZ, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX + rX, y, z + dZ + rZ, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 2 + rX, y, z + dZ * 2 + rZ, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 3 + rX, y, z + dZ * 3 + rZ, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 4 + rX, y, z + dZ * 4 + rZ, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 2 + rX * 2, y, z + dZ * 2 + rZ * 2, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 3 + rX * 2, y, z + dZ * 3 + rZ * 2, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 4 + rX * 2, y, z + dZ * 4 + rZ * 2, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 5 + rX * 2, y, z + dZ * 5 + rZ * 2, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 3 + rX * 3, y, z + dZ * 3 + rZ * 3, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 4 + rX * 3, y, z + dZ * 4 + rZ * 3, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 5 + rX * 3, y, z + dZ * 5 + rZ * 3, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 4 + rX * 4, y, z + dZ * 4 + rZ * 4, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 5 + rX * 4, y, z + dZ * 5 + rZ * 4, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 6 + rX * 4, y, z + dZ * 6 + rZ * 4, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 5 + rX * 5, y, z + dZ * 5 + rZ * 5, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 5 + rX * 6, y, z + dZ * 5 + rZ * 6, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 6 + rX * 5, y, z + dZ * 6 + rZ * 5, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 6 + rX * 6, y, z + dZ * 6 + rZ * 6, this, rot.ordinal(), 3);
|
||||
|
||||
BlockDummyable.safeRem = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(Tessellator tessellator, Block block, int metadata) {
|
||||
GL11.glScaled(0.225, 0.225, 0.225);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glRotated(60, 1, 0, 0);
|
||||
GL11.glTranslated(3, 0, 3);
|
||||
tessellator.startDrawingQuads();
|
||||
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_curve_wide7, block.getIcon(1, 0), tessellator, 0, false);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderWorld(Tessellator tessellator, Block block, int meta, IBlockAccess world, int x, int y, int z) {
|
||||
if(meta < 12) return;
|
||||
float rotation = 0;
|
||||
if(meta == 15) rotation = 90F / 180F * (float) Math.PI;
|
||||
if(meta == 12) rotation = 180F / 180F * (float) Math.PI;
|
||||
if(meta == 14) rotation = 270F / 180F * (float) Math.PI;
|
||||
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
|
||||
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_curve_wide7, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||
}
|
||||
}
|
||||
148
src/main/java/com/hbm/blocks/rail/RailStandardCurveWide9.java
Normal file
148
src/main/java/com/hbm/blocks/rail/RailStandardCurveWide9.java
Normal file
@ -0,0 +1,148 @@
|
||||
package com.hbm.blocks.rail;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardCurveWide9 extends RailStandardCurveBase {
|
||||
|
||||
public RailStandardCurveWide9() {
|
||||
super();
|
||||
this.width = 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
dir = dir.getOpposite();
|
||||
|
||||
int dX = dir.offsetX;
|
||||
int dZ = dir.offsetZ;
|
||||
int rX = rot.offsetX;
|
||||
int rZ = rot.offsetZ;
|
||||
|
||||
int[][] dim = new int[][] {
|
||||
{1, 0},
|
||||
{2, 0},
|
||||
{0, 1},
|
||||
{1, 1},
|
||||
{2, 1},
|
||||
{3, 1},
|
||||
{4, 1},
|
||||
{2, 2},
|
||||
{3, 2},
|
||||
{4, 2},
|
||||
{5, 2},
|
||||
{4, 3},
|
||||
{5, 3},
|
||||
{5, 4},
|
||||
{6, 3},
|
||||
{6, 4},
|
||||
{7, 4},
|
||||
{6, 5},
|
||||
{7, 5},
|
||||
{6, 6},
|
||||
{7, 6},
|
||||
{7, 7},
|
||||
{7, 8},
|
||||
{8, 6},
|
||||
{8, 7},
|
||||
{8, 8},
|
||||
};
|
||||
|
||||
for(int[] array : dim) {
|
||||
if(!world.getBlock(x + dX * array[0] + rX * array[1], y, z + dZ * array[0] + rZ * array[1]).isReplaceable(world, x + dX * array[0] + rX * array[1], y, z + dZ * array[0] + rZ * array[1])) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
BlockDummyable.safeRem = true;
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
dir = dir.getOpposite();
|
||||
|
||||
int dX = dir.offsetX;
|
||||
int dZ = dir.offsetZ;
|
||||
int rX = rot.offsetX;
|
||||
int rZ = rot.offsetZ;
|
||||
|
||||
int d = dir.ordinal();
|
||||
int r = rot.ordinal();
|
||||
|
||||
int[][] dim = new int[][] {
|
||||
{1, 0, d},
|
||||
{2, 0, d},
|
||||
{0, 1, r},
|
||||
{1, 1, d},
|
||||
{2, 1, d},
|
||||
{3, 1, d},
|
||||
{4, 1, d},
|
||||
{2, 2, r},
|
||||
{3, 2, r},
|
||||
{4, 2, r},
|
||||
{5, 2, d},
|
||||
{4, 3, r},
|
||||
{5, 3, r},
|
||||
{5, 4, r},
|
||||
{6, 3, d},
|
||||
{6, 4, d},
|
||||
{7, 4, d},
|
||||
{6, 5, r},
|
||||
{7, 5, r},
|
||||
{6, 6, r},
|
||||
{7, 6, r},
|
||||
{7, 7, r},
|
||||
{7, 8, r},
|
||||
{8, 6, d},
|
||||
{8, 7, d},
|
||||
{8, 8, d},
|
||||
};
|
||||
|
||||
for(int[] array : dim) {
|
||||
world.setBlock(x + dX * array[0] + rX * array[1], y, z + dZ * array[0] + rZ * array[1], this, array[2], 3);
|
||||
}
|
||||
|
||||
BlockDummyable.safeRem = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(Tessellator tessellator, Block block, int metadata) {
|
||||
GL11.glScaled(0.175, 0.175, 0.175);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glRotated(60, 1, 0, 0);
|
||||
GL11.glTranslated(4, 0, 4);
|
||||
tessellator.startDrawingQuads();
|
||||
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_curve_wide9, block.getIcon(1, 0), tessellator, 0, false);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderWorld(Tessellator tessellator, Block block, int meta, IBlockAccess world, int x, int y, int z) {
|
||||
if(meta < 12) return;
|
||||
float rotation = 0;
|
||||
if(meta == 15) rotation = 90F / 180F * (float) Math.PI;
|
||||
if(meta == 12) rotation = 180F / 180F * (float) Math.PI;
|
||||
if(meta == 14) rotation = 270F / 180F * (float) Math.PI;
|
||||
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
|
||||
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_curve_wide9, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||
}
|
||||
}
|
||||
@ -23,7 +23,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardRamp extends BlockDummyable implements IRailNTM, IRenderRail {
|
||||
public class RailStandardRamp extends BlockDummyable implements IRailNTM, IRenderBlock {
|
||||
|
||||
public RailStandardRamp() {
|
||||
super(Material.iron);
|
||||
|
||||
@ -22,7 +22,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardStraight extends BlockDummyable implements IRailNTM, IRenderRail {
|
||||
public class RailStandardStraight extends BlockDummyable implements IRailNTM, IRenderBlock {
|
||||
|
||||
public RailStandardStraight() {
|
||||
super(Material.iron);
|
||||
|
||||
152
src/main/java/com/hbm/blocks/rail/RailStandardStraightShort.java
Normal file
152
src/main/java/com/hbm/blocks/rail/RailStandardStraightShort.java
Normal file
@ -0,0 +1,152 @@
|
||||
package com.hbm.blocks.rail;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
|
||||
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.Tessellator;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardStraightShort extends BlockDummyable implements IRailNTM, IRenderBlock {
|
||||
|
||||
public RailStandardStraightShort() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {0, 0, 0, 0, 1, 0};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
this.setBlockBounds(0F, 0F, 0F, 1F, 0.125F, 1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
this.setBlockBounds(0F, 0F, 0F, 1F, 0.125F, 1F);
|
||||
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 getSnappingPos(World world, int x, int y, int z, double trainX, double trainY, double trainZ) {
|
||||
return snapAndMove(world, x, y, z, trainX, trainY, trainZ, 0, 0, 0, 0, new RailContext());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 getTravelLocation(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info, MoveContext context) {
|
||||
return snapAndMove(world, x, y, z, trainX, trainY, trainZ, motionX, motionY, motionZ, speed, info);
|
||||
}
|
||||
|
||||
/* Very simple function determining the snapping position and adding the motion value to it, if desired. */
|
||||
public Vec3 snapAndMove(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
if(pos == null) return Vec3.createVectorHelper(trainX, trainY, trainZ);
|
||||
int cX = pos[0];
|
||||
int cY = pos[1];
|
||||
int cZ = pos[2];
|
||||
int meta = world.getBlockMetadata(cX, cY, cZ) - this.offset;
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(meta);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(trainX, trainY, trainZ);
|
||||
|
||||
if(dir == Library.POS_X || dir == Library.NEG_X) {
|
||||
double targetX = trainX;
|
||||
if(motionX > 0) {
|
||||
targetX += speed;
|
||||
info.yaw(-90F);
|
||||
} else {
|
||||
targetX -= speed;
|
||||
info.yaw(90F);
|
||||
}
|
||||
vec.xCoord = MathHelper.clamp_double(targetX, cX, cX + 1);
|
||||
vec.yCoord = y + 0.1875;
|
||||
vec.zCoord = cZ + 0.5 + rot.offsetZ * 0.5;
|
||||
info.dist(Math.abs(targetX - vec.xCoord) * Math.signum(speed));
|
||||
info.pos(new BlockPos(cX + (motionX * speed > 0 ? 1 : -1), y, cZ));
|
||||
} else {
|
||||
double targetZ = trainZ;
|
||||
if(motionZ > 0) {
|
||||
targetZ += speed;
|
||||
info.yaw(0F);
|
||||
} else {
|
||||
targetZ -= speed;
|
||||
info.yaw(180F);
|
||||
}
|
||||
vec.xCoord = cX + 0.5 + rot.offsetX * 0.5;
|
||||
vec.yCoord = y + 0.1875;
|
||||
vec.zCoord = MathHelper.clamp_double(targetZ, cZ,cZ + 1);
|
||||
info.dist(Math.abs(targetZ - vec.zCoord) * Math.signum(speed));
|
||||
info.pos(new BlockPos(cX, y, cZ + (motionZ * speed > 0 ? 1 : -1)));
|
||||
}
|
||||
|
||||
return vec;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TrackGauge getGauge(World world, int x, int y, int z) {
|
||||
return TrackGauge.STANDARD;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(Tessellator tessellator, Block block, int metadata) {
|
||||
GL11.glTranslated(0, -0.0625, 0);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(0.7, 0.7, 0.7);
|
||||
tessellator.startDrawingQuads();
|
||||
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_straight_short, block.getIcon(1, 0), tessellator, 0, false);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderWorld(Tessellator tessellator, Block block, int meta, IBlockAccess world, int x, int y, int z) {
|
||||
if(meta < 12) return;
|
||||
float rotation = 0;
|
||||
if(meta == 14 || meta == 15) rotation = 90F / 180F * (float) Math.PI;
|
||||
if(meta == 12) tessellator.addTranslation(0.5F, 0F, 0F);
|
||||
if(meta == 13) tessellator.addTranslation(-0.5F, 0F, 0F);
|
||||
if(meta == 14) tessellator.addTranslation(0F, 0F, -0.5F);
|
||||
if(meta == 15) tessellator.addTranslation(0F, 0F, 0.5F);
|
||||
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
|
||||
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_straight_short, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||
if(meta == 12) tessellator.addTranslation(-0.5F, 0F, 0F);
|
||||
if(meta == 13) tessellator.addTranslation(0.5F, 0F, 0F);
|
||||
if(meta == 14) tessellator.addTranslation(0F, 0F, 0.5F);
|
||||
if(meta == 15) tessellator.addTranslation(0F, 0F, -0.5F);
|
||||
}
|
||||
}
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.rail;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.ResourceManager;
|
||||
@ -27,7 +28,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardSwitch extends BlockRailWaypointSystem implements IRenderRail {
|
||||
public class RailStandardSwitch extends BlockRailWaypointSystem implements IRenderBlock {
|
||||
|
||||
@SideOnly(Side.CLIENT) private IIcon iconSign;
|
||||
|
||||
@ -128,6 +129,7 @@ public class RailStandardSwitch extends BlockRailWaypointSystem implements IRend
|
||||
|
||||
if(world.isRemote) return true;
|
||||
if(player.isSneaking()) return false;
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.train) return false;
|
||||
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
|
||||
237
src/main/java/com/hbm/blocks/rail/RailStandardSwitchFlipped.java
Normal file
237
src/main/java/com/hbm/blocks/rail/RailStandardSwitchFlipped.java
Normal file
@ -0,0 +1,237 @@
|
||||
package com.hbm.blocks.rail;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.rail.RailStandardSwitch.TileEntityRailSwitch;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
|
||||
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.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardSwitchFlipped extends BlockRailWaypointSystem implements IRenderBlock {
|
||||
|
||||
@SideOnly(Side.CLIENT) private IIcon iconSign;
|
||||
|
||||
public RailStandardSwitchFlipped() {
|
||||
super(Material.iron);
|
||||
|
||||
RailDef main = new RailDef("main");
|
||||
RailDef side = new RailDef("side");
|
||||
railDefs.add(main);
|
||||
railDefs.add(side);
|
||||
|
||||
main.nodes.add(Vec3.createVectorHelper(-8.5, 0.1875, 0.5));
|
||||
main.nodes.add(Vec3.createVectorHelper(-7.5, 0.1875, 0.5));
|
||||
main.nodes.add(Vec3.createVectorHelper(6.5, 0.1875, 0.5));
|
||||
main.nodes.add(Vec3.createVectorHelper(7.5, 0.1875, 0.5));
|
||||
main.nodes.add(Vec3.createVectorHelper(8.5, 0.1875, 0.5));
|
||||
|
||||
side.nodes.add(Vec3.createVectorHelper(-8.5, 0.1875, -3.5));
|
||||
side.nodes.add(Vec3.createVectorHelper(-7.5, 0.1875, -3.5));
|
||||
side.nodes.add(Vec3.createVectorHelper(-6.5, 0.1875, -3.5));
|
||||
side.nodes.add(Vec3.createVectorHelper(-5.5, 0.1875, -3.5));
|
||||
side.nodes.add(Vec3.createVectorHelper(-4.5, 0.1875, -3.5));
|
||||
side.nodes.add(Vec3.createVectorHelper(-3.5, 0.1875, -3.5));
|
||||
side.nodes.add(Vec3.createVectorHelper(-2.5, 0.1875, -3.5));
|
||||
side.nodes.add(Vec3.createVectorHelper(-1.5, 0.1875, -3.5));
|
||||
side.nodes.add(Vec3.createVectorHelper(-0.5, 0.1875, -3.25));
|
||||
side.nodes.add(Vec3.createVectorHelper(0.5, 0.1875, -2.9375));
|
||||
side.nodes.add(Vec3.createVectorHelper(1.5, 0.1875, -2.375));
|
||||
side.nodes.add(Vec3.createVectorHelper(2.5, 0.1875, -1.4625));
|
||||
side.nodes.add(Vec3.createVectorHelper(3.5, 0.1875, -0.75));
|
||||
side.nodes.add(Vec3.createVectorHelper(4.5, 0.1875, -0.1875));
|
||||
side.nodes.add(Vec3.createVectorHelper(5.5, 0.1875, 0.175));
|
||||
side.nodes.add(Vec3.createVectorHelper(6.5, 0.1875, 0.375));
|
||||
side.nodes.add(Vec3.createVectorHelper(7.5, 0.1875, 0.5));
|
||||
side.nodes.add(Vec3.createVectorHelper(8.5, 0.1875, 0.5));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
super.registerBlockIcons(iconRegister);
|
||||
this.iconSign = iconRegister.registerIcon(RefStrings.MODID + ":rail_switch_sign_flipped");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityRailSwitch();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {0, 0, 7, 7, 1, 0};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 7;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TrackGauge getGauge(World world, int x, int y, int z) {
|
||||
return TrackGauge.STANDARD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCross(World world, int x, int y, int z, Vec3 from, Vec3 to, RailDef def) {
|
||||
TileEntityRailSwitch tile = (TileEntityRailSwitch) world.getTileEntity(x, y, z);
|
||||
if(tile == null) return true;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(tile.getBlockMetadata() - 10);
|
||||
|
||||
if(dir == Library.POS_X) if(from.xCoord < to.xCoord) return true;
|
||||
if(dir == Library.NEG_X) if(from.xCoord > to.xCoord) return true;
|
||||
if(dir == Library.POS_Z) if(from.zCoord < to.zCoord) return true;
|
||||
if(dir == Library.NEG_Z) if(from.zCoord > to.zCoord) return true;
|
||||
|
||||
if(dir == Library.POS_X) if(to.xCoord < x + 0.5 + 7) return true;
|
||||
if(dir == Library.NEG_X) if(to.xCoord > x + 0.5 - 7) return true;
|
||||
if(dir == Library.POS_Z) if(to.zCoord < z + 0.5 + 7) return true;
|
||||
if(dir == Library.NEG_Z) if(to.zCoord > z + 0.5 - 7) return true;
|
||||
|
||||
if(tile.isSwitched) {
|
||||
if("side".equals(def.name)) return true;
|
||||
} else {
|
||||
if("main".equals(def.name)) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
if(world.isRemote) return true;
|
||||
if(player.isSneaking()) return false;
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.train) return false;
|
||||
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos != null) {
|
||||
TileEntity tile = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
|
||||
if(tile instanceof TileEntityRailSwitch) {
|
||||
TileEntityRailSwitch sw = (TileEntityRailSwitch) tile;
|
||||
sw.isSwitched = !sw.isSwitched;
|
||||
sw.markDirty();
|
||||
world.markBlockForUpdate(pos[0], pos[1], pos[2]);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 snapAndMove(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info) {
|
||||
return super.snapAndMove(world, x, y, z, trainX, trainY, trainZ, motionX, motionY, motionZ, speed, info);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
if(!super.checkRequirement(world, x, y, z, dir, o)) return false;
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
dir = dir.getOpposite();
|
||||
|
||||
int dX = dir.offsetX;
|
||||
int dZ = dir.offsetZ;
|
||||
int rX = rot.offsetX;
|
||||
int rZ = rot.offsetZ;
|
||||
|
||||
for(int i = 0; i < 4; i++) if(!world.getBlock(x + dX * (2 + i) + rX * 2, y, z + dZ * (2 + i) + rZ * 2).isReplaceable(world, x + dX * (2 + i) + rX * 2, y, z + dZ * (2 + i) + rZ * 2)) return false;
|
||||
for(int i = 0; i < 2; i++) if(!world.getBlock(x + dX * (4 + i) + rX * 3, y, z + dZ * (4 + i) + rZ * 3).isReplaceable(world, x + dX * (4 + i) + rX * 3, y, z + dZ * (4 + i) + rZ * 3)) return false;
|
||||
if(!world.getBlock(x + dX * 5 + rX * 4, y, z + dZ * 5 + rZ * 4).isReplaceable(world, x + dX * 5 + rX * 4, y, z + dZ * 5 + rZ * 4)) return false;
|
||||
for(int j = 0; j < 2; j++) for(int i = 0; i < 2; i++) if(!world.getBlock(x + dX * (6 + j) + rX * (3 + i), y, z + dZ * (6 + j) + rZ * (3 + i)).isReplaceable(world, x + dX * (6 + j) + rX * (3 + i), y, z + dZ * (6 + j) + rZ * (3 + i))) return false;
|
||||
if(!world.getBlock(x + dX * 7 + rX * 5, y, z + dZ * 7 + rZ * 5).isReplaceable(world, x + dX * 7 + rX * 5, y, z + dZ * 7 + rZ * 5)) return false;
|
||||
for(int j = 0; j < 7; j++) for(int i = 0; i < 2; i++) if(!world.getBlock(x + dX * (8 + j) + rX * (4 + i), y, z + dZ * (8 + j) + rZ * (4 + i)).isReplaceable(world, x + dX * (8 + j) + rX * (4 + i), y, z + dZ * (8 + j) + rZ * (4 + i))) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
BlockDummyable.safeRem = true;
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
dir = dir.getOpposite();
|
||||
|
||||
int dX = dir.offsetX;
|
||||
int dZ = dir.offsetZ;
|
||||
int rX = rot.offsetX;
|
||||
int rZ = rot.offsetZ;
|
||||
|
||||
for(int i = 0; i < 4; i++) world.setBlock(x + dX * (2 + i) + rX * 1, y, z + dZ * (2 + i) + rZ * 1, this, rot.ordinal(), 3);
|
||||
for(int i = 0; i < 2; i++) world.setBlock(x + dX * (4 + i) + rX * 2, y, z + dZ * (4 + i) + rZ * 2, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 5 + rX * 3, y, z + dZ * 5 + rZ * 3, this, rot.ordinal(), 3);
|
||||
for(int j = 0; j < 2; j++) for(int i = 0; i < 2; i++) world.setBlock(x + dX * (6 + j) + rX * (2 + i), y, z + dZ * (6 + j) + rZ * (2 + i), this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 7 + rX * 4, y, z + dZ * 7 + rZ * 4, this, rot.ordinal(), 3);
|
||||
for(int j = 0; j < 7; j++) for(int i = 0; i < 2; i++) world.setBlock(x + dX * (8 + j) + rX * (3 + i), y, z + dZ * (8 + j) + rZ * (3 + i), this, dir.ordinal(), 3);
|
||||
|
||||
BlockDummyable.safeRem = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(Tessellator tessellator, Block block, int metadata) {
|
||||
GL11.glTranslated(0, -0.0625, 0);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(0.1, 0.1, 0.1);
|
||||
tessellator.startDrawingQuads();
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.rail_standard_switch_flipped, "Rail", this.blockIcon, tessellator, 0, false);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderWorld(Tessellator tessellator, Block block, int meta, IBlockAccess world, int x, int y, int z) {
|
||||
if(meta < 12) return;
|
||||
float rotation = 0;
|
||||
if(meta == 15) rotation = 90F / 180F * (float) Math.PI;
|
||||
if(meta == 12) rotation = 180F / 180F * (float) Math.PI;
|
||||
if(meta == 14) rotation = 270F / 180F * (float) Math.PI;
|
||||
if(meta == 12) tessellator.addTranslation(0.5F, 0F, 0F);
|
||||
if(meta == 13) tessellator.addTranslation(-0.5F, 0F, 0F);
|
||||
if(meta == 14) tessellator.addTranslation(0F, 0F, -0.5F);
|
||||
if(meta == 15) tessellator.addTranslation(0F, 0F, 0.5F);
|
||||
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.rail_standard_switch_flipped, "Rail", this.blockIcon, tessellator, rotation, true);
|
||||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if(tile instanceof TileEntityRailSwitch) {
|
||||
TileEntityRailSwitch sw = (TileEntityRailSwitch) tile;
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.rail_standard_switch_flipped, sw.isSwitched ? "SignTurn" : "SignStraight", this.iconSign, tessellator, rotation, true);
|
||||
}
|
||||
|
||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||
if(meta == 12) tessellator.addTranslation(-0.5F, 0F, 0F);
|
||||
if(meta == 13) tessellator.addTranslation(0.5F, 0F, 0F);
|
||||
if(meta == 14) tessellator.addTranslation(0F, 0F, 0.5F);
|
||||
if(meta == 15) tessellator.addTranslation(0F, 0F, -0.5F);
|
||||
}
|
||||
}
|
||||
@ -25,6 +25,7 @@ public class CommonConfig {
|
||||
public static final String CATEGORY_HAZARD = "14_hazard";
|
||||
public static final String CATEGORY_STRUCTURES = "15_structures";
|
||||
public static final String CATEGORY_POLLUTION = "16_pollution";
|
||||
public static final String CATEGORY_BIOMES = "17_biomes";
|
||||
|
||||
public static final String CATEGORY_528 = "528";
|
||||
public static final String CATEGORY_LBSM = "LESS BULLSHIT MODE";
|
||||
|
||||
@ -55,13 +55,8 @@ public class FalloutConfigJSON {
|
||||
private static void initDefault() {
|
||||
|
||||
double woodEffectRange = 65D;
|
||||
/* destroy all leaves within the radios, kill all leaves outside of it */
|
||||
entries.add(new FalloutEntry() .mB(Blocks.leaves) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
||||
entries.add(new FalloutEntry() .mB(Blocks.leaves2) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
||||
entries.add(new FalloutEntry() .mB(ModBlocks.waste_leaves) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
||||
entries.add(new FalloutEntry() .mB(Blocks.leaves) .prim(new Triplet(ModBlocks.waste_leaves, 0, 1)) .min(woodEffectRange));
|
||||
entries.add(new FalloutEntry() .mB(Blocks.leaves2) .prim(new Triplet(ModBlocks.waste_leaves, 0, 1)) .min(woodEffectRange));
|
||||
|
||||
/* petrify all wooden things possible */
|
||||
entries.add(new FalloutEntry() .mB(Blocks.log) .prim(new Triplet(ModBlocks.waste_log, 0, 1)) .max(woodEffectRange));
|
||||
entries.add(new FalloutEntry() .mB(Blocks.log2) .prim(new Triplet(ModBlocks.waste_log, 0, 1)) .max(woodEffectRange));
|
||||
entries.add(new FalloutEntry() .mB(Blocks.red_mushroom_block).mM(10) .prim(new Triplet(ModBlocks.waste_log, 0, 1)) .max(woodEffectRange));
|
||||
@ -69,24 +64,33 @@ public class FalloutConfigJSON {
|
||||
entries.add(new FalloutEntry() .mB(Blocks.red_mushroom_block) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
||||
entries.add(new FalloutEntry() .mB(Blocks.brown_mushroom_block) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
||||
entries.add(new FalloutEntry() .mB(Blocks.planks) .prim(new Triplet(ModBlocks.waste_planks, 0, 1)) .max(woodEffectRange));
|
||||
|
||||
FalloutEntry stoneCore = new FalloutEntry().prim(new Triplet(ModBlocks.sellafield, 1, 1)).max(5).sol(true);
|
||||
FalloutEntry stoneInner = new FalloutEntry().prim(new Triplet(ModBlocks.sellafield, 0, 1)).min(5).max(15).sol(true);
|
||||
FalloutEntry stoneOuter = new FalloutEntry().prim(new Triplet(ModBlocks.sellafield_slaked, 0, 1)).min(15).max(50).sol(true);
|
||||
/* if it can't be petrified, destroy it */
|
||||
entries.add(new FalloutEntry() .mMa(Material.wood) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
||||
/* destroy all leaves within the radios, kill all leaves outside of it */
|
||||
entries.add(new FalloutEntry() .mMa(Material.leaves) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
||||
entries.add(new FalloutEntry() .mMa(Material.plants) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
||||
entries.add(new FalloutEntry() .mB(ModBlocks.waste_leaves) .prim(new Triplet(Blocks.air, 0, 1)) .max(woodEffectRange));
|
||||
entries.add(new FalloutEntry() .mB(Blocks.leaves) .prim(new Triplet(ModBlocks.waste_leaves, 0, 1)) .min(woodEffectRange));
|
||||
entries.add(new FalloutEntry() .mB(Blocks.leaves2) .prim(new Triplet(ModBlocks.waste_leaves, 0, 1)) .min(woodEffectRange));
|
||||
|
||||
entries.add(stoneCore.clone().mB(Blocks.stone));
|
||||
entries.add(stoneInner.clone().mB(Blocks.stone));
|
||||
|
||||
entries.add(new FalloutEntry().prim(new Triplet(ModBlocks.sellafield_slaked, 0, 1)).max(35).sol(true).mMa(Material.ground));
|
||||
|
||||
//FalloutEntry stoneCore = new FalloutEntry().prim(new Triplet(ModBlocks.sellafield, 1, 1)).max(5).sol(true);
|
||||
//FalloutEntry stoneInner = new FalloutEntry().prim(new Triplet(ModBlocks.sellafield, 0, 1)).min(5).max(15).sol(true);
|
||||
FalloutEntry stoneOuter = new FalloutEntry().prim(new Triplet(ModBlocks.sellafield_slaked, 0, 1)).max(50).sol(true);
|
||||
|
||||
//entries.add(stoneCore.clone().mB(Blocks.stone));
|
||||
//entries.add(stoneInner.clone().mB(Blocks.stone));
|
||||
entries.add(stoneOuter.clone().mB(Blocks.stone));
|
||||
entries.add(stoneCore.clone().mB(Blocks.gravel));
|
||||
entries.add(stoneInner.clone().mB(Blocks.gravel));
|
||||
//entries.add(stoneCore.clone().mB(Blocks.gravel));
|
||||
//entries.add(stoneInner.clone().mB(Blocks.gravel));
|
||||
entries.add(stoneOuter.clone().mB(Blocks.gravel));
|
||||
/* recontaminate slaked sellafield */
|
||||
entries.add(stoneCore.clone().mB(ModBlocks.sellafield_slaked));
|
||||
entries.add(stoneInner.clone().mB(ModBlocks.sellafield_slaked));
|
||||
//entries.add(stoneCore.clone().mB(ModBlocks.sellafield_slaked));
|
||||
//entries.add(stoneInner.clone().mB(ModBlocks.sellafield_slaked));
|
||||
|
||||
entries.add(new FalloutEntry()
|
||||
.mB(Blocks.grass)
|
||||
.prim(new Triplet(ModBlocks.waste_earth, 0, 1)));
|
||||
//entries.add(new FalloutEntry().mB(Blocks.grass).prim(new Triplet(ModBlocks.waste_earth, 0, 1)));
|
||||
entries.add(new FalloutEntry()
|
||||
.mB(Blocks.mycelium)
|
||||
.prim(new Triplet(ModBlocks.waste_mycelium, 0, 1)));
|
||||
@ -125,14 +129,14 @@ public class FalloutConfigJSON {
|
||||
/// COMPAT ///
|
||||
Block deepslate = Compat.tryLoadBlock(Compat.MOD_EF, "deepslate");
|
||||
if(deepslate != null) { //identical to stone
|
||||
entries.add(stoneCore.clone().mB(deepslate));
|
||||
entries.add(stoneInner.clone().mB(deepslate));
|
||||
//entries.add(stoneCore.clone().mB(deepslate));
|
||||
//entries.add(stoneInner.clone().mB(deepslate));
|
||||
entries.add(stoneOuter.clone().mB(deepslate));
|
||||
}
|
||||
Block stone = Compat.tryLoadBlock(Compat.MOD_EF, "stone");
|
||||
if(stone != null) { //identical to stone
|
||||
entries.add(stoneCore.clone().mB(stone));
|
||||
entries.add(stoneInner.clone().mB(stone));
|
||||
//entries.add(stoneCore.clone().mB(stone));
|
||||
//entries.add(stoneInner.clone().mB(stone));
|
||||
entries.add(stoneOuter.clone().mB(stone));
|
||||
}
|
||||
}
|
||||
@ -191,6 +195,7 @@ public class FalloutConfigJSON {
|
||||
private double minDist = 0.0D;
|
||||
private double maxDist = 100.0D;
|
||||
|
||||
/** Whether the depth value should be decremented when this block is converted */
|
||||
private boolean isSolid = false;
|
||||
|
||||
public FalloutEntry clone() {
|
||||
|
||||
@ -59,7 +59,7 @@ public class MobConfig {
|
||||
public static boolean rampantMode = false;
|
||||
public static boolean rampantNaturalScoutSpawn = false;
|
||||
public static double rampantScoutSpawnThresh = 20;
|
||||
public static int rampantScoutSpawnChance = 1000;
|
||||
public static int rampantScoutSpawnChance = 600;
|
||||
public static boolean scoutInitialSpawn = false;
|
||||
public static boolean rampantExtendedTargetting = false;
|
||||
public static boolean rampantDig = false;
|
||||
@ -154,8 +154,8 @@ public class MobConfig {
|
||||
config.addCustomCategoryComment(CATEGORY, "The individual features of rampant can be used regardless of whether the main rampant toggle is enabled or not");
|
||||
|
||||
rampantNaturalScoutSpawn = CommonConfig.createConfigBool(config, CATEGORY,"12.R02_rampantScoutSpawn", "Whether scouts should spawn natually in highly polluted chunks", false);
|
||||
rampantScoutSpawnChance = CommonConfig.createConfigInt(config, CATEGORY, "12.R02.1_rampantScoutSpawnChance", "How much soot is needed for scouts to naturally spawn", 20);
|
||||
rampantScoutSpawnThresh = CommonConfig.createConfigDouble(config, CATEGORY, "12.R02.2_rampantScoutSpawnThresh", "How often scouts naturally spawn per mob population, 1/x format, the bigger the number, the more uncommon the scouts", 600);
|
||||
rampantScoutSpawnThresh = CommonConfig.createConfigDouble(config, CATEGORY, "12.R02.1_rampantScoutSpawnThresh", "How much soot is needed for scouts to naturally spawn", 20);
|
||||
rampantScoutSpawnChance = CommonConfig.createConfigInt(config, CATEGORY, "12.R02.2_rampantScoutSpawnChance", "How often scouts naturally spawn per mob population, 1/x format, the bigger the number, the more uncommon the scouts", 600);
|
||||
rampantExtendedTargetting = CommonConfig.createConfigBool(config, CATEGORY,"12.R03_rampantExtendedTargeting", "Whether Glyphids should have the extended targetting always enabled", false);
|
||||
rampantDig = CommonConfig.createConfigBool(config, CATEGORY,"12.R04_rampantDig", "Whether Glyphids should be able to dig to waypoints", false);
|
||||
rampantGlyphidGuidance = CommonConfig.createConfigBool(config, CATEGORY,"12.R05_rampantGlyphidGuidance", "Whether Glyphids should always expand toward a player's spawnpoint", false);
|
||||
|
||||
@ -107,6 +107,10 @@ public class WorldConfig {
|
||||
public static int meteorStrikeChance = 20 * 60 * 180;
|
||||
public static int meteorShowerChance = 20 * 60 * 5;
|
||||
public static int meteorShowerDuration = 6000;
|
||||
|
||||
public static int craterBiomeId = 80;
|
||||
public static int craterBiomeInnerId = 81;
|
||||
public static int craterBiomeOuterId = 82;
|
||||
|
||||
public static void loadFromConfig(Configuration config) {
|
||||
|
||||
@ -218,6 +222,11 @@ public class WorldConfig {
|
||||
meteorShowerChance = CommonConfig.createConfigInt(config, CATEGORY_METEOR, "5.04_meteorShowerChance", "The probability of a meteor spawning during meteor shower (an average of once every nTH ticks)", 20 * 60 * 15);
|
||||
meteorShowerDuration = CommonConfig.createConfigInt(config, CATEGORY_METEOR, "5.05_meteorShowerDuration", "Max duration of meteor shower in ticks", 20 * 60 * 30);
|
||||
|
||||
final String CATEGORY_BIOMES = CommonConfig.CATEGORY_BIOMES;
|
||||
craterBiomeId = CommonConfig.createConfigInt(config, CATEGORY_METEOR, "17.00_craterBiomeId", "The numeric ID for the crater biome", 80);
|
||||
craterBiomeInnerId = CommonConfig.createConfigInt(config, CATEGORY_METEOR, "17.01_craterBiomeInnerId", "The numeric ID for the inner crater biome", 81);
|
||||
craterBiomeOuterId = CommonConfig.createConfigInt(config, CATEGORY_METEOR, "17.02_craterBiomeOuterId", "The numeric ID for the outer crater biome", 82);
|
||||
|
||||
radioStructure = CommonConfig.setDefZero(radioStructure, 1000);
|
||||
antennaStructure = CommonConfig.setDefZero(antennaStructure, 1000);
|
||||
atomStructure = CommonConfig.setDefZero(atomStructure, 1000);
|
||||
|
||||
@ -124,7 +124,7 @@ public class ArmorRecipes {
|
||||
//Jetpacks
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.jetpack_fly, 1), new Object[] { "ACA", "TLT", "D D", 'A', AL.plate(), 'C', ModItems.circuit_targeting_tier1, 'T', ModItems.tank_steel, 'L', Items.leather, 'D', ModItems.thruster_small });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.jetpack_break, 1), new Object[] { "ICI", "TJT", "I I", 'C', ModItems.circuit_targeting_tier2, 'T', ModItems.ingot_dura_steel, 'J', ModItems.jetpack_fly, 'I', ModItems.plate_polymer });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.jetpack_vector, 1), new Object[] { "TCT", "MJM", "B B", 'C', ModItems.circuit_targeting_tier3, 'T', ModItems.tank_steel, 'J', ModItems.jetpack_break, 'M', ModItems.motor, 'B', ModItems.bolt_dura_steel });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.jetpack_vector, 1), new Object[] { "TCT", "MJM", "B B", 'C', ModItems.circuit_targeting_tier3, 'T', ModItems.tank_steel, 'J', ModItems.jetpack_break, 'M', ModItems.motor, 'B', DURA.bolt() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.jetpack_boost, 1), new Object[] { "PCP", "DJD", "PAP", 'C', ModItems.circuit_targeting_tier4, 'P', BIGMT.plate(), 'D', DESH.ingot(), 'J', ModItems.jetpack_vector, 'A', ModItems.board_copper });
|
||||
|
||||
//Hazmat
|
||||
|
||||
@ -50,8 +50,8 @@ public class ConsumableRecipes {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.balefire_and_ham, 1), new Object[] { ModItems.balefire_scrambled, Items.cooked_beef });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.med_ipecac, 1), new Object[] { Items.glass_bottle, Items.nether_wart });
|
||||
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.pancake, 1), new Object[] { REDSTONE.dust(), DIAMOND.dust(), Items.wheat, STEEL.bolt(), ModItems.wire_copper, STEEL.plate() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.pancake, 1), new Object[] { REDSTONE.dust(), EMERALD.dust(), Items.wheat, STEEL.bolt(), 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, 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 });
|
||||
@ -170,8 +170,8 @@ public class ConsumableRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.insert_yharonite, 1), new Object[] { "YIY", "IYI", "YIY", 'Y', ModItems.billet_yharonite, 'I', ModItems.insert_du });
|
||||
|
||||
//Servos
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.servo_set, 1), new Object[] { "MBM", "PBP", "MBM", 'M', ModItems.motor, 'B', ModItems.bolt_tungsten, 'P', IRON.plate() });
|
||||
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 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.servo_set, 1), new Object[] { "MBM", "PBP", "MBM", 'M', ModItems.motor, 'B', STEEL.bolt(), 'P', IRON.plate() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.servo_set_desh, 1), new Object[] { "MBM", "PSP", "MBM", 'M', ModItems.motor_desh, 'B', DURA.bolt(), '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', ANY_RUBBER.ingot(), 'G', KEY_ANYPANE, 'F', IRON.plate() });
|
||||
|
||||
@ -62,10 +62,10 @@ public class ToolRecipes {
|
||||
addShovel( DESH.ingot(), ModItems.desh_shovel);
|
||||
addHoe( DESH.ingot(), ModItems.desh_hoe);
|
||||
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_sword, 1), new Object[] { "RPR", "RPR", " B ", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', ModItems.bolt_dura_steel, 'M', ModItems.motor, 'B', ModItems.battery_lithium });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_pickaxe, 1), new Object[] { "RDM", " PB", " P ", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', ModItems.bolt_dura_steel, 'M', ModItems.motor, 'B', ModItems.battery_lithium });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_axe, 1), new Object[] { " DP", "RRM", " PB", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', ModItems.bolt_dura_steel, 'M', ModItems.motor, 'B', ModItems.battery_lithium });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_shovel, 1), new Object[] { " P", "RRM", " B", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', ModItems.bolt_dura_steel, 'M', ModItems.motor, 'B', ModItems.battery_lithium });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_sword, 1), new Object[] { "RPR", "RPR", " B ", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', ModItems.battery_lithium });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_pickaxe, 1), new Object[] { "RDM", " PB", " P ", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', ModItems.battery_lithium });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_axe, 1), new Object[] { " DP", "RRM", " PB", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', ModItems.battery_lithium });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_shovel, 1), new Object[] { " P", "RRM", " B", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', ModItems.battery_lithium });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.centri_stick, 1), new Object[] { ModItems.centrifuge_element, ModItems.energy_core, KEY_STICK });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.smashing_hammer, 1), new Object[] { "STS", "SPS", " P ", 'S', STEEL.block(), 'T', W.block(), 'P', ANY_PLASTIC.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.meteorite_sword, 1), new Object[] { " B", "GB ", "SG ", 'B', ModItems.blade_meteorite, 'G', GOLD.plate(), 'S', KEY_STICK });
|
||||
@ -76,10 +76,10 @@ public class ToolRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.drax_mk3, 1), new Object[] { "ECE", "CDC", "SBS", 'E', ModBlocks.block_euphemium_cluster, 'C', ModItems.crystal_schrabidium, 'D', ModItems.drax_mk2, 'S', ModItems.circuit_targeting_tier6, 'B', ItemBattery.getFullBattery(ModItems.battery_spark) });
|
||||
|
||||
//Super pickaxes
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bismuth_pickaxe, 1), new Object[] { " BM", "BPB", "TB ", 'B', ModItems.ingot_bismuth, 'M', ModItems.ingot_meteorite, 'P', ModItems.starmetal_pickaxe, 'T', ModItems.bolt_tungsten });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.volcanic_pickaxe, 1), new Object[] { " BM", "BPB", "TB ", 'B', ModItems.gem_volcanic, 'M', ModItems.ingot_meteorite, 'P', ModItems.starmetal_pickaxe, 'T', ModItems.bolt_tungsten });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.chlorophyte_pickaxe, 1), new Object[] { " SD", "APS", "FA ", 'S', ModItems.blades_steel, 'D', ModItems.powder_chlorophyte, 'A', FIBER.ingot(), 'P', ModItems.bismuth_pickaxe, 'F', ModItems.bolt_dura_steel });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.chlorophyte_pickaxe, 1), new Object[] { " SD", "APS", "FA ", 'S', ModItems.blades_steel, 'D', ModItems.powder_chlorophyte, 'A', FIBER.ingot(), 'P', ModItems.volcanic_pickaxe, 'F', ModItems.bolt_dura_steel });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bismuth_pickaxe, 1), new Object[] { " BM", "BPB", "TB ", 'B', ModItems.ingot_bismuth, 'M', ModItems.ingot_meteorite, 'P', ModItems.starmetal_pickaxe, 'T', W.bolt() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.volcanic_pickaxe, 1), new Object[] { " BM", "BPB", "TB ", 'B', ModItems.gem_volcanic, 'M', ModItems.ingot_meteorite, 'P', ModItems.starmetal_pickaxe, 'T', W.bolt() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.chlorophyte_pickaxe, 1), new Object[] { " SD", "APS", "FA ", 'S', ModItems.blades_steel, 'D', ModItems.powder_chlorophyte, 'A', FIBER.ingot(), 'P', ModItems.bismuth_pickaxe, 'F', DURA.bolt() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.chlorophyte_pickaxe, 1), new Object[] { " SD", "APS", "FA ", 'S', ModItems.blades_steel, 'D', ModItems.powder_chlorophyte, 'A', FIBER.ingot(), 'P', ModItems.volcanic_pickaxe, 'F', DURA.bolt() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.mese_pickaxe, 1), new Object[] { " SD", "APS", "FA ", 'S', ModItems.blades_desh, 'D', ModItems.powder_dineutronium, 'A', ModItems.plate_paa, 'P', ModItems.chlorophyte_pickaxe, 'F', ModItems.shimmer_handle });
|
||||
|
||||
//Chainsaws
|
||||
@ -124,7 +124,7 @@ public class ToolRecipes {
|
||||
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', ANY_RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.reacher, 1), new Object[] { "BIB", "P P", "B B", 'B', W.bolt(), '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() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.sat_relay), new Object[] { ModItems.sat_chip, ModItems.ducttape, ModItems.radar_linker });
|
||||
|
||||
@ -75,7 +75,7 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_panzerschreck, 1), new Object[] { "SSS", " MW", 'S', ModItems.hull_small_steel, 'W', CU.plate(), 'M', ModItems.mechanism_launcher_1 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_karl, 1), new Object[] { "SSW", " MW", 'S', ModItems.hull_small_steel, 'W', ALLOY.plate(), 'M', ModItems.mechanism_launcher_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_quadro, 1), new Object[] { "SSS", "SSS", "CM ", 'S', ModItems.hull_small_steel, 'C', ModItems.circuit_targeting_tier3, 'M', ModItems.mechanism_launcher_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_hk69, 1), new Object[] { "SSI", " MB", 'S', ModItems.hull_small_steel, 'I', IRON.ingot(), 'M', ModItems.mechanism_launcher_1, 'B', ModItems.bolt_tungsten });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_hk69, 1), new Object[] { "SSI", " MB", 'S', ModItems.hull_small_steel, 'I', IRON.ingot(), 'M', ModItems.mechanism_launcher_1, 'B', STEEL.bolt() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_congolake, 1), new Object[] { "HHR", "WLW", 'H', ModItems.hull_small_aluminium, 'R', ModItems.mechanism_rifle_1, 'W', KEY_LOG, 'L', ModItems.mechanism_launcher_1 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_stinger, 1), new Object[] { "SSW", "CMW", 'S', STEEL.plate(), 'W', TI.plate(), 'C', ModItems.circuit_red_copper, 'M', ModItems.mechanism_launcher_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_stinger_rocket, 4), new Object[] { "SS ", "STI", " IR", 'S', STEEL.plate(), 'T', Item.getItemFromBlock(Blocks.tnt), 'I', AL.plate(), 'R', REDSTONE.dust() });
|
||||
@ -88,12 +88,12 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_blackjack, 1), new Object[] { "SSP", " TI", 'S', STEEL.plate(), 'P', ModItems.mechanism_revolver_2, 'T', ModItems.wire_tungsten, 'I', KEY_PLANKS });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_silver, 1), new Object[] { "SSP", " TI", 'S', AL.plate(), 'P', ModItems.mechanism_revolver_2, 'T', ModItems.wire_tungsten, 'I', KEY_PLANKS });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_red, 1), new Object[] { "R ", " B", 'R', ModItems.key_red, 'B', ModItems.gun_revolver_blackjack });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_deagle, 1), new Object[] { "PPM", " BI", 'P', STEEL.plate(), 'B', ModItems.bolt_tungsten, 'I', ANY_PLASTIC.ingot(), 'M', ModItems.mechanism_rifle_1 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_uac_pistol, 1), new Object[] { "IIM", " BI", 'B', ModItems.bolt_dura_steel, 'I', ANY_PLASTIC.ingot(), 'M', ModItems.mechanism_rifle_1 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_deagle, 1), new Object[] { "PPM", " BI", 'P', STEEL.plate(), 'B', STEEL.bolt(), 'I', ANY_PLASTIC.ingot(), 'M', ModItems.mechanism_rifle_1 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_uac_pistol, 1), new Object[] { "IIM", " BI", 'B', DURA.bolt(), 'I', ANY_PLASTIC.ingot(), 'M', ModItems.mechanism_rifle_1 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_cursed, 1), new Object[] { "TTM", "SRI", 'S', STEEL.plate(), 'I', STEEL.ingot(), 'R', ModItems.wire_red_copper, 'T', TI.plate(), 'M', ModItems.mechanism_revolver_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_nightmare, 1), new Object[] { "SEM", " RW", 'S', STEEL.plate(), 'W', KEY_PLANKS, 'R', ModItems.wire_aluminium, 'E', ModItems.powder_power, 'M', ModItems.mechanism_revolver_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_nightmare2, 1), new Object[] { "SSM", "RRW", 'S', OreDictManager.getReflector(), 'W', W.ingot(), 'R', ModItems.wire_gold, 'M', ModItems.mechanism_special });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_bio_revolver, 1), new Object[] { "SSM", "BTW", 'S', STEEL.plate(), 'M', ModItems.mechanism_revolver_2, 'B', B.ingot(), 'T', ModItems.bolt_tungsten, 'W', KEY_LOG });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_bio_revolver, 1), new Object[] { "SSM", "BTW", 'S', STEEL.plate(), 'M', ModItems.mechanism_revolver_2, 'B', B.ingot(), 'T', W.bolt(), 'W', KEY_LOG });
|
||||
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 });
|
||||
@ -144,9 +144,9 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_b93), new Object[] { "PCE", "SEB", "PCE", 'P', ModItems.plate_dineutronium, 'C', ModItems.weaponized_starblaster_cell, 'E', ModItems.component_emitter, 'B', ModItems.gun_b92, 'S', ModItems.singularity_spark });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_b92_ammo, 1), new Object[] { "PSP", "ESE", "PSP", 'P', STEEL.plate(), 'S', STAR.ingot(), 'E', ModItems.powder_spark_mix });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.weaponized_starblaster_cell, 1), new Object[] { new ItemStack(ModItems.fluid_tank_full, 1, Fluids.ACID.getID()), GunB92Cell.getFullCell(), ModItems.wire_copper });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_uzi, 1), new Object[] { "SMS", " PB", " P ", 'S', STEEL.ingot(), 'M', ModItems.mechanism_rifle_2, 'P', STEEL.plate(), 'B', ModItems.bolt_dura_steel });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_uzi, 1), new Object[] { "SMS", " PB", " P ", 'S', STEEL.ingot(), 'M', ModItems.mechanism_rifle_2, 'P', STEEL.plate(), 'B', DURA.bolt() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_uzi_silencer, 1), new Object[] { "P ", " P ", " U", 'P', ANY_PLASTIC.ingot(), 'U', ModItems.gun_uzi });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_uzi_saturnite, 1), new Object[] { "SMS", " PB", " P ", 'S', BIGMT.ingot(), 'M', ModItems.mechanism_rifle_2, 'P', BIGMT.plate(), 'B', ModItems.bolt_tungsten });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_uzi_saturnite, 1), new Object[] { "SMS", " PB", " P ", 'S', BIGMT.ingot(), 'M', ModItems.mechanism_rifle_2, 'P', BIGMT.plate(), 'B', W.bolt() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_uzi_saturnite_silencer, 1), new Object[] { "P ", " P ", " U", 'P', ANY_PLASTIC.ingot(), 'U', ModItems.gun_uzi_saturnite });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_bolter, 1), new Object[] { "SSM", "PIP", " I ", 'S', BIGMT.plate(), 'I', BIGMT.ingot(), 'M', ModItems.mechanism_special, 'P', ANY_PLASTIC.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_calamity, 1), new Object[] { " PI", "BBM", " PI", 'P', IRON.plate(), 'B', ModItems.pipes_steel, 'M', ModItems.mechanism_rifle_1, 'I', STEEL.ingot() });
|
||||
@ -156,8 +156,8 @@ public class WeaponRecipes {
|
||||
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', 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()});
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_fireext, 1), new Object[] { "HB", " T", 'H', ModItems.hull_small_steel, 'B', STEEL.bolt(), 'T', ModItems.tank_steel });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_spas12, 1), new Object[] { "TPS", "HHR", " L", 'T', STEEL.bolt(), 'P', STEEL.plate(), 'S', STEEL.ingot(), 'H', ModItems.hull_small_steel, 'R', ModItems.mechanism_rifle_1, 'L', ANY_PLASTIC.ingot()});
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_glass_cannon, 1), new Object[] { "GGC", "GTM", 'G', Item.getItemFromBlock(ModBlocks.glass_quartz), 'C', ModItems.battery_lithium_cell, 'T', ModItems.crt_display, 'M', ModItems.mechanism_special });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_remington, 1), new Object[] { "PPM", "S L", 'P', STEEL.plate(), 'M', ModItems.mechanism_rifle_1, 'S', KEY_SLAB, 'L', KEY_LOG });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_benelli), new Object[] { "HHP", "SSM", "AAP", 'H', ModItems.ingot_dura_steel, 'S', ModItems.hull_small_steel, 'A', ModItems.hull_small_aluminium, 'P', ModItems.ingot_polymer, 'M', ModItems.mechanism_rifle_2 });
|
||||
@ -329,14 +329,14 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV_SPECIAL), new Object[] { "CBC", "MCM", "CBC", 'C', ModItems.canned_conserve.stackFromEnum(EnumFoodType.JIZZ), 'B', ModItems.ammo_nuke.stackFromEnum(AmmoFatman.BALEFIRE), 'M', ModItems.ammo_nuke.stackFromEnum(AmmoFatman.MIRV) });
|
||||
|
||||
//Flamer fuel
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.DIESEL), new Object[] { " P ", "BDB", " P ", 'P', STEEL.plate(), 'B', ModItems.bolt_tungsten, 'D', Fluids.DIESEL.getDict(1000) });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.NAPALM), new Object[] { " P ", "BDB", " P ", 'P', STEEL.plate(), 'B', ModItems.bolt_tungsten, 'D', ModItems.canister_napalm });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.DIESEL), new Object[] { " P ", "BDB", " P ", 'P', STEEL.plate(), 'B', STEEL.bolt(), 'D', Fluids.DIESEL.getDict(1000) });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.NAPALM), new Object[] { " P ", "BDB", " P ", 'P', STEEL.plate(), 'B', STEEL.bolt(), 'D', ModItems.canister_napalm });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.PHOSPHORUS), new Object[] { "CPC", "CDC", "CPC", 'C', COAL.dust(), 'P', P_WHITE.ingot(), 'D', ModItems.ammo_fuel });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.CHLORINE), new Object[] { "PDP", "BDB", "PDP", 'P', STEEL.plate(), 'B', ModItems.bolt_tungsten, 'D', ModItems.pellet_gas });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.CHLORINE), new Object[] { "PDP", "BDB", "PDP", 'P', STEEL.plate(), 'B', STEEL.bolt(), 'D', ModItems.pellet_gas });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.VAPORIZER), new Object[] { "PSP", "SNS", "PSP", 'P', P_WHITE.ingot(), 'S', ModItems.crystal_sulfur, 'N', ModItems.ammo_fuel.stackFromEnum(AmmoFlamethrower.NAPALM) });
|
||||
|
||||
//Fire Extingusisher Tanks
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_fireext, 1), new Object[] { " P ", "BDB", " P ", 'P', STEEL.plate(), 'B', ModItems.bolt_tungsten, 'D', new ItemStack(ModItems.fluid_tank_full, 1, Fluids.WATER.getID()) });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_fireext, 1), new Object[] { " P ", "BDB", " P ", 'P', STEEL.plate(), 'B', STEEL.bolt(), 'D', new ItemStack(ModItems.fluid_tank_full, 1, Fluids.WATER.getID()) });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_fireext.stackFromEnum(AmmoFireExt.FOAM), new Object[] { " N ", "NFN", " N ", 'N', KNO.dust(), 'F', ModItems.ammo_fireext });
|
||||
CraftingManager.addRecipeAuto(ModItems.ammo_fireext.stackFromEnum(AmmoFireExt.SAND), new Object[] { "NNN", "NFN", "NNN", 'N', ModBlocks.sand_boron, 'F', ModItems.ammo_fireext });
|
||||
|
||||
|
||||
@ -223,6 +223,7 @@ public class EntityMappings {
|
||||
addEntity(EntityAcidBomb.class, "entity_acid_bomb", 1000);
|
||||
addEntity(EntityFallingBlockNT.class, "entity_falling_block_nt", 1000);
|
||||
addEntity(EntityBoatRubber.class, "entity_rubber_boat", 250, false);
|
||||
addEntity(EntityMissileStealth.class, "entity_missile_stealth", 1000);
|
||||
|
||||
addEntity(EntityItemWaste.class, "entity_item_waste", 100);
|
||||
addEntity(EntityItemBuoyant.class, "entity_item_buoyant", 100);
|
||||
|
||||
@ -6,6 +6,8 @@ import com.hbm.config.FalloutConfigJSON;
|
||||
import com.hbm.config.FalloutConfigJSON.FalloutEntry;
|
||||
import com.hbm.entity.item.EntityFallingBlockNT;
|
||||
import com.hbm.saveddata.AuxSavedData;
|
||||
import com.hbm.world.WorldUtil;
|
||||
import com.hbm.world.biome.BiomeGenCraterBase;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -15,6 +17,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.storage.WorldInfo;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@ -55,24 +58,40 @@ public class EntityFalloutRain extends Entity {
|
||||
long chunkPos = chunksToProcess.remove(chunksToProcess.size() - 1); // Just so it doesn't shift the whole list every time
|
||||
int chunkPosX = (int) (chunkPos & Integer.MAX_VALUE);
|
||||
int chunkPosZ = (int) (chunkPos >> 32 & Integer.MAX_VALUE);
|
||||
boolean biomeModified = false;
|
||||
for(int x = chunkPosX << 4; x <= (chunkPosX << 4) + 16; x++) {
|
||||
for(int z = chunkPosZ << 4; z <= (chunkPosZ << 4) + 16; z++) {
|
||||
stomp(x, z, Math.hypot(x - posX, z - posZ) * 100 / getScale());
|
||||
double percent = Math.hypot(x - posX, z - posZ) * 100 / getScale();
|
||||
stomp(x, z, percent);
|
||||
BiomeGenBase biome = getBiomeChange(percent, getScale());
|
||||
if(biome != null) {
|
||||
WorldUtil.setBiome(worldObj, x, z, biome);
|
||||
biomeModified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(biomeModified) WorldUtil.syncBiomeChange(worldObj, chunkPosX << 4, chunkPosZ << 4);
|
||||
|
||||
} else if (!outerChunksToProcess.isEmpty()) {
|
||||
long chunkPos = outerChunksToProcess.remove(outerChunksToProcess.size() - 1);
|
||||
int chunkPosX = (int) (chunkPos & Integer.MAX_VALUE);
|
||||
int chunkPosZ = (int) (chunkPos >> 32 & Integer.MAX_VALUE);
|
||||
boolean biomeModified = false;
|
||||
for(int x = chunkPosX << 4; x <= (chunkPosX << 4) + 16; x++) {
|
||||
for(int z = chunkPosZ << 4; z <= (chunkPosZ << 4) + 16; z++) {
|
||||
double distance = Math.hypot(x - posX, z - posZ);
|
||||
if(distance <= getScale()) {
|
||||
stomp(x, z, distance * 100 / getScale());
|
||||
double percent = distance * 100 / getScale();
|
||||
stomp(x, z, percent);
|
||||
BiomeGenBase biome = getBiomeChange(percent, getScale());
|
||||
if(biome != null) {
|
||||
WorldUtil.setBiome(worldObj, x, z, biome);
|
||||
biomeModified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(biomeModified) WorldUtil.syncBiomeChange(worldObj, chunkPosX << 4, chunkPosZ << 4);
|
||||
|
||||
} else {
|
||||
setDead();
|
||||
@ -93,6 +112,13 @@ public class EntityFalloutRain extends Entity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static BiomeGenBase getBiomeChange(double dist, int scale) {
|
||||
if(scale >= 150 && dist < 15) return BiomeGenCraterBase.craterInnerBiome;
|
||||
if(scale >= 100 && dist < 50) return BiomeGenCraterBase.craterBiome;
|
||||
if(scale >= 25) return BiomeGenCraterBase.craterOuterBiome;
|
||||
return null;
|
||||
}
|
||||
|
||||
private final List<Long> chunksToProcess = new ArrayList<>();
|
||||
private final List<Long> outerChunksToProcess = new ArrayList<>();
|
||||
@ -123,25 +149,21 @@ public class EntityFalloutRain extends Entity {
|
||||
Collections.reverse(outerChunksToProcess);
|
||||
}
|
||||
|
||||
//private List<int[]> changedPositions = new ArrayList();
|
||||
|
||||
// TODO cache chunks?
|
||||
private void stomp(int x, int z, double dist) {
|
||||
|
||||
int depth = 0;
|
||||
|
||||
for(int y = 255; y >= 0; y--) {
|
||||
|
||||
if(depth >= 3)
|
||||
return;
|
||||
if(depth >= 3) return;
|
||||
|
||||
Block b = worldObj.getBlock(x, y, z);
|
||||
|
||||
if(b.getMaterial() == Material.air) continue;
|
||||
|
||||
Block ab = worldObj.getBlock(x, y + 1, z);
|
||||
int meta = worldObj.getBlockMetadata(x, y, z);
|
||||
|
||||
if(b.getMaterial() == Material.air)
|
||||
continue;
|
||||
|
||||
if(b != ModBlocks.fallout && (ab == Blocks.air || (ab.isReplaceable(worldObj, x, y + 1, z) && !ab.getMaterial().isLiquid()))) {
|
||||
|
||||
double d = dist / 100;
|
||||
@ -161,6 +183,10 @@ public class EntityFalloutRain extends Entity {
|
||||
|
||||
for(FalloutEntry entry : FalloutConfigJSON.entries) {
|
||||
|
||||
if(b == Blocks.grass) {
|
||||
break;
|
||||
}
|
||||
|
||||
if(entry.eval(worldObj, x, y, z, b, meta, dist)) {
|
||||
if(entry.isSolid()) {
|
||||
depth++;
|
||||
|
||||
@ -63,7 +63,7 @@ public class EntityNukeExplosionMK5 extends EntityExplosionChunkloading {
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote && fallout && explosion != null && this.ticksExisted < 10) {
|
||||
radiate(500_000, this.length * 2);
|
||||
radiate(2_500_000F / (this.ticksExisted * 5 + 1), this.length * 2);
|
||||
}
|
||||
|
||||
if(!mute) {
|
||||
@ -131,7 +131,7 @@ public class EntityNukeExplosionMK5 extends EntityExplosionChunkloading {
|
||||
eRads /= (float)res;
|
||||
eRads /= (float)(len * len);
|
||||
|
||||
ContaminationUtil.contaminate(e, HazardType.RADIATION, ContaminationType.CREATIVE, eRads);
|
||||
ContaminationUtil.contaminate(e, HazardType.RADIATION, ContaminationType.RAD_BYPASS, eRads);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -108,7 +108,8 @@ public class EntityMissileAntiBallistic extends EntityThrowableInterp implements
|
||||
|
||||
for(Entity e : TileEntityMachineRadarNT.matchingEntities) {
|
||||
if(e.dimension != this.dimension) continue;
|
||||
if(!(e instanceof EntityMissileBaseNT)) continue;
|
||||
if(!(e instanceof EntityMissileBaseNT)) continue; //can only lock onto missiles
|
||||
if(e instanceof EntityMissileStealth) continue; //cannot lack onto missiles with stealth coating
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(e.posX - posX, e.posY - posY, e.posZ - posZ);
|
||||
|
||||
|
||||
@ -15,7 +15,6 @@ import com.hbm.explosion.vanillant.standard.ExplosionEffectStandard;
|
||||
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
|
||||
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;
|
||||
@ -31,7 +30,7 @@ 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 abstract class EntityMissileBaseNT extends EntityThrowableInterp implements IChunkLoader, IRadarDetectableNT {
|
||||
|
||||
public int startX;
|
||||
public int startZ;
|
||||
|
||||
@ -105,11 +105,6 @@ public class EntityMissileDoomsday extends EntityMissileBaseNT {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "radar.target.doomsday";
|
||||
|
||||
@ -61,11 +61,6 @@ public class EntityMissileShuttle extends EntityMissileBaseNT {
|
||||
return new ItemStack(ModItems.missile_generic);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "radar.target.shuttle";
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
import com.hbm.inventory.material.Mats;
|
||||
import com.hbm.items.ItemEnums.EnumAshType;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import api.hbm.entity.IRadarDetectableNT;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMissileStealth extends EntityMissileBaseNT {
|
||||
|
||||
public EntityMissileStealth(World world) { super(world); }
|
||||
public EntityMissileStealth(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.bolt, 4, Mats.MAT_STEEL.id));
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override public String getUnlocalizedName() { return "radar.target.tier1"; }
|
||||
@Override public int getBlipLevel() { return IRadarDetectableNT.TIER1; }
|
||||
@Override public boolean canBeSeenBy(Object radar) { return false; }
|
||||
|
||||
@Override public void onImpact() { this.explodeStandard(20F, 24, false, true); }
|
||||
@Override public ItemStack getDebrisRareDrop() { return DictFrame.fromOne(ModItems.powder_ash, EnumAshType.MISC); }
|
||||
}
|
||||
@ -37,11 +37,6 @@ public abstract class EntityMissileTier0 extends EntityMissileBaseNT {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "radar.target.tier0";
|
||||
|
||||
@ -25,11 +25,6 @@ public abstract class EntityMissileTier1 extends EntityMissileBaseNT {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "radar.target.tier1";
|
||||
|
||||
@ -29,11 +29,6 @@ public abstract class EntityMissileTier2 extends EntityMissileBaseNT {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "radar.target.tier2";
|
||||
|
||||
@ -31,11 +31,6 @@ public abstract class EntityMissileTier3 extends EntityMissileBaseNT {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "radar.target.tier3";
|
||||
|
||||
@ -30,11 +30,6 @@ public abstract class EntityMissileTier4 extends EntityMissileBaseNT {
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RadarTargetType getTargetType() {
|
||||
return RadarTargetType.MISSILE_TIER4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "radar.target.tier4";
|
||||
|
||||
@ -107,9 +107,9 @@ public class EntityGlyphid extends EntityMob {
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
super.entityInit();
|
||||
this.dataWatcher.addObject(DW_WALL, new Byte((byte) 0)); //wall climbing
|
||||
this.dataWatcher.addObject(DW_WALL, new Byte((byte) 0)); //wall climbing
|
||||
this.dataWatcher.addObject(DW_ARMOR, new Byte((byte) 0b11111)); //armor
|
||||
this.dataWatcher.addObject(DW_SUBTYPE, new Byte((byte) 0)); //subtype (i.e. normal, infected, etc)
|
||||
this.dataWatcher.addObject(DW_SUBTYPE, new Byte((byte) 0)); //subtype (i.e. normal, infected, etc)
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -32,49 +32,36 @@ public class EntityBoxcar extends EntityThrowable {
|
||||
this.lastTickPosZ = this.prevPosZ = posZ;
|
||||
this.setPosition(posX + this.motionX, posY + this.motionY, posZ + this.motionZ);
|
||||
|
||||
/*this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;*/
|
||||
|
||||
this.motionY -= 0.03;
|
||||
if(motionY < -1.5)
|
||||
motionY = -1.5;
|
||||
|
||||
if(this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ) != Blocks.air)
|
||||
{
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:entity.oldExplosion", 10000.0F, 0.5F + this.rand.nextFloat() * 0.1F);
|
||||
this.setDead();
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 3);
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 2.5);
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 2);
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 1.5);
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 1);
|
||||
|
||||
List<Entity> list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
||||
AxisAlignedBB.getBoundingBox(posX - 2, posY - 2, posZ - 2, posX + 2, posY + 2, posZ + 2));
|
||||
|
||||
for(Entity e : list) {
|
||||
e.attackEntityFrom(ModDamageSource.boxcar, 1000);
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
worldObj.setBlock((int)(this.posX - 0.5), (int)(this.posY + 0.5), (int)(this.posZ - 0.5), ModBlocks.boxcar);
|
||||
}
|
||||
}
|
||||
|
||||
if(this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.air) {
|
||||
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:weapon.trainImpact", 100.0F, 1.0F);
|
||||
this.setDead();
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 3);
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 2.5);
|
||||
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 2);
|
||||
//ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 1.5);
|
||||
//ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 1);
|
||||
|
||||
List<Entity> list = (List<Entity>) worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(posX - 2, posY - 2, posZ - 2, posX + 2, posY + 2, posZ + 2));
|
||||
|
||||
for(Entity e : list) {
|
||||
e.attackEntityFrom(ModDamageSource.boxcar, 1000);
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
worldObj.setBlock((int) (this.posX - 0.5), (int) (this.posY + 0.5), (int) (this.posZ - 0.5), ModBlocks.boxcar);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onImpact(MovingObjectPosition p_70184_1_) {
|
||||
|
||||
}
|
||||
protected void onImpact(MovingObjectPosition p_70184_1_) { }
|
||||
|
||||
@Override
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double distance)
|
||||
{
|
||||
return distance < 25000;
|
||||
}
|
||||
public boolean isInRangeToRenderDist(double distance) {
|
||||
return distance < 25000;
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,6 @@ import com.hbm.blocks.rail.IRailNTM.TrackGauge;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
@ -56,6 +55,7 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay {
|
||||
public double renderX;
|
||||
public double renderY;
|
||||
public double renderZ;
|
||||
public double cachedSpeed;
|
||||
|
||||
public EntityRailCarBase coupledFront;
|
||||
public EntityRailCarBase coupledBack;
|
||||
@ -131,7 +131,7 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay {
|
||||
data.setInteger("color", 0x0000ff);
|
||||
data.setFloat("scale", 1.5F);
|
||||
data.setString("text", id + " (#" + train.ltuIndex + ")");
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, train.posX, train.posY + 1, train.posZ), new TargetPoint(this.dimension, train.posX, train.posY + 1, train.posZ, 50));
|
||||
//PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, train.posX, train.posY + 1, train.posZ), new TargetPoint(this.dimension, train.posX, train.posY + 1, train.posZ, 50));
|
||||
}
|
||||
}
|
||||
|
||||
@ -175,9 +175,20 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay {
|
||||
this.renderX = (frontPos.xCoord + backPos.xCoord) / 2D;
|
||||
this.renderY = (frontPos.yCoord + backPos.yCoord) / 2D;
|
||||
this.renderZ = (frontPos.zCoord + backPos.zCoord) / 2D;
|
||||
} else {
|
||||
this.renderX = posX;
|
||||
this.renderY = posY;
|
||||
this.renderZ = posZ;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if(!this.isOnRail) {
|
||||
if(this.coupledFront != null) this.coupledFront.couple(this.coupledFront.getCouplingFrom(this), null);
|
||||
if(this.coupledBack != null) this.coupledBack.couple(this.coupledBack.getCouplingFrom(this), null);
|
||||
this.coupledFront = null;
|
||||
this.coupledBack = null;
|
||||
}
|
||||
|
||||
if(this.coupledFront != null && this.coupledFront.isDead) {
|
||||
this.coupledFront = null;
|
||||
@ -188,10 +199,20 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay {
|
||||
if(this.ltu != null) this.ltu.dissolveTrain();
|
||||
}
|
||||
|
||||
if(this.ltu == null && (this.coupledFront == null || this.coupledBack == null)) {
|
||||
if(this.ltu == null && (this.coupledFront == null || this.coupledBack == null) && this.isOnRail) {
|
||||
LogicalTrainUnit.generateTrain(this);
|
||||
}
|
||||
|
||||
if(!this.isOnRail) {
|
||||
Vec3 motion = Vec3.createVectorHelper(0, 0, this.cachedSpeed);
|
||||
motion.rotateAroundY((float) (-this.rotationYaw * Math.PI / 180D));
|
||||
this.moveEntity(motion.xCoord, motion.yCoord - 0.04, motion.zCoord);
|
||||
this.renderX = posX;
|
||||
this.renderY = posY;
|
||||
this.renderZ = posZ;
|
||||
this.cachedSpeed *= 0.95D;
|
||||
}
|
||||
|
||||
DummyConfig[] definitions = this.getDummies();
|
||||
|
||||
if(!this.initDummies) {
|
||||
@ -319,6 +340,8 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay {
|
||||
|
||||
if(Math.abs(speed) < 0.001) speed = 0;
|
||||
|
||||
for(EntityRailCarBase car : ltu.trains) car.cachedSpeed = speed;
|
||||
|
||||
if(ltu.trains.length == 1) {
|
||||
|
||||
EntityRailCarBase train = ltu.trains[0];
|
||||
@ -356,11 +379,9 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay {
|
||||
ltu.moveTrainByApproach(speed);
|
||||
}
|
||||
|
||||
if(ltu.trains.length != 1) {
|
||||
//ltu.pushForce *= 0.95;
|
||||
ltu.pushForce = 0;
|
||||
ltu.collideTrain(speed);
|
||||
}
|
||||
//ltu.pushForce *= 0.95;
|
||||
ltu.pushForce = 0;
|
||||
ltu.collideTrain(speed);
|
||||
}
|
||||
}
|
||||
|
||||
@ -389,7 +410,7 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay {
|
||||
|
||||
public void derail() {
|
||||
isOnRail = false;
|
||||
this.setDead();
|
||||
//this.setDead();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@ -746,24 +767,34 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay {
|
||||
return totalSpeed;
|
||||
}
|
||||
|
||||
/*
|
||||
* This method has no rhyme or reason behind it. Nothing of this was calculated, instead it was an old system that worked with older constraints,
|
||||
* which was retrofitted with a slightly newer system and beaten into submission for two consecutive hours until it yielded the results it should.
|
||||
* Booleans are flipped back and forth based on seemingly random conditions, numbers are inverted and then inverted again and finally smashed into
|
||||
* the rail system in the hopes that it would make trains work. My apologies extend towards Bob in the future who will inevitably have to rewrite this
|
||||
* abhorrence because of some constraint change which will cause the entire system to break. Part of me wishes to never touch the train code ever again,
|
||||
* to abandon the idea and to ban the annoying people on Discord who keep asking about it. Another part wants me to slam my head against this project
|
||||
* until either it or my skull gives way; and considering I got this far, it appears as if this side is the one that is winning.
|
||||
*/
|
||||
/** Determines the "front" wagon based on the movement and moves it, then moves all other wagons towards that */
|
||||
public void moveTrainByApproach(double speed) {
|
||||
boolean forward = speed < 0;
|
||||
speed = Math.abs(speed);
|
||||
EntityRailCarBase previous = null;
|
||||
|
||||
EntityRailCarBase first = this.trains[0];
|
||||
boolean forward = speed > 0;
|
||||
boolean order = forward ^ first.getCouplingFrom(null) == TrainCoupling.BACK;
|
||||
|
||||
for(int i = !forward ? 0 : this.trains.length - 1; !forward ? i < this.trains.length : i >= 0; i += !forward ? 1 : -1) {
|
||||
for(int i = order ? 0 : this.trains.length - 1; order ? i < this.trains.length : i >= 0; i += order ? 1 : -1) {
|
||||
EntityRailCarBase current = this.trains[i];
|
||||
|
||||
if(previous == null) {
|
||||
|
||||
if(first == current) speed *= -1;
|
||||
|
||||
boolean inReverse = first.getCouplingFrom(null) == current.getCouplingFrom(null);
|
||||
int sigNum = inReverse ? 1 : -1;
|
||||
BlockPos anchor = current.getCurrentAnchorPos();
|
||||
|
||||
/*Vec3 frontPos = current.getRelPosAlongRail(anchor, current.getLengthSpan(), new MoveContext(RailCheckType.FRONT));
|
||||
Vec3 frontPos = current.getRelPosAlongRail(anchor, (speed + current.getLengthSpan()) * -sigNum, new MoveContext(RailCheckType.FRONT, current.getCollisionSpan() - current.getLengthSpan()));
|
||||
|
||||
if(frontPos == null) {
|
||||
current.derail();
|
||||
@ -771,43 +802,16 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay {
|
||||
return;
|
||||
} else {
|
||||
anchor = current.getCurrentAnchorPos(); //reset origin to new position
|
||||
Vec3 corePos = current.getRelPosAlongRail(anchor, speed * sigNum, new MoveContext(RailCheckType.CORE));
|
||||
Vec3 corePos = current.getRelPosAlongRail(anchor, speed * -sigNum, new MoveContext(RailCheckType.CORE, 0));
|
||||
current.setPosition(corePos.xCoord, corePos.yCoord, corePos.zCoord);
|
||||
Vec3 backPos = current.getRelPosAlongRail(anchor, -current.getLengthSpan(), new MoveContext(RailCheckType.BACK));
|
||||
Vec3 backPos = current.getRelPosAlongRail(anchor, (speed - current.getLengthSpan()) * -sigNum, new MoveContext(RailCheckType.BACK, current.getCollisionSpan() - current.getLengthSpan()));
|
||||
|
||||
if(frontPos == null || backPos == null) {
|
||||
current.derail();
|
||||
this.dissolveTrain();
|
||||
return;
|
||||
} else {
|
||||
setRenderPos(current, frontPos, backPos);
|
||||
}
|
||||
}*/
|
||||
|
||||
Pair<Double, RailCheckType>[] checks;
|
||||
double dist = speed * sigNum;
|
||||
|
||||
if(forward) {
|
||||
checks = new Pair[] {
|
||||
new Pair(dist + current.getLengthSpan(), RailCheckType.FRONT),
|
||||
new Pair(dist, RailCheckType.CORE),
|
||||
new Pair(dist - current.getLengthSpan(), RailCheckType.BACK)
|
||||
};
|
||||
} else {
|
||||
checks = new Pair[] {
|
||||
new Pair(dist - current.getLengthSpan(), RailCheckType.BACK),
|
||||
new Pair(dist, RailCheckType.CORE),
|
||||
new Pair(dist + current.getLengthSpan(), RailCheckType.FRONT)
|
||||
};
|
||||
}
|
||||
|
||||
double brake = 0;
|
||||
|
||||
for(Pair<Double, RailCheckType> check : checks) {
|
||||
MoveContext ctx = new MoveContext(check.getValue(), current.getCollisionSpan() - current.getLengthSpan());
|
||||
current.getRelPosAlongRail(anchor, check.getKey() - (brake * Math.signum(check.getKey())), ctx);
|
||||
if(ctx.collision) {
|
||||
brake += ctx.overshoot;
|
||||
setRenderPos(current, inReverse ? backPos : frontPos, inReverse ? frontPos : backPos);
|
||||
}
|
||||
}
|
||||
|
||||
@ -887,6 +891,6 @@ public abstract class EntityRailCarBase extends Entity implements ILookOverlay {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void printHook(RenderGameOverlayEvent.Pre event, World world, int x, int y, int z) {
|
||||
List<String> text = new ArrayList();
|
||||
ILookOverlay.printGeneric(event, this.getClass().getSimpleName() + " " + this.hashCode(), 0xffff00, 0x404000, text); //none of this shit is going to work anyway
|
||||
//ILookOverlay.printGeneric(event, this.getClass().getSimpleName() + " " + this.hashCode(), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ public abstract class EntityRailCarCargo extends EntityRailCarBase implements II
|
||||
this.dataWatcher.addObject(10, new Integer(0));
|
||||
}
|
||||
|
||||
public int countVacantSlots() {
|
||||
public int countOccupiedSlots() {
|
||||
int slots = 0;
|
||||
|
||||
for(int i = 0; i < this.getSizeInventory(); i++) {
|
||||
@ -53,11 +53,9 @@ public abstract class EntityRailCarCargo extends EntityRailCarBase implements II
|
||||
this.slots[slot] = null;
|
||||
}
|
||||
|
||||
if(!this.worldObj.isRemote) this.dataWatcher.updateObject(10, this.countVacantSlots());
|
||||
return itemstack;
|
||||
}
|
||||
} else {
|
||||
if(!this.worldObj.isRemote) this.dataWatcher.updateObject(10, this.countVacantSlots());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -67,10 +65,8 @@ public abstract class EntityRailCarCargo extends EntityRailCarBase implements II
|
||||
if(this.slots[slot] != null) {
|
||||
ItemStack itemstack = this.slots[slot];
|
||||
this.slots[slot] = null;
|
||||
if(!this.worldObj.isRemote) this.dataWatcher.updateObject(10, this.countVacantSlots());
|
||||
return itemstack;
|
||||
} else {
|
||||
if(!this.worldObj.isRemote) this.dataWatcher.updateObject(10, this.countVacantSlots());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -82,8 +78,12 @@ public abstract class EntityRailCarCargo extends EntityRailCarBase implements II
|
||||
if(stack != null && stack.stackSize > this.getInventoryStackLimit()) {
|
||||
stack.stackSize = this.getInventoryStackLimit();
|
||||
}
|
||||
|
||||
if(!this.worldObj.isRemote) this.dataWatcher.updateObject(10, this.countVacantSlots());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
if(!this.worldObj.isRemote) this.dataWatcher.updateObject(10, this.countOccupiedSlots());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -142,7 +142,7 @@ public abstract class EntityRailCarCargo extends EntityRailCarBase implements II
|
||||
}
|
||||
}
|
||||
|
||||
this.dataWatcher.updateObject(10, this.countVacantSlots());
|
||||
this.dataWatcher.updateObject(10, this.countOccupiedSlots());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -291,6 +291,6 @@ public abstract class EntityRailCarRidable extends EntityRailCarCargo {
|
||||
text.add("Front: " + this.coupledFront);
|
||||
text.add("Back: " + this.coupledBack);*/
|
||||
text.add("Nearest seat: " + this.getNearestSeat(MainRegistry.proxy.me()));
|
||||
ILookOverlay.printGeneric(event, this.getClass().getSimpleName() + " " + this.hashCode(), 0xffff00, 0x404000, text);
|
||||
//ILookOverlay.printGeneric(event, this.getClass().getSimpleName() + " " + this.hashCode(), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,14 +47,14 @@ public class Gun44MagnumFactory {
|
||||
config.roundsPerCycle = 1;
|
||||
config.gunMode = GunConfiguration.MODE_NORMAL;
|
||||
config.firingMode = GunConfiguration.FIRE_MANUAL;
|
||||
config.reloadDuration = 10;
|
||||
config.reloadDuration = 50;
|
||||
config.firingDuration = 0;
|
||||
config.ammoCap = 6;
|
||||
config.reloadType = GunConfiguration.RELOAD_FULL;
|
||||
config.allowsInfinity = true;
|
||||
config.crosshair = Crosshair.L_CLASSIC;
|
||||
config.reloadSound = GunConfiguration.RSOUND_REVOLVER;
|
||||
config.firingSound = "hbm:weapon.revolverShootAlt";
|
||||
config.firingSound = "hbm:weapon.44Shoot";
|
||||
config.reloadSoundEnd = false;
|
||||
|
||||
config.config.addAll(HbmCollection.m44Normal);
|
||||
@ -83,7 +83,7 @@ public class Gun44MagnumFactory {
|
||||
|
||||
GunConfiguration config = getBaseConfig();
|
||||
|
||||
config.durability = 4000;
|
||||
config.durability = 31_000;
|
||||
|
||||
config.name = "ifScope";
|
||||
config.manufacturer = EnumGunManufacturer.IF;
|
||||
|
||||
@ -33,9 +33,9 @@ public class ConstructionHandler extends NEIUniversalHandler {
|
||||
/* WATZ */
|
||||
ItemStack[] watz = new ItemStack[] {
|
||||
new ItemStack(ModBlocks.watz_end, 48),
|
||||
new ItemStack(ModItems.bolt_dura_steel, 64),
|
||||
new ItemStack(ModItems.bolt_dura_steel, 64),
|
||||
new ItemStack(ModItems.bolt_dura_steel, 64),
|
||||
Mats.MAT_DURA.make(ModItems.bolt, 64),
|
||||
Mats.MAT_DURA.make(ModItems.bolt, 64),
|
||||
Mats.MAT_DURA.make(ModItems.bolt, 64),
|
||||
new ItemStack(ModBlocks.watz_element, 36),
|
||||
new ItemStack(ModBlocks.watz_cooler, 26),
|
||||
new ItemStack(ModItems.boltgun)};
|
||||
|
||||
@ -362,7 +362,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) .billet(billet_bismuth) .ingot(ingot_bismuth) .dust(powder_bismuth);
|
||||
BI .nugget(nugget_bismuth) .billet(billet_bismuth) .ingot(ingot_bismuth) .dust(powder_bismuth) .block(block_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);
|
||||
@ -516,6 +516,7 @@ public class OreDictManager {
|
||||
|
||||
for(NTMMaterial mat : Mats.orderedList) {
|
||||
if(mat.smeltable == SmeltingBehavior.SMELTABLE) {
|
||||
if(mat.shapes.contains(MaterialShapes.BOLT)) for(String name : mat.names) OreDictionary.registerOre(MaterialShapes.BOLT.name() + name, new ItemStack(ModItems.bolt, 1, mat.id));
|
||||
if(mat.shapes.contains(MaterialShapes.CASTPLATE)) for(String name : mat.names) OreDictionary.registerOre(MaterialShapes.CASTPLATE.name() + name, new ItemStack(ModItems.plate_cast, 1, mat.id));
|
||||
if(mat.shapes.contains(MaterialShapes.WELDEDPLATE)) for(String name : mat.names) OreDictionary.registerOre(MaterialShapes.WELDEDPLATE.name() + name, new ItemStack(ModItems.plate_welded, 1, mat.id));
|
||||
if(mat.shapes.contains(MaterialShapes.HEAVY_COMPONENT)) for(String name : mat.names) OreDictionary.registerOre(MaterialShapes.HEAVY_COMPONENT.name() + name, new ItemStack(ModItems.heavy_component, 1, mat.id));
|
||||
@ -661,6 +662,7 @@ public class OreDictManager {
|
||||
public String any() { return ANY + mats[0]; }
|
||||
public String nugget() { return NUGGET + mats[0]; }
|
||||
public String tiny() { return TINY + mats[0]; }
|
||||
public String bolt() { return BOLT + mats[0]; }
|
||||
public String ingot() { return INGOT + mats[0]; }
|
||||
public String dustTiny() { return DUSTTINY + mats[0]; }
|
||||
public String dust() { return DUST + mats[0]; }
|
||||
@ -914,6 +916,7 @@ public class OreDictManager {
|
||||
public String any() { return ANY + groupName; }
|
||||
public String nugget() { return NUGGET + groupName; }
|
||||
public String tiny() { return TINY + groupName; }
|
||||
public String bolt() { return BOLT + groupName; }
|
||||
public String ingot() { return INGOT + groupName; }
|
||||
public String dustTiny() { return DUSTTINY + groupName; }
|
||||
public String dust() { return DUST + groupName; }
|
||||
|
||||
@ -8,6 +8,7 @@ public class OreNames {
|
||||
public static final String ANY = "any";
|
||||
public static final String NUGGET = "nugget";
|
||||
public static final String TINY = "tiny";
|
||||
public static final String BOLT = "bolt";
|
||||
public static final String INGOT = "ingot";
|
||||
public static final String DUSTTINY = "dustTiny";
|
||||
public static final String DUST = "dust";
|
||||
@ -24,6 +25,6 @@ public class OreNames {
|
||||
public static final String HEAVY_COMPONENT = "componentHeavy";
|
||||
|
||||
public static final String[] prefixes = new String[] {
|
||||
ANY, NUGGET, TINY, INGOT, DUSTTINY, DUST, GEM, CRYSTAL, PLATE, PLATECAST, BILLET, BLOCK, ORE, ORENETHER, HEAVY_COMPONENT, WIREDENSE
|
||||
ANY, NUGGET, TINY, BOLT, INGOT, DUSTTINY, DUST, GEM, CRYSTAL, PLATE, PLATECAST, BILLET, BLOCK, ORE, ORENETHER, HEAVY_COMPONENT, WIREDENSE
|
||||
};
|
||||
}
|
||||
|
||||
@ -0,0 +1,64 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineFunnel;
|
||||
|
||||
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 ContainerFunnel extends Container {
|
||||
|
||||
private TileEntityMachineFunnel funnel;
|
||||
|
||||
public ContainerFunnel(InventoryPlayer playerInv, TileEntityMachineFunnel tile) {
|
||||
funnel = tile;
|
||||
|
||||
for(int i = 0; i < 9; i++) this.addSlotToContainer(new Slot(tile, i, 8 + 18 * i, 18));
|
||||
for(int i = 0; i < 9; i++) this.addSlotToContainer(new SlotCraftingOutput(playerInv.player, tile, i + 9, 8 + 18 * i, 54));
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, j + i * 9 + 9, 8 + j * 18, 86 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, i, 8 + i * 18, 144));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return funnel.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(index);
|
||||
|
||||
if(var4 != null && var4.getHasStack()) {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if(index <= 17) {
|
||||
if(!this.mergeItemStack(var5, 18, this.inventorySlots.size(), true)) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -1,82 +0,0 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeN45;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerNukeN45 extends Container {
|
||||
|
||||
private TileEntityNukeN45 diFurnace;
|
||||
|
||||
public ContainerNukeN45(InventoryPlayer invPlayer, TileEntityNukeN45 tedf) {
|
||||
|
||||
diFurnace = tedf;
|
||||
|
||||
//Payload
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 44, 35));
|
||||
//Range up
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 116, 35));
|
||||
|
||||
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++)
|
||||
{
|
||||
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)
|
||||
{
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= 1) {
|
||||
if (!this.mergeItemStack(var5, 2, this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, 2, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return diFurnace.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
42
src/main/java/com/hbm/inventory/gui/GUIFunnel.java
Normal file
42
src/main/java/com/hbm/inventory/gui/GUIFunnel.java
Normal file
@ -0,0 +1,42 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerFunnel;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineFunnel;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIFunnel extends GuiContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_funnel.png");
|
||||
private TileEntityMachineFunnel funnel;
|
||||
|
||||
public GUIFunnel(InventoryPlayer invPlayer, TileEntityMachineFunnel tedf) {
|
||||
super(new ContainerFunnel(invPlayer, tedf));
|
||||
funnel = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 168;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.funnel.hasCustomInventoryName() ? this.funnel.getInventoryName() : I18n.format(this.funnel.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);
|
||||
}
|
||||
}
|
||||
@ -36,7 +36,7 @@ public class GUIMachineRadGen extends GuiInfoContainer {
|
||||
this.drawCustomInfo(this, mouseX, mouseY, guiLeft + 65, guiTop + 18 + i * 5, 46, 5, new String[] {
|
||||
"Slot " + (i + 1) + ":",
|
||||
radgen.production[i] + "HE/t for",
|
||||
(radgen.maxProgress[i] - radgen.progress[i]) + " ticks. (" + ((radgen.maxProgress[i] - radgen.progress[i]) * 100 / radgen.maxProgress[i]) + "%)"
|
||||
(radgen.maxProgress[i] - radgen.progress[i]) + " ticks (" + ((radgen.maxProgress[i] - radgen.progress[i]) * 100 / radgen.maxProgress[i]) + "%)"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,73 +0,0 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerNukeN45;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeN45;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUINukeN45 extends GuiInfoContainer {
|
||||
|
||||
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/weapon/gui_n45.png");
|
||||
private TileEntityNukeN45 diFurnace;
|
||||
|
||||
public GUINukeN45(InventoryPlayer invPlayer, TileEntityNukeN45 tedf) {
|
||||
super(new ContainerNukeN45(invPlayer, tedf));
|
||||
diFurnace = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 168;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
String[] text = new String[] { "The first slot holds the payload.",
|
||||
"Acceptable payloads:",
|
||||
" -Det Cord",
|
||||
" -TNT",
|
||||
" -Explosive Charge",
|
||||
" -Nuclear Charge",
|
||||
"Using detonator while in mine mode will",
|
||||
"arm the mine, set to explode when",
|
||||
"it detects a large entity nearby."};
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
|
||||
|
||||
String[] text1 = new String[] { "The second slot is for green machine",
|
||||
"upgrades. Entity detection range increases",
|
||||
"by 5 blocks for every level.",
|
||||
"When left empty, the mine can not be armed",
|
||||
"an will behave like a regular bomb." };
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, text1);
|
||||
|
||||
if(diFurnace.primed)
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 121, guiTop + 22, 6, 8, mouseX, mouseY, new String[]{ "Mine armed!" } );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.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(diFurnace.primed) {
|
||||
drawTexturedModalRect(guiLeft + 121, guiTop + 22, 176, 0, 6, 8);
|
||||
}
|
||||
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36, 16, 16, 2);
|
||||
this.drawInfoPanel(guiLeft - 16, guiTop + 36 + 16, 16, 16, 3);
|
||||
}
|
||||
}
|
||||
@ -13,6 +13,7 @@ public class MaterialShapes {
|
||||
public static final MaterialShapes NUGGET = new MaterialShapes(8, "nugget");
|
||||
public static final MaterialShapes DUSTTINY = new MaterialShapes(NUGGET.quantity, "dustTiny");
|
||||
public static final MaterialShapes WIRE = new MaterialShapes(9);
|
||||
public static final MaterialShapes BOLT = new MaterialShapes(9, "bolt");
|
||||
public static final MaterialShapes BILLET = new MaterialShapes(NUGGET.quantity * 6, "billet");
|
||||
public static final MaterialShapes INGOT = new MaterialShapes(NUGGET.quantity * 9, "ingot");
|
||||
public static final MaterialShapes GEM = new MaterialShapes(INGOT.quantity, "gem");
|
||||
|
||||
@ -96,7 +96,7 @@ public class Mats {
|
||||
//Base metals
|
||||
public static final NTMMaterial MAT_TITANIUM = makeSmeltable(2200, TI, 0xF7F3F2, 0x4F4C4B, 0xA99E79).setShapes(INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, BLOCK, HEAVY_COMPONENT);
|
||||
public static final NTMMaterial MAT_COPPER = makeSmeltable(2900, CU, 0xFDCA88, 0x601E0D, 0xC18336).setShapes(WIRE, INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, BLOCK, HEAVY_COMPONENT);
|
||||
public static final NTMMaterial MAT_TUNGSTEN = makeSmeltable(7400, W, 0x868686, 0x000000, 0x977474).setShapes(WIRE, INGOT, DUST, DENSEWIRE, CASTPLATE, WELDEDPLATE, BLOCK, HEAVY_COMPONENT);
|
||||
public static final NTMMaterial MAT_TUNGSTEN = makeSmeltable(7400, W, 0x868686, 0x000000, 0x977474).setShapes(WIRE, BOLT, INGOT, DUST, DENSEWIRE, CASTPLATE, WELDEDPLATE, BLOCK, HEAVY_COMPONENT);
|
||||
public static final NTMMaterial MAT_ALUMINIUM = makeSmeltable(1300, AL, 0xFFFFFF, 0x344550, 0xD0B8EB).setShapes(WIRE, INGOT, DUST, PLATE, CASTPLATE, BLOCK, HEAVY_COMPONENT);
|
||||
public static final NTMMaterial MAT_LEAD = makeSmeltable(8200, PB, 0xA6A6B2, 0x03030F, 0x646470).setShapes(NUGGET, INGOT, DUST, PLATE, CASTPLATE, BLOCK, HEAVY_COMPONENT);
|
||||
public static final NTMMaterial MAT_BISMUTH = makeSmeltable(8300, BI, 0xB200FF).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK);
|
||||
@ -113,10 +113,10 @@ public class Mats {
|
||||
public static final NTMMaterial MAT_OSMIRIDIUM = makeSmeltable(7699, OSMIRIDIUM, 0xDBE3EF, 0x7891BE, 0xACBDD9).setShapes(NUGGET, INGOT, CASTPLATE, WELDEDPLATE);
|
||||
|
||||
//Alloys
|
||||
public static final NTMMaterial MAT_STEEL = makeSmeltable(_AS + 0, STEEL, 0xAFAFAF, 0x0F0F0F, 0x4A4A4A).setShapes(DUSTTINY, INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, BLOCK, HEAVY_COMPONENT);
|
||||
public static final NTMMaterial MAT_STEEL = makeSmeltable(_AS + 0, STEEL, 0xAFAFAF, 0x0F0F0F, 0x4A4A4A).setShapes(DUSTTINY, BOLT, INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, BLOCK, HEAVY_COMPONENT);
|
||||
public static final NTMMaterial MAT_MINGRADE = makeSmeltable(_AS + 1, MINGRADE, 0xFFBA7D, 0xAF1700, 0xE44C0F).setShapes(WIRE, INGOT, DUST, BLOCK);
|
||||
public static final NTMMaterial MAT_ALLOY = makeSmeltable(_AS + 2, ALLOY, 0xFF8330, 0x700000, 0xFF7318).setShapes(WIRE, INGOT, DUST, DENSEWIRE, PLATE, CASTPLATE, BLOCK, HEAVY_COMPONENT);
|
||||
public static final NTMMaterial MAT_DURA = makeSmeltable(_AS + 3, DURA, 0x183039, 0x030B0B, 0x376373).setShapes(INGOT, DUST, BLOCK);
|
||||
public static final NTMMaterial MAT_DURA = makeSmeltable(_AS + 3, DURA, 0x183039, 0x030B0B, 0x376373).setShapes(BOLT, INGOT, DUST, BLOCK);
|
||||
public static final NTMMaterial MAT_SATURN = makeSmeltable(_AS + 4, BIGMT, 0x4DA3AF, 0x00000C, 0x4DA3AF).setShapes(INGOT, DUST, BLOCK);
|
||||
public static final NTMMaterial MAT_DESH = makeSmeltable(_AS + 12, DESH, 0xFF6D6D, 0x720000, 0xF22929).setShapes(INGOT, DUST, CASTPLATE, BLOCK, HEAVY_COMPONENT);
|
||||
public static final NTMMaterial MAT_STAR = makeSmeltable(_AS + 5, STAR, 0xCCCCEA, 0x11111A, 0xA5A5D3).setShapes(INGOT, DUST, DENSEWIRE, BLOCK);
|
||||
|
||||
@ -175,7 +175,7 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModItems.reactor_core, 1), new AStack[] {new OreDictStack(PB.ingot(), 8), new OreDictStack(BE.ingot(), 6), new OreDictStack(STEEL.plate(), 16), new OreDictStack(OreDictManager.getReflector(), 8), new OreDictStack(FIBER.ingot(), 2) },100);
|
||||
makeRecipe(new ComparableStack(ModItems.rtg_unit, 1), new AStack[] {new ComparableStack(ModItems.thermo_element, 2), new ComparableStack(ModItems.board_copper, 1), new OreDictStack(PB.ingot(), 2), new OreDictStack(STEEL.plate(), 2), new ComparableStack(ModItems.circuit_copper, 1), },100);
|
||||
makeRecipe(new ComparableStack(ModItems.levitation_unit, 1), new AStack[] {new ComparableStack(ModItems.coil_copper, 4), new ComparableStack(ModItems.coil_tungsten, 2), new OreDictStack(TI.plate(), 6), new ComparableStack(ModItems.nugget_schrabidium, 2), },100);
|
||||
makeRecipe(new ComparableStack(ModItems.drill_titanium, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 2), new OreDictStack(DURA.ingot(), 2), new ComparableStack(ModItems.bolt_dura_steel, 2), new OreDictStack(TI.plate(), 6), },100);
|
||||
makeRecipe(new ComparableStack(ModItems.drill_titanium, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 2), new OreDictStack(DURA.ingot(), 2), new OreDictStack(DURA.bolt(), 4), new OreDictStack(TI.plate(), 6), },100);
|
||||
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);
|
||||
@ -197,6 +197,7 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModItems.warhead_volcano, 1), new AStack[] {new OreDictStack(TI.plate(), 24), new OreDictStack(STEEL.plate(), 16), new ComparableStack(ModBlocks.det_nuke, 3), new OreDictStack(U238.block(), 24), new ComparableStack(ModItems.circuit_tantalium, 5) }, 600);
|
||||
makeRecipe(new ComparableStack(ModItems.warhead_thermo_endo, 1), new AStack[] {new ComparableStack(ModBlocks.therm_endo, 2), new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.circuit_targeting_tier3, 1) },300);
|
||||
makeRecipe(new ComparableStack(ModItems.warhead_thermo_exo, 1), new AStack[] {new ComparableStack(ModBlocks.therm_exo, 2), new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.circuit_targeting_tier3, 1) },300);
|
||||
makeRecipe(new ComparableStack(ModItems.missile_stealth, 1), new AStack[] { new OreDictStack(TI.plate(), 20), new OreDictStack(AL.plate(), 20), new OreDictStack(CU.plate(), 10), new OreDictStack(KEY_BLACK, 16), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 4), new ComparableStack(ModItems.circuit_gold), new OreDictStack(STEEL.bolt(), 32) },1200);
|
||||
makeRecipe(new ComparableStack(ModItems.thruster_nuclear, 1), new AStack[] {new OreDictStack(DURA.ingot(), 32), new OreDictStack(B.ingot(), 8), new OreDictStack(PB.plate(), 16), new ComparableStack(ModItems.pipes_steel), new ComparableStack(ModItems.circuit_gold, 1) },600);
|
||||
makeRecipe(new ComparableStack(ModItems.sat_base, 1), new AStack[] {new ComparableStack(ModItems.thruster_large, 1), new OreDictStack(STEEL.plate(), 6), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.hull_big_titanium, 3), new ComparableStack(ModItems.fluid_barrel_full, 1, Fluids.KEROSENE.getID()), new ComparableStack(ModItems.photo_panel, 24), new ComparableStack(ModItems.board_copper, 12), new ComparableStack(ModItems.circuit_gold, 6), new ComparableStack(ModItems.battery_lithium_cell_6, 1), },500);
|
||||
makeRecipe(new ComparableStack(ModItems.sat_head_mapper, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 4), new OreDictStack(STEEL.plate(), 6), new ComparableStack(ModItems.hull_small_steel, 3), new ComparableStack(ModItems.plate_desh, 2), new ComparableStack(ModItems.circuit_gold, 2), new OreDictStack(RUBBER.ingot(), 12), new OreDictStack(REDSTONE.dust(), 6), new ComparableStack(Items.diamond, 1), new ComparableStack(Blocks.glass_pane, 6), },400);
|
||||
@ -243,9 +244,9 @@ public class AssemblerRecipes {
|
||||
makeRecipe(new ComparableStack(ModItems.upgrade_fortune_1, 1), new AStack[] {new ComparableStack(ModItems.upgrade_template, 1), new OreDictStack(DIAMOND.dust(), 4), new OreDictStack(IRON.dust(), 6), new ComparableStack(ModItems.wire_red_copper, 4), },200);
|
||||
makeRecipe(new ComparableStack(ModItems.upgrade_fortune_2, 1), new AStack[] {new ComparableStack(ModItems.upgrade_fortune_1, 1), new OreDictStack(DIAMOND.dust(), 2), new OreDictStack(IRON.dust(), 4), new ComparableStack(ModItems.circuit_red_copper, 4), new ComparableStack(ModItems.wire_red_copper, 4), new OreDictStack(ANY_PLASTIC.ingot(), 2), },300);
|
||||
makeRecipe(new ComparableStack(ModItems.upgrade_fortune_3, 1), new AStack[] {new ComparableStack(ModItems.upgrade_fortune_2, 1), new OreDictStack(DIAMOND.dust(), 2), new OreDictStack(IRON.dust(), 6), new OreDictStack(DESH.ingot(), 4), },500);
|
||||
makeRecipe(new ComparableStack(ModItems.upgrade_afterburn_1, 1), new AStack[] {new ComparableStack(ModItems.upgrade_template, 1), new OreDictStack(POLYMER.dust(), 4), new OreDictStack(W.dust(), 6), new ComparableStack(ModItems.wire_red_copper, 4), },200);
|
||||
makeRecipe(new ComparableStack(ModItems.upgrade_afterburn_2, 1), new AStack[] {new ComparableStack(ModItems.upgrade_afterburn_1, 1), new OreDictStack(POLYMER.dust(), 2), new OreDictStack(W.dust(), 4), new ComparableStack(ModItems.circuit_red_copper, 4), new ComparableStack(ModItems.wire_red_copper, 4), new OreDictStack(ANY_PLASTIC.ingot(), 2), },300);
|
||||
makeRecipe(new ComparableStack(ModItems.upgrade_afterburn_3, 1), new AStack[] {new ComparableStack(ModItems.upgrade_afterburn_2, 1), new OreDictStack(POLYMER.dust(), 2), new OreDictStack(W.dust(), 6), new OreDictStack(DESH.ingot(), 4), },500);
|
||||
makeRecipe(new ComparableStack(ModItems.upgrade_afterburn_1, 1), new AStack[] {new ComparableStack(ModItems.upgrade_template, 1), new OreDictStack(ANY_PLASTIC.dust(), 4), new OreDictStack(W.dust(), 6), new ComparableStack(ModItems.wire_red_copper, 4), },200);
|
||||
makeRecipe(new ComparableStack(ModItems.upgrade_afterburn_2, 1), new AStack[] {new ComparableStack(ModItems.upgrade_afterburn_1, 1), new OreDictStack(ANY_PLASTIC.dust(), 2), new OreDictStack(W.dust(), 4), new ComparableStack(ModItems.circuit_red_copper, 4), new ComparableStack(ModItems.wire_red_copper, 4), new OreDictStack(ANY_PLASTIC.ingot(), 2), },300);
|
||||
makeRecipe(new ComparableStack(ModItems.upgrade_afterburn_3, 1), new AStack[] {new ComparableStack(ModItems.upgrade_afterburn_2, 1), new OreDictStack(ANY_PLASTIC.dust(), 2), new OreDictStack(W.dust(), 6), new OreDictStack(DESH.ingot(), 4), },500);
|
||||
makeRecipe(new ComparableStack(ModItems.upgrade_radius, 1), new AStack[] {new ComparableStack(ModItems.upgrade_template, 1), new ComparableStack(Items.glowstone_dust, 6), new OreDictStack(DIAMOND.dust(), 4), },500);
|
||||
makeRecipe(new ComparableStack(ModItems.upgrade_health, 1), new AStack[] {new ComparableStack(ModItems.upgrade_template, 1), new ComparableStack(Items.glowstone_dust, 6), new OreDictStack(TI.dust(), 4), },500);
|
||||
makeRecipe(new ComparableStack(ModItems.upgrade_overdrive_1, 1), new AStack[] {new ComparableStack(ModItems.upgrade_speed_3, 1), new ComparableStack(ModItems.upgrade_effect_3, 1), new OreDictStack(DESH.ingot(), 8), new ComparableStack(ModItems.powder_power, 16), new ComparableStack(ModItems.crystal_lithium, 4), new ComparableStack(ModItems.circuit_schrabidium, 1), }, 200);
|
||||
@ -253,11 +254,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 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.part_lithium, 8), new AStack[] {new OreDictStack(ANY_RUBBER.ingot(), 1), new OreDictStack(LI.dust(), 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.part_beryllium, 8), new AStack[] {new OreDictStack(ANY_RUBBER.ingot(), 1), new OreDictStack(BE.dust(), 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.part_carbon, 8), new AStack[] {new OreDictStack(ANY_RUBBER.ingot(), 1), new OreDictStack(COAL.dust(), 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.part_copper, 8), new AStack[] {new OreDictStack(ANY_RUBBER.ingot(), 1), new OreDictStack(CU.dust(), 1), },50);
|
||||
makeRecipe(new ComparableStack(ModItems.part_plutonium, 8), 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 +288,7 @@ public class AssemblerRecipes {
|
||||
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);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_bat9000, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 2), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16), },150);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_orbus, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(BIGMT.plate(), 12), new ComparableStack(ModItems.coil_advanced_alloy, 12), new ComparableStack(ModItems.battery_sc_polonium, 1) }, 200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_mining_laser, 1), new AStack[] {new ComparableStack(ModItems.tank_steel, 3), !exp ? new OreDictStack(STEEL.plate528(), 16) : new OreDictStack(STEEL.heavyComp(), 3), new ComparableStack(ModItems.crystal_redstone, 3), new ComparableStack(Items.diamond, 3), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.motor, 3), !exp ? new OreDictStack(DURA.ingot(), 4) : new OreDictStack(DESH.heavyComp(), 1), new ComparableStack(ModItems.bolt_dura_steel, 6), new ComparableStack(ModBlocks.machine_battery, 3), },400);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_mining_laser, 1), new AStack[] {new ComparableStack(ModItems.tank_steel, 3), !exp ? new OreDictStack(STEEL.plate528(), 16) : new OreDictStack(STEEL.heavyComp(), 3), new ComparableStack(ModItems.crystal_redstone, 3), new ComparableStack(Items.diamond, 3), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.motor, 3), !exp ? new OreDictStack(DURA.ingot(), 4) : new OreDictStack(DESH.heavyComp(), 1), new OreDictStack(DURA.bolt(), 8), new ComparableStack(ModBlocks.machine_battery, 3), },400);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_turbofan, 1), new AStack[] {!exp ? new ComparableStack(ModItems.hull_big_steel, 1) : new OreDictStack(STEEL.heavyComp(), 1), new ComparableStack(ModItems.hull_big_titanium, 3), new ComparableStack(ModItems.hull_small_steel, 2), new ComparableStack(ModItems.turbine_tungsten, 1), new ComparableStack(ModItems.turbine_titanium, 7), new ComparableStack(ModItems.bolt_compound, 8), new OreDictStack(MINGRADE.ingot(), 12), new ComparableStack(ModItems.wire_red_copper, 24), },500);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_turbinegas, 1), new AStack[] {!exp ? new ComparableStack(ModItems.hull_big_steel, 4) : new OreDictStack(STEEL.heavyComp(), 2), new ComparableStack(ModItems.hull_small_steel, 6), new ComparableStack(ModItems.generator_steel, 2), new ComparableStack(ModItems.bolt_compound, 4), new ComparableStack(ModBlocks.steel_scaffold, 8), new ComparableStack(ModBlocks.deco_pipe_quad, 4), new ComparableStack(ModItems.turbine_tungsten, 3), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.ingot_rubber, 4), new ComparableStack(ModItems.circuit_red_copper, 3)}, 600);
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_teleporter, 1), new AStack[] {new OreDictStack(TI.ingot(), 8), new OreDictStack(ALLOY.plate528(), 12), new ComparableStack(ModItems.wire_gold, 32), new ComparableStack(ModItems.entanglement_kit, 1), new ComparableStack(ModBlocks.machine_battery, 1) },300);
|
||||
@ -441,7 +442,7 @@ public class AssemblerRecipes {
|
||||
new OreDictStack(CU.ingot(), 8),
|
||||
new ComparableStack(ModItems.generator_steel, 1),
|
||||
new ComparableStack(ModItems.tank_steel, 2),
|
||||
new ComparableStack(ModItems.bolt_tungsten, 8),
|
||||
new OreDictStack(W.bolt(), 16),
|
||||
new ComparableStack(ModItems.wire_red_copper, 24),
|
||||
new ComparableStack(ModItems.circuit_copper, 1)
|
||||
}, 300);
|
||||
@ -449,13 +450,13 @@ public class AssemblerRecipes {
|
||||
new OreDictStack(STEEL.plate(), 16),
|
||||
new OreDictStack(CU.plate(), 4),
|
||||
new OreDictStack(W.ingot(), 8),
|
||||
new ComparableStack(ModItems.bolt_tungsten, 16)
|
||||
new OreDictStack(W.bolt(), 16)
|
||||
}, 200);
|
||||
makeRecipe(new ComparableStack(ModItems.piston_set, 1, EnumPistonType.DURA.ordinal()), new AStack[] {
|
||||
new OreDictStack(DURA.ingot(), 24),
|
||||
new OreDictStack(TI.plate(), 8),
|
||||
new OreDictStack(W.ingot(), 8),
|
||||
new ComparableStack(ModItems.bolt_dura_steel, 16)
|
||||
new OreDictStack(DURA.bolt(), 16)
|
||||
}, 200);
|
||||
makeRecipe(new ComparableStack(ModItems.piston_set, 1, EnumPistonType.DESH.ordinal()), new AStack[] {
|
||||
new OreDictStack(DESH.ingot(), 24),
|
||||
@ -672,8 +673,8 @@ public class AssemblerRecipes {
|
||||
new OreDictStack(PB.plate(), 16),
|
||||
new OreDictStack(ALLOY.plate(), 4),
|
||||
new OreDictStack(ANY_RUBBER.ingot(), 4),
|
||||
new ComparableStack(ModItems.bolt_tungsten, 8),
|
||||
new ComparableStack(ModItems.bolt_dura_steel, 8),
|
||||
new OreDictStack(W.bolt(), 16),
|
||||
new OreDictStack(DURA.bolt(), 16),
|
||||
new ComparableStack(ModItems.motor, 3),
|
||||
}, 200);
|
||||
|
||||
@ -683,8 +684,8 @@ public class AssemblerRecipes {
|
||||
new OreDictStack(PB.plate(), 6),
|
||||
new OreDictStack(ALLOY.plate(), 3),
|
||||
new OreDictStack(ANY_RUBBER.ingot(), 3),
|
||||
new ComparableStack(ModItems.bolt_tungsten, 3),
|
||||
new ComparableStack(ModItems.bolt_dura_steel, 3),
|
||||
new OreDictStack(W.bolt(), 4),
|
||||
new OreDictStack(DURA.bolt(), 4),
|
||||
new ComparableStack(ModItems.motor, 1),
|
||||
}, 300);
|
||||
|
||||
@ -692,7 +693,7 @@ public class AssemblerRecipes {
|
||||
new OreDictStack(STEEL.ingot(), 8),
|
||||
new OreDictStack(STEEL.plate(), 8),
|
||||
new OreDictStack(ALLOY.plate(), 4),
|
||||
new ComparableStack(ModItems.bolt_tungsten, 4),
|
||||
new OreDictStack(W.bolt(), 8),
|
||||
new ComparableStack(ModItems.motor, 2),
|
||||
}, 200);
|
||||
|
||||
@ -922,7 +923,7 @@ public class AssemblerRecipes {
|
||||
new OreDictStack(RUBBER.ingot(), 16),
|
||||
new OreDictStack(KEY_ANYPANE, 64),
|
||||
new ComparableStack(ModItems.motor, 18),
|
||||
new ComparableStack(ModItems.bolt_tungsten, 12),
|
||||
new OreDictStack(W.bolt(), 16),
|
||||
new ComparableStack(ModItems.pipes_steel, 1),
|
||||
new ComparableStack(ModItems.circuit_gold, 3)
|
||||
}, 400);
|
||||
@ -1189,7 +1190,7 @@ public class AssemblerRecipes {
|
||||
new OreDictStack(ANY_RUBBER.ingot(), 36),
|
||||
new OreDictStack(STEEL.block(), 24),
|
||||
new ComparableStack(ModItems.motor_desh, 16),
|
||||
new ComparableStack(ModItems.bolt_dura_steel, 12),
|
||||
new OreDictStack(DURA.bolt(), 16),
|
||||
new OreDictStack(KEY_YELLOW, 4)
|
||||
}, 1200);
|
||||
|
||||
@ -1198,16 +1199,16 @@ public class AssemblerRecipes {
|
||||
new OreDictStack(W.ingot(), 8),
|
||||
new ComparableStack(ModBlocks.reinforced_glass, 4),
|
||||
new OreDictStack(ANY_RUBBER.ingot(), 4),
|
||||
new ComparableStack(ModItems.bolt_dura_steel, 8),
|
||||
new OreDictStack(DURA.bolt(), 16),
|
||||
new ComparableStack(ModItems.motor, 2)
|
||||
}, 200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.large_vehicle_door, 1), new AStack[]{new OreDictStack(STEEL.plate(), 36), new OreDictStack("plateAdvancedAlloy", 4), new ComparableStack(ModItems.plate_polymer, 2), new OreDictStack("blockSteel", 4), new ComparableStack(ModItems.motor, 4), new ComparableStack(ModItems.bolt_dura_steel, 12), new OreDictStack("dyeGreen", 4)}, 500);
|
||||
makeRecipe(new ComparableStack(ModBlocks.water_door, 1), new AStack[]{new OreDictStack(STEEL.plate(), 12), new OreDictStack("plateAdvancedAlloy", 2), new ComparableStack(ModItems.bolt_dura_steel, 2), new OreDictStack("dyeRed", 1)}, 500);
|
||||
makeRecipe(new ComparableStack(ModBlocks.qe_containment, 1), new AStack[]{new OreDictStack(STEEL.plate(), 24), new OreDictStack("plateAdvancedAlloy", 8), new ComparableStack(ModItems.plate_polymer, 8), new OreDictStack("blockSteel", 2), new ComparableStack(ModItems.motor, 4), new ComparableStack(ModItems.bolt_dura_steel, 16), new OreDictStack("dyeBlack", 4)}, 500);
|
||||
makeRecipe(new ComparableStack(ModBlocks.qe_sliding_door, 1), new AStack[]{new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModItems.plate_polymer, 2), new OreDictStack("blockSteel", 1), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.bolt_dura_steel, 2), new OreDictStack("dyeWhite", 4), new ComparableStack(Blocks.glass, 4)}, 200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.round_airlock_door, 1), new AStack[]{new OreDictStack(STEEL.plate(), 32), new OreDictStack("plateAdvancedAlloy", 12), new ComparableStack(ModItems.plate_polymer, 12), new OreDictStack("blockSteel", 6), new ComparableStack(ModItems.motor, 6), new ComparableStack(ModItems.bolt_dura_steel, 12), new OreDictStack("dyeGreen", 4)}, 500);
|
||||
makeRecipe(new ComparableStack(ModBlocks.secure_access_door, 1), new AStack[]{new OreDictStack(STEEL.plate(), 48), new OreDictStack("plateAdvancedAlloy", 16), new ComparableStack(ModItems.plate_polymer, 2), new OreDictStack("blockSteel", 6), new ComparableStack(ModItems.motor, 4), new ComparableStack(ModItems.bolt_dura_steel, 24), new OreDictStack("dyeRed", 8)}, 1000);
|
||||
makeRecipe(new ComparableStack(ModBlocks.sliding_seal_door, 1), new AStack[]{new OreDictStack(STEEL.plate(), 12), new OreDictStack("plateAdvancedAlloy", 4), new ComparableStack(ModItems.plate_polymer, 2), new OreDictStack("blockSteel", 1), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.bolt_dura_steel, 2), new OreDictStack("dyeWhite", 2)}, 500);
|
||||
makeRecipe(new ComparableStack(ModBlocks.large_vehicle_door, 1), new AStack[]{new OreDictStack(STEEL.plate(), 36), new OreDictStack("plateAdvancedAlloy", 4), new ComparableStack(ModItems.plate_polymer, 2), new OreDictStack("blockSteel", 4), new ComparableStack(ModItems.motor, 4), new OreDictStack(DURA.bolt(), 16), new OreDictStack("dyeGreen", 4)}, 500);
|
||||
makeRecipe(new ComparableStack(ModBlocks.water_door, 1), new AStack[]{new OreDictStack(STEEL.plate(), 12), new OreDictStack("plateAdvancedAlloy", 2), new OreDictStack(DURA.bolt(), 4), new OreDictStack("dyeRed", 1)}, 500);
|
||||
makeRecipe(new ComparableStack(ModBlocks.qe_containment, 1), new AStack[]{new OreDictStack(STEEL.plate(), 24), new OreDictStack("plateAdvancedAlloy", 8), new ComparableStack(ModItems.plate_polymer, 8), new OreDictStack("blockSteel", 2), new ComparableStack(ModItems.motor, 4), new OreDictStack(DURA.bolt(), 32), new OreDictStack("dyeBlack", 4)}, 500);
|
||||
makeRecipe(new ComparableStack(ModBlocks.qe_sliding_door, 1), new AStack[]{new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModItems.plate_polymer, 2), new OreDictStack("blockSteel", 1), new ComparableStack(ModItems.motor, 2), new OreDictStack(DURA.bolt(), 4), new OreDictStack("dyeWhite", 4), new ComparableStack(Blocks.glass, 4)}, 200);
|
||||
makeRecipe(new ComparableStack(ModBlocks.round_airlock_door, 1), new AStack[]{new OreDictStack(STEEL.plate(), 32), new OreDictStack("plateAdvancedAlloy", 12), new ComparableStack(ModItems.plate_polymer, 12), new OreDictStack("blockSteel", 6), new ComparableStack(ModItems.motor, 6), new OreDictStack(DURA.bolt(), 16), new OreDictStack("dyeGreen", 4)}, 500);
|
||||
makeRecipe(new ComparableStack(ModBlocks.secure_access_door, 1), new AStack[]{new OreDictStack(STEEL.plate(), 48), new OreDictStack("plateAdvancedAlloy", 16), new ComparableStack(ModItems.plate_polymer, 2), new OreDictStack("blockSteel", 6), new ComparableStack(ModItems.motor, 4), new OreDictStack(DURA.bolt(), 32), new OreDictStack("dyeRed", 8)}, 1000);
|
||||
makeRecipe(new ComparableStack(ModBlocks.sliding_seal_door, 1), new AStack[]{new OreDictStack(STEEL.plate(), 12), new OreDictStack("plateAdvancedAlloy", 4), new ComparableStack(ModItems.plate_polymer, 2), new OreDictStack("blockSteel", 1), new ComparableStack(ModItems.motor, 2), new OreDictStack(DURA.bolt(), 4), new OreDictStack("dyeWhite", 2)}, 500);
|
||||
|
||||
if(Loader.isModLoaded("Mekanism")) {
|
||||
|
||||
|
||||
@ -121,8 +121,8 @@ public class ChemplantRecipes extends SerializableRecipe {
|
||||
new FluidStack(Fluids.XYLENE, 250),
|
||||
new FluidStack(Fluids.PHOSGENE, 250))
|
||||
.inputItems(
|
||||
new ComparableStack(com.hbm.blocks.ModBlocks.reinforced_glass),
|
||||
new ComparableStack(com.hbm.items.ModItems.bolt_tungsten, 4))
|
||||
new ComparableStack(ModBlocks.reinforced_glass),
|
||||
new OreDictStack(STEEL.bolt(), 4))
|
||||
.outputItems(new ItemStack(com.hbm.blocks.ModBlocks.reinforced_laminate)));
|
||||
recipes.add(new ChemRecipe(94, "PC", 100)
|
||||
.inputFluids(
|
||||
|
||||
@ -518,7 +518,7 @@ public class AnvilRecipes {
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_dineutronium, 4))).setTier(7));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {new OreDictStack(TI.plate(), 2), new OreDictStack(STEEL.ingot(), 1), new ComparableStack(ModItems.bolt_tungsten, 2)},
|
||||
new AStack[] {new OreDictStack(TI.plate(), 2), new OreDictStack(STEEL.ingot(), 1), new OreDictStack(STEEL.bolt(), 4)},
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_armor_titanium))).setTier(2));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {new OreDictStack(IRON.plate(), 4), new OreDictStack(BIGMT.plate(), 2), new ComparableStack(ModItems.plate_armor_titanium, 1)},
|
||||
|
||||
@ -324,12 +324,11 @@ public class ModItems {
|
||||
public static Item plate_mixed;
|
||||
public static Item plate_paa;
|
||||
public static Item board_copper;
|
||||
public static Item bolt_dura_steel;
|
||||
public static Item pipes_steel;
|
||||
public static Item drill_titanium;
|
||||
public static Item plate_dalekanium;
|
||||
public static Item plate_euphemium;
|
||||
public static Item bolt_tungsten;
|
||||
public static Item bolt;
|
||||
public static Item bolt_compound;
|
||||
public static Item plate_polymer;
|
||||
public static Item plate_kevlar;
|
||||
@ -1322,6 +1321,7 @@ public class ModItems {
|
||||
public static Item missile_schrabidium;
|
||||
public static Item missile_emp;
|
||||
public static Item missile_shuttle;
|
||||
public static Item missile_stealth;
|
||||
|
||||
public static Item mp_thruster_10_kerosene;
|
||||
public static Item mp_thruster_10_kerosene_tec;
|
||||
@ -2593,12 +2593,11 @@ public class ModItems {
|
||||
plate_mixed = new Item().setUnlocalizedName("plate_mixed").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_mixed");
|
||||
plate_paa = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("plate_paa").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_paa");
|
||||
board_copper = new Item().setUnlocalizedName("board_copper").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":board_copper");
|
||||
bolt_dura_steel = new Item().setUnlocalizedName("bolt_dura_steel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":bolt_dura_steel");
|
||||
pipes_steel = new Item().setUnlocalizedName("pipes_steel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pipes_steel");
|
||||
drill_titanium = new Item().setUnlocalizedName("drill_titanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":drill_titanium");
|
||||
plate_dalekanium = new Item().setUnlocalizedName("plate_dalekanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_dalekanium");
|
||||
plate_euphemium = new ItemCustomLore().setRarity(EnumRarity.epic).setUnlocalizedName("plate_euphemium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_euphemium");
|
||||
bolt_tungsten = new Item().setUnlocalizedName("bolt_tungsten").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":bolt_tungsten");
|
||||
bolt = new ItemAutogen(MaterialShapes.BOLT).setUnlocalizedName("bolt").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":bolt");
|
||||
bolt_compound = new Item().setUnlocalizedName("bolt_compound").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":bolt_compound");
|
||||
plate_polymer = new Item().setUnlocalizedName("plate_polymer").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_polymer");
|
||||
plate_kevlar = new Item().setUnlocalizedName("plate_kevlar").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_kevlar");
|
||||
@ -3942,6 +3941,7 @@ public class ModItems {
|
||||
missile_schrabidium = new Item().setUnlocalizedName("missile_schrabidium").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_schrabidium");
|
||||
missile_emp = new Item().setUnlocalizedName("missile_emp").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_emp");
|
||||
missile_shuttle = new ItemMissileShuttle().setUnlocalizedName("missile_shuttle").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_shuttle");
|
||||
missile_stealth = new Item().setUnlocalizedName("missile_stealth").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_stealth");
|
||||
missile_carrier = new Item().setUnlocalizedName("missile_carrier").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":missile_carrier");
|
||||
missile_soyuz = new ItemSoyuz().setUnlocalizedName("missile_soyuz").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":soyuz");
|
||||
missile_soyuz_lander = new ItemCustomLore().setUnlocalizedName("missile_soyuz_lander").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":soyuz_lander");
|
||||
@ -4161,7 +4161,7 @@ public class ModItems {
|
||||
gun_revolver_cursed = new ItemGunBase(Gun357MagnumFactory.getRevolverCursedConfig()).setUnlocalizedName("gun_revolver_cursed").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_cursed");
|
||||
gun_revolver_nightmare = new ItemGunBase(Gun357MagnumFactory.getRevolverNightmareConfig()).setUnlocalizedName("gun_revolver_nightmare").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare");
|
||||
gun_revolver_nightmare2 = new ItemGunBase(Gun357MagnumFactory.getRevolverNightmare2Config()).setUnlocalizedName("gun_revolver_nightmare2").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare2");
|
||||
gun_revolver_pip = new ItemGunBase(Gun44MagnumFactory.getMacintoshConfig()).setUnlocalizedName("gun_revolver_pip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_pip");
|
||||
gun_revolver_pip = new ItemGunPip(Gun44MagnumFactory.getMacintoshConfig()).setUnlocalizedName("gun_revolver_pip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_pip");
|
||||
gun_revolver_nopip = new ItemGunBase(Gun44MagnumFactory.getNovacConfig()).setUnlocalizedName("gun_revolver_nopip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nopip");
|
||||
gun_revolver_blackjack = new ItemGunBase(Gun44MagnumFactory.getBlackjackConfig()).setUnlocalizedName("gun_revolver_blackjack").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_blackjack");
|
||||
gun_revolver_silver = new ItemGunBase(Gun44MagnumFactory.getSilverConfig()).setUnlocalizedName("gun_revolver_silver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_silver");
|
||||
@ -6045,8 +6045,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(board_copper, board_copper.getUnlocalizedName());
|
||||
|
||||
//Bolts
|
||||
GameRegistry.registerItem(bolt_dura_steel, bolt_dura_steel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bolt_tungsten, bolt_tungsten.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bolt, bolt.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bolt_compound, bolt_compound.getUnlocalizedName());
|
||||
|
||||
//Cloth
|
||||
@ -6865,6 +6864,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(missile_schrabidium, missile_schrabidium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(missile_emp, missile_emp.getUnlocalizedName());
|
||||
GameRegistry.registerItem(missile_shuttle, missile_shuttle.getUnlocalizedName());
|
||||
GameRegistry.registerItem(missile_stealth, missile_stealth.getUnlocalizedName());
|
||||
GameRegistry.registerItem(missile_carrier, missile_carrier.getUnlocalizedName());
|
||||
GameRegistry.registerItem(missile_soyuz, missile_soyuz.getUnlocalizedName());
|
||||
GameRegistry.registerItem(missile_soyuz_lander, missile_soyuz_lander.getUnlocalizedName());
|
||||
|
||||
@ -49,7 +49,7 @@ public class ItemWatzPellet extends ItemEnumMulti {
|
||||
NQD( 0x4B4B4B, 0x121212, 2_000, 20, 0.01D, new FunctionLinear(2D), new FunctionSqrt(1D/25D).withOff(25D * 25D), null),
|
||||
NQR( 0x2D2D2D, 0x0B0B0B, 2_500, 30, 0.01D, new FunctionLinear(1.5D), new FunctionSqrt(1D/25D).withOff(25D * 25D), null);
|
||||
|
||||
public double yield = 1_000_000_000;
|
||||
public double yield = 500_000_000;
|
||||
public int colorLight;
|
||||
public int colorDark;
|
||||
public double mudContent; //how much mud per reaction flux should be produced
|
||||
@ -64,7 +64,7 @@ public class ItemWatzPellet extends ItemEnumMulti {
|
||||
this.colorDark = colorDark;
|
||||
this.passive = passive;
|
||||
this.heatEmission = heatEmission;
|
||||
this.mudContent = mudContent;
|
||||
this.mudContent = mudContent / 2D;
|
||||
this.burnFunc = burnFunction;
|
||||
this.heatDiv = heatDivisor;
|
||||
this.absorbFunc = absorbFunction;
|
||||
|
||||
@ -64,7 +64,7 @@ public class ItemAutogen extends Item {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
|
||||
|
||||
for(NTMMaterial mat : Mats.orderedList) {
|
||||
if(mat.shapes.contains(this.shape)) {
|
||||
list.add(new ItemStack(item, 1, mat.id));
|
||||
|
||||
@ -44,9 +44,9 @@ public class ItemTrain extends ItemEnumMulti {
|
||||
public static enum EnumTrainType {
|
||||
|
||||
// Engine Gauge Max Speed Accel. Eng. Brake Parking Brake
|
||||
CARGO_TRAM(TrainCargoTram.class, "Electric", "Standard Gauge", "10m/s", "0.2m/s", "<1m/s", "Yes"),
|
||||
CARGO_TRAM(TrainCargoTram.class, "Electric", "Standard Gauge", "10m/s", "0.2m/s²", "<1m/s", "Yes"),
|
||||
CARGO_TRAM_TRAILER(TrainCargoTramTrailer.class, null, "Standard Gauge", "Yes", null, null, "No"),
|
||||
TUNNEL_BORE(TrainTunnelBore.class, "NONE", "Standard Gauge", "10m/s", "0.2m/s", "<1m/s", "Yes");
|
||||
TUNNEL_BORE(TrainTunnelBore.class, "NONE", "Standard Gauge", "10m/s", "0.2m/s²", "<1m/s", "Yes");
|
||||
|
||||
public Class<? extends EntityRailCarBase> train;
|
||||
public String engine;
|
||||
@ -78,20 +78,24 @@ public class ItemTrain extends ItemEnumMulti {
|
||||
try { train = type.train.getConstructor(World.class).newInstance(world); } catch(Exception e) { }
|
||||
|
||||
if(train != null && train.getGauge() == ((IRailNTM) b).getGauge(world, x, y, z)) {
|
||||
if(!world.isRemote) {
|
||||
train.setPosition(x + fx, y + fy, z + fz);
|
||||
BlockPos anchor = train.getCurrentAnchorPos();
|
||||
train.rotationYaw = entity.rotationYaw;
|
||||
Vec3 corePos = train.getRelPosAlongRail(anchor, 0, new MoveContext(RailCheckType.CORE, 0));
|
||||
|
||||
train.setPosition(x + fx, y + fy, z + fz);
|
||||
BlockPos anchor = train.getCurrentAnchorPos();
|
||||
train.rotationYaw = entity.rotationYaw;
|
||||
Vec3 corePos = train.getRelPosAlongRail(anchor, 0, new MoveContext(RailCheckType.CORE, 0));
|
||||
if(corePos != null) {
|
||||
train.setPosition(corePos.xCoord, corePos.yCoord, corePos.zCoord);
|
||||
Vec3 frontPos = train.getRelPosAlongRail(anchor, train.getLengthSpan(), new MoveContext(RailCheckType.FRONT, train.getCollisionSpan() - train.getLengthSpan()));
|
||||
Vec3 backPos = train.getRelPosAlongRail(anchor, -train.getLengthSpan(), new MoveContext(RailCheckType.BACK, train.getCollisionSpan() - train.getLengthSpan()));
|
||||
train.rotationYaw = train.generateYaw(frontPos, backPos);
|
||||
world.spawnEntityInWorld(train);
|
||||
if(frontPos != null && backPos != null) {
|
||||
if(!world.isRemote) {
|
||||
train.rotationYaw = train.generateYaw(frontPos, backPos);
|
||||
world.spawnEntityInWorld(train);
|
||||
}
|
||||
stack.stackSize--;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
stack.stackSize--;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.hbm.items.tool;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.material.Mats;
|
||||
import com.hbm.items.IAnimatedItem;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
@ -50,14 +50,14 @@ public class ItemBoltgun extends Item implements IAnimatedItem {
|
||||
World world = player.worldObj;
|
||||
if(!entity.isEntityAlive()) return false;
|
||||
|
||||
Item[] bolts = new Item[] { ModItems.bolt_dura_steel, ModItems.bolt_tungsten, Item.getItemFromBlock(ModBlocks.steel_beam) };
|
||||
ItemStack[] bolts = new ItemStack[] { Mats.MAT_STEEL.make(ModItems.bolt), Mats.MAT_TUNGSTEN.make(ModItems.bolt), Mats.MAT_DURA.make(ModItems.bolt)};
|
||||
|
||||
for(Item item : bolts) {
|
||||
for(ItemStack bolt : bolts) {
|
||||
for(int i = 0; i < player.inventory.getSizeInventory(); i++) {
|
||||
ItemStack slot = player.inventory.getStackInSlot(i);
|
||||
|
||||
if(slot != null) {
|
||||
if(slot.getItem() == item) {
|
||||
if(slot.getItem() == bolt.getItem() && slot.getItemDamage() == bolt.getItemDamage()) {
|
||||
if(!world.isRemote) {
|
||||
world.playSoundAtEntity(entity, "hbm:item.boltgun", 1.0F, 1.0F);
|
||||
player.inventory.decrStackSize(i, 1);
|
||||
|
||||
@ -3,7 +3,8 @@ package com.hbm.items.tool;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.saveddata.TomSaveData;
|
||||
import com.hbm.world.WorldUtil;
|
||||
import com.hbm.world.biome.BiomeGenCraterBase;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@ -40,11 +41,19 @@ public class ItemWandD extends Item {
|
||||
TimeAnalyzer.endCount();
|
||||
TimeAnalyzer.dump();*/
|
||||
|
||||
TomSaveData data = TomSaveData.forWorld(world);
|
||||
/*TomSaveData data = TomSaveData.forWorld(world);
|
||||
data.impact = true;
|
||||
data.fire = 0F;
|
||||
data.dust = 0F;
|
||||
data.markDirty();
|
||||
data.markDirty();*/
|
||||
|
||||
for(int i = -5; i <= 5; i++) {
|
||||
for(int j = -5; j <= 5; j++) {
|
||||
WorldUtil.setBiome(world, pos.blockX + i, pos.blockZ + j, BiomeGenCraterBase.craterBiome);
|
||||
}
|
||||
}
|
||||
|
||||
WorldUtil.syncBiomeChange(world, pos.blockX, pos.blockZ);
|
||||
|
||||
/*EntityTomBlast tom = new EntityTomBlast(world);
|
||||
tom.posX = pos.blockX;
|
||||
|
||||
@ -790,6 +790,8 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
|
||||
if(!mainConfig.equipSound.isEmpty() && !player.worldObj.isRemote) {
|
||||
player.worldObj.playSoundAtEntity(player, mainConfig.equipSound, 1, 1);
|
||||
}
|
||||
|
||||
if(player instanceof EntityPlayerMP) PacketDispatcher.wrapper.sendTo(new GunAnimationPacket(AnimType.EQUIP.ordinal()), (EntityPlayerMP) player);
|
||||
}
|
||||
|
||||
protected static void queueCasing(Entity entity, CasingEjector ejector, BulletConfiguration bullet, ItemStack stack) {
|
||||
|
||||
@ -22,7 +22,6 @@ public class ItemGunBio extends ItemGunBase {
|
||||
super(config);
|
||||
}
|
||||
|
||||
/* just a test */
|
||||
public static long lastShot;
|
||||
public static List<double[]> smokeNodes = new ArrayList();
|
||||
|
||||
@ -66,8 +65,6 @@ public class ItemGunBio extends ItemGunBase {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BusAnimation getAnimation(ItemStack stack, AnimType type) {
|
||||
//GunConfiguration config = ((ItemGunBase) stack.getItem()).mainConfig;
|
||||
//return config.animations.get(type);
|
||||
|
||||
if(type == AnimType.CYCLE) {
|
||||
lastShot = System.currentTimeMillis();
|
||||
|
||||
138
src/main/java/com/hbm/items/weapon/ItemGunPip.java
Normal file
138
src/main/java/com/hbm/items/weapon/ItemGunPip.java
Normal file
@ -0,0 +1,138 @@
|
||||
package com.hbm.items.weapon;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemGunPip extends ItemGunBase {
|
||||
|
||||
public static long lastShot;
|
||||
public static List<double[]> smokeNodes = new ArrayList();
|
||||
|
||||
public ItemGunPip(GunConfiguration config) {
|
||||
super(config);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected void updateClient(ItemStack stack, World world, EntityPlayer entity, int slot, boolean isCurrentItem) {
|
||||
super.updateClient(stack, world, entity, slot, isCurrentItem);
|
||||
|
||||
boolean smoking = lastShot + 2000 > System.currentTimeMillis();
|
||||
|
||||
if(!smoking && !smokeNodes.isEmpty()) {
|
||||
smokeNodes.clear();
|
||||
}
|
||||
|
||||
if(smoking) {
|
||||
Vec3 prev = Vec3.createVectorHelper(-entity.motionX, -entity.motionY, -entity.motionZ);
|
||||
prev.rotateAroundY((float) (entity.rotationYaw * Math.PI / 180D));
|
||||
double accel = 15D;
|
||||
double side = (entity.rotationYaw - entity.prevRotationYawHead) * 0.1D;
|
||||
double waggle = 0.025D;
|
||||
|
||||
for(double[] node : smokeNodes) {
|
||||
node[0] += -prev.zCoord * accel + world.rand.nextGaussian() * waggle;
|
||||
node[1] += prev.yCoord + 1.5D;
|
||||
node[2] += prev.xCoord * accel + world.rand.nextGaussian() * waggle + side;
|
||||
}
|
||||
|
||||
double alpha = (System.currentTimeMillis() - lastShot) / 2000D;
|
||||
alpha = (1 - alpha) * 0.5D;
|
||||
|
||||
if(this.getIsReloading(stack)) alpha = 0;
|
||||
|
||||
smokeNodes.add(new double[] {0, 0, 0, alpha});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BusAnimation getAnimation(ItemStack stack, AnimType type) {
|
||||
|
||||
if(type == AnimType.EQUIP) {
|
||||
return new BusAnimation()
|
||||
.addBus("ROTATE", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(-360, 0, 0, 350))
|
||||
);
|
||||
}
|
||||
|
||||
if(type == AnimType.CYCLE) {
|
||||
lastShot = System.currentTimeMillis();
|
||||
int s = 1;
|
||||
return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 50 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, -3, 50 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 250 * s))
|
||||
)
|
||||
.addBus("HAMMER", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 1, 50 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 1, 300 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 200 * s))
|
||||
)
|
||||
.addBus("DRUM", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 1, 50 * s))
|
||||
);
|
||||
}
|
||||
|
||||
if(type == AnimType.RELOAD) {
|
||||
int s = 1;
|
||||
return new BusAnimation()
|
||||
.addBus("RELAOD_TILT", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(-15, 0, 0, 100 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(65, 0, 0, 100 * s)) //200
|
||||
.addKeyframe(new BusAnimationKeyframe(45, 0, 0, 50 * s)) //250
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 200 * s)) //450
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 1450 * s)) //1900
|
||||
.addKeyframe(new BusAnimationKeyframe(-80, 0, 0, 100 * s)) //2000
|
||||
.addKeyframe(new BusAnimationKeyframe(-80, 0, 0, 100 * s)) //2100
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 200 * s)) //2300
|
||||
)
|
||||
.addBus("RELOAD_CYLINDER", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 200 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(90, 0, 0, 100 * s)) //300
|
||||
.addKeyframe(new BusAnimationKeyframe(90, 0, 0, 1700 * s)) //2000
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 70 * s)) //2100
|
||||
)
|
||||
.addBus("RELOAD_LIFT", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 350 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(-45, 0, 0, 250 * s)) //600
|
||||
.addKeyframe(new BusAnimationKeyframe(-45, 0, 0, 350 * s)) //950
|
||||
.addKeyframe(new BusAnimationKeyframe(-15, 0, 0, 200 * s)) //1150
|
||||
.addKeyframe(new BusAnimationKeyframe(-15, 0, 0, 1050 * s)) //2200
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 100 * s)) //2300
|
||||
)
|
||||
.addBus("RELOAD_JOLT", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 600 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(2, 0, 0, 50 * s)) //650
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 100 * s)) //750
|
||||
)
|
||||
.addBus("RELOAD_BULLETS", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 650 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(10, 0, 0, 300 * s)) //950
|
||||
.addKeyframe(new BusAnimationKeyframe(10, 0, 0, 200 * s)) //1150
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 700 * s)) //1850
|
||||
)
|
||||
.addBus("RELOAD_BULLETS_CON", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 0 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 950 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 1 * s))
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -4,6 +4,7 @@ import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.material.Mats;
|
||||
import com.hbm.items.ItemAmmoEnums.Ammo357Magnum;
|
||||
import com.hbm.items.ItemAmmoEnums.AmmoFatman;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -54,7 +55,8 @@ public class HbmChestContents {
|
||||
new WeightedRandomChestContent(ModItems.hull_big_steel, 0, 1, 2, 2),
|
||||
new WeightedRandomChestContent(ModItems.hull_small_steel, 0, 1, 3, 3),
|
||||
new WeightedRandomChestContent(ModItems.plate_polymer, 0, 1, 6, 5),
|
||||
new WeightedRandomChestContent(ModItems.bolt_tungsten, 0, 1, 4, 3),
|
||||
new WeightedRandomChestContent(ModItems.bolt, Mats.MAT_STEEL.id, 4, 16, 3),
|
||||
new WeightedRandomChestContent(ModItems.bolt, Mats.MAT_TUNGSTEN.id, 4, 16, 3),
|
||||
new WeightedRandomChestContent(ModItems.board_copper, 0, 1, 2, 4),
|
||||
new WeightedRandomChestContent(ModItems.coil_tungsten, 0, 1, 2, 5),
|
||||
new WeightedRandomChestContent(ModItems.motor, 0, 1, 2, 4),
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (4824)";
|
||||
public static final String VERSION = "1.0.27 BETA (4837)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -185,7 +185,6 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeSolinium.class, new RenderNukeSolinium());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeN2.class, new RenderNukeN2());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeMan.class, new RenderNukeMan());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeN45.class, new RenderNukeN45());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeBalefire.class, new RenderNukeFstbmb());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBombMulti.class, new RenderBombMulti());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNukeMike.class, new RenderNukeMike());
|
||||
@ -536,7 +535,7 @@ public class ClientProxy extends ServerProxy {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_chemthrower, new ItemRenderWeaponChemthrower());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_m2, new ItemRenderM2());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_nopip, new ItemRenderWeaponNovac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_pip, new ItemRenderWeaponNovac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_pip, new ItemRenderWeaponLilMac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_blackjack, new ItemRenderWeaponNovac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_silver, new ItemRenderWeaponNovac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_red, new ItemRenderWeaponNovac());
|
||||
@ -668,6 +667,7 @@ public class ClientProxy extends ServerProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileCustom.class, new RenderMissileCustom());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileGeneric.class, new RenderMissileGeneric());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileDecoy.class, new RenderMissileGeneric());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileStealth.class, new RenderMissileGeneric());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileAntiBallistic.class, new RenderMissileGeneric());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileIncendiary.class, new RenderMissileGeneric());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileCluster.class, new RenderMissileGeneric());
|
||||
|
||||
@ -89,14 +89,15 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.big_sword, 1), new Object[] { "QIQ", "QIQ", "GSG", 'G', Items.gold_ingot, 'S', KEY_STICK, 'I', Items.iron_ingot, 'Q', Items.quartz});
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.board_copper, 1), new Object[] { "TTT", "TTT", 'T', CU.plate() });
|
||||
addRecipeAuto(Mats.MAT_IRON.make(ModItems.plate_cast), new Object[] { "BPB", "BPB", "BPB", 'B', ModItems.bolt_tungsten, 'P', IRON.plate() });
|
||||
addRecipeAuto(Mats.MAT_IRON.make(ModItems.plate_cast), new Object[] { "BPB", "BPB", "BPB", 'B', STEEL.bolt(), 'P', IRON.plate() });
|
||||
addRecipeAuto(new ItemStack(ModItems.hazmat_cloth_red, 1), new Object[] { "C", "R", "C", 'C', ModItems.hazmat_cloth, 'R', REDSTONE.dust() });
|
||||
addRecipeAuto(new ItemStack(ModItems.hazmat_cloth_grey, 1), new Object[] { " P ", "ICI", " L ", 'C', ModItems.hazmat_cloth_red, 'P', IRON.plate(), 'L', PB.plate(), 'I', ANY_RUBBER.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.asbestos_cloth, 8), new Object[] { "SCS", "CPC", "SCS", 'S', Items.string, 'P', BR.dust(), 'C', Blocks.wool });
|
||||
addRecipeAuto(new ItemStack(ModItems.bolt_dura_steel, 4), new Object[] { "D", "D", 'D', DURA.ingot()});
|
||||
addRecipeAuto(Mats.MAT_TUNGSTEN.make(ModItems.bolt, 16), new Object[] { "D", "D", 'D', W.ingot()});
|
||||
addRecipeAuto(Mats.MAT_STEEL.make(ModItems.bolt, 16), new Object[] { "D", "D", 'D', STEEL.ingot()});
|
||||
addRecipeAuto(Mats.MAT_DURA.make(ModItems.bolt, 16), new Object[] { "D", "D", 'D', DURA.ingot()});
|
||||
addRecipeAuto(new ItemStack(ModItems.pipes_steel, 1), new Object[] { "B", "B", "B", 'B', STEEL.block() });
|
||||
addRecipeAuto(new ItemStack(ModItems.bolt_tungsten, 4), new Object[] { "D", "D", 'D', W.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.bolt_compound, 1), new Object[] { "PDP", "PTP", "PDP", 'D', ModItems.bolt_dura_steel, 'T', ModItems.bolt_tungsten, 'P', TI.plate() });
|
||||
addRecipeAuto(new ItemStack(ModItems.bolt_compound, 1), new Object[] { "PDP", "PTP", "PDP", 'D', DURA.bolt(), 'T', W.bolt(), 'P', TI.plate() });
|
||||
addRecipeAuto(new ItemStack(ModItems.pellet_coal, 1), new Object[] { "PFP", "FOF", "PFP", 'P', COAL.dust(), 'F', Items.flint, 'O', ModBlocks.gravel_obsidian });
|
||||
addRecipeAuto(new ItemStack(ModItems.plate_polymer, 8), new Object[] { "DD", 'D', ANY_PLASTIC.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.plate_polymer, 8), new Object[] { "DD", 'D', ANY_RUBBER.ingot() });
|
||||
@ -249,7 +250,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.wrench, 1), new Object[] { " S ", " IS", "I ", 'S', STEEL.ingot(), 'I', IRON.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.wrench_flipped, 1), new Object[] { "S", "D", "W", 'S', Items.iron_sword, 'D', ModItems.ducttape, 'W', ModItems.wrench });
|
||||
addRecipeAuto(new ItemStack(ModItems.memespoon, 1), new Object[] { "CGC", "PSP", "IAI", 'C', ModItems.powder_cloud, 'G', TH232.block(), 'P', ModItems.photo_panel, 'S', ModItems.steel_shovel, 'I', ModItems.plate_polymer, 'A', "ingotAustralium" });
|
||||
addShapelessAuto(new ItemStack(ModItems.cbt_device, 1), new Object[] { ModItems.bolt_tungsten, ModItems.wrench });
|
||||
addShapelessAuto(new ItemStack(ModItems.cbt_device, 1), new Object[] { STEEL.bolt(), ModItems.wrench });
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.toothpicks, 3), new Object[] { KEY_STICK, KEY_STICK, KEY_STICK });
|
||||
addRecipeAuto(new ItemStack(ModItems.ducttape, 6), new Object[] { "FSF", "SPS", "FSF", 'F', Items.string, 'S', KEY_SLIME, 'P', Items.paper });
|
||||
@ -312,6 +313,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.mass_storage, 1, 2), new Object[] { "PCP", "PMP", "PPP", 'P', ANY_RESISTANTALLOY.ingot(), 'C', ModItems.circuit_gold, 'M', new ItemStack(ModBlocks.mass_storage, 1, 1) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.mass_storage, 1, 3), new Object[] { "PPP", "PIP", "PPP", 'P', KEY_PLANKS, 'I', IRON.plate() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_autocrafter, 1), new Object[] { "SCS", "MWM", "SCS", 'S', STEEL.plate(), 'C', ModItems.circuit_copper, 'M', ModItems.motor, 'W', Blocks.crafting_table });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_funnel, 1), new Object[] { "S S", "SRS", " S ", 'S', STEEL.ingot(), 'R', REDSTONE.dust() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_waste_drum, 1), new Object[] { "LRL", "BRB", "LRL", 'L', PB.ingot(), 'B', Blocks.iron_bars, 'R', ModItems.rod_quad_empty });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_press, 1), new Object[] { "IRI", "IPI", "IBI", 'I', IRON.ingot(), 'R', Blocks.furnace, 'B', IRON.block(), 'P', Blocks.piston });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_siren, 1), new Object[] { "SIS", "ICI", "SRS", 'S', STEEL.plate(), 'I', ANY_RUBBER.ingot(), 'C', ModItems.circuit_copper, 'R', REDSTONE.dust() });
|
||||
@ -325,15 +327,15 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fraction_spacer), new Object[] { "BHB", 'H', ModItems.hull_big_steel, 'B', Blocks.iron_bars });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.furnace_iron), new Object[] { "III", "IFI", "BBB", 'I', IRON.ingot(), 'F', Blocks.furnace, 'B', Blocks.stonebrick });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_mixer), new Object[] { "PIP", "GCG", "PMP", 'P', STEEL.plate(), 'I', DURA.ingot(), 'G', KEY_ANYPANE, 'C', ModItems.circuit_copper, 'M', ModItems.motor });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fan), new Object[] { "BPB", "PRP", "BPB", 'B', ModItems.bolt_tungsten, 'P', IRON.plate(), 'R', REDSTONE.dust() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.piston_inserter), new Object[] { "ITI", "TPT", "ITI", 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'I', IRON.plate(), 'T', ModItems.bolt_tungsten });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fan), new Object[] { "BPB", "PRP", "BPB", 'B', STEEL.bolt(), 'P', IRON.plate(), 'R', REDSTONE.dust() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.piston_inserter), new Object[] { "ITI", "TPT", "ITI", 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'I', IRON.plate(), 'T', STEEL.bolt() });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.muffler, 1), new Object[] { "III", "IWI", "III", 'I', ANY_RUBBER.ingot(), 'W', Blocks.wool });
|
||||
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_hull), 8), new Object[] { "PIP", "I I", "PIP", 'P', TI.plate(), 'I', TI.ingot() });
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_advanced_hull), 8), new Object[] { "PIP", "I I", "PIP", 'P', ALLOY.plate(), 'I', ALLOY.ingot() });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.arc_electrode, 1), new Object[] { "C", "T", "C", 'C', GRAPHITE.ingot(), 'T', ModItems.bolt_tungsten });
|
||||
addRecipeAuto(new ItemStack(ModItems.arc_electrode, 1), new Object[] { "C", "T", "C", 'C', GRAPHITE.ingot(), 'T', W.bolt() });
|
||||
addRecipeAuto(new ItemStack(ModItems.arc_electrode_desh, 1), new Object[] { "C", "T", "C", 'C', DESH.dust(), 'T', ModItems.arc_electrode });
|
||||
addRecipeAuto(new ItemStack(ModItems.detonator, 1), new Object[] { " W", "SC", "CE", 'S', STEEL.plate(), 'W', ModItems.wire_red_copper, 'C', ModItems.circuit_red_copper, 'E', STEEL.ingot() });
|
||||
addShapelessAuto(new ItemStack(ModItems.detonator_multi, 1), new Object[] { ModItems.detonator, ModItems.circuit_targeting_tier3 });
|
||||
@ -349,8 +351,8 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.crystal_xen, 1), new Object[] { "EEE", "EIE", "EEE", 'E', ModItems.powder_power, 'I', EUPH.ingot() });
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.fuse, 1), new Object[] { STEEL.plate(), ModItems.plate_polymer, ModItems.wire_tungsten });
|
||||
addShapelessAuto(new ItemStack(ModItems.overfuse, 1), new Object[] { ModItems.bolt_tungsten, NP237.dust(), I.dust(), TH232.dust(), AT.dust(), ND.dust(), ModItems.board_copper, ModItems.black_hole, CS.dust() });
|
||||
addShapelessAuto(new ItemStack(ModItems.overfuse, 1), new Object[] { ModItems.bolt_tungsten, ST.dust(), BR.dust(), CO.dust(), TS.dust(), NB.dust(), ModItems.board_copper, ModItems.black_hole, CE.dust() });
|
||||
addShapelessAuto(new ItemStack(ModItems.overfuse, 1), new Object[] { STEEL.bolt(), NP237.dust(), I.dust(), TH232.dust(), AT.dust(), ND.dust(), ModItems.board_copper, ModItems.black_hole, CS.dust() });
|
||||
addShapelessAuto(new ItemStack(ModItems.overfuse, 1), new Object[] { STEEL.bolt(), ST.dust(), BR.dust(), CO.dust(), TS.dust(), NB.dust(), ModItems.board_copper, ModItems.black_hole, CE.dust() });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.blades_steel, 1), new Object[] { " P ", "PIP", " P ", 'P', STEEL.plate(), 'I', STEEL.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.blades_titanium, 1), new Object[] { " P ", "PIP", " P ", 'P', TI.plate(), 'I', TI.ingot() });
|
||||
@ -382,8 +384,8 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_revolver_2, 1), new Object[] { "ATA", "TDT", "ATA", 'A', ALLOY.plate(), 'T', W.ingot(), 'D', DURA.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_rifle_1, 1), new Object[] { "ICI", "MAM", "ICI", 'I', IRON.plate(), 'C', CU.ingot(), 'A', AL.ingot(), 'M', ModItems.mechanism_revolver_1 });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_rifle_2, 1), new Object[] { "ATA", "MDM", "ATA", 'A', ALLOY.plate(), 'T', W.ingot(), 'D', DURA.ingot(), 'M', ModItems.mechanism_revolver_2 });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_launcher_1, 1), new Object[] { "TTT", "SSS", "BBI", 'T', TI.plate(), 'S', STEEL.ingot(), 'B', ModItems.bolt_tungsten, 'I', MINGRADE.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_launcher_2, 1), new Object[] { "TTT", "SSS", "BBI", 'T', ALLOY.plate(), 'S', ANY_PLASTIC.ingot(), 'B', ModItems.bolt_dura_steel, 'I', DESH.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_launcher_1, 1), new Object[] { "TTT", "SSS", "BBI", 'T', TI.plate(), 'S', STEEL.ingot(), 'B', W.bolt(), 'I', MINGRADE.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_launcher_2, 1), new Object[] { "TTT", "SSS", "BBI", 'T', ALLOY.plate(), 'S', ANY_PLASTIC.ingot(), 'B', W.bolt(), 'I', DESH.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.mechanism_special, 1), new Object[] { "PCI", "ISS", "PCI", 'P', ModItems.plate_desh, 'C', ModItems.coil_advanced_alloy, 'I', STAR.ingot(), 'S', ModItems.circuit_targeting_tier3 });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.watz_pump, 1), new Object[] { "MPM", "PCP", "PSP", 'M', ModItems.motor_desh, 'P', ANY_RESISTANTALLOY.plateCast(), 'C', KEY_CIRCUIT_BISMUTH, 'S', ModItems.pipes_steel });
|
||||
@ -448,7 +450,7 @@ public class CraftingManager {
|
||||
|
||||
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.reinforced_brick), 4), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.iron_bars, 'B', ModBlocks.brick_concrete });
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.brick_compound), 4), new Object[] { "FBF", "BTB", "FBF", 'F', ModItems.bolt_tungsten, 'B', ModBlocks.reinforced_brick, 'T', ANY_TAR.any() });
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.brick_compound), 4), new Object[] { "FBF", "BTB", "FBF", 'F', STEEL.bolt(), 'B', ModBlocks.reinforced_brick, 'T', ANY_TAR.any() });
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.reinforced_glass), 4), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.iron_bars, 'B', Blocks.glass });
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.reinforced_glass_pane), 16), new Object[] { " ", "GGG", "GGG", 'G', ModBlocks.reinforced_glass});
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.reinforced_laminate_pane), 16), new Object[] { " ", "LLL", "LLL", 'L', ModBlocks.reinforced_laminate});
|
||||
@ -511,6 +513,18 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_highspeed, 16), new Object[] { "S S", "SIS", "S S", 'S', STEEL.ingot(), 'I', IRON.plate() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_booster, 6), new Object[] { "S S", "CIC", "SRS", 'S', STEEL.ingot(), 'I', IRON.plate(), 'R', MINGRADE.ingot(), 'C', ModItems.coil_copper });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_large_straight, 4), new Object[] { "B B", "SSS", "W W", 'B', STEEL.bolt(), 'S', ModBlocks.steel_beam, 'W', KEY_SLAB });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.rail_large_straight, 1), new Object[] { ModBlocks.rail_large_straight_short, ModBlocks.rail_large_straight_short, ModBlocks.rail_large_straight_short, ModBlocks.rail_large_straight_short, ModBlocks.rail_large_straight_short });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.rail_large_straight_short, 5), new Object[] { ModBlocks.rail_large_straight });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_large_buffer, 1), new Object[] { " S", "RS", 'R', ModBlocks.rail_large_straight, 'S', STEEL.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_large_curve, 1), new Object[] { "R ", " R", 'R', ModBlocks.rail_large_straight });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_large_curve_7, 1), new Object[] { "RR", " R", 'R', ModBlocks.rail_large_straight });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_large_curve_9, 1), new Object[] { "RR ", " R", " R", 'R', ModBlocks.rail_large_straight });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_large_ramp, 1), new Object[] { " R ", "SSS", 'R', ModBlocks.rail_large_straight, 'S', KEY_SLAB });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.rail_large_switch, 1), new Object[] { "R R", " RR", " R", 'R', ModBlocks.rail_large_straight });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.rail_large_switch), new Object[] { ModBlocks.rail_large_switch_flipped });
|
||||
addShapelessAuto(new ItemStack(ModBlocks.rail_large_switch_flipped), new Object[] { ModBlocks.rail_large_switch });
|
||||
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.bomb_multi), 1), new Object[] { "AAD", "CHF", "AAD", 'A', ModItems.wire_aluminium, 'C', ModItems.circuit_aluminium, 'H', ModItems.hull_small_aluminium, 'F', ModItems.fins_quad_titanium, 'D', KEY_WHITE });
|
||||
addShapelessAuto(new ItemStack(ModItems.powder_ice, 4), new Object[] { Items.snowball, KNO.dust(), REDSTONE.dust() });
|
||||
addShapelessAuto(new ItemStack(ModItems.powder_poison, 4), new Object[] { Items.spider_eye, REDSTONE.dust(), NETHERQUARTZ.gem() });
|
||||
@ -598,21 +612,21 @@ public class CraftingManager {
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.wiring_red_copper, 1), new Object[] { "PPP", "PIP", "PPP", 'P', STEEL.plate(), 'I', STEEL.ingot() });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.jetpack_tank, 1), new Object[] { " S ", "BKB", " S ", 'S', STEEL.plate(), 'B', ModItems.bolt_tungsten, 'K', Fluids.KEROSENE.getDict(1000) });
|
||||
addRecipeAuto(new ItemStack(ModItems.gun_kit_1, 4), new Object[] { "I ", "LB", "P ", 'I', ANY_RUBBER.ingot(), 'L', Fluids.LUBRICANT.getDict(1000), 'B', ModItems.bolt_tungsten, 'P', IRON.plate() });
|
||||
addRecipeAuto(new ItemStack(ModItems.jetpack_tank, 1), new Object[] { " S ", "BKB", " S ", 'S', STEEL.plate(), 'B', STEEL.bolt(), 'K', Fluids.KEROSENE.getDict(1000) });
|
||||
addRecipeAuto(new ItemStack(ModItems.gun_kit_1, 4), new Object[] { "I ", "LB", "P ", 'I', ANY_RUBBER.ingot(), 'L', Fluids.LUBRICANT.getDict(1000), 'B', STEEL.bolt(), 'P', IRON.plate() });
|
||||
addRecipeAuto(new ItemStack(ModItems.gun_kit_2, 1), new Object[] { "III", "GLG", "PPP", 'I', ANY_RUBBER.ingot(), 'L', ModItems.ducttape, 'G', ModItems.gun_kit_1, 'P', IRON.plate() });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.igniter, 1), new Object[] { " W", "SC", "CE", 'S', STEEL.plate(), 'W', ModItems.wire_schrabidium, 'C', ModItems.circuit_schrabidium, 'E', EUPH.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.watch, 1), new Object[] { "LYL", "EWE", "LYL", 'E', EUPH.ingot(), 'L', KEY_BLUE, 'W', Items.clock, 'Y', ModItems.billet_yharonite });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.key, 1), new Object[] { " B", " B ", "P ", 'P', STEEL.plate(), 'B', ModItems.bolt_tungsten });
|
||||
addRecipeAuto(new ItemStack(ModItems.key, 1), new Object[] { " B", " B ", "P ", 'P', STEEL.plate(), 'B', STEEL.bolt() });
|
||||
addRecipeAuto(new ItemStack(ModItems.key_kit, 1), new Object[] { "PKP", "DTD", "PKP", 'P', GOLD.plate(), 'K', ModItems.key, 'D', DESH.dust(), 'T', KEY_TOOL_SCREWDRIVER });
|
||||
addRecipeAuto(new ItemStack(ModItems.key_red, 1), new Object[] { "RCA", "CIC", "KCR", 'R', KEY_RED, 'C', STAR.wireDense(), 'A', ModItems.gem_alexandrite, 'I', ModItems.ingot_chainsteel, 'K', ModItems.key });
|
||||
addRecipeAuto(new ItemStack(ModItems.pin, 1), new Object[] { "W ", " W", " W", 'W', ModItems.wire_copper });
|
||||
addRecipeAuto(new ItemStack(ModItems.padlock_rusty, 1), new Object[] { "I", "B", "I", 'I', IRON.ingot(), 'B', ModItems.bolt_tungsten });
|
||||
addRecipeAuto(new ItemStack(ModItems.padlock, 1), new Object[] { " P ", "PBP", "PPP", 'P', STEEL.plate(), 'B', ModItems.bolt_tungsten });
|
||||
addRecipeAuto(new ItemStack(ModItems.padlock_reinforced, 1), new Object[] { " P ", "PBP", "PDP", 'P', ALLOY.plate(), 'D', ModItems.plate_desh, 'B', ModItems.bolt_dura_steel });
|
||||
addRecipeAuto(new ItemStack(ModItems.padlock_unbreakable, 1), new Object[] { " P ", "PBP", "PDP", 'P', BIGMT.plate(), 'D', DIAMOND.gem(), 'B', ModItems.bolt_dura_steel });
|
||||
addRecipeAuto(new ItemStack(ModItems.padlock_rusty, 1), new Object[] { "I", "B", "I", 'I', IRON.ingot(), 'B', STEEL.bolt() });
|
||||
addRecipeAuto(new ItemStack(ModItems.padlock, 1), new Object[] { " P ", "PBP", "PPP", 'P', STEEL.plate(), 'B', STEEL.bolt() });
|
||||
addRecipeAuto(new ItemStack(ModItems.padlock_reinforced, 1), new Object[] { " P ", "PBP", "PDP", 'P', ALLOY.plate(), 'D', ModItems.plate_desh, 'B', DURA.bolt() });
|
||||
addRecipeAuto(new ItemStack(ModItems.padlock_unbreakable, 1), new Object[] { " P ", "PBP", "PDP", 'P', BIGMT.plate(), 'D', DIAMOND.gem(), 'B', DURA.bolt() });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.record_lc, 1), new Object[] { " S ", "SDS", " S ", 'S', ANY_PLASTIC.ingot(), 'D', LAPIS.dust() });
|
||||
addRecipeAuto(new ItemStack(ModItems.record_ss, 1), new Object[] { " S ", "SDS", " S ", 'S', ANY_PLASTIC.ingot(), 'D', ALLOY.dust() });
|
||||
@ -647,7 +661,7 @@ public class CraftingManager {
|
||||
}
|
||||
|
||||
//not so Temporary Crappy Recipes
|
||||
addRecipeAuto(new ItemStack(ModItems.piston_selenium, 1), new Object[] { "SSS", "STS", " D ", 'S', STEEL.plate(), 'T', W.ingot(), 'D', ModItems.bolt_dura_steel });
|
||||
addRecipeAuto(new ItemStack(ModItems.piston_selenium, 1), new Object[] { "SSS", "STS", " D ", 'S', STEEL.plate(), 'T', W.ingot(), 'D', DURA.bolt() });
|
||||
addShapelessAuto(new ItemStack(ModItems.catalyst_clay), new Object[] { IRON.dust(), Items.clay_ball });
|
||||
addRecipeAuto(new ItemStack(ModItems.singularity_spark, 1), new Object[] { "XAX", "BCB", "XAX", 'X', ModItems.plate_dineutronium, 'A', ModItems.singularity_counter_resonant, 'B', ModItems.singularity_super_heated, 'C', ModItems.black_hole });
|
||||
addRecipeAuto(new ItemStack(ModItems.singularity_spark, 1), new Object[] { "XBX", "ACA", "XBX", 'X', ModItems.plate_dineutronium, 'A', ModItems.singularity_counter_resonant, 'B', ModItems.singularity_super_heated, 'C', ModItems.black_hole });
|
||||
@ -695,7 +709,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.vent_chlorine_seal), new Object[] { "ISI", "SCS", "ISI", 'I', BIGMT.ingot(), 'S', STAR.ingot(), 'C', ModItems.chlorine_pinwheel });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.vent_cloud), new Object[] { "IGI", "ICI", "IDI", 'I', IRON.plate(), 'G', Blocks.iron_bars, 'C', ModItems.grenade_cloud, 'D', Blocks.dispenser });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.vent_pink_cloud), new Object[] { "IGI", "ICI", "IDI", 'I', IRON.plate(), 'G', Blocks.iron_bars, 'C', ModItems.grenade_pink_cloud, 'D', Blocks.dispenser });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.spikes, 4), new Object[] { "FFF", "BBB", "TTT", 'F', Items.flint, 'B', ModItems.bolt_tungsten, 'T', W.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.spikes, 4), new Object[] { "BBB", "BBB", "TTT", 'B', STEEL.bolt(), 'T', STEEL.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.custom_fall, 1), new Object[] { "IIP", "CHW", "IIP", 'I', ANY_RUBBER.ingot(), 'P', BIGMT.plate(), 'C', ModItems.circuit_red_copper, 'H', ModItems.hull_small_steel, 'W', ModItems.coil_copper });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_controller, 1), new Object[] { "TDT", "DCD", "TDT", 'T', ANY_RESISTANTALLOY.ingot(), 'D', ModItems.crt_display, 'C', ModItems.circuit_targeting_tier3 });
|
||||
addRecipeAuto(new ItemStack(ModItems.containment_box, 1), new Object[] { "LUL", "UCU", "LUL", 'L', PB.plate(), 'U', U238.billet(), 'C', ModBlocks.crate_steel });
|
||||
|
||||
@ -25,6 +25,7 @@ import com.hbm.inventory.FluidContainerRegistry;
|
||||
import com.hbm.inventory.OreDictManager;
|
||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.material.Mats;
|
||||
import com.hbm.inventory.recipes.*;
|
||||
import com.hbm.inventory.recipes.anvil.AnvilRecipes;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
@ -46,6 +47,7 @@ import com.hbm.tileentity.machine.TileEntityMachineReactorLarge;
|
||||
import com.hbm.tileentity.machine.TileEntityNukeFurnace;
|
||||
import com.hbm.tileentity.machine.rbmk.RBMKDials;
|
||||
import com.hbm.util.*;
|
||||
import com.hbm.world.biome.BiomeGenCraterBase;
|
||||
import com.hbm.world.feature.BedrockOre;
|
||||
import com.hbm.world.feature.OreCave;
|
||||
import com.hbm.world.feature.OreLayer3D;
|
||||
@ -270,6 +272,9 @@ public class MainRegistry {
|
||||
loadConfig(PreEvent);
|
||||
HbmPotion.init();
|
||||
|
||||
/* For whichever fucking reason, replacing the bolt items with a bolt autogen broke all autogen items, most likely due to the load order.
|
||||
* This "fix" just makes sure that the material system is loaded first no matter what. */
|
||||
Mats.MAT_STONE.getUnlocalizedName();
|
||||
Fluids.init();
|
||||
ModBlocks.mainRegistry();
|
||||
ModItems.mainRegistry();
|
||||
@ -290,6 +295,8 @@ public class MainRegistry {
|
||||
MinecraftForge.EVENT_BUS.register(oreMan); //OreRegisterEvent
|
||||
OreDictManager.registerGroups(); //important to run first
|
||||
OreDictManager.registerOres();
|
||||
|
||||
BiomeGenCraterBase.initDictionary();
|
||||
|
||||
Library.superuser.add("192af5d7-ed0f-48d8-bd89-9d41af8524f8");
|
||||
Library.superuser.add("5aee1e3d-3767-4987-a222-e7ce1fbdf88e");
|
||||
@ -1183,6 +1190,10 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:tile.brick_dungeon_tile");
|
||||
ignoreMappings.add("hbm:tile.brick_dungeon_circle");
|
||||
ignoreMappings.add("hbm:tile.bomber");
|
||||
ignoreMappings.add("hbm:item.bolt_tungsten");
|
||||
ignoreMappings.add("hbm:item.bolt_dura_steel");
|
||||
ignoreMappings.add("hbm:tile.rail_large_curve_wide");
|
||||
ignoreMappings.add("hbm:tile.nuke_n45");
|
||||
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
|
||||
@ -241,7 +241,7 @@ public class ModEventHandlerClient {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(Gui.icons);
|
||||
}*/
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
/*List<String> text = new ArrayList();
|
||||
MovingObjectPosition pos = Library.rayTrace(player, 500, 1, false, true, false);
|
||||
|
||||
for(int i = 0; i < 2; i++) if(pos != null && pos.typeOfHit == pos.typeOfHit.BLOCK) {
|
||||
@ -255,6 +255,11 @@ public class ModEventHandlerClient {
|
||||
|
||||
double distanceToCover = 4D * (i == 0 ? 1 : -1);
|
||||
|
||||
if(distanceToCover < 0) {
|
||||
distanceToCover *= -1;
|
||||
yaw += 180;
|
||||
}
|
||||
|
||||
do {
|
||||
|
||||
it++;
|
||||
@ -304,7 +309,7 @@ public class ModEventHandlerClient {
|
||||
} while(distanceToCover != 0);
|
||||
|
||||
ILookOverlay.printGeneric(event, "DEBUG", 0xffff00, 0x4040000, text);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/// HANLDE ANIMATION BUSES ///
|
||||
|
||||
@ -10,6 +10,7 @@ import com.hbm.items.armor.IArmorDisableModel;
|
||||
import com.hbm.items.armor.IArmorDisableModel.EnumPlayerPart;
|
||||
import com.hbm.packet.PermaSyncHandler;
|
||||
import com.hbm.render.model.ModelMan;
|
||||
import com.hbm.world.biome.BiomeGenCraterBase;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
@ -27,6 +28,8 @@ import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||
import net.minecraftforge.client.event.EntityViewRenderEvent.FogColors;
|
||||
@ -369,6 +372,17 @@ public class ModEventHandlerRenderer {
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.LOW)
|
||||
public void tintFog(FogColors event) {
|
||||
|
||||
EntityPlayer player = MainRegistry.proxy.me();
|
||||
BiomeGenBase biome = player.worldObj.getBiomeGenForCoords((int) Math.floor(player.posX), (int) Math.floor(player.posZ));
|
||||
|
||||
if(biome instanceof BiomeGenCraterBase) {
|
||||
int color = ForgeHooksClient.getSkyBlendColour(player.worldObj, (int) Math.floor(player.posX), (int) Math.floor(player.posY), (int) Math.floor(player.posZ));
|
||||
event.red = ((color & 0xff0000) >> 16) / 255F;
|
||||
event.green = ((color & 0x00ff00) >> 8) / 255F;
|
||||
event.blue = (color & 0x0000ff) / 255F;
|
||||
}
|
||||
|
||||
float soot = (float) (renderSoot - RadiationConfig.sootFogThreshold);
|
||||
float sootColor = 0.15F;
|
||||
float sootReq = (float) RadiationConfig.sootFogDivisor;
|
||||
|
||||
@ -254,7 +254,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom shredder = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/shredder.obj"));
|
||||
|
||||
//Bombs
|
||||
public static final IModelCustom bomb_gadget = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/TheGadget3.obj"));
|
||||
public static final IModelCustom bomb_gadget = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/gadget.obj")).asDisplayList();
|
||||
public static final IModelCustom bomb_boy = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/LilBoy1.obj"));
|
||||
public static final IModelCustom bomb_man = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/FatMan.obj")).asDisplayList();
|
||||
public static final IModelCustom bomb_mike = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/ivymike.obj"));
|
||||
@ -671,7 +671,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation shredder_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/shredder.png");
|
||||
|
||||
//Bombs
|
||||
public static final ResourceLocation bomb_gadget_tex = new ResourceLocation(RefStrings.MODID, "textures/models/TheGadget3_tex.png");
|
||||
public static final ResourceLocation bomb_gadget_tex = new ResourceLocation(RefStrings.MODID, "textures/models/bombs/gadget.png");
|
||||
public static final ResourceLocation bomb_boy_tex = new ResourceLocation(RefStrings.MODID, "textures/models/lilboy.png");
|
||||
public static final ResourceLocation bomb_man_tex = new ResourceLocation(RefStrings.MODID, "textures/models/FatMan.png");
|
||||
public static final ResourceLocation bomb_mike_tex = new ResourceLocation(RefStrings.MODID, "textures/models/bombs/ivymike.png");
|
||||
@ -828,6 +828,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom cryocannon = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/cryo_cannon.obj")).asDisplayList();
|
||||
public static final IModelCustom uac_pistol = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/UAC pistol.obj")).asDisplayList();
|
||||
public static final IModelCustom congolake = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/congolake.obj")).asDisplayList();
|
||||
public static final IModelCustom lilmac = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lilmac.obj")).asDisplayList();
|
||||
|
||||
public static final IModelCustom lance = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lance.obj"));
|
||||
|
||||
@ -925,6 +926,8 @@ public class ResourceManager {
|
||||
public static final ResourceLocation cryocannon_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/cryo_cannon.png");
|
||||
public static final ResourceLocation uac_pistol_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/pistol_texture.png");
|
||||
public static final ResourceLocation congolake_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/congolake.png");
|
||||
public static final ResourceLocation lilmac_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lilmac.png");
|
||||
public static final ResourceLocation lilmac_scope_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lilmac_scope.png");
|
||||
|
||||
public static final ResourceLocation lance_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lance.png");
|
||||
|
||||
@ -1044,6 +1047,7 @@ public class ResourceManager {
|
||||
//Missiles
|
||||
public static final IModelCustom missileV2 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/missile_v2.obj")).asDisplayList();
|
||||
public static final IModelCustom missileABM = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/missile_abm.obj")).asDisplayList();
|
||||
public static final IModelCustom missileStealth = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/missile_stealth.obj"), false).asDisplayList();
|
||||
public static final IModelCustom missileStrong = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/missile_strong.obj"));
|
||||
public static final IModelCustom missileHuge = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/missile_huge.obj"));
|
||||
public static final IModelCustom missileNuclear = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missileNeon.obj"));
|
||||
@ -1188,6 +1192,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation missileV2_BU_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_v2_bu.png");
|
||||
public static final ResourceLocation missileV2_decoy_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_v2_decoy.png");
|
||||
public static final ResourceLocation missileAA_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_abm.png");
|
||||
public static final ResourceLocation missileStealth_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_stealth.png");
|
||||
public static final ResourceLocation missileStrong_HE_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_strong.png");
|
||||
public static final ResourceLocation missileStrong_EMP_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_strong_emp.png");
|
||||
public static final ResourceLocation missileStrong_IN_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_strong_inc.png");
|
||||
@ -1464,11 +1469,16 @@ public class ResourceManager {
|
||||
public static final IModelCustom rail_narrow_straight = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_narrow.obj"));
|
||||
public static final IModelCustom rail_narrow_curve = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_narrow_bend.obj"));
|
||||
public static final IModelCustom rail_standard_straight = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard.obj"));
|
||||
public static final IModelCustom rail_standard_straight_short = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_short.obj"));
|
||||
public static final IModelCustom rail_standard_curve = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_bend.obj"));
|
||||
public static final IModelCustom rail_standard_curve_wide7 = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_bend_wide.obj"));
|
||||
public static final IModelCustom rail_standard_curve_wide9 = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_bend_wide9.obj"));
|
||||
public static final IModelCustom rail_standard_ramp = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_ramp.obj"));
|
||||
public static final IModelCustom rail_standard_buffer = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_buffer.obj"));
|
||||
public static final IModelCustom rail_standard_switch = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_switch.obj"));
|
||||
public static final IModelCustom rail_standard_switch_flipped = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_switch_flipped.obj"));
|
||||
public static final IModelCustom capacitor = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/capacitor.obj"));
|
||||
public static final IModelCustom funnel = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/funnel.obj"));
|
||||
|
||||
public static final IModelCustom charge_dynamite = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/charge_dynamite.obj"));
|
||||
public static final IModelCustom charge_c4 = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/charge_c4.obj"));
|
||||
|
||||
@ -5,7 +5,6 @@ import com.hbm.items.weapon.ItemMissile.PartSize;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.tileentity.bomb.TileEntityCompactLauncher;
|
||||
import com.hbm.tileentity.bomb.TileEntityLaunchTable;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeN45;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSBase;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSEmitter;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSLimiter;
|
||||
@ -127,11 +126,6 @@ public class AuxGaugePacket implements IMessage {
|
||||
if(m.id == 0)
|
||||
boiler.heat = m.value;
|
||||
}
|
||||
if (te instanceof TileEntityNukeN45) {
|
||||
TileEntityNukeN45 nuke = (TileEntityNukeN45)te;
|
||||
|
||||
nuke.primed = m.value == 1;
|
||||
}
|
||||
if (te instanceof TileEntityCompactLauncher) {
|
||||
TileEntityCompactLauncher launcher = (TileEntityCompactLauncher)te;
|
||||
|
||||
|
||||
@ -28,8 +28,8 @@ public class BiomeSyncPacket implements IMessage {
|
||||
}
|
||||
|
||||
public BiomeSyncPacket(int blockX, int blockZ, byte biome) {
|
||||
this.chunkX = blockX << 4;
|
||||
this.chunkZ = blockZ << 4;
|
||||
this.chunkX = blockX >> 4;
|
||||
this.chunkZ = blockZ >> 4;
|
||||
this.blockX = (byte) (blockX & 15);
|
||||
this.blockZ = (byte) (blockZ & 15);
|
||||
this.biome = biome;
|
||||
@ -63,7 +63,6 @@ public class BiomeSyncPacket implements IMessage {
|
||||
this.blockX = buf.readByte();
|
||||
this.blockZ = buf.readByte();
|
||||
} else {
|
||||
buf.writeBoolean(true);
|
||||
this.biomeArray = new byte[256];
|
||||
for(int i = 0; i < 256; i++) {
|
||||
this.biomeArray[i] = buf.readByte();
|
||||
@ -80,12 +79,15 @@ public class BiomeSyncPacket implements IMessage {
|
||||
World world = Minecraft.getMinecraft().theWorld;
|
||||
if(!world.getChunkProvider().chunkExists(m.chunkX, m.chunkZ)) return null;
|
||||
Chunk chunk = world.getChunkFromChunkCoords(m.chunkX, m.chunkZ);
|
||||
chunk.isModified = true;
|
||||
|
||||
if(m.biomeArray == null) {
|
||||
chunk.getBiomeArray()[(m.blockZ & 15) << 4 | (m.blockX & 15)] = m.biome;
|
||||
world.markBlockRangeForRenderUpdate(m.chunkX << 4, 0, m.chunkZ << 4, m.chunkX << 4, 255, m.chunkZ << 4);
|
||||
} else {
|
||||
for(int i = 0; i < 256; i++) {
|
||||
chunk.getBiomeArray()[i] = m.biomeArray[i];
|
||||
world.markBlockRangeForRenderUpdate(m.chunkX << 4, 0, m.chunkZ << 4, (m.chunkX << 4) + 15, 255, (m.chunkZ << 4) + 15);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -20,7 +20,8 @@ public class HbmAnimations {
|
||||
CYCLE, //animation for every firing cycle
|
||||
ALT_CYCLE, //animation for alt fire cycles
|
||||
SPINUP, //animation for actionstart
|
||||
SPINDOWN //animation for actionend
|
||||
SPINDOWN, //animation for actionend
|
||||
EQUIP //animation for drawing the weapon
|
||||
}
|
||||
|
||||
public static class Animation {
|
||||
|
||||
@ -2,7 +2,7 @@ package com.hbm.render.block;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.rail.IRenderRail;
|
||||
import com.hbm.blocks.rail.IRenderBlock;
|
||||
import com.hbm.blocks.rail.RailStandardStraight;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
@ -17,7 +17,7 @@ public class RenderRail implements ISimpleBlockRenderingHandler {
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
IRenderRail rail = (IRenderRail) block;
|
||||
IRenderBlock rail = (IRenderBlock) block;
|
||||
rail.renderInventory(tessellator, block, metadata);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@ -28,7 +28,7 @@ public class RenderRail implements ISimpleBlockRenderingHandler {
|
||||
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
|
||||
tessellator.setColorOpaque_F(1, 1, 1);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
IRenderRail rail = (IRenderRail) block;
|
||||
IRenderBlock rail = (IRenderBlock) block;
|
||||
rail.renderWorld(tessellator, block, meta, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.render.entity.rocket;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.entity.missile.EntityMissileAntiBallistic;
|
||||
import com.hbm.entity.missile.EntityMissileStealth;
|
||||
import com.hbm.entity.missile.EntityMissileTier1.*;
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
@ -28,6 +29,9 @@ public class RenderMissileGeneric extends Render {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.missileABM.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
} else if(entity instanceof EntityMissileStealth) {
|
||||
bindTexture(ResourceManager.missileStealth_tex);
|
||||
ResourceManager.missileStealth.renderAll();
|
||||
} else {
|
||||
|
||||
if(entity instanceof EntityMissileGeneric)
|
||||
|
||||
@ -411,17 +411,6 @@ public class ItemRenderLibrary {
|
||||
bindTexture(ResourceManager.duchessgambit_tex); ResourceManager.duchessgambit.renderAll();
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.nuke_gadget), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glScaled(5, 5, 5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glTranslated(0.25, 0, 0);
|
||||
bindTexture(ResourceManager.bomb_gadget_tex);
|
||||
ResourceManager.bomb_gadget.renderAll();
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.nuke_boy), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glScaled(5, 5, 5);
|
||||
|
||||
@ -0,0 +1,256 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.ItemGunPip;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderWeaponLilMac implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation lilmac_plume = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lilmac_plume.png");
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
|
||||
//prevent rendering when using scope
|
||||
if(item.getItem() == ModItems.gun_revolver_pip && type == ItemRenderType.EQUIPPED_FIRST_PERSON && MainRegistry.proxy.me().isSneaking()) return;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
|
||||
double s0 = 0.1D;
|
||||
GL11.glRotated(25, 0, 0, 1);
|
||||
GL11.glTranslated(1.0, 0.25, -0.25);
|
||||
GL11.glRotated(170, 0, 1, 0);
|
||||
GL11.glScaled(s0, s0, s0);
|
||||
double width = 0.5D;
|
||||
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
double[] reloadLift = HbmAnimations.getRelevantTransformation("RELOAD_LIFT");
|
||||
double[] reloadJolt = HbmAnimations.getRelevantTransformation("RELOAD_JOLT");
|
||||
double[] equipSpin = HbmAnimations.getRelevantTransformation("ROTATE");
|
||||
GL11.glTranslated(2, 0, 0);
|
||||
GL11.glRotated(equipSpin[0], 0, 0, 1);
|
||||
GL11.glTranslated(-2, 0, 0);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0F);
|
||||
GL11.glTranslated(-10, 2.25, 0);
|
||||
GL11.glTranslated(-recoil[2] * 3.5, -recoil[2] * 1.375, 0);
|
||||
|
||||
if(ItemGunPip.smokeNodes.size() > 1 && equipSpin[0] == 0) {
|
||||
|
||||
tess.startDrawingQuads();
|
||||
tess.setNormal(0F, 1F, 0F);
|
||||
|
||||
for(int i = 0; i < ItemGunPip.smokeNodes.size() - 1; i++) {
|
||||
double[] node = ItemGunPip.smokeNodes.get(i);
|
||||
double[] past = ItemGunPip.smokeNodes.get(i + 1);
|
||||
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, (float) node[3]);
|
||||
tess.addVertex(node[0], node[1], node[2]);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
|
||||
tess.addVertex(node[0], node[1], node[2] + width);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
|
||||
tess.addVertex(past[0], past[1], past[2] + width);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, (float) past[3]);
|
||||
tess.addVertex(past[0], past[1], past[2]);
|
||||
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, (float) node[3]);
|
||||
tess.addVertex(node[0], node[1], node[2]);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
|
||||
tess.addVertex(node[0], node[1], node[2] - width);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
|
||||
tess.addVertex(past[0], past[1], past[2] - width);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, (float) past[3]);
|
||||
tess.addVertex(past[0], past[1], past[2]);
|
||||
}
|
||||
GL11.glDepthMask(false);
|
||||
tess.draw();
|
||||
GL11.glDepthMask(true);
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glAlphaFunc(GL11.GL_GEQUAL, 0.1F);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glTranslated(0, reloadLift[0] / -22D, 0);
|
||||
|
||||
GL11.glTranslated(recoil[0], recoil[1], recoil[2]);
|
||||
GL11.glRotated(recoil[2] * 10, 0, 0, 1);
|
||||
GL11.glRotated(reloadLift[0], 0, 0, 1);
|
||||
GL11.glTranslated(reloadJolt[0], 0, 0);
|
||||
|
||||
double[] reloadTilt = HbmAnimations.getRelevantTransformation("RELAOD_TILT");
|
||||
GL11.glRotated(reloadTilt[0], 1, 0, 0);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lilmac_scope_tex);
|
||||
ResourceManager.lilmac.renderPart("Scope");
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lilmac_tex);
|
||||
ResourceManager.lilmac.renderPart("Gun");
|
||||
|
||||
double[] cylinderFlip = HbmAnimations.getRelevantTransformation("RELOAD_CYLINDER");
|
||||
GL11.glPushMatrix(); /// DRUM PUSH ///
|
||||
GL11.glRotated(cylinderFlip[0], 1, 0, 0);
|
||||
ResourceManager.lilmac.renderPart("Pivot");
|
||||
GL11.glTranslated(0, 1.75, 0);
|
||||
GL11.glRotated(HbmAnimations.getRelevantTransformation("DRUM")[2] * -60, 1, 0, 0);
|
||||
GL11.glTranslated(0, -1.75, 0);
|
||||
ResourceManager.lilmac.renderPart("Cylinder");
|
||||
double[] reloadBullets = HbmAnimations.getRelevantTransformation("RELOAD_BULLETS");
|
||||
GL11.glTranslated(reloadBullets[0], reloadBullets[1], reloadBullets[2]);
|
||||
if(HbmAnimations.getRelevantTransformation("RELOAD_BULLETS_CON")[0] != 1)
|
||||
ResourceManager.lilmac.renderPart("Bullets");
|
||||
ResourceManager.lilmac.renderPart("Casings");
|
||||
GL11.glPopMatrix(); /// DRUM POP ///
|
||||
|
||||
GL11.glPushMatrix(); /// HAMMER ///
|
||||
GL11.glTranslated(4, 1.25, 0);
|
||||
GL11.glRotated(-30 + 30 * HbmAnimations.getRelevantTransformation("HAMMER")[2], 0, 0, 1);
|
||||
GL11.glTranslated(-4, -1.25, 0);
|
||||
ResourceManager.lilmac.renderPart("Hammer");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
int flash = 75;
|
||||
if(System.currentTimeMillis() - ItemGunPip.lastShot < flash) {
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.125, 2.25, 0);
|
||||
|
||||
double fire = (System.currentTimeMillis() - ItemGunPip.lastShot) / (double) flash;
|
||||
|
||||
double height = 4 * fire;
|
||||
double length = 15 * fire;
|
||||
double lift = 3 * fire;
|
||||
double offset = 1 * fire;
|
||||
double lengthOffset = 0.125;
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(lilmac_plume);
|
||||
tess.startDrawingQuads();
|
||||
tess.setNormal(0F, 1F, 0F);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 1F);
|
||||
|
||||
tess.addVertexWithUV(0, -height, -offset, 1, 1);
|
||||
tess.addVertexWithUV(0, height, -offset, 0, 1);
|
||||
tess.addVertexWithUV(0, height + lift, length - offset, 0 ,0);
|
||||
tess.addVertexWithUV(0, -height + lift, length - offset, 1, 0);
|
||||
|
||||
tess.addVertexWithUV(0, height, offset, 0, 1);
|
||||
tess.addVertexWithUV(0, -height, offset, 1, 1);
|
||||
tess.addVertexWithUV(0, -height + lift, -length + offset, 1, 0);
|
||||
tess.addVertexWithUV(0, height + lift, -length + offset, 0 ,0);
|
||||
|
||||
tess.addVertexWithUV(0, -height, -offset, 1, 1);
|
||||
tess.addVertexWithUV(0, height, -offset, 0, 1);
|
||||
tess.addVertexWithUV(lengthOffset, height, length - offset, 0 ,0);
|
||||
tess.addVertexWithUV(lengthOffset, -height, length - offset, 1, 0);
|
||||
|
||||
tess.addVertexWithUV(0, height, offset, 0, 1);
|
||||
tess.addVertexWithUV(0, -height, offset, 1, 1);
|
||||
tess.addVertexWithUV(lengthOffset, -height, -length + offset, 1, 0);
|
||||
tess.addVertexWithUV(lengthOffset, height, -length + offset, 0 ,0);
|
||||
|
||||
tess.draw();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case EQUIPPED:
|
||||
|
||||
double scale = 0.1D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(100, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-3F, 1F, 4F);
|
||||
|
||||
break;
|
||||
|
||||
case ENTITY:
|
||||
|
||||
double s1 = 0.075D;
|
||||
GL11.glScaled(s1, s1, s1);
|
||||
GL11.glTranslatef(0F, 1F, 0F);
|
||||
|
||||
break;
|
||||
|
||||
case INVENTORY:
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0F);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
double s = 0.8D;
|
||||
GL11.glTranslated(8, 8, 0);
|
||||
GL11.glRotated(180, 0, 1, 0);
|
||||
GL11.glRotated(135, 0, 0, 1);
|
||||
GL11.glScaled(s, s, -s);
|
||||
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
if(type != ItemRenderType.EQUIPPED_FIRST_PERSON) {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lilmac_scope_tex);
|
||||
ResourceManager.lilmac.renderPart("Scope");
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lilmac_tex);
|
||||
ResourceManager.lilmac.renderPart("Gun");
|
||||
ResourceManager.lilmac.renderPart("Cylinder");
|
||||
ResourceManager.lilmac.renderPart("Bullets");
|
||||
ResourceManager.lilmac.renderPart("Casings");
|
||||
ResourceManager.lilmac.renderPart("Pivot");
|
||||
ResourceManager.lilmac.renderPart("Hammer");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -32,19 +32,21 @@ public class RenderLaunchPadTier1 extends TileEntitySpecialRenderer {
|
||||
|
||||
//TODO: add a registry for missile rendering to be reused here and for the entity renderer
|
||||
if(toRender.getItem() == ModItems.missile_generic) {
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
bindTexture(ResourceManager.missileV2_HE_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.missileV2.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
if(toRender.getItem() == ModItems.missile_decoy) {
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
bindTexture(ResourceManager.missileV2_decoy_tex);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.missileV2.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
if(toRender.getItem() == ModItems.missile_stealth) {
|
||||
bindTexture(ResourceManager.missileStealth_tex);
|
||||
ResourceManager.missileStealth.renderAll();
|
||||
}
|
||||
if(toRender.getItem() == ModItems.missile_strong) {
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
bindTexture(ResourceManager.missileStrong_HE_tex);
|
||||
|
||||
@ -2,38 +2,66 @@ package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderNukeGadget extends TileEntitySpecialRenderer {
|
||||
public class RenderNukeGadget extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
switch(tileEntity.getBlockMetadata())
|
||||
{
|
||||
case 2:
|
||||
GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 4:
|
||||
GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 3:
|
||||
GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 5:
|
||||
GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(tileEntity.getBlockMetadata()) {
|
||||
case 2: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
bindTexture(ResourceManager.bomb_gadget_tex);
|
||||
ResourceManager.bomb_gadget.renderAll();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.bomb_gadget_tex);
|
||||
ResourceManager.bomb_gadget.renderPart("Body");
|
||||
|
||||
if(Minecraft.getMinecraft().gameSettings.fancyGraphics)
|
||||
ResourceManager.bomb_gadget.renderPart("Wires");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.nuke_gadget);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glScaled(5, 5, 5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glRotatef(-90, 0F, 1F, 0F);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.bomb_gadget_tex);
|
||||
ResourceManager.bomb_gadget.renderPart("Body");
|
||||
|
||||
if(Minecraft.getMinecraft().gameSettings.fancyGraphics)
|
||||
ResourceManager.bomb_gadget.renderPart("Wires");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,113 +0,0 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeN45;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class RenderNukeN45 extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f)
|
||||
{
|
||||
boolean standing = tileEntity.getWorldObj().getBlock(tileEntity.xCoord, tileEntity.yCoord - 1, tileEntity.zCoord).isNormalCube();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
bindTexture(ResourceManager.universal);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
//GL11.glScaled(2.0D, 2.0D, 2.0D);
|
||||
|
||||
if(standing) {
|
||||
ResourceManager.n45_stand.renderAll();
|
||||
}
|
||||
|
||||
double d = 0.25;
|
||||
|
||||
if(((TileEntityNukeN45)tileEntity).primed)
|
||||
d /= 4D;
|
||||
|
||||
GL11.glTranslated(0, standing ? 1D : 0.5D, 0);
|
||||
|
||||
ResourceManager.n45_globe.renderAll();
|
||||
|
||||
GL11.glRotated(90, 1, 0, 0);
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
ResourceManager.n45_knob.renderAll();
|
||||
GL11.glTranslated(0, -d, 0);
|
||||
ResourceManager.n45_rod.renderAll();
|
||||
GL11.glTranslated(0, d, 0);
|
||||
GL11.glRotated(45, 0, 0, 1);
|
||||
}
|
||||
|
||||
GL11.glRotated(45, 0, 0, 1);
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
GL11.glRotated(-45, 1, 0, 0);
|
||||
ResourceManager.n45_knob.renderAll();
|
||||
GL11.glTranslated(0, -d, 0);
|
||||
ResourceManager.n45_rod.renderAll();
|
||||
GL11.glTranslated(0, d, 0);
|
||||
GL11.glRotated(45, 1, 0, 0);
|
||||
GL11.glRotated(90, 0, 0, 1);
|
||||
}
|
||||
|
||||
GL11.glRotated(-90, 0, 0, 1);
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
GL11.glRotated(45, 1, 0, 0);
|
||||
ResourceManager.n45_knob.renderAll();
|
||||
GL11.glTranslated(0, -d, 0);
|
||||
ResourceManager.n45_rod.renderAll();
|
||||
GL11.glTranslated(0, d, 0);
|
||||
GL11.glRotated(-45, 1, 0, 0);
|
||||
GL11.glRotated(90, 0, 0, 1);
|
||||
}
|
||||
|
||||
GL11.glRotated(45, 0, 0, 1);
|
||||
GL11.glRotated(-90, 1, 0, 0);
|
||||
|
||||
ResourceManager.n45_knob.renderAll();
|
||||
GL11.glTranslated(0, -d, 0);
|
||||
ResourceManager.n45_rod.renderAll();
|
||||
GL11.glTranslated(0, d, 0);
|
||||
|
||||
if(!standing) {
|
||||
int depth = 0;
|
||||
|
||||
for(int i = 0; i < 51; i++) {
|
||||
|
||||
if(!tileEntity.getWorldObj().getBlock(tileEntity.xCoord, tileEntity.yCoord - i - 1, tileEntity.zCoord).isNormalCube()) {
|
||||
depth++;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(depth != 0 && depth < 51) {
|
||||
|
||||
GL11.glTranslated(0, -1D, 0);
|
||||
|
||||
for(int i = 0; i < depth + 1; i++) {
|
||||
|
||||
ResourceManager.n45_chain.renderAll();
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -38,7 +38,7 @@ public class RenderSolarBoiler extends TileEntitySpecialRenderer {
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
if(te instanceof TileEntitySolarBoiler && Minecraft.getMinecraft().gameSettings.particleSetting < 2) {
|
||||
if(te instanceof TileEntitySolarBoiler && !Minecraft.getMinecraft().gameSettings.fancyGraphics) {
|
||||
TileEntitySolarBoiler boiler = (TileEntitySolarBoiler) te;
|
||||
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
@ -128,7 +128,6 @@ public class TileMappings {
|
||||
put(TileEntityLandmine.class, "tileentity_landmine");
|
||||
put(TileEntityMachineKeyForge.class, "tileentity_key_forge");
|
||||
put(TileEntitySellafield.class, "tileentity_sellafield_core");
|
||||
put(TileEntityNukeN45.class, "tileentity_n45");
|
||||
put(TileEntityBlastDoor.class, "tileentity_blast_door");
|
||||
put(TileEntitySafe.class, "tileentity_safe");
|
||||
put(TileEntityMachineGasCent.class, "tileentity_gas_centrifuge");
|
||||
@ -297,8 +296,9 @@ public class TileMappings {
|
||||
put(TileEntityFoundryOutlet.class, "tileentity_foundry_outlet");
|
||||
put(TileEntityFoundrySlagtap.class, "tileentity_foundry_slagtap");
|
||||
put(TileEntitySlag.class, "tileentity_foundry_slag");
|
||||
|
||||
|
||||
put(TileEntityMachineAutocrafter.class, "tileentity_autocrafter");
|
||||
put(TileEntityMachineFunnel.class, "tileentity_funnel");
|
||||
put(TileEntityDiFurnaceRTG.class, "tileentity_rtg_difurnace");
|
||||
put(TileEntityMachineRadiolysis.class, "tileentity_radiolysis");
|
||||
put(TileEntityUVLamp.class, "tileentity_uv_lamp");
|
||||
|
||||
@ -12,6 +12,7 @@ import com.hbm.entity.missile.EntityMissileAntiBallistic;
|
||||
import com.hbm.entity.missile.EntityMissileBaseNT;
|
||||
import com.hbm.entity.missile.EntityMissileDoomsday;
|
||||
import com.hbm.entity.missile.EntityMissileShuttle;
|
||||
import com.hbm.entity.missile.EntityMissileStealth;
|
||||
import com.hbm.entity.missile.EntityMissileTier0.*;
|
||||
import com.hbm.entity.missile.EntityMissileTier1.*;
|
||||
import com.hbm.entity.missile.EntityMissileTier2.*;
|
||||
@ -88,8 +89,9 @@ public class TileEntityLaunchPad extends TileEntityMachineBase implements IEnerg
|
||||
missiles.put(new ComparableStack(ModItems.missile_nuclear), EntityMissileNuclear.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_nuclear_cluster), EntityMissileMirv.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_volcano), EntityMissileVolcano.class);
|
||||
|
||||
|
||||
missiles.put(new ComparableStack(ModItems.missile_doomsday), EntityMissileDoomsday.class);
|
||||
missiles.put(new ComparableStack(ModItems.missile_stealth), EntityMissileStealth.class);
|
||||
}
|
||||
|
||||
public ItemStack toRender;
|
||||
|
||||
@ -1,326 +0,0 @@
|
||||
package com.hbm.tileentity.bomb;
|
||||
|
||||
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.inventory.container.ContainerNukeN45;
|
||||
import com.hbm.inventory.gui.GUINukeN45;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityNukeN45 extends TileEntity implements ISidedInventory, IGUIProvider {
|
||||
|
||||
public ItemStack slots[];
|
||||
private String customName;
|
||||
|
||||
public boolean primed = false;
|
||||
|
||||
public TileEntityNukeN45() {
|
||||
slots = new ItemStack[2];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return slots.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i) {
|
||||
return slots[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
if(slots[i].stackSize <= j)
|
||||
{
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
}
|
||||
ItemStack itemStack1 = slots[i].splitStack(j);
|
||||
if (slots[i].stackSize == 0)
|
||||
{
|
||||
slots[i] = null;
|
||||
}
|
||||
|
||||
return itemStack1;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i) {
|
||||
if(slots[i] != null)
|
||||
{
|
||||
ItemStack itemStack = slots[i];
|
||||
slots[i] = null;
|
||||
return itemStack;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemStack) {
|
||||
slots[i] = itemStack;
|
||||
if(itemStack != null && itemStack.stackSize > getInventoryStackLimit())
|
||||
{
|
||||
itemStack.stackSize = getInventoryStackLimit();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return this.hasCustomInventoryName() ? this.customName : "container.nukeN45";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return this.customName != null && this.customName.length() > 0;
|
||||
}
|
||||
|
||||
public void setCustomName(String name) {
|
||||
this.customName = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
if(worldObj.getTileEntity(xCoord, yCoord, zCoord) != this)
|
||||
{
|
||||
return false;
|
||||
}else{
|
||||
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <=64;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int p_94128_1_) {
|
||||
return new int[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int i, ItemStack itemStack, int j) {
|
||||
return this.isItemValidForSlot(i, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
NBTTagList list = nbt.getTagList("items", 10);
|
||||
|
||||
primed = nbt.getBoolean("primed");
|
||||
|
||||
slots = new ItemStack[getSizeInventory()];
|
||||
|
||||
for(int i = 0; i < list.tagCount(); i++)
|
||||
{
|
||||
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
|
||||
byte b0 = nbt1.getByte("slot");
|
||||
if(b0 >= 0 && b0 < slots.length)
|
||||
{
|
||||
slots[b0] = ItemStack.loadItemStackFromNBT(nbt1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
NBTTagList list = new NBTTagList();
|
||||
|
||||
nbt.setBoolean("primed", primed);
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
{
|
||||
if(slots[i] != null)
|
||||
{
|
||||
NBTTagCompound nbt1 = new NBTTagCompound();
|
||||
nbt1.setByte("slot", (byte)i);
|
||||
slots[i].writeToNBT(nbt1);
|
||||
list.appendTag(nbt1);
|
||||
}
|
||||
}
|
||||
nbt.setTag("items", list);
|
||||
}
|
||||
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxGaugePacket(xCoord, yCoord, zCoord, primed ? 1 : 0, 0), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
|
||||
|
||||
if(primed) {
|
||||
|
||||
if(getType() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
int rad = 0;
|
||||
|
||||
if(slots[1] != null) {
|
||||
|
||||
if(slots[1].getItem() == ModItems.upgrade_effect_1)
|
||||
rad = 5;
|
||||
if(slots[1].getItem() == ModItems.upgrade_effect_2)
|
||||
rad = 10;
|
||||
if(slots[1].getItem() == ModItems.upgrade_effect_3)
|
||||
rad = 15;
|
||||
}
|
||||
|
||||
if(rad == 0) {
|
||||
primed = false;
|
||||
return;
|
||||
}
|
||||
|
||||
List<Object> list = worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(xCoord + 0.5 - rad, yCoord + 0.5 - rad, zCoord + 0.5 - rad, xCoord + 0.5 + rad, yCoord + 0.5 + rad, zCoord + 0.5 + rad));
|
||||
|
||||
for(Object o : list) {
|
||||
|
||||
Entity e = (Entity)o;
|
||||
|
||||
if(e instanceof EntityLivingBase && e.width * e.width * e.height >= 0.5 && !((EntityLivingBase)e).isPotionActive(Potion.invisibility.id)) {
|
||||
int t = getType();
|
||||
this.clearSlots();
|
||||
explode(worldObj, xCoord, yCoord, zCoord, t);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void explode(World world, int x, int y, int z, int type) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
|
||||
//System.out.println(type);
|
||||
|
||||
switch(type) {
|
||||
case 1:
|
||||
world.createExplosion(null, x + 0.5, y + 0.5, z + 0.5, 1.5F, true);
|
||||
break;
|
||||
case 2:
|
||||
world.createExplosion(null, x + 0.5, y + 0.5, z + 0.5, 4.0F, true);
|
||||
break;
|
||||
case 3:
|
||||
ExplosionLarge.explode(world, x, y, z, 15, true, false, false);
|
||||
break;
|
||||
case 4:
|
||||
world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, (int)(BombConfig.missileRadius * 0.75F), x + 0.5, y + 0.5, z + 0.5));
|
||||
EntityNukeTorex.statFac(world, x + 0.5, y + 0.5, z + 0.5, BombConfig.missileRadius * 0.75F);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
|
||||
if(!primed && slots[1] != null) {
|
||||
|
||||
if(slots[1].getItem() == ModItems.upgrade_effect_1 ||
|
||||
slots[1].getItem() == ModItems.upgrade_effect_2 ||
|
||||
slots[1].getItem() == ModItems.upgrade_effect_3)
|
||||
return 100;
|
||||
}
|
||||
|
||||
if(slots[0] != null) {
|
||||
|
||||
if(slots[0].getItem() == Item.getItemFromBlock(ModBlocks.det_cord))
|
||||
return 1;
|
||||
if(slots[0].getItem() == Item.getItemFromBlock(Blocks.tnt))
|
||||
return 2;
|
||||
if(slots[0].getItem() == Item.getItemFromBlock(ModBlocks.det_charge))
|
||||
return 3;
|
||||
if(slots[0].getItem() == Item.getItemFromBlock(ModBlocks.det_nuke))
|
||||
return 4;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void clearSlots() {
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
{
|
||||
slots[i] = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return TileEntity.INFINITE_EXTENT_AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared()
|
||||
{
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerNukeN45(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUINukeN45(player.inventory, this);
|
||||
}
|
||||
|
||||
}
|
||||
@ -354,7 +354,7 @@ public class TileEntityMachineArcWelder extends TileEntityMachineBase implements
|
||||
|
||||
@Override
|
||||
public void provideInfo(UpgradeType type, int level, List<String> info, boolean extendedInfo) {
|
||||
info.add(IUpgradeInfoProvider.getStandardLabel(ModBlocks.machine_electric_furnace_off));
|
||||
info.add(IUpgradeInfoProvider.getStandardLabel(ModBlocks.machine_arc_welder));
|
||||
if(type == UpgradeType.SPEED) {
|
||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(this.KEY_DELAY, "-" + (level * 100 / 6) + "%"));
|
||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(this.KEY_CONSUMPTION, "+" + (level * 100) + "%"));
|
||||
|
||||
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