mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge branch 'HbmMods:master' into master
This commit is contained in:
commit
aec7c58141
@ -849,8 +849,9 @@ public class ModBlocks {
|
|||||||
|
|
||||||
public static Block iter;
|
public static Block iter;
|
||||||
public static Block plasma_heater;
|
public static Block plasma_heater;
|
||||||
|
|
||||||
public static Block watz;
|
public static Block watz;
|
||||||
|
public static Block watz_pump;
|
||||||
|
|
||||||
public static Block watz_element;
|
public static Block watz_element;
|
||||||
public static Block watz_control;
|
public static Block watz_control;
|
||||||
@ -1981,6 +1982,7 @@ public class ModBlocks {
|
|||||||
watz_conductor = new BlockCableConnect(Material.iron).setBlockName("watz_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_conductor_top");
|
watz_conductor = new BlockCableConnect(Material.iron).setBlockName("watz_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_conductor_top");
|
||||||
watz_core = new WatzCore(Material.iron).setBlockName("watz_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_computer");
|
watz_core = new WatzCore(Material.iron).setBlockName("watz_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_computer");
|
||||||
watz = new Watz().setBlockName("watz").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
watz = new Watz().setBlockName("watz").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
watz_pump = new WatzPump().setBlockName("watz_pump").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
|
||||||
fwatz_conductor = new BlockPillar(Material.iron, RefStrings.MODID + ":block_combine_steel").setBlockName("fwatz_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fwatz_conductor_side");
|
fwatz_conductor = new BlockPillar(Material.iron, RefStrings.MODID + ":block_combine_steel").setBlockName("fwatz_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fwatz_conductor_side");
|
||||||
fwatz_cooler = new BlockPillar(Material.iron, RefStrings.MODID + ":fwatz_cooler_top").setBlockName("fwatz_cooler").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fwatz_cooler");
|
fwatz_cooler = new BlockPillar(Material.iron, RefStrings.MODID + ":fwatz_cooler_top").setBlockName("fwatz_cooler").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fwatz_cooler");
|
||||||
@ -3260,6 +3262,7 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(watz_conductor, watz_conductor.getUnlocalizedName());
|
GameRegistry.registerBlock(watz_conductor, watz_conductor.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(watz_core, watz_core.getUnlocalizedName());
|
GameRegistry.registerBlock(watz_core, watz_core.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(watz, watz.getUnlocalizedName());
|
GameRegistry.registerBlock(watz, watz.getUnlocalizedName());
|
||||||
|
GameRegistry.registerBlock(watz_pump, watz_pump.getUnlocalizedName());
|
||||||
|
|
||||||
GameRegistry.registerBlock(fwatz_conductor, fwatz_conductor.getUnlocalizedName());
|
GameRegistry.registerBlock(fwatz_conductor, fwatz_conductor.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(fwatz_scaffold, fwatz_scaffold.getUnlocalizedName());
|
GameRegistry.registerBlock(fwatz_scaffold, fwatz_scaffold.getUnlocalizedName());
|
||||||
|
|||||||
@ -25,7 +25,6 @@ import net.minecraft.world.World;
|
|||||||
public class Landmine extends BlockContainer implements IBomb {
|
public class Landmine extends BlockContainer implements IBomb {
|
||||||
|
|
||||||
public static boolean safeMode = false;
|
public static boolean safeMode = false;
|
||||||
static Random rand = new Random();;
|
|
||||||
|
|
||||||
public Landmine(Material p_i45386_1_) {
|
public Landmine(Material p_i45386_1_) {
|
||||||
super(p_i45386_1_);
|
super(p_i45386_1_);
|
||||||
@ -100,18 +99,23 @@ public class Landmine extends BlockContainer implements IBomb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(flag) {
|
if(flag) {
|
||||||
this.dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0);
|
|
||||||
world.setBlockToAir(x, y, z);
|
if(!safeMode) {
|
||||||
|
explode(world, x, y, z);
|
||||||
|
} else {
|
||||||
|
world.setBlockToAir(x, y, z);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void breakBlock(World world, int x, int y, int z, Block block, int i) {
|
@Override
|
||||||
|
public void onBlockDestroyedByPlayer(World world, int x, int y, int z, int meta) {
|
||||||
|
|
||||||
if(!safeMode) {
|
if(!safeMode) {
|
||||||
explode(world, x, y, z);
|
explode(world, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
super.breakBlock(world, x, y, z, block, i);
|
super.onBlockDestroyedByPlayer(world, x, y, z, meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float fx, float fy, float fz) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float fx, float fy, float fz) {
|
||||||
|
|||||||
@ -1,12 +1,14 @@
|
|||||||
package com.hbm.blocks.machine;
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
import com.hbm.blocks.BlockDummyable;
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
import com.hbm.tileentity.machine.TileEntityWatz;
|
import com.hbm.tileentity.machine.TileEntityWatz;
|
||||||
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class Watz extends BlockDummyable {
|
public class Watz extends BlockDummyable {
|
||||||
|
|
||||||
@ -17,16 +19,14 @@ public class Watz extends BlockDummyable {
|
|||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int meta) {
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
|
||||||
if(meta >= 12)
|
if(meta >= 12) return new TileEntityWatz();
|
||||||
return new TileEntityWatz();
|
if(meta >= 6) return new TileEntityProxyCombo().inventory().fluid();
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
//return super.standardOpenBehavior(world, x, y, z, player, 0);
|
return super.standardOpenBehavior(world, x, y, z, player, 0);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -38,4 +38,26 @@ public class Watz extends BlockDummyable {
|
|||||||
public int getOffset() {
|
public int getOffset() {
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
return super.checkRequirement(world, x, y, z, dir, o); //TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
super.fillSpace(world, x, y, z, dir, o);
|
||||||
|
|
||||||
|
x += dir.offsetX * o;
|
||||||
|
z += dir.offsetZ * o;
|
||||||
|
|
||||||
|
this.makeExtra(world, x + 2, y, z);
|
||||||
|
this.makeExtra(world, x - 2, y, z);
|
||||||
|
this.makeExtra(world, x, y, z + 2);
|
||||||
|
this.makeExtra(world, x, y, z - 2);
|
||||||
|
this.makeExtra(world, x + 2, y + 2, z);
|
||||||
|
this.makeExtra(world, x - 2, y + 2, z);
|
||||||
|
this.makeExtra(world, x, y + 2, z + 2);
|
||||||
|
this.makeExtra(world, x, y + 2, z - 2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
52
src/main/java/com/hbm/blocks/machine/WatzPump.java
Normal file
52
src/main/java/com/hbm/blocks/machine/WatzPump.java
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class WatzPump extends BlockDummyable {
|
||||||
|
|
||||||
|
public WatzPump() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityWatzPump();
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getDimensions() {
|
||||||
|
return new int[] {1, 0, 0, 0, 0, 0};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getOffset() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) {
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
return side == ForgeDirection.UP && meta == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class TileEntityWatzPump extends TileEntity {
|
||||||
|
@Override public boolean canUpdate() { return false; }
|
||||||
|
@Override @SideOnly(Side.CLIENT) public double getMaxRenderDistanceSquared() { return 65536.0D; }
|
||||||
|
AxisAlignedBB bb = null;
|
||||||
|
@Override public AxisAlignedBB getRenderBoundingBox() {
|
||||||
|
if(bb == null) bb = AxisAlignedBB.getBoundingBox(xCoord - 1, yCoord, zCoord - 1, xCoord + 2, yCoord + 2, zCoord + 2);
|
||||||
|
return bb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -14,7 +14,6 @@ import com.hbm.entity.mob.botprime.*;
|
|||||||
import com.hbm.entity.mob.siege.*;
|
import com.hbm.entity.mob.siege.*;
|
||||||
import com.hbm.entity.particle.*;
|
import com.hbm.entity.particle.*;
|
||||||
import com.hbm.entity.projectile.*;
|
import com.hbm.entity.projectile.*;
|
||||||
import com.hbm.entity.qic.*;
|
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.util.Tuple.Quartet;
|
import com.hbm.util.Tuple.Quartet;
|
||||||
|
|
||||||
@ -201,7 +200,6 @@ public class EntityMappings {
|
|||||||
addEntity(EntityArtilleryShell.class, "entity_artillery_shell", 1000);
|
addEntity(EntityArtilleryShell.class, "entity_artillery_shell", 1000);
|
||||||
addEntity(EntityArtilleryRocket.class, "entity_himars", 1000);
|
addEntity(EntityArtilleryRocket.class, "entity_himars", 1000);
|
||||||
addEntity(EntitySiegeTunneler.class, "entity_meme_tunneler", 1000);
|
addEntity(EntitySiegeTunneler.class, "entity_meme_tunneler", 1000);
|
||||||
addEntity(EntitySPV.class, "entity_self_propelled_vehicle_mark_1", 1000);
|
|
||||||
addEntity(EntityCog.class, "entity_stray_cog", 1000);
|
addEntity(EntityCog.class, "entity_stray_cog", 1000);
|
||||||
addEntity(EntitySawblade.class, "entity_stray_saw", 1000);
|
addEntity(EntitySawblade.class, "entity_stray_saw", 1000);
|
||||||
addEntity(EntityChemical.class, "entity_chemthrower_splash", 1000);
|
addEntity(EntityChemical.class, "entity_chemthrower_splash", 1000);
|
||||||
|
|||||||
@ -1,73 +0,0 @@
|
|||||||
package com.hbm.entity.qic;
|
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.util.Vec3;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class EntitySPV extends Entity {
|
|
||||||
|
|
||||||
public EntitySPV(World p_i1582_1_) {
|
|
||||||
super(p_i1582_1_);
|
|
||||||
this.setSize(0.5F, 0.5F);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void entityInit() { }
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void readEntityFromNBT(NBTTagCompound p_70037_1_) { }
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void writeEntityToNBT(NBTTagCompound p_70014_1_) { }
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onUpdate() {
|
|
||||||
|
|
||||||
if(this.riddenByEntity != null && this.riddenByEntity instanceof EntityLivingBase && ((EntityLivingBase)this.riddenByEntity).moveForward != 0) {
|
|
||||||
EntityLivingBase riding = (EntityLivingBase) this.riddenByEntity;
|
|
||||||
Vec3 vec = riding.getLookVec();
|
|
||||||
this.motionX = vec.xCoord * riding.moveForward * 0.25D;
|
|
||||||
this.motionY = vec.yCoord * riding.moveForward * 0.25D;
|
|
||||||
this.motionZ = vec.zCoord * riding.moveForward * 0.25D;
|
|
||||||
|
|
||||||
} else if(this.riddenByEntity == null) {
|
|
||||||
this.motionY -= 0.01D;
|
|
||||||
|
|
||||||
if(this.onGround) {
|
|
||||||
this.motionX = 0;
|
|
||||||
this.motionY = 0;
|
|
||||||
this.motionZ = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
this.motionX = 0;
|
|
||||||
this.motionY = 0;
|
|
||||||
this.motionZ = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
|
||||||
//this.setPositionAndRotation(this.posX + motionX, this.posY + motionY, this.posZ + motionZ, this.rotationYaw, this.rotationPitch);
|
|
||||||
|
|
||||||
super.onUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canBeCollidedWith() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean interactFirst(EntityPlayer player) {
|
|
||||||
if(super.interactFirst(player)) {
|
|
||||||
return true;
|
|
||||||
} else if(!this.worldObj.isRemote && (this.riddenByEntity == null || this.riddenByEntity == player)) {
|
|
||||||
player.mountEntity(this);
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -53,6 +53,10 @@ public class FluidTank {
|
|||||||
|
|
||||||
public void setTankType(FluidType type) {
|
public void setTankType(FluidType type) {
|
||||||
|
|
||||||
|
if(type == null) {
|
||||||
|
type = Fluids.NONE;
|
||||||
|
}
|
||||||
|
|
||||||
if(this.type == type)
|
if(this.type == type)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -85,16 +89,16 @@ public class FluidTank {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Called on TE update
|
//Called on TE update
|
||||||
public void updateTank(TileEntity te) {
|
@Deprecated public void updateTank(TileEntity te) {
|
||||||
updateTank(te, 100);
|
updateTank(te, 100);
|
||||||
}
|
}
|
||||||
public void updateTank(TileEntity te, int range) {
|
@Deprecated public void updateTank(TileEntity te, int range) {
|
||||||
updateTank(te.xCoord, te.yCoord, te.zCoord, te.getWorldObj().provider.dimensionId, range);
|
updateTank(te.xCoord, te.yCoord, te.zCoord, te.getWorldObj().provider.dimensionId, range);
|
||||||
}
|
}
|
||||||
public void updateTank(int x, int y, int z, int dim) {
|
@Deprecated public void updateTank(int x, int y, int z, int dim) {
|
||||||
updateTank(x, y, z, dim, 100);
|
updateTank(x, y, z, dim, 100);
|
||||||
}
|
}
|
||||||
public void updateTank(int x, int y, int z, int dim, int range) {
|
@Deprecated public void updateTank(int x, int y, int z, int dim, int range) {
|
||||||
PacketDispatcher.wrapper.sendToAllAround(new TEFluidPacket(x, y, z, fluid, index, type), new TargetPoint(dim, x, y, z, range));
|
PacketDispatcher.wrapper.sendToAllAround(new TEFluidPacket(x, y, z, fluid, index, type), new TargetPoint(dim, x, y, z, range));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -114,15 +114,15 @@ public class Mats {
|
|||||||
public static final NTMMaterial MAT_ALLOY = makeSmeltable(_AS + 2, ALLOY, 0xFF8330, 0x700000, 0xFF7318).setShapes(WIRE, INGOT, DUST, PLATE, CASTPLATE, BLOCK);
|
public static final NTMMaterial MAT_ALLOY = makeSmeltable(_AS + 2, ALLOY, 0xFF8330, 0x700000, 0xFF7318).setShapes(WIRE, INGOT, DUST, PLATE, CASTPLATE, BLOCK);
|
||||||
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(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_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);
|
||||||
public static final NTMMaterial MAT_STAR = makeSmeltable(_AS + 5, STAR, 0xCCCCEA, 0x11111A, 0xA5A5D3).setShapes(INGOT, DUST, BLOCK);
|
public static final NTMMaterial MAT_STAR = makeSmeltable(_AS + 5, STAR, 0xCCCCEA, 0x11111A, 0xA5A5D3).setShapes(INGOT, DUST, BLOCK);
|
||||||
public static final NTMMaterial MAT_TCALLOY = makeSmeltable(_AS + 6, TCALLOY, 0xD4D6D6, 0x323D3D, 0x9CA6A6).setShapes(INGOT, DUST, CASTPLATE);
|
|
||||||
public static final NTMMaterial MAT_FERRO = makeSmeltable(_AS + 7, FERRO, 0xB7B7C9, 0x101022, 0x6B6B8B).setShapes(INGOT);
|
public static final NTMMaterial MAT_FERRO = makeSmeltable(_AS + 7, FERRO, 0xB7B7C9, 0x101022, 0x6B6B8B).setShapes(INGOT);
|
||||||
|
public static final NTMMaterial MAT_TCALLOY = makeSmeltable(_AS + 6, TCALLOY, 0xD4D6D6, 0x323D3D, 0x9CA6A6).setShapes(INGOT, DUST, CASTPLATE);
|
||||||
|
public static final NTMMaterial MAT_CDALLOY = makeSmeltable(_AS + 13, CDALLOY, 0xF7DF8F, 0x604308, 0xFBD368).setShapes(INGOT, CASTPLATE);
|
||||||
public static final NTMMaterial MAT_MAGTUNG = makeSmeltable(_AS + 8, MAGTUNG, 0x22A2A2, 0x0F0F0F, 0x22A2A2).setShapes(INGOT, DUST, BLOCK);
|
public static final NTMMaterial MAT_MAGTUNG = makeSmeltable(_AS + 8, MAGTUNG, 0x22A2A2, 0x0F0F0F, 0x22A2A2).setShapes(INGOT, DUST, BLOCK);
|
||||||
public static final NTMMaterial MAT_CMB = makeSmeltable(_AS + 9, CMB, 0x6F6FB4, 0x000011, 0x6F6FB4).setShapes(INGOT, DUST, PLATE, CASTPLATE, BLOCK);
|
public static final NTMMaterial MAT_CMB = makeSmeltable(_AS + 9, CMB, 0x6F6FB4, 0x000011, 0x6F6FB4).setShapes(INGOT, DUST, PLATE, CASTPLATE, BLOCK);
|
||||||
public static final NTMMaterial MAT_FLUX = makeAdditive(_AS + 10, df("Flux"), 0xF1E0BB, 0x6F6256, 0xDECCAD).setShapes(DUST);
|
public static final NTMMaterial MAT_FLUX = makeAdditive(_AS + 10, df("Flux"), 0xF1E0BB, 0x6F6256, 0xDECCAD).setShapes(DUST);
|
||||||
public static final NTMMaterial MAT_SLAG = makeSmeltable(_AS + 11, SLAG, 0x554940, 0x34281F, 0x6C6562).setShapes(BLOCK);
|
public static final NTMMaterial MAT_SLAG = makeSmeltable(_AS + 11, SLAG, 0x554940, 0x34281F, 0x6C6562).setShapes(BLOCK);
|
||||||
public static final NTMMaterial MAT_DESH = makeSmeltable(_AS + 12, DESH, 0xFF6D6D, 0x720000, 0xF22929).setShapes(INGOT, DUST, CASTPLATE, BLOCK);
|
|
||||||
public static final NTMMaterial MAT_CDALLOY = makeSmeltable(_AS + 13, CDALLOY, 0xF7DF8F, 0x604308, 0xFBD368).setShapes(INGOT, CASTPLATE);
|
|
||||||
|
|
||||||
@Deprecated public static NTMMaterial makeSmeltable(int id, DictFrame dict, int color) { return makeSmeltable(id, dict, color, color, color); }
|
@Deprecated public static NTMMaterial makeSmeltable(int id, DictFrame dict, int color) { return makeSmeltable(id, dict, color, color, color); }
|
||||||
@Deprecated public static NTMMaterial makeAdditive(int id, DictFrame dict, int color) { return makeAdditive(id, dict, color, color, color); }
|
@Deprecated public static NTMMaterial makeAdditive(int id, DictFrame dict, int color) { return makeAdditive(id, dict, color, color, color); }
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.config.GeneralConfig;
|
import com.hbm.config.GeneralConfig;
|
||||||
import com.hbm.handler.imc.IMCCentrifuge;
|
import com.hbm.handler.imc.IMCCentrifuge;
|
||||||
|
import static com.hbm.inventory.OreDictManager.*;
|
||||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||||
import com.hbm.inventory.RecipesCommon;
|
import com.hbm.inventory.RecipesCommon;
|
||||||
import com.hbm.inventory.RecipesCommon.AStack;
|
import com.hbm.inventory.RecipesCommon.AStack;
|
||||||
@ -140,115 +141,115 @@ public class CentrifugeRecipes extends SerializableRecipe {
|
|||||||
new ItemStack(ModItems.dust, 1),
|
new ItemStack(ModItems.dust, 1),
|
||||||
new ItemStack(ModItems.dust, 1) });
|
new ItemStack(ModItems.dust, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreCoal"), new ItemStack[] {
|
recipes.put(new OreDictStack(COAL.ore()), new ItemStack[] {
|
||||||
new ItemStack(ModItems.powder_coal, 2),
|
new ItemStack(ModItems.powder_coal, 2),
|
||||||
new ItemStack(ModItems.powder_coal, 2),
|
new ItemStack(ModItems.powder_coal, 2),
|
||||||
new ItemStack(ModItems.powder_coal, 2),
|
new ItemStack(ModItems.powder_coal, 2),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreLignite"), new ItemStack[] {
|
recipes.put(new OreDictStack(LIGNITE.ore()), new ItemStack[] {
|
||||||
new ItemStack(ModItems.powder_lignite, 2),
|
new ItemStack(ModItems.powder_lignite, 2),
|
||||||
new ItemStack(ModItems.powder_lignite, 2),
|
new ItemStack(ModItems.powder_lignite, 2),
|
||||||
new ItemStack(ModItems.powder_lignite, 2),
|
new ItemStack(ModItems.powder_lignite, 2),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreIron"), new ItemStack[] {
|
recipes.put(new OreDictStack(IRON.ore()), new ItemStack[] {
|
||||||
new ItemStack(ModItems.powder_iron, 1),
|
new ItemStack(ModItems.powder_iron, 1),
|
||||||
new ItemStack(ModItems.powder_iron, 1),
|
new ItemStack(ModItems.powder_iron, 1),
|
||||||
new ItemStack(ModItems.powder_iron, 1),
|
new ItemStack(ModItems.powder_iron, 1),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreGold"), new ItemStack[] {
|
recipes.put(new OreDictStack(GOLD.ore()), new ItemStack[] {
|
||||||
lbs ? new ItemStack(ModItems.powder_gold, 2) : new ItemStack(ModItems.powder_gold, 1),
|
lbs ? new ItemStack(ModItems.powder_gold, 2) : new ItemStack(ModItems.powder_gold, 1),
|
||||||
new ItemStack(ModItems.powder_gold, 1),
|
new ItemStack(ModItems.powder_gold, 1),
|
||||||
lbs ? new ItemStack(ModItems.nugget_bismuth, 1) : new ItemStack(ModItems.powder_gold, 1),
|
lbs ? new ItemStack(ModItems.nugget_bismuth, 1) : new ItemStack(ModItems.powder_gold, 1),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreDiamond"), new ItemStack[] {
|
recipes.put(new OreDictStack(DIAMOND.ore()), new ItemStack[] {
|
||||||
new ItemStack(ModItems.powder_diamond, 1),
|
new ItemStack(ModItems.powder_diamond, 1),
|
||||||
new ItemStack(ModItems.powder_diamond, 1),
|
new ItemStack(ModItems.powder_diamond, 1),
|
||||||
new ItemStack(ModItems.powder_diamond, 1),
|
new ItemStack(ModItems.powder_diamond, 1),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreEmerald"), new ItemStack[] {
|
recipes.put(new OreDictStack(EMERALD.ore()), new ItemStack[] {
|
||||||
new ItemStack(ModItems.powder_emerald, 1),
|
new ItemStack(ModItems.powder_emerald, 1),
|
||||||
new ItemStack(ModItems.powder_emerald, 1),
|
new ItemStack(ModItems.powder_emerald, 1),
|
||||||
new ItemStack(ModItems.powder_emerald, 1),
|
new ItemStack(ModItems.powder_emerald, 1),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreTitanium"), new ItemStack[] {
|
recipes.put(new OreDictStack(TI.ore()), new ItemStack[] {
|
||||||
lbs ? new ItemStack(ModItems.powder_titanium, 2) : new ItemStack(ModItems.powder_titanium, 1),
|
lbs ? new ItemStack(ModItems.powder_titanium, 2) : new ItemStack(ModItems.powder_titanium, 1),
|
||||||
lbs ? new ItemStack(ModItems.powder_titanium, 2) : new ItemStack(ModItems.powder_titanium, 1),
|
lbs ? new ItemStack(ModItems.powder_titanium, 2) : new ItemStack(ModItems.powder_titanium, 1),
|
||||||
new ItemStack(ModItems.powder_iron, 1),
|
new ItemStack(ModItems.powder_iron, 1),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreQuartz"), new ItemStack[] {
|
recipes.put(new OreDictStack(NETHERQUARTZ.ore()), new ItemStack[] {
|
||||||
new ItemStack(ModItems.powder_quartz, 1),
|
new ItemStack(ModItems.powder_quartz, 1),
|
||||||
new ItemStack(ModItems.powder_quartz, 1),
|
new ItemStack(ModItems.powder_quartz, 1),
|
||||||
new ItemStack(ModItems.powder_lithium_tiny, 1),
|
new ItemStack(ModItems.powder_lithium_tiny, 1),
|
||||||
new ItemStack(Blocks.netherrack, 1) });
|
new ItemStack(Blocks.netherrack, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreTungsten"), new ItemStack[] {
|
recipes.put(new OreDictStack(W.ore()), new ItemStack[] {
|
||||||
lbs ? new ItemStack(ModItems.powder_tungsten, 2) : new ItemStack(ModItems.powder_tungsten, 1),
|
lbs ? new ItemStack(ModItems.powder_tungsten, 2) : new ItemStack(ModItems.powder_tungsten, 1),
|
||||||
new ItemStack(ModItems.powder_tungsten, 1),
|
new ItemStack(ModItems.powder_tungsten, 1),
|
||||||
new ItemStack(ModItems.powder_iron, 1),
|
new ItemStack(ModItems.powder_iron, 1),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreCopper"), new ItemStack[] {
|
recipes.put(new OreDictStack(CU.ore()), new ItemStack[] {
|
||||||
lbs ? new ItemStack(ModItems.powder_copper, 2) : new ItemStack(ModItems.powder_copper, 1),
|
lbs ? new ItemStack(ModItems.powder_copper, 2) : new ItemStack(ModItems.powder_copper, 1),
|
||||||
new ItemStack(ModItems.powder_copper, 1),
|
new ItemStack(ModItems.powder_copper, 1),
|
||||||
new ItemStack(ModItems.powder_gold, 1),
|
new ItemStack(ModItems.powder_gold, 1),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreAluminum"), new ItemStack[] {
|
recipes.put(new OreDictStack(AL.ore()), new ItemStack[] {
|
||||||
new ItemStack(ModItems.powder_aluminium, 1),
|
new ItemStack(ModItems.powder_aluminium, 1),
|
||||||
new ItemStack(ModItems.powder_aluminium, 1),
|
new ItemStack(ModItems.powder_aluminium, 1),
|
||||||
new ItemStack(ModItems.powder_iron, 1),
|
new ItemStack(ModItems.powder_iron, 1),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreLead"), new ItemStack[] {
|
recipes.put(new OreDictStack(PB.ore()), new ItemStack[] {
|
||||||
lbs ? new ItemStack(ModItems.powder_lead, 2) : new ItemStack(ModItems.powder_lead, 1),
|
lbs ? new ItemStack(ModItems.powder_lead, 2) : new ItemStack(ModItems.powder_lead, 1),
|
||||||
lbs ? new ItemStack(ModItems.nugget_bismuth, 1) : new ItemStack(ModItems.powder_lead, 1),
|
lbs ? new ItemStack(ModItems.nugget_bismuth, 1) : new ItemStack(ModItems.powder_lead, 1),
|
||||||
new ItemStack(ModItems.powder_gold, 1),
|
new ItemStack(ModItems.powder_gold, 1),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreSchrabidium"), new ItemStack[] {
|
recipes.put(new OreDictStack(SA326.ore()), new ItemStack[] {
|
||||||
new ItemStack(ModItems.powder_schrabidium, 1),
|
new ItemStack(ModItems.powder_schrabidium, 1),
|
||||||
new ItemStack(ModItems.powder_schrabidium, 1),
|
new ItemStack(ModItems.powder_schrabidium, 1),
|
||||||
new ItemStack(ModItems.nugget_solinium, 1),
|
new ItemStack(ModItems.nugget_solinium, 1),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new ComparableStack(ModBlocks.ore_rare), new ItemStack[] {
|
recipes.put(new OreDictStack("oreRareEarth"), new ItemStack[] {
|
||||||
new ItemStack(ModItems.powder_desh_mix, 1),
|
new ItemStack(ModItems.powder_desh_mix, 1),
|
||||||
new ItemStack(ModItems.nugget_zirconium, 1),
|
new ItemStack(ModItems.nugget_zirconium, 1),
|
||||||
new ItemStack(ModItems.nugget_zirconium, 1),
|
new ItemStack(ModItems.nugget_zirconium, 1),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("orePlutonium"), new ItemStack[] {
|
recipes.put(new OreDictStack(PU.ore()), new ItemStack[] {
|
||||||
new ItemStack(ModItems.powder_plutonium, 1),
|
new ItemStack(ModItems.powder_plutonium, 1),
|
||||||
new ItemStack(ModItems.powder_plutonium, 1),
|
new ItemStack(ModItems.powder_plutonium, 1),
|
||||||
new ItemStack(ModItems.nugget_polonium, 3),
|
new ItemStack(ModItems.nugget_polonium, 3),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreUranium"), new ItemStack[] {
|
recipes.put(new OreDictStack(U.ore()), new ItemStack[] {
|
||||||
lbs ? new ItemStack(ModItems.powder_uranium, 2) : new ItemStack(ModItems.powder_uranium, 1),
|
lbs ? new ItemStack(ModItems.powder_uranium, 2) : new ItemStack(ModItems.powder_uranium, 1),
|
||||||
lbs ? new ItemStack(ModItems.nugget_technetium, 2) : new ItemStack(ModItems.powder_uranium, 1),
|
lbs ? new ItemStack(ModItems.nugget_technetium, 2) : new ItemStack(ModItems.powder_uranium, 1),
|
||||||
lbs ? new ItemStack(ModItems.nugget_ra226, 2) : new ItemStack(ModItems.nugget_ra226, 1),
|
lbs ? new ItemStack(ModItems.nugget_ra226, 2) : new ItemStack(ModItems.nugget_ra226, 1),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreThorium"), new ItemStack[] {
|
recipes.put(new OreDictStack(TH232.ore()), new ItemStack[] {
|
||||||
new ItemStack(ModItems.powder_thorium, 1),
|
new ItemStack(ModItems.powder_thorium, 1),
|
||||||
new ItemStack(ModItems.powder_thorium, 1),
|
new ItemStack(ModItems.powder_thorium, 1),
|
||||||
new ItemStack(ModItems.powder_uranium, 1),
|
new ItemStack(ModItems.powder_uranium, 1),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreBeryllium"), new ItemStack[] {
|
recipes.put(new OreDictStack(BE.ore()), new ItemStack[] {
|
||||||
new ItemStack(ModItems.powder_beryllium, 1),
|
new ItemStack(ModItems.powder_beryllium, 1),
|
||||||
new ItemStack(ModItems.powder_beryllium, 1),
|
new ItemStack(ModItems.powder_beryllium, 1),
|
||||||
new ItemStack(ModItems.powder_emerald, 1),
|
new ItemStack(ModItems.powder_emerald, 1),
|
||||||
new ItemStack(Blocks.gravel, 1) });
|
new ItemStack(Blocks.gravel, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreRedstone"), new ItemStack[] {
|
recipes.put(new OreDictStack(REDSTONE.ore()), new ItemStack[] {
|
||||||
new ItemStack(Items.redstone, 3),
|
new ItemStack(Items.redstone, 3),
|
||||||
new ItemStack(Items.redstone, 3),
|
new ItemStack(Items.redstone, 3),
|
||||||
lbs ? new ItemStack(ModItems.ingot_mercury, 3) : new ItemStack(ModItems.ingot_mercury, 1),
|
lbs ? new ItemStack(ModItems.ingot_mercury, 3) : new ItemStack(ModItems.ingot_mercury, 1),
|
||||||
@ -260,7 +261,7 @@ public class CentrifugeRecipes extends SerializableRecipe {
|
|||||||
new ItemStack(ModItems.powder_niobium, 2),
|
new ItemStack(ModItems.powder_niobium, 2),
|
||||||
new ItemStack(Blocks.end_stone, 1) });
|
new ItemStack(Blocks.end_stone, 1) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreLapis"), new ItemStack[] {
|
recipes.put(new OreDictStack(LAPIS.ore()), new ItemStack[] {
|
||||||
new ItemStack(ModItems.powder_lapis, 3),
|
new ItemStack(ModItems.powder_lapis, 3),
|
||||||
new ItemStack(ModItems.powder_lapis, 3),
|
new ItemStack(ModItems.powder_lapis, 3),
|
||||||
new ItemStack(ModItems.powder_cobalt_tiny, 1),
|
new ItemStack(ModItems.powder_cobalt_tiny, 1),
|
||||||
@ -284,7 +285,7 @@ public class CentrifugeRecipes extends SerializableRecipe {
|
|||||||
new ItemStack(ModItems.ingot_phosphorus),
|
new ItemStack(ModItems.ingot_phosphorus),
|
||||||
new ItemStack(Blocks.netherrack) });
|
new ItemStack(Blocks.netherrack) });
|
||||||
|
|
||||||
recipes.put(new OreDictStack("oreCobalt"), new ItemStack[] {
|
recipes.put(new OreDictStack(CO.ore()), new ItemStack[] {
|
||||||
new ItemStack(ModItems.powder_cobalt, 2),
|
new ItemStack(ModItems.powder_cobalt, 2),
|
||||||
new ItemStack(ModItems.powder_iron, 1),
|
new ItemStack(ModItems.powder_iron, 1),
|
||||||
new ItemStack(ModItems.powder_copper, 1),
|
new ItemStack(ModItems.powder_copper, 1),
|
||||||
|
|||||||
@ -140,13 +140,19 @@ public class CrystallizerRecipes extends SerializableRecipe {
|
|||||||
|
|
||||||
registerRecipe(KEY_SAND, new CrystallizerRecipe(Blocks.clay, 20), new FluidStack(Fluids.COLLOID, 1_000));
|
registerRecipe(KEY_SAND, new CrystallizerRecipe(Blocks.clay, 20), new FluidStack(Fluids.COLLOID, 1_000));
|
||||||
|
|
||||||
|
/// COMPAT CERTUS QUARTZ ///
|
||||||
List<ItemStack> quartz = OreDictionary.getOres("crystalCertusQuartz");
|
List<ItemStack> quartz = OreDictionary.getOres("crystalCertusQuartz");
|
||||||
|
|
||||||
if(quartz != null && !quartz.isEmpty()) {
|
if(quartz != null && !quartz.isEmpty()) {
|
||||||
ItemStack qItem = quartz.get(0).copy();
|
ItemStack qItem = quartz.get(0).copy();
|
||||||
qItem.stackSize = 12;
|
qItem.stackSize = 12;
|
||||||
registerRecipe("oreCertusQuartz", new CrystallizerRecipe(qItem, baseTime));
|
registerRecipe("oreCertusQuartz", new CrystallizerRecipe(qItem, baseTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// COMPAT WHITE PHOSPHORUS DUST ///
|
||||||
|
List<ItemStack> dustWhitePhosphorus = OreDictionary.getOres(P_WHITE.dust());
|
||||||
|
if(dustWhitePhosphorus != null && !dustWhitePhosphorus.isEmpty()) {
|
||||||
|
registerRecipe(P_WHITE.dust(), new CrystallizerRecipe(new ItemStack(ModItems.ingot_phosphorus), utilityTime), new FluidStack(Fluids.AROMATICS, 50));
|
||||||
|
}
|
||||||
|
|
||||||
if(!IMCCrystallizer.buffer.isEmpty()) {
|
if(!IMCCrystallizer.buffer.isEmpty()) {
|
||||||
recipes.putAll(IMCCrystallizer.buffer);
|
recipes.putAll(IMCCrystallizer.buffer);
|
||||||
|
|||||||
@ -36,7 +36,7 @@ public class AnvilSmithingMold extends AnvilSmithingRecipe {
|
|||||||
|
|
||||||
for(String otherPrefix : OreNames.prefixes) {
|
for(String otherPrefix : OreNames.prefixes) {
|
||||||
if(otherPrefix.length() > matchesPrefix.name.length() && name.startsWith(otherPrefix)) {
|
if(otherPrefix.length() > matchesPrefix.name.length() && name.startsWith(otherPrefix)) {
|
||||||
continue; //ignore if there's a longer prefix that matches (i.e. a more accurate match)
|
return false; //ignore if there's a longer prefix that matches (i.e. a more accurate match)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -35,15 +35,15 @@ public class ItemWatzPellet extends ItemEnumMulti {
|
|||||||
|
|
||||||
public static enum EnumWatzType {
|
public static enum EnumWatzType {
|
||||||
|
|
||||||
//TODO: durability
|
|
||||||
SCHRABIDIUM( 0x32FFFF, 0x005C5C, 2_000, 10D, new FunctionLogarithmic(10), null, null),
|
SCHRABIDIUM( 0x32FFFF, 0x005C5C, 2_000, 10D, new FunctionLogarithmic(10), null, null),
|
||||||
HES( 0x66DCD6, 0x023933, 1_500, 10D, null, null, null),
|
HES( 0x66DCD6, 0x023933, 1_500, 10D, null, null, null),
|
||||||
LES( 0xABB4A8, 0x0C1105, 500, 10D, null, null, null),
|
LES( 0xABB4A8, 0x0C1105, 500, 10D, null, null, null),
|
||||||
MES( 0xCBEADF, 0x28473C, 1_000, 10D, null, null, null),
|
MES( 0xCBEADF, 0x28473C, 1_000, 10D, null, null, null),
|
||||||
NP( 0xA6B2A6, 0x030F03, 0, 10D, null, null, null),
|
HEN( 0xA6B2A6, 0x030F03, 0, 10D, null, null, null),
|
||||||
MEU( 0xC1C7BD, 0x2B3227, 0, 10D, null, null, null),
|
MEU( 0xC1C7BD, 0x2B3227, 0, 10D, null, null, null),
|
||||||
MEP( 0x9AA3A0, 0x111A17, 0, 10D, null, null, null),
|
MEP( 0x9AA3A0, 0x111A17, 0, 10D, null, null, null),
|
||||||
LEAD( 0xA6A6B2, 0x03030F, 0, 0, null, null, new FunctionSqrt(10)), //standard absorber, negative coefficient
|
LEAD( 0xA6A6B2, 0x03030F, 0, 0, null, null, new FunctionSqrt(10)), //standard absorber, negative coefficient
|
||||||
|
BORON( 0xBDC8D2, 0x29343E, 0, 0, null, null, new FunctionLinear(10)), //improved absorber, linear
|
||||||
DU( 0xC1C7BD, 0x2B3227, 0, 0, null, null, new FunctionQuadratic(1D, 1D).withDiv(100)); //absorber with positive coefficient
|
DU( 0xC1C7BD, 0x2B3227, 0, 0, null, null, new FunctionQuadratic(1D, 1D).withDiv(100)); //absorber with positive coefficient
|
||||||
|
|
||||||
public double yield = 1_000_000_000;
|
public double yield = 1_000_000_000;
|
||||||
|
|||||||
@ -48,6 +48,7 @@ import com.hbm.blocks.generic.BlockEmitter.TileEntityEmitter;
|
|||||||
import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
|
import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
|
||||||
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
|
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
|
||||||
import com.hbm.blocks.machine.MachineFan.TileEntityFan;
|
import com.hbm.blocks.machine.MachineFan.TileEntityFan;
|
||||||
|
import com.hbm.blocks.machine.WatzPump.TileEntityWatzPump;
|
||||||
import com.hbm.entity.cart.*;
|
import com.hbm.entity.cart.*;
|
||||||
import com.hbm.entity.effect.*;
|
import com.hbm.entity.effect.*;
|
||||||
import com.hbm.entity.grenade.*;
|
import com.hbm.entity.grenade.*;
|
||||||
@ -332,7 +333,9 @@ public class ClientProxy extends ServerProxy {
|
|||||||
//ITER
|
//ITER
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityITER.class, new RenderITER());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityITER.class, new RenderITER());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePlasmaHeater.class, new RenderPlasmaHeater());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePlasmaHeater.class, new RenderPlasmaHeater());
|
||||||
|
//Watz
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWatz.class, new RenderWatz());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWatz.class, new RenderWatz());
|
||||||
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWatzPump.class, new RenderWatzPump());
|
||||||
//doors
|
//doors
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityVaultDoor.class, new RenderVaultDoor());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityVaultDoor.class, new RenderVaultDoor());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBlastDoor.class, new RenderBlastDoor());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBlastDoor.class, new RenderBlastDoor());
|
||||||
|
|||||||
@ -214,6 +214,7 @@ public class ResourceManager {
|
|||||||
|
|
||||||
//Watz
|
//Watz
|
||||||
public static final IModelCustom watz = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/reactors/watz.obj"));
|
public static final IModelCustom watz = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/reactors/watz.obj"));
|
||||||
|
public static final IModelCustom watz_pump = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/watz_pump.obj"));
|
||||||
|
|
||||||
//FENSU
|
//FENSU
|
||||||
public static final IModelCustom fensu = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/fensu.obj"));
|
public static final IModelCustom fensu = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/fensu.obj"));
|
||||||
@ -561,6 +562,7 @@ public class ResourceManager {
|
|||||||
|
|
||||||
//Watz
|
//Watz
|
||||||
public static final ResourceLocation watz_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/watz.png");
|
public static final ResourceLocation watz_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/watz.png");
|
||||||
|
public static final ResourceLocation watz_pump_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/watz_pump.png");
|
||||||
|
|
||||||
//FENSU
|
//FENSU
|
||||||
public static final ResourceLocation fensu_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensu.png");
|
public static final ResourceLocation fensu_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensu.png");
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public class TEFluidPacket implements IMessage {
|
public class TEFluidPacket implements IMessage {
|
||||||
|
|
||||||
int x;
|
int x;
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.hbm.particle.psys.engine;
|
|||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -10,7 +11,7 @@ import net.minecraft.world.World;
|
|||||||
* @author hbm
|
* @author hbm
|
||||||
*/
|
*/
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class PSysFX {
|
public abstract class PSysFX {
|
||||||
|
|
||||||
public World world;
|
public World world;
|
||||||
public double posX;
|
public double posX;
|
||||||
@ -19,14 +20,62 @@ public class PSysFX {
|
|||||||
public double prevPosX;
|
public double prevPosX;
|
||||||
public double prevPosY;
|
public double prevPosY;
|
||||||
public double prevPosZ;
|
public double prevPosZ;
|
||||||
public double motionX;
|
|
||||||
public double motionY;
|
|
||||||
public double motionZ;
|
|
||||||
public static double interpPosX;
|
public static double interpPosX;
|
||||||
public static double interpPosY;
|
public static double interpPosY;
|
||||||
public static double interpPosZ;
|
public static double interpPosZ;
|
||||||
|
public AxisAlignedBB boundingBox;
|
||||||
public PSysFX() {
|
public int particleAge;
|
||||||
|
public int particleMaxAge;
|
||||||
|
public boolean isExpired = false;
|
||||||
|
public boolean shouldExpireWhenUnloaded = true;
|
||||||
|
public boolean isUnloaded = false;
|
||||||
|
|
||||||
|
public PSysFX(World world, double x, double y, double z) {
|
||||||
|
this.world = world;
|
||||||
|
this.posX = x;
|
||||||
|
this.posY = y;
|
||||||
|
this.posZ = z;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateParticle() {
|
||||||
|
this.prevPosX = posX;
|
||||||
|
this.prevPosY = posY;
|
||||||
|
this.prevPosZ = posZ;
|
||||||
|
this.isUnloaded = !world.getChunkProvider().chunkExists((int) Math.floor(posX) >> 4, (int) Math.floor(posZ) >> 4);
|
||||||
|
|
||||||
|
this.particleAge++;
|
||||||
|
|
||||||
|
if(this.particleAge >= this.particleMaxAge) {
|
||||||
|
this.expire();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.shouldExpireWhenUnloaded && this.isUnloaded) {
|
||||||
|
this.expire();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract void renderParticle();
|
||||||
|
|
||||||
|
public AxisAlignedBB getBoundingBox() {
|
||||||
|
return this.boundingBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBoundingBox(AxisAlignedBB bb) {
|
||||||
|
this.boundingBox = bb;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setPosToAABB() {
|
||||||
|
AxisAlignedBB aabb = this.getBoundingBox();
|
||||||
|
this.posX = (aabb.minX + aabb.maxX) / 2.0D;
|
||||||
|
this.posY = aabb.minY;
|
||||||
|
this.posZ = (aabb.minZ + aabb.maxZ) / 2.0D;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void expire() {
|
||||||
|
this.isExpired = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExpireOnUnload(boolean expire) {
|
||||||
|
this.shouldExpireWhenUnloaded = expire;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
87
src/main/java/com/hbm/particle/psys/engine/PSysFXMoving.java
Normal file
87
src/main/java/com/hbm/particle/psys/engine/PSysFXMoving.java
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
package com.hbm.particle.psys.engine;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.lib.Library;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public abstract class PSysFXMoving extends PSysFX {
|
||||||
|
|
||||||
|
public double motionX;
|
||||||
|
public double motionY;
|
||||||
|
public double motionZ;
|
||||||
|
boolean noClip = false;
|
||||||
|
/* using the forgedirection's ordinal as an index, this tells us what side of a block the particle has collided with */
|
||||||
|
public boolean collisionData[] = new boolean[6];
|
||||||
|
|
||||||
|
public PSysFXMoving(World world, double x, double y, double z, double mX, double mY, double mZ) {
|
||||||
|
super(world, x, y, z);
|
||||||
|
this.motionX = mX;
|
||||||
|
this.motionY = mY;
|
||||||
|
this.motionZ = mZ;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getParticleGravity() {
|
||||||
|
return 0.04D;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getParticleDrag() {
|
||||||
|
return 0.98D;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateParticle() {
|
||||||
|
super.updateParticle();
|
||||||
|
|
||||||
|
if(!this.isUnloaded) {
|
||||||
|
this.motionX -= this.getParticleGravity();
|
||||||
|
this.motionX *= this.getParticleDrag();
|
||||||
|
this.motionY *= this.getParticleDrag();
|
||||||
|
this.motionZ *= this.getParticleDrag();
|
||||||
|
|
||||||
|
this.move(motionX, motionY, motionZ);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void move(double x, double y, double z) {
|
||||||
|
|
||||||
|
double x0 = x;
|
||||||
|
double y0 = y;
|
||||||
|
double z0 = z;
|
||||||
|
|
||||||
|
this.collisionData = new boolean[6];
|
||||||
|
|
||||||
|
if(!noClip) {
|
||||||
|
List<AxisAlignedBB> list = this.world.getCollidingBoundingBoxes(null, this.getBoundingBox().expand(x, y, z));
|
||||||
|
|
||||||
|
for(AxisAlignedBB aabb : list) y = aabb.calculateYOffset(this.getBoundingBox(), y);
|
||||||
|
this.setBoundingBox(this.getBoundingBox().offset(0.0D, y, 0.0D));
|
||||||
|
|
||||||
|
for(AxisAlignedBB aabb : list) x = aabb.calculateXOffset(this.getBoundingBox(), x);
|
||||||
|
this.setBoundingBox(this.getBoundingBox().offset(x, 0.0D, 0.0D));
|
||||||
|
|
||||||
|
for(AxisAlignedBB aabb : list) z = aabb.calculateZOffset(this.getBoundingBox(), z);
|
||||||
|
this.setBoundingBox(this.getBoundingBox().offset(0.0D, 0.0D, z));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.setBoundingBox(this.getBoundingBox().offset(x, y, z));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setPosToAABB();
|
||||||
|
|
||||||
|
if(x0 != x && x > 0) this.collisionData[Library.NEG_X.ordinal()] = true;
|
||||||
|
if(x0 != x && x < 0) this.collisionData[Library.POS_X.ordinal()] = true;
|
||||||
|
if(y0 != y && y > 0) this.collisionData[Library.NEG_Y.ordinal()] = true;
|
||||||
|
if(y0 != y && y < 0) this.collisionData[Library.POS_Y.ordinal()] = true;
|
||||||
|
if(z0 != z && z > 0) this.collisionData[Library.NEG_Z.ordinal()] = true;
|
||||||
|
if(z0 != z && z < 0) this.collisionData[Library.POS_Z.ordinal()] = true;
|
||||||
|
|
||||||
|
if(x0 != x) this.motionX = 0.0D;
|
||||||
|
if(y0 != y) this.motionY = 0.0D;
|
||||||
|
if(z0 != z) this.motionZ = 0.0D;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -29,17 +29,17 @@ public class ParticleEngine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateParticles() {
|
public void updateParticles() {
|
||||||
|
for(FXLayer layer : layers) layer.updateLayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void renderParticles(float interp) {
|
public void renderParticles(float interp) {
|
||||||
|
for(FXLayer layer : layers) layer.renderLayer(interp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class FXLayer {
|
public static class FXLayer {
|
||||||
|
|
||||||
protected ResourceLocation batchTexture;
|
protected ResourceLocation batchTexture;
|
||||||
protected List particles;
|
protected List<PSysFX> particles;
|
||||||
|
|
||||||
public FXLayer() { }
|
public FXLayer() { }
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ public class ParticleEngine {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderLayer() {
|
protected void renderLayer(float interp) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,5 +26,4 @@ public class RenderWatz extends TileEntitySpecialRenderer {
|
|||||||
|
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
29
src/main/java/com/hbm/render/tileentity/RenderWatzPump.java
Normal file
29
src/main/java/com/hbm/render/tileentity/RenderWatzPump.java
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package com.hbm.render.tileentity;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.main.ResourceManager;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
|
public class RenderWatzPump extends TileEntitySpecialRenderer {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float f) {
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
|
||||||
|
GL11.glTranslatef((float) x + 0.5F, (float) y, (float) z + 0.5F);
|
||||||
|
|
||||||
|
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||||
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
|
|
||||||
|
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||||
|
bindTexture(ResourceManager.watz_pump_tex);
|
||||||
|
ResourceManager.watz_pump.renderAll();
|
||||||
|
GL11.glShadeModel(GL11.GL_FLAT);
|
||||||
|
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -12,6 +12,7 @@ import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
|
|||||||
import com.hbm.blocks.generic.BlockMotherOfAllOres.TileEntityRandomOre;
|
import com.hbm.blocks.generic.BlockMotherOfAllOres.TileEntityRandomOre;
|
||||||
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
|
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
|
||||||
import com.hbm.blocks.machine.MachineFan.TileEntityFan;
|
import com.hbm.blocks.machine.MachineFan.TileEntityFan;
|
||||||
|
import com.hbm.blocks.machine.WatzPump.TileEntityWatzPump;
|
||||||
import com.hbm.blocks.network.BlockCablePaintable.TileEntityCablePaintable;
|
import com.hbm.blocks.network.BlockCablePaintable.TileEntityCablePaintable;
|
||||||
import com.hbm.blocks.network.CableDiode.TileEntityDiode;
|
import com.hbm.blocks.network.CableDiode.TileEntityDiode;
|
||||||
import com.hbm.blocks.network.FluidDuctGauge.TileEntityPipeGauge;
|
import com.hbm.blocks.network.FluidDuctGauge.TileEntityPipeGauge;
|
||||||
@ -183,7 +184,6 @@ public class TileMappings {
|
|||||||
put(TileEntityPipeBaseNT.class, "tileentity_pipe_base");
|
put(TileEntityPipeBaseNT.class, "tileentity_pipe_base");
|
||||||
put(TileEntityPipePaintable.class, "tileentity_pipe_paintable");
|
put(TileEntityPipePaintable.class, "tileentity_pipe_paintable");
|
||||||
put(TileEntityPipeGauge.class, "tileentity_pipe_gauge");
|
put(TileEntityPipeGauge.class, "tileentity_pipe_gauge");
|
||||||
put(TileEntityWatz.class, "tileentity_watz");
|
|
||||||
put(TileEntityMachineBAT9000.class, "tileentity_bat9000");
|
put(TileEntityMachineBAT9000.class, "tileentity_bat9000");
|
||||||
put(TileEntityMachineOrbus.class, "tileentity_orbus");
|
put(TileEntityMachineOrbus.class, "tileentity_orbus");
|
||||||
|
|
||||||
@ -306,6 +306,9 @@ public class TileMappings {
|
|||||||
|
|
||||||
put(TileEntityReactorZirnox.class, "tileentity_zirnox");
|
put(TileEntityReactorZirnox.class, "tileentity_zirnox");
|
||||||
put(TileEntityZirnoxDestroyed.class, "tileentity_zirnox_destroyed");
|
put(TileEntityZirnoxDestroyed.class, "tileentity_zirnox_destroyed");
|
||||||
|
|
||||||
|
put(TileEntityWatz.class, "tileentity_watz");
|
||||||
|
put(TileEntityWatzPump.class, "tileentity_watz_pump");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void putPile() {
|
private static void putPile() {
|
||||||
|
|||||||
@ -145,23 +145,11 @@ public class TileEntityMachineMixer extends TileEntityMachineBase implements INB
|
|||||||
|
|
||||||
if(recipe == null) return false;
|
if(recipe == null) return false;
|
||||||
|
|
||||||
if(recipe.input1 != null) {
|
tanks[0].setTankType(recipe.input1.type);
|
||||||
|
tanks[1].setTankType(recipe.input2.type);
|
||||||
if(recipe.input1.type != tanks[0].getTankType()) {
|
|
||||||
tanks[0].setTankType(recipe.input1.type);
|
if(recipe.input1 != null && tanks[0].getFill() < recipe.input1.fill) return false;
|
||||||
}
|
if(recipe.input2 != null && tanks[1].getFill() < recipe.input2.fill) return false;
|
||||||
|
|
||||||
if(tanks[0].getFill() < recipe.input1.fill) return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(recipe.input2 != null) {
|
|
||||||
|
|
||||||
if(recipe.input2.type != tanks[1].getTankType()) {
|
|
||||||
tanks[1].setTankType(recipe.input2.type);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(tanks[1].getFill() < recipe.input2.fill) return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* simplest check would usually go first, but fluid checks also do the setup and we want that to happen even without power */
|
/* simplest check would usually go first, but fluid checks also do the setup and we want that to happen even without power */
|
||||||
if(this.power < getConsumption()) return false;
|
if(this.power < getConsumption()) return false;
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.hbm.tileentity.machine;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.interfaces.IControlReceiver;
|
import com.hbm.interfaces.IControlReceiver;
|
||||||
import com.hbm.inventory.container.ContainerWatz;
|
import com.hbm.inventory.container.ContainerWatz;
|
||||||
import com.hbm.inventory.fluid.Fluids;
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
@ -64,6 +65,7 @@ public class TileEntityWatz extends TileEntityMachineBase implements IFluidStand
|
|||||||
|
|
||||||
if(!worldObj.isRemote && !updateLock()) {
|
if(!worldObj.isRemote && !updateLock()) {
|
||||||
|
|
||||||
|
boolean turnedOn = worldObj.getBlock(xCoord, yCoord + 3, zCoord) == ModBlocks.watz_pump && worldObj.getIndirectPowerLevelTo(xCoord, yCoord + 5, zCoord, 0) > 0;
|
||||||
List<TileEntityWatz> segments = new ArrayList();
|
List<TileEntityWatz> segments = new ArrayList();
|
||||||
segments.add(this);
|
segments.add(this);
|
||||||
this.subscribeToTop();
|
this.subscribeToTop();
|
||||||
@ -97,11 +99,11 @@ public class TileEntityWatz extends TileEntityMachineBase implements IFluidStand
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* update reaction, top to bottom */
|
/* update reaction, top to bottom */
|
||||||
this.updateReaction(null, sharedTanks);
|
this.updateReaction(null, sharedTanks, turnedOn);
|
||||||
for(int i = 1; i < segments.size(); i++) {
|
for(int i = 1; i < segments.size(); i++) {
|
||||||
TileEntityWatz segment = segments.get(i);
|
TileEntityWatz segment = segments.get(i);
|
||||||
TileEntityWatz above = segments.get(i - 1);
|
TileEntityWatz above = segments.get(i - 1);
|
||||||
segment.updateReaction(above, sharedTanks);
|
segment.updateReaction(above, sharedTanks, turnedOn);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* re-distribute fluid from shared tanks back into actual tanks, bottom to top */
|
/* re-distribute fluid from shared tanks back into actual tanks, bottom to top */
|
||||||
@ -153,57 +155,64 @@ public class TileEntityWatz extends TileEntityMachineBase implements IFluidStand
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** enforces strict top to bottom update order (instead of semi-random based on placement) */
|
/** enforces strict top to bottom update order (instead of semi-random based on placement) */
|
||||||
public void updateReaction(TileEntityWatz above, FluidTank[] tanks) {
|
public void updateReaction(TileEntityWatz above, FluidTank[] tanks, boolean turnedOn) {
|
||||||
|
|
||||||
List<ItemStack> pellets = new ArrayList();
|
if(turnedOn) {
|
||||||
|
List<ItemStack> pellets = new ArrayList();
|
||||||
for(int i = 0; i < 24; i++) {
|
|
||||||
ItemStack stack = slots[i];
|
|
||||||
if(stack != null && stack.getItem() == ModItems.watz_pellet) {
|
|
||||||
pellets.add(stack);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
double baseFlux = 0D;
|
|
||||||
|
|
||||||
/* init base flux */
|
|
||||||
for(ItemStack stack : pellets) {
|
|
||||||
EnumWatzType type = EnumUtil.grabEnumSafely(EnumWatzType.class, stack.getItemDamage());
|
|
||||||
baseFlux += type.passive;
|
|
||||||
}
|
|
||||||
|
|
||||||
double inputFlux = baseFlux + fluxLastReaction;
|
|
||||||
double addedFlux = 0D;
|
|
||||||
double addedHeat = 0D;
|
|
||||||
|
|
||||||
for(ItemStack stack : pellets) {
|
|
||||||
EnumWatzType type = EnumUtil.grabEnumSafely(EnumWatzType.class, stack.getItemDamage());
|
|
||||||
Function burnFunc = type.burnFunc;
|
|
||||||
Function heatMod = type.heatMult;
|
|
||||||
|
|
||||||
if(burnFunc != null) {
|
for(int i = 0; i < 24; i++) {
|
||||||
double mod = heatMod != null ? heatMod.effonix(heat) : 1D;
|
ItemStack stack = slots[i];
|
||||||
double burn = burnFunc.effonix(inputFlux) * mod;
|
if(stack != null && stack.getItem() == ModItems.watz_pellet) {
|
||||||
ItemWatzPellet.setYield(stack, ItemWatzPellet.getYield(stack) - burn);
|
pellets.add(stack);
|
||||||
addedFlux += burn;
|
}
|
||||||
addedHeat += type.heatEmission * burn;
|
|
||||||
tanks[2].setFill(tanks[2].getFill() + (int) Math.round(type.mudContent * burn));
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
for(ItemStack stack : pellets) {
|
|
||||||
EnumWatzType type = EnumUtil.grabEnumSafely(EnumWatzType.class, stack.getItemDamage());
|
|
||||||
Function absorbFunc = type.absorbFunc;
|
|
||||||
|
|
||||||
if(absorbFunc != null) {
|
double baseFlux = 0D;
|
||||||
addedHeat += absorbFunc.effonix(baseFlux + fluxLastReaction);
|
|
||||||
|
/* init base flux */
|
||||||
|
for(ItemStack stack : pellets) {
|
||||||
|
EnumWatzType type = EnumUtil.grabEnumSafely(EnumWatzType.class, stack.getItemDamage());
|
||||||
|
baseFlux += type.passive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double inputFlux = baseFlux + fluxLastReaction;
|
||||||
|
double addedFlux = 0D;
|
||||||
|
double addedHeat = 0D;
|
||||||
|
|
||||||
|
for(ItemStack stack : pellets) {
|
||||||
|
EnumWatzType type = EnumUtil.grabEnumSafely(EnumWatzType.class, stack.getItemDamage());
|
||||||
|
Function burnFunc = type.burnFunc;
|
||||||
|
Function heatMod = type.heatMult;
|
||||||
|
|
||||||
|
if(burnFunc != null) {
|
||||||
|
double mod = heatMod != null ? heatMod.effonix(heat) : 1D;
|
||||||
|
double burn = burnFunc.effonix(inputFlux) * mod;
|
||||||
|
ItemWatzPellet.setYield(stack, ItemWatzPellet.getYield(stack) - burn);
|
||||||
|
addedFlux += burn;
|
||||||
|
addedHeat += type.heatEmission * burn;
|
||||||
|
tanks[2].setFill(tanks[2].getFill() + (int) Math.round(type.mudContent * burn));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(ItemStack stack : pellets) {
|
||||||
|
EnumWatzType type = EnumUtil.grabEnumSafely(EnumWatzType.class, stack.getItemDamage());
|
||||||
|
Function absorbFunc = type.absorbFunc;
|
||||||
|
|
||||||
|
if(absorbFunc != null) {
|
||||||
|
addedHeat += absorbFunc.effonix(baseFlux + fluxLastReaction);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.heat += addedHeat;
|
||||||
|
this.fluxLastBase = baseFlux;
|
||||||
|
this.fluxLastReaction = addedFlux;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.fluxLastBase = 0;
|
||||||
|
this.fluxLastReaction = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.heat += addedHeat;
|
|
||||||
this.fluxLastBase = baseFlux;
|
|
||||||
this.fluxLastReaction = addedFlux;
|
|
||||||
|
|
||||||
if(above != null) {
|
if(above != null) {
|
||||||
for(int i = 0; i < 24; i++) {
|
for(int i = 0; i < 24; i++) {
|
||||||
ItemStack stackBottom = slots[i];
|
ItemStack stackBottom = slots[i];
|
||||||
@ -307,7 +316,9 @@ public class TileEntityWatz extends TileEntityMachineBase implements IFluidStand
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||||
return stack.getItem() == ModItems.watz_pellet;
|
if(stack.getItem() != ModItems.watz_pellet) return false;
|
||||||
|
if(!this.isLocked) return true;
|
||||||
|
return this.locks[i] != null && this.locks[i].getItem() == stack.getItem() && locks[i].getItemDamage() == stack.getItemDamage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -19,15 +19,13 @@ public class DeepLayer {
|
|||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onDecorate(DecorateBiomeEvent.Pre event) {
|
public void onDecorate(DecorateBiomeEvent.Pre event) {
|
||||||
|
|
||||||
|
World world = event.world;
|
||||||
|
if(world.provider == null || world.provider.dimensionId != 0) return;
|
||||||
|
|
||||||
if(this.noise == null) {
|
if(this.noise == null) {
|
||||||
this.noise = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + 19), 4);
|
this.noise = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + 19), 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
World world = event.world;
|
|
||||||
|
|
||||||
if(world.provider.dimensionId != 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
int cX = event.chunkX;
|
int cX = event.chunkX;
|
||||||
int cZ = event.chunkZ;
|
int cZ = event.chunkZ;
|
||||||
|
|||||||
@ -73,17 +73,14 @@ public class OreCave {
|
|||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onDecorate(DecorateBiomeEvent.Pre event) {
|
public void onDecorate(DecorateBiomeEvent.Pre event) {
|
||||||
|
|
||||||
if(event.world.provider.dimensionId != this.dim) return;
|
World world = event.world;
|
||||||
|
|
||||||
|
if(world.provider == null || world.provider.dimensionId != this.dim) return;
|
||||||
|
|
||||||
if(this.noise == null) {
|
if(this.noise == null) {
|
||||||
this.noise = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + (ore.getID() * 31) + yLevel), 2);
|
this.noise = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + (ore.getID() * 31) + yLevel), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
World world = event.world;
|
|
||||||
|
|
||||||
if(world.provider.dimensionId != 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
int cX = event.chunkX;
|
int cX = event.chunkX;
|
||||||
int cZ = event.chunkZ;
|
int cZ = event.chunkZ;
|
||||||
|
|
||||||
|
|||||||
@ -67,17 +67,14 @@ public class OreLayer {
|
|||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onDecorate(DecorateBiomeEvent.Pre event) {
|
public void onDecorate(DecorateBiomeEvent.Pre event) {
|
||||||
|
|
||||||
if(event.world.provider.dimensionId != this.dim) return;
|
World world = event.world;
|
||||||
|
|
||||||
|
if(world.provider == null || world.provider.dimensionId != this.dim) return;
|
||||||
|
|
||||||
if(this.noise == null) {
|
if(this.noise == null) {
|
||||||
this.noise = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + (ore.getID() * 31) + yLevel), 4);
|
this.noise = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + (ore.getID() * 31) + yLevel), 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
World world = event.world;
|
|
||||||
|
|
||||||
if(world.provider.dimensionId != 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
int cX = event.chunkX;
|
int cX = event.chunkX;
|
||||||
int cZ = event.chunkZ;
|
int cZ = event.chunkZ;
|
||||||
|
|
||||||
|
|||||||
@ -33,17 +33,14 @@ public class OreLayer3D {
|
|||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onDecorate(DecorateBiomeEvent.Pre event) {
|
public void onDecorate(DecorateBiomeEvent.Pre event) {
|
||||||
|
|
||||||
|
World world = event.world;
|
||||||
|
|
||||||
if(event.world.provider.dimensionId != this.dim) return;
|
if(world.provider == null || world.provider.dimensionId != this.dim) return;
|
||||||
|
|
||||||
if(this.noiseX == null) this.noiseX = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + 101), 4);
|
if(this.noiseX == null) this.noiseX = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + 101), 4);
|
||||||
if(this.noiseY == null) this.noiseY = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + 102), 4);
|
if(this.noiseY == null) this.noiseY = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + 102), 4);
|
||||||
if(this.noiseZ == null) this.noiseZ = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + 103), 4);
|
if(this.noiseZ == null) this.noiseZ = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + 103), 4);
|
||||||
|
|
||||||
World world = event.world;
|
|
||||||
|
|
||||||
if(world.provider.dimensionId != 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
int cX = event.chunkX;
|
int cX = event.chunkX;
|
||||||
int cZ = event.chunkZ;
|
int cZ = event.chunkZ;
|
||||||
|
|||||||
@ -24,7 +24,7 @@ public class SchistStratum {
|
|||||||
|
|
||||||
World world = event.world;
|
World world = event.world;
|
||||||
|
|
||||||
if(world.provider.dimensionId != 0)
|
if(world.provider == null || world.provider.dimensionId != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int cX = event.chunkX;
|
int cX = event.chunkX;
|
||||||
|
|||||||
@ -3226,6 +3226,26 @@ item.waste_u235.name=Erschöpfter Uran-235-Kernbrennstoff
|
|||||||
item.waste_u233.name=Erschöpfter Uran-233-Kernbrennstoff
|
item.waste_u233.name=Erschöpfter Uran-233-Kernbrennstoff
|
||||||
item.waste_uranium.name=Erschöpfter Urankernbrennstoff
|
item.waste_uranium.name=Erschöpfter Urankernbrennstoff
|
||||||
item.watch.name=Zerbrochene Taschenuhr
|
item.watch.name=Zerbrochene Taschenuhr
|
||||||
|
item.watz_pellet.boron=Bor-Absorberpellet
|
||||||
|
item.watz_pellet.du=Abgereichertes Uran-Absorberpellet
|
||||||
|
item.watz_pellet.hes=HES-Watzpellet
|
||||||
|
item.watz_pellet.lead=Blei-Absorberpellet
|
||||||
|
item.watz_pellet.les=LES-Watzpellet
|
||||||
|
item.watz_pellet.mes=MES-Watzpellet
|
||||||
|
item.watz_pellet.mep=MEP-Watzpellet
|
||||||
|
item.watz_pellet.meu=MEU-Watzpellet
|
||||||
|
item.watz_pellet.hen=HEN-Watzpellet
|
||||||
|
item.watz_pellet.schrabidium=Schrabidium-Watzpellet
|
||||||
|
item.watz_pellet_depleted.boron=Bor-Absorberpellet (Erschöpft)
|
||||||
|
item.watz_pellet_depleted.du=Abgereichertes Uran-Absorberpellet (Erschöpft)
|
||||||
|
item.watz_pellet_depleted.hes=HES-Watzpellet (Erschöpft)
|
||||||
|
item.watz_pellet_depleted.lead=Blei-Absorberpellet (Erschöpft)
|
||||||
|
item.watz_pellet_depleted.les=LES-Watzpellet (Erschöpft)
|
||||||
|
item.watz_pellet_depleted.mes=MES-Watzpellet (Erschöpft)
|
||||||
|
item.watz_pellet_depleted.mep=MEP-Watzpellet (Erschöpft)
|
||||||
|
item.watz_pellet_depleted.meu=MEU-Watzpellet (Erschöpft)
|
||||||
|
item.watz_pellet_depleted.hen=HEN-Watzpellet (Erschöpft)
|
||||||
|
item.watz_pellet_depleted.schrabidium=Schrabidium-Watzpellet (Erschöpft)
|
||||||
item.weapon_bat.name=Richards Standard
|
item.weapon_bat.name=Richards Standard
|
||||||
item.weapon_bat_nail.name=Das Klischee
|
item.weapon_bat_nail.name=Das Klischee
|
||||||
item.weapon_golf_club.name=Schläger des russischen Mafiosos
|
item.weapon_golf_club.name=Schläger des russischen Mafiosos
|
||||||
|
|||||||
@ -4018,6 +4018,26 @@ item.waste_uranium.name=Depleted Uranium Fuel
|
|||||||
item.waste_zfb_mox.name=Depleted ZFB MOX Fuel
|
item.waste_zfb_mox.name=Depleted ZFB MOX Fuel
|
||||||
item.watch.name=Broken Pocket Watch
|
item.watch.name=Broken Pocket Watch
|
||||||
item.watch.desc=A small blue pocket watch.$It's glass has a few cracks in it,$and some shards are missing.$It stopped ticking at 2:34.
|
item.watch.desc=A small blue pocket watch.$It's glass has a few cracks in it,$and some shards are missing.$It stopped ticking at 2:34.
|
||||||
|
item.watz_pellet.boron=Boron Absorber Pellet
|
||||||
|
item.watz_pellet.du=Depleted Uranium Absorber Pellet
|
||||||
|
item.watz_pellet.hes=HES Watz Pellet
|
||||||
|
item.watz_pellet.lead=Lead Absorber Pellet
|
||||||
|
item.watz_pellet.les=LES Watz Pellet
|
||||||
|
item.watz_pellet.mes=MES Watz Pellet
|
||||||
|
item.watz_pellet.mep=MEP Watz Pellet
|
||||||
|
item.watz_pellet.meu=MEU Watz Pellet
|
||||||
|
item.watz_pellet.hen=HEN Watz Pellet
|
||||||
|
item.watz_pellet.schrabidium=Schrabidium Watz Pellet
|
||||||
|
item.watz_pellet_depleted.boron=Boron Absorber Pellet (Depleted)
|
||||||
|
item.watz_pellet_depleted.du=Depleted Uranium Absorber Pellet (Depleted)
|
||||||
|
item.watz_pellet_depleted.hes=HES Watz Pellet (Depleted)
|
||||||
|
item.watz_pellet_depleted.lead=Lead Absorber Pellet (Depleted)
|
||||||
|
item.watz_pellet_depleted.les=LES Watz Pellet (Depleted)
|
||||||
|
item.watz_pellet_depleted.mes=MES Watz Pellet (Depleted)
|
||||||
|
item.watz_pellet_depleted.mep=MEP Watz Pellet (Depleted)
|
||||||
|
item.watz_pellet_depleted.meu=MEU Watz Pellet (Depleted)
|
||||||
|
item.watz_pellet_depleted.hen=HEN Watz Pellet (Depleted)
|
||||||
|
item.watz_pellet_depleted.schrabidium=Schrabidium Watz Pellet (Depleted)
|
||||||
item.weapon_bat.name=Richard's Default
|
item.weapon_bat.name=Richard's Default
|
||||||
item.weapon_bat_nail.name=The Cliché
|
item.weapon_bat_nail.name=The Cliché
|
||||||
item.weapon_golf_club.name=Russian Mobster's Club
|
item.weapon_golf_club.name=Russian Mobster's Club
|
||||||
|
|||||||
1647
src/main/resources/assets/hbm/models/machines/watz_pump.obj
Normal file
1647
src/main/resources/assets/hbm/models/machines/watz_pump.obj
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 341 B |
Binary file not shown.
|
Before Width: | Height: | Size: 363 B |
Binary file not shown.
|
After Width: | Height: | Size: 902 B |
Loading…
x
Reference in New Issue
Block a user