PERFLUOROMETHYL WANTS TO KNOW YOUR LOCATION
14
changelog
@ -1,7 +1,17 @@
|
||||
## Changed
|
||||
* The bedrock ore processor now has an NEI handler
|
||||
* Boilers and crucibles will only consume as much heat fom the source as they can actually accept instead of a fixed rate, preventing them from wasting excess heat
|
||||
* Boilers and crucibles will only consume as much heat from the source as they can actually accept instead of a fixed rate, preventing them from wasting excess heat
|
||||
* Rockets can now be made with rocket fuel in addition to cordite (only requires one)
|
||||
* The rocket recipes using cordite now use 3 pieces of smokeless powder instead of 2
|
||||
* Iron ore fragments now take 4x longer to process into steal using the rotary furnace, but require only a quarter of the steam per tick
|
||||
* Little known secret: it is, indeed, possible to increase processing throughput by playing more than one machine. Either people don't know this, or they fear the immense cost of the rotary furnace, that being a few stone bricks, iron ingots and copper plates. Truly a king's ransom.
|
||||
* Optimized rendering for conveyor belt items, each frame no longer creates a new item stack and item entity instance which need to be removed by the GC right after
|
||||
* Changed fuel stats for HEAus, it's now a linear fuel with a multiplier of 35 with a heat/flux of 1.5°C
|
||||
* Digamma RBMK fuel now lasts substantially longer
|
||||
* RBMK dials now have gamerules for disabling rod depletion and xenon poison
|
||||
|
||||
## Fixed
|
||||
* Fixed incorrect tooltip in the automatic control rod's GUI
|
||||
* Fixed recipe autogen creating recipes for nonexistant thorium bedrock ore
|
||||
* Fixed recipe autogen creating recipes for nonexistant thorium bedrock ore
|
||||
* Fixed FBI agents spawning both the old and new bullet entities when firing
|
||||
* Fixed dupe concerning one of the weapon abilities
|
||||
@ -89,5 +89,5 @@ public interface IFluidConnector extends ILoadedTile {
|
||||
}
|
||||
}
|
||||
|
||||
public static final boolean particleDebug = false;
|
||||
public static final boolean particleDebug = true;
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ INDEX includes:
|
||||
optionally returning a value
|
||||
|
||||
On the implementation side we can expect:
|
||||
- ROR readers, torches which have a list of named values which are read, as well as frequencies on which these values are boradcasted
|
||||
- ROR readers, torches which have a list of named values which are read, as well as frequencies on which these values are broadcasted
|
||||
- ROR controllers, torches which have one frequency and can receive commands with parameters which will be executed on the component
|
||||
- ROR programmers, torches which have a list of frequencies and return frequencies which can receive commands with parameters and
|
||||
then send the return value on the return frequency
|
||||
|
||||
@ -3,11 +3,14 @@ package com.hbm.blocks.machine.albion;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPADetector;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockPADetector extends BlockDummyable {
|
||||
|
||||
@ -20,10 +23,21 @@ public class BlockPADetector extends BlockDummyable {
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityPADetector();
|
||||
if(meta >= 6) return new TileEntityProxyCombo().power().fluid();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return standardOpenBehavior(world, x, y, z, player, side);
|
||||
}
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] {2, 2, 2, 2, 4, 4}; }
|
||||
@Override public int getOffset() { return 0; }
|
||||
@Override public int getHeightOffset() { return 2; }
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,11 +3,14 @@ package com.hbm.blocks.machine.albion;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPADipole;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockPADipole extends BlockDummyable {
|
||||
|
||||
@ -20,10 +23,30 @@ public class BlockPADipole extends BlockDummyable {
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityPADipole();
|
||||
if(meta >= 6) return new TileEntityProxyCombo().power().fluid();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return standardOpenBehavior(world, x, y, z, player, side);
|
||||
}
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] {1, 1, 1, 1, 1, 1}; }
|
||||
@Override public int getOffset() { return 0; }
|
||||
@Override public int getHeightOffset() { return 1; }
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
this.makeExtra(world, x + 1, y - 1, z);
|
||||
this.makeExtra(world, x - 1, y - 1, z);
|
||||
this.makeExtra(world, x, y - 1, z + 1);
|
||||
this.makeExtra(world, x, y - 1, z - 1);
|
||||
this.makeExtra(world, x + 1, y + 1, z);
|
||||
this.makeExtra(world, x - 1, y + 1, z);
|
||||
this.makeExtra(world, x, y + 1, z + 1);
|
||||
this.makeExtra(world, x, y + 1, z - 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,11 +3,14 @@ package com.hbm.blocks.machine.albion;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPAQuadrupole;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockPAQuadrupole extends BlockDummyable {
|
||||
|
||||
@ -20,10 +23,26 @@ public class BlockPAQuadrupole extends BlockDummyable {
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityPAQuadrupole();
|
||||
if(meta >= 6) return new TileEntityProxyCombo().power().fluid();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return standardOpenBehavior(world, x, y, z, player, side);
|
||||
}
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] {1, 1, 1, 1, 1, 1}; }
|
||||
@Override public int getOffset() { return 0; }
|
||||
@Override public int getHeightOffset() { return 1; }
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
this.makeExtra(world, x + dir.offsetX, y, z + dir.offsetZ);
|
||||
this.makeExtra(world, x - dir.offsetX, y, z - dir.offsetZ);
|
||||
this.makeExtra(world, x, y + 1, z);
|
||||
this.makeExtra(world, x, y - 1, z);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,11 +3,14 @@ package com.hbm.blocks.machine.albion;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPARFC;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockPARFC extends BlockDummyable {
|
||||
|
||||
@ -20,10 +23,29 @@ public class BlockPARFC extends BlockDummyable {
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityPARFC();
|
||||
if(meta >= 6) return new TileEntityProxyCombo().power().fluid();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return standardOpenBehavior(world, x, y, z, player, side);
|
||||
}
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] {1, 1, 1, 1, 4, 4}; }
|
||||
@Override public int getOffset() { return 0; }
|
||||
@Override public int getHeightOffset() { return 1; }
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
dir = dir.getRotation(ForgeDirection.UP);
|
||||
this.makeExtra(world, x + dir.offsetX * 3, y + 1, z + dir.offsetZ * 3);
|
||||
this.makeExtra(world, x - dir.offsetX * 3, y + 1, z - dir.offsetZ * 3);
|
||||
this.makeExtra(world, x, y + 1, z);
|
||||
this.makeExtra(world, x + dir.offsetX * 3, y - 1, z + dir.offsetZ * 3);
|
||||
this.makeExtra(world, x - dir.offsetX * 3, y - 1, z - dir.offsetZ * 3);
|
||||
this.makeExtra(world, x, y - 1, z);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,11 +3,14 @@ package com.hbm.blocks.machine.albion;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPASource;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockPASource extends BlockDummyable {
|
||||
|
||||
@ -20,10 +23,21 @@ public class BlockPASource extends BlockDummyable {
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityPASource();
|
||||
if(meta >= 6) return new TileEntityProxyCombo().power().fluid();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return standardOpenBehavior(world, x, y, z, player, side);
|
||||
}
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] {1, 1, 1, 1, 4, 4}; }
|
||||
@Override public int getOffset() { return 0; }
|
||||
@Override public int getHeightOffset() { return 1; }
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,6 +15,8 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class EntityMovingItem extends EntityMovingConveyorObject implements IConveyorItem {
|
||||
|
||||
public EntityItem cacheForRender = null;
|
||||
|
||||
public EntityMovingItem(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
@ -67,6 +69,23 @@ public class EntityMovingItem extends EntityMovingConveyorObject implements ICon
|
||||
this.getDataWatcher().addObjectByDataType(10, 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(worldObj.isRemote) {
|
||||
ItemStack item = this.getItemStack();
|
||||
//initial cache creation
|
||||
if(this.cacheForRender == null) {
|
||||
cacheForRender = new EntityItem(worldObj, 0, 0, 0, item);
|
||||
}
|
||||
//if the cache is no longer relevant, update
|
||||
if(!ItemStack.areItemStacksEqual(cacheForRender.getEntityItem(), item)) {
|
||||
cacheForRender.setEntityItemStack(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
|
||||
|
||||
@ -8,7 +8,6 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.MobConfig;
|
||||
import com.hbm.entity.mob.ai.EntityAIBreaking;
|
||||
import com.hbm.entity.pathfinder.PathFinderUtils;
|
||||
import com.hbm.entity.projectile.EntityBullet;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@ -141,24 +140,6 @@ public class EntityFBI extends EntityMob implements IRangedAttackMob {
|
||||
|
||||
@Override
|
||||
public void attackEntityWithRangedAttack(EntityLivingBase entity, float f) {
|
||||
|
||||
if(this.getEquipmentInSlot(0) != null) {
|
||||
if(this.getEquipmentInSlot(0).getItem() == ModItems.gun_heavy_revolver) {
|
||||
EntityBullet bullet = new EntityBullet(worldObj, this, entity, 3F, 2);
|
||||
bullet.damage = 10;
|
||||
this.worldObj.spawnEntityInWorld(bullet);
|
||||
this.playSound("hbm:weapon.revolverShootAlt", 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
if(this.getEquipmentInSlot(0).getItem() == ModItems.gun_spas12) {
|
||||
for(int i = 0; i < 7; i++) {
|
||||
EntityBullet bullet = new EntityBullet(worldObj, this, entity, 3F, 5);
|
||||
bullet.damage = 3;
|
||||
this.worldObj.spawnEntityInWorld(bullet);
|
||||
}
|
||||
this.playSound("hbm:weapon.shotgunShoot", 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static final Set<Block> canDestroy = new HashSet();
|
||||
|
||||
@ -82,7 +82,7 @@ public abstract class WeaponAbility {
|
||||
if(victim instanceof EntityLivingBase) {
|
||||
|
||||
EntityLivingBase living = (EntityLivingBase) victim;
|
||||
|
||||
if(living.getHealth() <= 0) return;
|
||||
living.setHealth(living.getHealth() - amount);
|
||||
if(living.getHealth() <= 0) living.onDeath(DamageSource.magic);
|
||||
player.heal(amount);
|
||||
|
||||
@ -0,0 +1,72 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPADipole;
|
||||
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerPADipole extends Container {
|
||||
|
||||
private TileEntityPADipole quadrupole;
|
||||
|
||||
public ContainerPADipole(InventoryPlayer playerInv, TileEntityPADipole tile) {
|
||||
quadrupole = tile;
|
||||
|
||||
//Battery
|
||||
this.addSlotToContainer(new Slot(tile, 0, 8, 72));
|
||||
//Coil
|
||||
this.addSlotToContainer(new Slot(tile, 1, 89, 36));
|
||||
|
||||
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, 122 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, i, 8 + i * 18, 180));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return quadrupole.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
ItemStack rStack = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(index);
|
||||
|
||||
if(slot != null && slot.getHasStack()) {
|
||||
ItemStack stack = slot.getStack();
|
||||
rStack = stack.copy();
|
||||
|
||||
if(index <= 1) {
|
||||
if(!this.mergeItemStack(stack, 2, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(rStack.getItem() instanceof IBatteryItem || rStack.getItem() == ModItems.battery_creative) {
|
||||
if(!this.mergeItemStack(stack, 0, 1, false)) return null;
|
||||
} else {
|
||||
if(!this.mergeItemStack(stack, 1, 2, false)) return null;
|
||||
}
|
||||
}
|
||||
|
||||
if(stack.stackSize == 0) {
|
||||
slot.putStack((ItemStack) null);
|
||||
} else {
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return rStack;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPAQuadrupole;
|
||||
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerPAQuadrupole extends Container {
|
||||
|
||||
private TileEntityPAQuadrupole quadrupole;
|
||||
|
||||
public ContainerPAQuadrupole(InventoryPlayer playerInv, TileEntityPAQuadrupole tile) {
|
||||
quadrupole = tile;
|
||||
|
||||
//Battery
|
||||
this.addSlotToContainer(new Slot(tile, 0, 26, 72));
|
||||
//Coil
|
||||
this.addSlotToContainer(new Slot(tile, 1, 71, 36));
|
||||
|
||||
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, 122 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, i, 8 + i * 18, 180));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return quadrupole.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
ItemStack rStack = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(index);
|
||||
|
||||
if(slot != null && slot.getHasStack()) {
|
||||
ItemStack stack = slot.getStack();
|
||||
rStack = stack.copy();
|
||||
|
||||
if(index <= 1) {
|
||||
if(!this.mergeItemStack(stack, 2, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(rStack.getItem() instanceof IBatteryItem || rStack.getItem() == ModItems.battery_creative) {
|
||||
if(!this.mergeItemStack(stack, 0, 1, false)) return null;
|
||||
} else {
|
||||
if(!this.mergeItemStack(stack, 1, 2, false)) return null;
|
||||
}
|
||||
}
|
||||
|
||||
if(stack.stackSize == 0) {
|
||||
slot.putStack((ItemStack) null);
|
||||
} else {
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return rStack;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPARFC;
|
||||
|
||||
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 ContainerPARFC extends Container {
|
||||
|
||||
private TileEntityPARFC rfc;
|
||||
|
||||
public ContainerPARFC(InventoryPlayer playerInv, TileEntityPARFC tile) {
|
||||
rfc = tile;
|
||||
|
||||
//Battery
|
||||
this.addSlotToContainer(new Slot(tile, 0, 53, 72));
|
||||
|
||||
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, 122 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, i, 8 + i * 18, 180));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return rfc.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
ItemStack rStack = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(index);
|
||||
|
||||
if(slot != null && slot.getHasStack()) {
|
||||
ItemStack stack = slot.getStack();
|
||||
rStack = stack.copy();
|
||||
|
||||
if(index <= 0) {
|
||||
if(!this.mergeItemStack(stack, 1, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
if(!this.mergeItemStack(stack, 0, 1, false)) return null;
|
||||
}
|
||||
|
||||
if(stack.stackSize == 0) {
|
||||
slot.putStack((ItemStack) null);
|
||||
} else {
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return rStack;
|
||||
}
|
||||
}
|
||||
@ -44,6 +44,9 @@ public class Fluids {
|
||||
public static FluidType ULTRAHOTSTEAM;
|
||||
public static FluidType COOLANT;
|
||||
public static FluidType COOLANT_HOT;
|
||||
public static FluidType PERFLUOROMETHYL;
|
||||
public static FluidType PERFLUOROMETHYL_COLD;
|
||||
public static FluidType PERFLUOROMETHYL_HOT;
|
||||
public static FluidType LAVA;
|
||||
public static FluidType DEUTERIUM;
|
||||
public static FluidType TRITIUM;
|
||||
@ -384,7 +387,10 @@ public class Fluids {
|
||||
VITRIOL = new FluidType("VITRIOL", 0x6E5222, 2, 0, 1, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS);
|
||||
SLOP = new FluidType("SLOP", 0x929D45, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS);
|
||||
LEAD = new FluidType("LEAD", 0x666672, 4, 0, 0, EnumSymbol.NONE).setTemp(350).addTraits(LIQUID, VISCOUS);
|
||||
LEAD_HOT = new FluidType(143, "LEAD_HOT", 0x776563, 4, 0, 0, EnumSymbol.NONE).setTemp(1500).addTraits(LIQUID, VISCOUS);
|
||||
LEAD_HOT = new FluidType("LEAD_HOT", 0x776563, 4, 0, 0, EnumSymbol.NONE).setTemp(1500).addTraits(LIQUID, VISCOUS);
|
||||
PERFLUOROMETHYL = new FluidType("PERFLUOROMETHYL", 0xBDC8DC, 1, 0, 1, EnumSymbol.NONE).setTemp(15).addTraits(LIQUID);
|
||||
PERFLUOROMETHYL_COLD = new FluidType("PERFLUOROMETHYL_COLD",0x99DADE, 1, 0, 1, EnumSymbol.NONE).setTemp(-150).addTraits(LIQUID);
|
||||
PERFLUOROMETHYL_HOT = new FluidType(146, "PERFLUOROMETHYL_HOT",0xB899DE, 1, 0, 1, EnumSymbol.NONE).setTemp(250).addTraits(LIQUID);
|
||||
|
||||
// ^ ^ ^ ^ ^ ^ ^ ^
|
||||
//ADD NEW FLUIDS HERE
|
||||
@ -414,6 +420,9 @@ public class Fluids {
|
||||
metaOrder.add(CARBONDIOXIDE);
|
||||
metaOrder.add(COOLANT);
|
||||
metaOrder.add(COOLANT_HOT);
|
||||
metaOrder.add(PERFLUOROMETHYL);
|
||||
metaOrder.add(PERFLUOROMETHYL_COLD);
|
||||
metaOrder.add(PERFLUOROMETHYL_HOT);
|
||||
metaOrder.add(CRYOGEL);
|
||||
metaOrder.add(MUG);
|
||||
metaOrder.add(MUG_HOT);
|
||||
@ -608,6 +617,10 @@ public class Fluids {
|
||||
COOLANT.addTraits(new FT_Heatable().setEff(HeatingType.HEATEXCHANGER, 1.0D).setEff(HeatingType.PWR, 1.0D).setEff(HeatingType.ICF, 1.0D).addStep(300, 1, COOLANT_HOT, 1));
|
||||
COOLANT_HOT.addTraits(new FT_Coolable(COOLANT, 1, 1, 300).setEff(CoolingType.HEATEXCHANGER, 1.0D));
|
||||
|
||||
PERFLUOROMETHYL_COLD.addTraits(new FT_Heatable().setEff(HeatingType.PA, 1.0D).addStep(300, 1, PERFLUOROMETHYL, 1));
|
||||
PERFLUOROMETHYL.addTraits(new FT_Heatable().setEff(HeatingType.HEATEXCHANGER, 1.0D).setEff(HeatingType.PWR, 1.0D).setEff(HeatingType.ICF, 1.0D).addStep(300, 1, PERFLUOROMETHYL_HOT, 1));
|
||||
PERFLUOROMETHYL_HOT.addTraits(new FT_Coolable(PERFLUOROMETHYL, 1, 1, 300).setEff(CoolingType.HEATEXCHANGER, 1.0D));
|
||||
|
||||
MUG.addTraits(new FT_Heatable().setEff(HeatingType.HEATEXCHANGER, 1.0D).setEff(HeatingType.PWR, 1.0D).setEff(HeatingType.ICF, 1.25D).addStep(400, 1, MUG_HOT, 1), new FT_PWRModerator(1.15D));
|
||||
MUG_HOT.addTraits(new FT_Coolable(MUG, 1, 1, 400).setEff(CoolingType.HEATEXCHANGER, 1.0D));
|
||||
|
||||
|
||||
@ -71,7 +71,8 @@ public class FT_Heatable extends FluidTrait {
|
||||
BOILER("Boilable"),
|
||||
HEATEXCHANGER("Heatable"),
|
||||
PWR("PWR Coolant"),
|
||||
ICF("ICF Coolant");
|
||||
ICF("ICF Coolant"),
|
||||
PA("Particle Accelerator Coolant");
|
||||
|
||||
public String name;
|
||||
|
||||
|
||||
67
src/main/java/com/hbm/inventory/gui/GUIPADipole.java
Normal file
@ -0,0 +1,67 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerPADipole;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPADipole;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIPADipole extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/particleaccelerator/gui_dipole.png");
|
||||
private TileEntityPADipole dipole;
|
||||
|
||||
public GUIPADipole(InventoryPlayer player, TileEntityPADipole slopper) {
|
||||
super(new ContainerPADipole(player, slopper));
|
||||
this.dipole = slopper;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 204;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
dipole.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 36, 16, 52);
|
||||
dipole.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 36, 16, 52);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 18, 16, 52, dipole.power, dipole.getMaxPower());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
||||
|
||||
String name = this.dipole.hasCustomInventoryName() ? this.dipole.getInventoryName() : I18n.format(this.dipole.getInventoryName());
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2 - 9, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
|
||||
this.fontRendererObj.drawString(EnumChatFormatting.AQUA + "/123K", 136, 22, 4210752);
|
||||
int heat = (int) Math.ceil(dipole.temperature);
|
||||
String label = (heat > 123 ? EnumChatFormatting.RED : EnumChatFormatting.AQUA) + "" + heat + "K";
|
||||
this.fontRendererObj.drawString(label, 166 - this.fontRendererObj.getStringWidth(label), 12, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float interp, int x, int y) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
int j = (int) (dipole.power * 52 / dipole.getMaxPower());
|
||||
drawTexturedModalRect(guiLeft + 8, guiTop + 70 - j, 184, 52 - j, 16, j);
|
||||
|
||||
int heat = (int) Math.ceil(dipole.temperature);
|
||||
if(heat <= 123) drawTexturedModalRect(guiLeft + 93, guiTop + 64, 176, 8, 8, 8);
|
||||
if(dipole.slots[1] != null && dipole.slots[1].getItem() == ModItems.pa_coil) drawTexturedModalRect(guiLeft + 103, guiTop + 64, 176, 8, 8, 8);
|
||||
|
||||
dipole.tanks[0].renderTank(guiLeft + 134, guiTop + 88, this.zLevel, 16, 52);
|
||||
dipole.tanks[1].renderTank(guiLeft + 152, guiTop + 88, this.zLevel, 16, 52);
|
||||
}
|
||||
}
|
||||
67
src/main/java/com/hbm/inventory/gui/GUIPAQuadrupole.java
Normal file
@ -0,0 +1,67 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerPAQuadrupole;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPAQuadrupole;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIPAQuadrupole extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/particleaccelerator/gui_quadrupole.png");
|
||||
private TileEntityPAQuadrupole quadrupole;
|
||||
|
||||
public GUIPAQuadrupole(InventoryPlayer player, TileEntityPAQuadrupole slopper) {
|
||||
super(new ContainerPAQuadrupole(player, slopper));
|
||||
this.quadrupole = slopper;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 204;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
quadrupole.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 116, guiTop + 36, 16, 52);
|
||||
quadrupole.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 36, 16, 52);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 18, 16, 52, quadrupole.power, quadrupole.getMaxPower());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
||||
|
||||
String name = this.quadrupole.hasCustomInventoryName() ? this.quadrupole.getInventoryName() : I18n.format(this.quadrupole.getInventoryName());
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2 - 9, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
|
||||
this.fontRendererObj.drawString(EnumChatFormatting.AQUA + "/123K", 118, 22, 4210752);
|
||||
int heat = (int) Math.ceil(quadrupole.temperature);
|
||||
String label = (heat > 123 ? EnumChatFormatting.RED : EnumChatFormatting.AQUA) + "" + heat + "K";
|
||||
this.fontRendererObj.drawString(label, 148 - this.fontRendererObj.getStringWidth(label), 12, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float interp, int x, int y) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
int j = (int) (quadrupole.power * 52 / quadrupole.getMaxPower());
|
||||
drawTexturedModalRect(guiLeft + 26, guiTop + 70 - j, 184, 52 - j, 16, j);
|
||||
|
||||
int heat = (int) Math.ceil(quadrupole.temperature);
|
||||
if(heat <= 123) drawTexturedModalRect(guiLeft + 75, guiTop + 64, 176, 8, 8, 8);
|
||||
if(quadrupole.slots[1] != null && quadrupole.slots[1].getItem() == ModItems.pa_coil) drawTexturedModalRect(guiLeft + 85, guiTop + 64, 176, 8, 8, 8);
|
||||
|
||||
quadrupole.tanks[0].renderTank(guiLeft + 116, guiTop + 88, this.zLevel, 16, 52);
|
||||
quadrupole.tanks[1].renderTank(guiLeft + 134, guiTop + 88, this.zLevel, 16, 52);
|
||||
}
|
||||
}
|
||||
59
src/main/java/com/hbm/inventory/gui/GUIPARFC.java
Normal file
@ -0,0 +1,59 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerPARFC;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPARFC;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIPARFC extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/particleaccelerator/gui_rfc.png");
|
||||
private TileEntityPARFC quadrupole;
|
||||
|
||||
public GUIPARFC(InventoryPlayer player, TileEntityPARFC slopper) {
|
||||
super(new ContainerPARFC(player, slopper));
|
||||
this.quadrupole = slopper;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 204;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
quadrupole.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 89, guiTop + 36, 16, 52);
|
||||
quadrupole.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 107, guiTop + 36, 16, 52);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 53, guiTop + 18, 16, 52, quadrupole.power, quadrupole.getMaxPower());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer( int i, int j) {
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
|
||||
this.fontRendererObj.drawString(EnumChatFormatting.AQUA + "/123K", 91, 22, 4210752);
|
||||
int heat = (int) Math.ceil(quadrupole.temperature);
|
||||
String label = (heat > 123 ? EnumChatFormatting.RED : EnumChatFormatting.AQUA) + "" + heat + "K";
|
||||
this.fontRendererObj.drawString(label, 121 - this.fontRendererObj.getStringWidth(label), 12, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float interp, int x, int y) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
int j = (int) (quadrupole.power * 52 / quadrupole.getMaxPower());
|
||||
drawTexturedModalRect(guiLeft + 53, guiTop + 70 - j, 184, 52 - j, 16, j);
|
||||
|
||||
quadrupole.tanks[0].renderTank(guiLeft + 89, guiTop + 88, this.zLevel, 16, 52);
|
||||
quadrupole.tanks[1].renderTank(guiLeft + 107, guiTop + 88, this.zLevel, 16, 52);
|
||||
}
|
||||
}
|
||||
@ -41,6 +41,7 @@ public class AmmoPressRecipes extends SerializableRecipe {
|
||||
OreDictStack uranium = new OreDictStack(U238.ingot());
|
||||
ComparableStack smokeful = new ComparableStack(Items.gunpowder);
|
||||
OreDictStack smokeless = new OreDictStack(ANY_SMOKELESS.dust());
|
||||
ComparableStack rocket = new ComparableStack(ModItems.rocket_fuel);
|
||||
OreDictStack he = new OreDictStack(ANY_HIGHEXPLOSIVE.ingot());
|
||||
OreDictStack wp = new OreDictStack(P_WHITE.ingot());
|
||||
OreDictStack rp = new OreDictStack(P_RED.dust());
|
||||
@ -285,23 +286,43 @@ public class AmmoPressRecipes extends SerializableRecipe {
|
||||
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.ROCKET_HE, 2),
|
||||
null, dyn, null,
|
||||
null, cBig, null,
|
||||
null, smokeless.copy(2), null));
|
||||
null, smokeless.copy(3), null));
|
||||
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.ROCKET_HE, 2),
|
||||
null, dyn, null,
|
||||
null, cBig, null,
|
||||
null, rocket, null));
|
||||
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.ROCKET_HEAT, 2),
|
||||
coplate, he, null,
|
||||
null, cBig, null,
|
||||
null, smokeless.copy(2), null));
|
||||
null, smokeless.copy(3), null));
|
||||
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.ROCKET_HEAT, 2),
|
||||
coplate, he, null,
|
||||
null, cBig, null,
|
||||
null, rocket, null));
|
||||
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.ROCKET_DEMO, 2),
|
||||
null, he.copy(2), null,
|
||||
null, cBig, null,
|
||||
null, smokeless.copy(2), null));
|
||||
null, smokeless.copy(3), null));
|
||||
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.ROCKET_DEMO, 2),
|
||||
null, he.copy(2), null,
|
||||
null, cBig, null,
|
||||
null, rocket, null));
|
||||
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.ROCKET_INC, 2),
|
||||
diesel, dyn, null,
|
||||
null, cBig, null,
|
||||
null, smokeless.copy(2), null));
|
||||
null, smokeless.copy(3), null));
|
||||
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.ROCKET_INC, 2),
|
||||
diesel, dyn, null,
|
||||
null, cBig, null,
|
||||
null, rocket, null));
|
||||
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.ROCKET_PHOSPHORUS, 2),
|
||||
wp, he, null,
|
||||
null, cBig, null,
|
||||
null, smokeless.copy(2), null));
|
||||
null, smokeless.copy(3), null));
|
||||
recipes.add(new AmmoPressRecipe(DictFrame.fromOne(ModItems.ammo_standard, EnumAmmo.ROCKET_PHOSPHORUS, 2),
|
||||
wp, he, null,
|
||||
null, cBig, null,
|
||||
null, rocket, null));
|
||||
|
||||
OreDictStack sPlate = new OreDictStack(STEEL.plate());
|
||||
ComparableStack napalm = new ComparableStack(ModItems.canister_napalm);
|
||||
|
||||
@ -27,6 +27,8 @@ public class CompressorRecipes extends SerializableRecipe {
|
||||
recipes.put(new Pair(Fluids.PETROLEUM, 1), new CompressorRecipe(2_000, new FluidStack(Fluids.LPG, 1_000, 0), 20));
|
||||
|
||||
recipes.put(new Pair(Fluids.BLOOD, 3), new CompressorRecipe(1_000, new FluidStack(Fluids.HEAVYOIL, 250, 0), 200));
|
||||
|
||||
recipes.put(new Pair(Fluids.PERFLUOROMETHYL, 1), new CompressorRecipe(1_000, new FluidStack(Fluids.PERFLUOROMETHYL_COLD, 1_000, 0), 100));
|
||||
}
|
||||
|
||||
public static class CompressorRecipe {
|
||||
|
||||
@ -38,9 +38,9 @@ public class RotaryFurnaceRecipes extends SerializableRecipe {
|
||||
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_STEEL, INGOT.q(1)), 100, 100, new OreDictStack(IRON.ingot()), new OreDictStack(COAL.gem())));
|
||||
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_STEEL, INGOT.q(1)), 100, 100, new OreDictStack(IRON.ingot()), new OreDictStack(ANY_COKE.gem())));
|
||||
|
||||
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_STEEL, INGOT.q(2)), 100, 100, new OreDictStack(IRON.fragment(), 9), new OreDictStack(COAL.gem())));
|
||||
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_STEEL, INGOT.q(3)), 100, 100, new OreDictStack(IRON.fragment(), 9), new OreDictStack(ANY_COKE.gem())));
|
||||
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_STEEL, INGOT.q(4)), 200, 100, new OreDictStack(IRON.fragment(), 9), new OreDictStack(ANY_COKE.gem()), new ComparableStack(ModItems.powder_flux)));
|
||||
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_STEEL, INGOT.q(2)), 400, 25, new OreDictStack(IRON.fragment(), 9), new OreDictStack(COAL.gem())));
|
||||
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_STEEL, INGOT.q(3)), 400, 25, new OreDictStack(IRON.fragment(), 9), new OreDictStack(ANY_COKE.gem())));
|
||||
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_STEEL, INGOT.q(4)), 800, 25, new OreDictStack(IRON.fragment(), 9), new OreDictStack(ANY_COKE.gem()), new ComparableStack(ModItems.powder_flux)));
|
||||
|
||||
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_DESH, INGOT.q(1)), 100, 200, new FluidStack(Fluids.LIGHTOIL, 100), new ComparableStack(ModItems.powder_desh_ready)));
|
||||
|
||||
|
||||
@ -593,25 +593,7 @@ public class ModItems {
|
||||
public static Item mechanism_launcher_2;
|
||||
public static Item mechanism_special;
|
||||
|
||||
public static Item assembly_iron;
|
||||
public static Item assembly_steel;
|
||||
public static Item assembly_lead;
|
||||
public static Item assembly_gold;
|
||||
public static Item assembly_schrabidium;
|
||||
public static Item assembly_nightmare;
|
||||
public static Item assembly_desh;
|
||||
//public static Item assembly_pip;
|
||||
public static Item assembly_nopip;
|
||||
public static Item assembly_smg;
|
||||
public static Item assembly_556;
|
||||
public static Item assembly_762;
|
||||
public static Item assembly_45;
|
||||
public static Item assembly_uzi;
|
||||
public static Item assembly_actionexpress;
|
||||
public static Item assembly_calamity;
|
||||
public static Item assembly_lacunae;
|
||||
public static Item assembly_nuke;
|
||||
public static Item assembly_luna;
|
||||
|
||||
public static Item casing;
|
||||
|
||||
@ -841,6 +823,8 @@ public class ModItems {
|
||||
public static Item demon_core_open;
|
||||
public static Item demon_core_closed;
|
||||
|
||||
public static Item pa_coil;
|
||||
|
||||
public static Item particle_empty;
|
||||
public static Item particle_hydrogen;
|
||||
public static Item particle_copper;
|
||||
@ -2851,24 +2835,7 @@ public class ModItems {
|
||||
mechanism_launcher_1 = new Item().setUnlocalizedName("mechanism_launcher_1").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_5");
|
||||
mechanism_launcher_2 = new Item().setUnlocalizedName("mechanism_launcher_2").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_6");
|
||||
mechanism_special = new Item().setUnlocalizedName("mechanism_special").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":mechanism_7");
|
||||
assembly_iron = new Item().setUnlocalizedName("assembly_iron").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_iron");
|
||||
assembly_steel = new Item().setUnlocalizedName("assembly_steel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_steel");
|
||||
assembly_lead = new Item().setUnlocalizedName("assembly_lead").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_lead");
|
||||
assembly_gold = new Item().setUnlocalizedName("assembly_gold").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_gold");
|
||||
assembly_schrabidium = new Item().setUnlocalizedName("assembly_schrabidium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_schrabidium");
|
||||
assembly_nightmare = new Item().setUnlocalizedName("assembly_nightmare").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_nightmare");
|
||||
assembly_desh = new Item().setUnlocalizedName("assembly_desh").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_desh");
|
||||
assembly_nopip = new Item().setUnlocalizedName("assembly_nopip").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_nopip");
|
||||
assembly_smg = new Item().setUnlocalizedName("assembly_smg").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_smg");
|
||||
assembly_556 = new Item().setUnlocalizedName("assembly_556").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_556");
|
||||
assembly_762 = new Item().setUnlocalizedName("assembly_762").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_762");
|
||||
assembly_45 = new Item().setUnlocalizedName("assembly_45").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_45");
|
||||
assembly_uzi = new Item().setUnlocalizedName("assembly_uzi").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_uzi");
|
||||
assembly_actionexpress = new Item().setUnlocalizedName("assembly_actionexpress").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_actionexpress");
|
||||
assembly_calamity = new Item().setUnlocalizedName("assembly_calamity").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_calamity");
|
||||
assembly_lacunae = new Item().setUnlocalizedName("assembly_lacunae").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_lacunae");
|
||||
assembly_nuke = new Item().setUnlocalizedName("assembly_nuke").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_nuke");
|
||||
assembly_luna = new Item().setUnlocalizedName("assembly_luna").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_luna");
|
||||
casing = new ItemEnumMulti(ItemEnums.EnumCasingType.class, true, true).setUnlocalizedName("casing").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":casing");
|
||||
|
||||
wiring_red_copper = new ItemWiring().setUnlocalizedName("wiring_red_copper").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wiring_red_copper");
|
||||
@ -2928,6 +2895,8 @@ public class ModItems {
|
||||
|
||||
demon_core_open = new ItemDemonCore().setUnlocalizedName("demon_core_open").setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":demon_core_open");
|
||||
demon_core_closed = new Item().setUnlocalizedName("demon_core_closed").setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":demon_core_closed");
|
||||
|
||||
pa_coil = new ItemPACoil().setUnlocalizedName("pa_coil").setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":pa_coil");
|
||||
|
||||
particle_empty = new Item().setUnlocalizedName("particle_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":particle_empty");
|
||||
particle_hydrogen = new Item().setUnlocalizedName("particle_hydrogen").setCreativeTab(MainRegistry.controlTab).setContainerItem(ModItems.particle_empty).setTextureName(RefStrings.MODID + ":particle_hydrogen");
|
||||
@ -3488,9 +3457,9 @@ public class ModItems {
|
||||
rbmk_fuel_heaus = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_heaus)
|
||||
.setYield(100000000D)
|
||||
.setStats(35)
|
||||
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
||||
.setFunction(EnumBurnFunc.LINEAR)
|
||||
.setXenon(0.05D, 50D)
|
||||
.setHeat(2D)
|
||||
.setHeat(1.5D)
|
||||
.setMeltingPoint(5211).setUnlocalizedName("rbmk_fuel_heaus").setTextureName(RefStrings.MODID + ":rbmk_fuel_heaus");
|
||||
rbmk_fuel_po210be = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_po210be)
|
||||
.setYield(25000000D)
|
||||
@ -3568,7 +3537,7 @@ public class ModItems {
|
||||
.setMeltingPoint(2744)
|
||||
.setUnlocalizedName("rbmk_fuel_zfb_am_mix").setTextureName(RefStrings.MODID + ":rbmk_fuel_zfb_am_mix");
|
||||
rbmk_fuel_drx = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_drx)
|
||||
.setYield(1000000D)
|
||||
.setYield(10000000D)
|
||||
.setStats(1000, 10)
|
||||
.setFunction(EnumBurnFunc.QUADRATIC)
|
||||
.setHeat(0.1D)
|
||||
@ -5714,24 +5683,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(casing, casing.getUnlocalizedName());
|
||||
|
||||
//Bullet Assemblies
|
||||
GameRegistry.registerItem(assembly_iron, assembly_iron.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_steel, assembly_steel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_lead, assembly_lead.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_gold, assembly_gold.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_schrabidium, assembly_schrabidium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_nightmare, assembly_nightmare.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_desh, assembly_desh.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_nopip, assembly_nopip.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_smg, assembly_smg.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_556, assembly_556.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_762, assembly_762.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_45, assembly_45.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_uzi, assembly_uzi.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_lacunae, assembly_lacunae.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_actionexpress, assembly_actionexpress.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_calamity, assembly_calamity.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_nuke, assembly_nuke.getUnlocalizedName());
|
||||
GameRegistry.registerItem(assembly_luna, assembly_luna.getUnlocalizedName());
|
||||
|
||||
//Wiring
|
||||
GameRegistry.registerItem(wiring_red_copper, wiring_red_copper.getUnlocalizedName());
|
||||
@ -5785,6 +5737,9 @@ public class ModItems {
|
||||
GameRegistry.registerItem(demon_core_open, demon_core_open.getUnlocalizedName());
|
||||
GameRegistry.registerItem(demon_core_closed, demon_core_closed.getUnlocalizedName());
|
||||
|
||||
//PA
|
||||
GameRegistry.registerItem(pa_coil, pa_coil.getUnlocalizedName());
|
||||
|
||||
//Particle Containers
|
||||
GameRegistry.registerItem(particle_empty, particle_empty.getUnlocalizedName());
|
||||
GameRegistry.registerItem(particle_hydrogen, particle_hydrogen.getUnlocalizedName());
|
||||
|
||||
15
src/main/java/com/hbm/items/machine/ItemPACoil.java
Normal file
@ -0,0 +1,15 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import com.hbm.items.ItemEnumMulti;
|
||||
|
||||
public class ItemPACoil extends ItemEnumMulti {
|
||||
|
||||
public ItemPACoil() {
|
||||
super(EnumCoilType.class, true, true);
|
||||
this.setMaxStackSize(1);
|
||||
}
|
||||
|
||||
public static enum EnumCoilType {
|
||||
GOLD, NIOBIUM, BSCCO
|
||||
}
|
||||
}
|
||||
@ -134,26 +134,32 @@ public class ItemRBMKRod extends Item {
|
||||
|
||||
inFlux += selfRate;
|
||||
|
||||
double xenon = getPoison(stack);
|
||||
xenon -= xenonBurnFunc(inFlux);
|
||||
|
||||
inFlux *= (1D - getPoisonLevel(stack));
|
||||
|
||||
xenon += xenonGenFunc(inFlux);
|
||||
|
||||
if(xenon < 0D) xenon = 0D;
|
||||
if(xenon > 100D) xenon = 100D;
|
||||
|
||||
setPoison(stack, xenon);
|
||||
//if xenon poison is enabled
|
||||
if(RBMKDials.getXenon(world)) {
|
||||
double xenon = getPoison(stack);
|
||||
xenon -= xenonBurnFunc(inFlux);
|
||||
|
||||
inFlux *= (1D - getPoisonLevel(stack));
|
||||
|
||||
xenon += xenonGenFunc(inFlux);
|
||||
|
||||
if(xenon < 0D) xenon = 0D;
|
||||
if(xenon > 100D) xenon = 100D;
|
||||
|
||||
setPoison(stack, xenon);
|
||||
}
|
||||
|
||||
double outFlux = reactivityFunc(inFlux, getEnrichment(stack)) * RBMKDials.getReactivityMod(world);
|
||||
|
||||
double y = getYield(stack);
|
||||
y -= inFlux;
|
||||
|
||||
if(y < 0D) y = 0D;
|
||||
|
||||
setYield(stack, y);
|
||||
|
||||
//if depletion is enabled
|
||||
if(RBMKDials.getDepletion(world)) {
|
||||
double y = getYield(stack);
|
||||
y -= inFlux;
|
||||
|
||||
if(y < 0D) y = 0D;
|
||||
|
||||
setYield(stack, y);
|
||||
}
|
||||
|
||||
double coreHeat = this.getCoreHeat(stack);
|
||||
coreHeat += outFlux * heat;
|
||||
|
||||
@ -1623,6 +1623,23 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:item.casing_9");
|
||||
ignoreMappings.add("hbm:item.casing_50");
|
||||
ignoreMappings.add("hbm:item.casing_buckshot");
|
||||
ignoreMappings.add("hbm:item.assembly_iron");
|
||||
ignoreMappings.add("hbm:item.assembly_steel");
|
||||
ignoreMappings.add("hbm:item.assembly_lead");
|
||||
ignoreMappings.add("hbm:item.assembly_gold");
|
||||
ignoreMappings.add("hbm:item.assembly_schrabidium");
|
||||
ignoreMappings.add("hbm:item.assembly_nightmare");
|
||||
ignoreMappings.add("hbm:item.assembly_desh");
|
||||
ignoreMappings.add("hbm:item.assembly_nopip");
|
||||
ignoreMappings.add("hbm:item.assembly_smg");
|
||||
ignoreMappings.add("hbm:item.assembly_556");
|
||||
ignoreMappings.add("hbm:item.assembly_762");
|
||||
ignoreMappings.add("hbm:item.assembly_45");
|
||||
ignoreMappings.add("hbm:item.assembly_uzi");
|
||||
ignoreMappings.add("hbm:item.assembly_actionexpress");
|
||||
ignoreMappings.add("hbm:item.assembly_calamity");
|
||||
ignoreMappings.add("hbm:item.assembly_lacunae");
|
||||
ignoreMappings.add("hbm:item.assembly_luna");
|
||||
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
package com.hbm.render.block;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.hbm.blocks.generic.BlockHangingVine;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
@ -15,53 +12,7 @@ import net.minecraft.world.IBlockAccess;
|
||||
public class RenderHangingVine implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
//TextureUtil.func_152777_a(false, false, 1.0F);
|
||||
|
||||
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(30.0F, -1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(-1.0F, -0.5F, -1.0F);
|
||||
|
||||
/*GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(210.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glScalef(1.0F, 1.0F, -1.0F);
|
||||
GL11.glTranslatef(1.0F, 0.5F, 1.0F);
|
||||
GL11.glScalef(10.0F, 10.0F, 10.0F);*/
|
||||
|
||||
|
||||
IIcon iicon0 = ((BlockHangingVine) block).iconHang;
|
||||
IIcon iicon1 = ((BlockHangingVine) block).iconHangGlow;
|
||||
renderStandard2D(iicon0);
|
||||
renderStandard2D(iicon1);
|
||||
|
||||
}
|
||||
|
||||
public void renderStandard2D(IIcon iicon) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
float f = iicon.getMinU();
|
||||
float f1 = iicon.getMaxU();
|
||||
float f2 = iicon.getMinV();
|
||||
float f3 = iicon.getMaxV();
|
||||
float f4 = 0.0F;
|
||||
float f5 = 0.3F;
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
//GL11.glTranslatef(-f4, -f5, 0.0F);
|
||||
float f6 = 1.5F;
|
||||
//GL11.glScalef(f6, f6, f6);
|
||||
//GL11.glRotatef(50.0F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(335.0F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glTranslatef(-0.9375F, -0.0625F, 0.0F);
|
||||
//ItemRenderer.renderItemIn2D(tessellator, f1, f2, f, f3, iicon.getIconWidth(), iicon.getIconHeight(), 0.0625F);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||
tessellator.addVertexWithUV(0.0D, 0.0D, 0.0D, (double)f1, (double)f3);
|
||||
tessellator.addVertexWithUV(1.0D, 0.0D, 0.0D, (double)f, (double)f3);
|
||||
tessellator.addVertexWithUV(1.0D, 1.0D, 0.0D, (double)f, (double)f2);
|
||||
tessellator.addVertexWithUV(0.0D, 1.0D, 0.0D, (double)f1, (double)f2);
|
||||
tessellator.draw();
|
||||
}
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { }
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||
|
||||
@ -12,7 +12,6 @@ import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@ -29,7 +28,7 @@ public class RenderMovingItem extends Render {
|
||||
GL11.glTranslated(0, rand.nextDouble() * 0.0625, 0);
|
||||
|
||||
EntityMovingItem item = (EntityMovingItem) entity;
|
||||
ItemStack stack = item.getItemStack().copy();
|
||||
ItemStack stack = item.getItemStack();
|
||||
|
||||
if(!(stack.getItemSpriteNumber() == 0 && stack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(stack.getItem()).getRenderType()))) {
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
@ -40,12 +39,13 @@ public class RenderMovingItem extends Render {
|
||||
}
|
||||
}
|
||||
|
||||
EntityItem dummy = new EntityItem(entity.worldObj, 0, 0, 0, stack);
|
||||
dummy.hoverStart = 0.0F;
|
||||
if(item.cacheForRender != null) {
|
||||
item.cacheForRender.hoverStart = 0.0F;
|
||||
|
||||
RenderItem.renderInFrame = true;
|
||||
RenderManager.instance.renderEntityWithPosYaw(dummy, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
RenderItem.renderInFrame = true;
|
||||
RenderManager.instance.renderEntityWithPosYaw(item.cacheForRender, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@ -65,12 +65,9 @@ public class TileEntityLoadedBase extends TileEntity implements ILoadedTile, IBu
|
||||
|
||||
/** Sends a sync packet that uses ByteBuf for efficient information-cramming */
|
||||
public void networkPackNT(int range) {
|
||||
if(worldObj.isRemote) {
|
||||
return;
|
||||
}
|
||||
if(worldObj.isRemote) return;
|
||||
|
||||
BufPacket packet = new BufPacket(xCoord, yCoord, zCoord, this);
|
||||
|
||||
ByteBuf preBuf = packet.getPreBuf();
|
||||
|
||||
// Don't send unnecessary packets, except for maybe one every second or so.
|
||||
@ -80,9 +77,7 @@ public class TileEntityLoadedBase extends TileEntity implements ILoadedTile, IBu
|
||||
// In my testing, this can be reliably reproduced with a full fluid barrel, for instance.
|
||||
// I think it might be fixable by doing something with getDescriptionPacket() and onDataPacket(),
|
||||
// but this sidesteps the problem for the mean time.
|
||||
if (preBuf.equals(lastPackedBuf) && this.worldObj.getWorldTime() % 20 != 0) {
|
||||
return;
|
||||
}
|
||||
if(preBuf.equals(lastPackedBuf) && this.worldObj.getWorldTime() % 20 != 0) return;
|
||||
|
||||
this.lastPackedBuf = preBuf.copy();
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@ import com.hbm.blocks.rail.RailStandardSwitch.TileEntityRailSwitch;
|
||||
import com.hbm.tileentity.bomb.*;
|
||||
import com.hbm.tileentity.deco.*;
|
||||
import com.hbm.tileentity.machine.*;
|
||||
import com.hbm.tileentity.machine.albion.*;
|
||||
import com.hbm.tileentity.machine.oil.*;
|
||||
import com.hbm.tileentity.machine.pile.*;
|
||||
import com.hbm.tileentity.machine.rbmk.*;
|
||||
@ -174,6 +175,12 @@ public class TileMappings {
|
||||
put(TileEntityHadronDiode.class, "tileentity_hadron_diode");
|
||||
put(TileEntityHadronPower.class, "tileentity_hadron_power");
|
||||
put(TileEntityHadron.class, "tileentity_hadron");
|
||||
put(TileEntityPASource.class, "tileentity_pa_source");
|
||||
put(TileEntityPABeamline.class, "tileentity_pa_beamline");
|
||||
put(TileEntityPARFC.class, "tileentity_pa_rfc");
|
||||
put(TileEntityPAQuadrupole.class, "tileentity_pa_quadrupole");
|
||||
put(TileEntityPADipole.class, "tileentity_pa_dipole");
|
||||
put(TileEntityPADetector.class, "tileentity_pa_detector");
|
||||
put(TileEntitySolarBoiler.class, "tileentity_solarboiler");
|
||||
put(TileEntitySolarMirror.class, "tileentity_solarmirror");
|
||||
put(TileEntityMachineDetector.class, "tileentity_he_detector");
|
||||
|
||||
@ -0,0 +1,109 @@
|
||||
package com.hbm.tileentity.machine.albion;
|
||||
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public abstract class TileEntityCooledBase extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardTransceiver {
|
||||
|
||||
public FluidTank[] tanks;
|
||||
|
||||
public long power;
|
||||
|
||||
public static final float KELVIN = 273F;
|
||||
public float temperature = KELVIN + 20;
|
||||
public static final float temperature_target = KELVIN - 150F;
|
||||
public static final float temp_change_per_mb = 0.5F;
|
||||
public static final float temp_passive_heating = 2.5F;
|
||||
public static final float temp_change_max = 5F + temp_passive_heating;
|
||||
|
||||
public TileEntityCooledBase(int slotCount) {
|
||||
super(slotCount);
|
||||
tanks = new FluidTank[2];
|
||||
tanks[0] = new FluidTank(Fluids.PERFLUOROMETHYL_COLD, 16_000);
|
||||
tanks[1] = new FluidTank(Fluids.PERFLUOROMETHYL, 16_000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
for(DirPos pos : this.getConPos()) {
|
||||
this.trySubscribe(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
this.trySubscribe(tanks[0].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
this.sendFluid(tanks[1], worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
|
||||
this.temperature += this.temp_passive_heating;
|
||||
if(this.temperature > KELVIN + 20) this.temperature = KELVIN + 20;
|
||||
|
||||
if(this.temperature > this.temperature_target) {
|
||||
int cyclesTemp = (int) Math.ceil((Math.min(this.temperature - temperature_target, temp_change_max)) / temp_change_per_mb);
|
||||
int cyclesCool = tanks[0].getFill();
|
||||
int cyclesHot = tanks[1].getMaxFill() - tanks[1].getFill();
|
||||
int cycles = BobMathUtil.min(cyclesTemp, cyclesCool, cyclesHot);
|
||||
|
||||
tanks[0].setFill(tanks[0].getFill() - cycles);
|
||||
tanks[1].setFill(tanks[1].getFill() + cycles);
|
||||
this.temperature -= this.temp_change_per_mb * cycles;
|
||||
}
|
||||
|
||||
this.networkPackNT(50);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract DirPos[] getConPos();
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
super.serialize(buf);
|
||||
tanks[0].serialize(buf);
|
||||
tanks[1].serialize(buf);
|
||||
buf.writeFloat(temperature);
|
||||
buf.writeLong(power);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(ByteBuf buf) {
|
||||
super.deserialize(buf);
|
||||
tanks[0].deserialize(buf);
|
||||
tanks[1].deserialize(buf);
|
||||
this.temperature = buf.readFloat();
|
||||
this.power = buf.readLong();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
tanks[0].readFromNBT(nbt, "t0");
|
||||
tanks[1].readFromNBT(nbt, "t1");
|
||||
this.temperature = nbt.getFloat("temperature");
|
||||
this.power = nbt.getLong("power");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
tanks[0].writeToNBT(nbt, "t0");
|
||||
tanks[1].writeToNBT(nbt, "t1");
|
||||
nbt.setFloat("temperature", temperature);
|
||||
nbt.setLong("power", power);
|
||||
}
|
||||
|
||||
@Override public long getPower() { return this.power; }
|
||||
@Override public void setPower(long power) { this.power = power; }
|
||||
|
||||
@Override public FluidTank[] getSendingTanks() { return new FluidTank[] {tanks[1]}; }
|
||||
@Override public FluidTank[] getReceivingTanks() { return new FluidTank[] {tanks[0]}; }
|
||||
@Override public FluidTank[] getAllTanks() { return tanks; }
|
||||
}
|
||||
@ -18,7 +18,7 @@ public class TileEntityPADetector extends TileEntity {
|
||||
yCoord - 2,
|
||||
zCoord - 4,
|
||||
xCoord + 5,
|
||||
yCoord + 1,
|
||||
yCoord + 3,
|
||||
zCoord + 5
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,11 +1,49 @@
|
||||
package com.hbm.tileentity.machine.albion;
|
||||
|
||||
import com.hbm.inventory.container.ContainerPADipole;
|
||||
import com.hbm.inventory.gui.GUIPADipole;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityPADipole extends TileEntity {
|
||||
public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProvider {
|
||||
|
||||
public TileEntityPADipole() {
|
||||
super(2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return 10_000_000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(ForgeDirection dir) {
|
||||
return dir == ForgeDirection.UP || dir == ForgeDirection.DOWN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.paDipole";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
this.power = Library.chargeTEFromItems(slots, 0, power, this.getMaxPower());
|
||||
}
|
||||
|
||||
super.updateEntity();
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@ -31,4 +69,28 @@ public class TileEntityPADipole extends TileEntity {
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DirPos[] getConPos() {
|
||||
return new DirPos[] {
|
||||
new DirPos(xCoord + 1, yCoord + 2, zCoord, Library.POS_Y),
|
||||
new DirPos(xCoord - 1, yCoord + 2, zCoord, Library.POS_Y),
|
||||
new DirPos(xCoord, yCoord + 2, zCoord + 1, Library.POS_Y),
|
||||
new DirPos(xCoord, yCoord + 2, zCoord - 1, Library.POS_Y),
|
||||
new DirPos(xCoord + 1, yCoord - 2, zCoord, Library.NEG_Y),
|
||||
new DirPos(xCoord - 1, yCoord - 2, zCoord, Library.NEG_Y),
|
||||
new DirPos(xCoord, yCoord - 2, zCoord + 1, Library.NEG_Y),
|
||||
new DirPos(xCoord, yCoord - 2, zCoord - 1, Library.NEG_Y)
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerPADipole(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIPADipole(player.inventory, this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,11 +1,44 @@
|
||||
package com.hbm.tileentity.machine.albion;
|
||||
|
||||
import com.hbm.inventory.container.ContainerPAQuadrupole;
|
||||
import com.hbm.inventory.gui.GUIPAQuadrupole;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityPAQuadrupole extends TileEntity {
|
||||
public class TileEntityPAQuadrupole extends TileEntityCooledBase implements IGUIProvider {
|
||||
|
||||
public TileEntityPAQuadrupole() {
|
||||
super(2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return 10_000_000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.paQuadrupole";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
this.power = Library.chargeTEFromItems(slots, 0, power, this.getMaxPower());
|
||||
}
|
||||
|
||||
super.updateEntity();
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@ -31,4 +64,25 @@ public class TileEntityPAQuadrupole extends TileEntity {
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DirPos[] getConPos() {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
|
||||
return new DirPos[] {
|
||||
new DirPos(xCoord, yCoord + 2, zCoord, Library.POS_Y),
|
||||
new DirPos(xCoord, yCoord - 2, zCoord, Library.NEG_Y),
|
||||
new DirPos(xCoord + dir.offsetX * 2, yCoord, zCoord + dir.offsetZ * 2, dir),
|
||||
new DirPos(xCoord - dir.offsetX * 2, yCoord, zCoord - dir.offsetZ * 2, dir.getOpposite())
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerPAQuadrupole(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIPAQuadrupole(player.inventory, this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,11 +1,44 @@
|
||||
package com.hbm.tileentity.machine.albion;
|
||||
|
||||
import com.hbm.inventory.container.ContainerPARFC;
|
||||
import com.hbm.inventory.gui.GUIPARFC;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityPARFC extends TileEntity {
|
||||
public class TileEntityPARFC extends TileEntityCooledBase implements IGUIProvider {
|
||||
|
||||
public TileEntityPARFC() {
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return 10_000_000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.paRFC";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
this.power = Library.chargeTEFromItems(slots, 0, power, this.getMaxPower());
|
||||
}
|
||||
|
||||
super.updateEntity();
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@ -31,4 +64,27 @@ public class TileEntityPARFC extends TileEntity {
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DirPos[] getConPos() {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10).getRotation(ForgeDirection.UP);
|
||||
return new DirPos[] {
|
||||
new DirPos(xCoord + dir.offsetX * 3, yCoord + 2, zCoord + dir.offsetZ * 3, Library.POS_Y),
|
||||
new DirPos(xCoord - dir.offsetX * 3, yCoord + 2, zCoord - dir.offsetZ * 3, Library.POS_Y),
|
||||
new DirPos(xCoord, yCoord + 2, zCoord, Library.POS_Y),
|
||||
new DirPos(xCoord + dir.offsetX * 3, yCoord - 2, zCoord + dir.offsetZ * 3, Library.NEG_Y),
|
||||
new DirPos(xCoord - dir.offsetX * 3, yCoord - 2, zCoord - dir.offsetZ * 3, Library.NEG_Y),
|
||||
new DirPos(xCoord, yCoord - 2, zCoord, Library.NEG_Y)
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerPARFC(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIPARFC(player.inventory, this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,38 @@
|
||||
package com.hbm.tileentity.machine.albion;
|
||||
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityPASource extends TileEntity {
|
||||
public class TileEntityPASource extends TileEntityCooledBase implements IGUIProvider {
|
||||
|
||||
public TileEntityPASource() {
|
||||
super(5);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.paSource";
|
||||
}
|
||||
|
||||
@Override
|
||||
public DirPos[] getConPos() {
|
||||
return new DirPos[] {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return 10_000_000;
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
@ -31,4 +57,14 @@ public class TileEntityPASource extends TileEntity {
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,7 +37,9 @@ public class RBMKDials {
|
||||
KEY_ENABLE_MELTDOWN_OVERPRESSURE("dialEnableMeltdownOverpressure", false),
|
||||
KEY_MODERATOR_EFFICIENCY("dialModeratorEfficiency", 1.0),
|
||||
KEY_ABSORBER_EFFICIENCY("dialAbsorberEfficiency", 1.0),
|
||||
KEY_REFLECTOR_EFFICIENCY("dialReflectorEfficiency", 1.0);
|
||||
KEY_REFLECTOR_EFFICIENCY("dialReflectorEfficiency", 1.0),
|
||||
KEY_DISABLE_DEPLETION("dialDisableDepletion", true),
|
||||
KEY_DISABLE_XENON("dialDisableXenon", true);
|
||||
|
||||
public final String keyString;
|
||||
public final Object defValue;
|
||||
@ -108,6 +110,8 @@ public class RBMKDials {
|
||||
gameRules.get(RBMKKeys.KEY_MODERATOR_EFFICIENCY).add(new Tuple.Pair<>(world, GameRuleHelper.getClampedDouble(world, RBMKKeys.KEY_MODERATOR_EFFICIENCY, 0.0D, 1.0D)));
|
||||
gameRules.get(RBMKKeys.KEY_ABSORBER_EFFICIENCY).add(new Tuple.Pair<>(world, GameRuleHelper.getClampedDouble(world, RBMKKeys.KEY_ABSORBER_EFFICIENCY, 0.0D, 1.0D)));
|
||||
gameRules.get(RBMKKeys.KEY_REFLECTOR_EFFICIENCY).add(new Tuple.Pair<>(world, GameRuleHelper.getClampedDouble(world, RBMKKeys.KEY_REFLECTOR_EFFICIENCY, 0.0D, 1.0D)));
|
||||
gameRules.get(RBMKKeys.KEY_DISABLE_DEPLETION).add(new Tuple.Pair<>(world, world.getGameRules().getGameRuleBooleanValue(RBMKKeys.KEY_DISABLE_DEPLETION.keyString)));
|
||||
gameRules.get(RBMKKeys.KEY_DISABLE_XENON).add(new Tuple.Pair<>(world, world.getGameRules().getGameRuleBooleanValue(RBMKKeys.KEY_DISABLE_XENON.keyString)));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -351,4 +355,22 @@ public class RBMKDials {
|
||||
public static double getReflectorEfficiency(World world) {
|
||||
return (double) getGameRule(world, RBMKKeys.KEY_REFLECTOR_EFFICIENCY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether fuel rods should deplete, disabling this makes rods last forever
|
||||
* @param world
|
||||
* @return
|
||||
*/
|
||||
public static boolean getDepletion(World world) {
|
||||
return !((boolean) getGameRule(world, RBMKKeys.KEY_DISABLE_DEPLETION));
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether xenon poison should be calculated
|
||||
* @param world
|
||||
* @return
|
||||
*/
|
||||
public static boolean getXenon(World world) {
|
||||
return !((boolean) getGameRule(world, RBMKKeys.KEY_DISABLE_XENON));
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,6 +15,38 @@ import java.util.function.ToIntFunction;
|
||||
|
||||
public class BobMathUtil {
|
||||
|
||||
//finally!
|
||||
public static int min(int... nums) {
|
||||
int smallest = Integer.MAX_VALUE;
|
||||
for(int num : nums) if(num < smallest) smallest = num;
|
||||
return smallest;
|
||||
}
|
||||
public static int max(int... nums) {
|
||||
int largest = Integer.MIN_VALUE;
|
||||
for(int num : nums) if(num > largest) largest = num;
|
||||
return largest;
|
||||
}
|
||||
public static float min(float... nums) {
|
||||
float smallest = Float.MAX_VALUE;
|
||||
for(float num : nums) if(num < smallest) smallest = num;
|
||||
return smallest;
|
||||
}
|
||||
public static float max(float... nums) {
|
||||
float largest = Float.MIN_VALUE;
|
||||
for(float num : nums) if(num > largest) largest = num;
|
||||
return largest;
|
||||
}
|
||||
public static double min(double... nums) {
|
||||
double smallest = Double.MAX_VALUE;
|
||||
for(double num : nums) if(num < smallest) smallest = num;
|
||||
return smallest;
|
||||
}
|
||||
public static double max(double... nums) {
|
||||
double largest = Double.MIN_VALUE;
|
||||
for(double num : nums) if(num > largest) largest = num;
|
||||
return largest;
|
||||
}
|
||||
|
||||
public static double safeClamp(double val, double min, double max) {
|
||||
|
||||
val = MathHelper.clamp_double(val, min, max);
|
||||
|
||||
@ -783,6 +783,9 @@ hbmfluid.oil_coker=Koker-Öl
|
||||
hbmfluid.oxyhydrogen=Knallgas
|
||||
hbmfluid.oxygen=Flüssiger Sauerstoff
|
||||
hbmfluid.pain=Pandemonium(III)tantalit-Lösung
|
||||
hbmfluid.perfluoromethyl=Perfluormethyl
|
||||
hbmfluid.perfluoromethyl_cold=Kaltes Perfluormethyl
|
||||
hbmfluid.perfluoromethyl_hot=Heißes Perfluormethyl
|
||||
hbmfluid.peroxide=Wasserstoffperoxid
|
||||
hbmfluid.petroil=Gemisch
|
||||
hbmfluid.petroil_leaded=Bleigemisch
|
||||
|
||||
@ -1491,6 +1491,9 @@ hbmfluid.oil_ds=Desulfurized Crude Oil
|
||||
hbmfluid.oxygen=Liquid Oxygen
|
||||
hbmfluid.oxyhydrogen=Oxyhydrogen
|
||||
hbmfluid.pain=Pandemonium(III)tantalite Solution
|
||||
hbmfluid.perfluoromethyl=Perfluoromethyl
|
||||
hbmfluid.perfluoromethyl_cold=Cold Perfluoromethyl
|
||||
hbmfluid.perfluoromethyl_hot=Hot Perfluoromethyl
|
||||
hbmfluid.peroxide=Hydrogen Peroxide
|
||||
hbmfluid.petroil=Petroil
|
||||
hbmfluid.petroil_leaded=Leaded Petroil
|
||||
|
||||
|
After Width: | Height: | Size: 491 B |
|
After Width: | Height: | Size: 490 B |
|
After Width: | Height: | Size: 491 B |
|
After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |