mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
finished pellet press, textures
This commit is contained in:
parent
053f5f7b77
commit
5558b8c2a7
17
changelog
17
changelog
@ -0,0 +1,17 @@
|
||||
## Added
|
||||
* ICF pellet maker
|
||||
* Can create custom ICF fuel pellets
|
||||
* Pellets use binary fuels, meaning they need two different fluids, two different solids or a solid and a fluid
|
||||
* Optionally, the pellet maker can accept muon capsules, each capsule can add muons to up to 16 pellets, reducing the laser input requirement
|
||||
|
||||
## Changed
|
||||
* To make balancing easier, ICFs will only directly convert 25% of incoming laser heat into output heat when there is no fuel pellet loaded, meaning when using fuel, direct heating does not apply
|
||||
* The ICF should now display its relevant values using Energy Control screens
|
||||
* Sodium and calcium are now valid crucible materials
|
||||
* All RBMK models that render as TESRs now use VBOs which should make them somewhat less laggy
|
||||
* Blocks like explosive charges, radioactive barrels and so on which used to explode instantly when destroyed by another explosion, now behave more like TNT, spawning a primed version of the block that is knocked back by the initial explosion
|
||||
* This fixes an issue where spamming too many blocks like that could potentially crash servers
|
||||
* Most explosives go off after a short delay, flammable barrels however will explode on impact
|
||||
|
||||
## Fixed
|
||||
* Fixed ICF laser parts being considered valid when bordering an otherwise invalid dependency block
|
||||
@ -886,7 +886,6 @@ public class ModBlocks {
|
||||
public static Block fusion_motor;
|
||||
public static Block fusion_heater;
|
||||
public static Block fusion_hatch;
|
||||
//public static Block fusion_core;
|
||||
public static Block plasma;
|
||||
|
||||
public static Block iter;
|
||||
|
||||
@ -15,8 +15,11 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
@ -60,6 +63,38 @@ public class MachineICFPress extends BlockContainer implements ITooltipProvider
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(!(te instanceof ISidedInventory)) return;
|
||||
ISidedInventory tileentityfurnace = (ISidedInventory) te;
|
||||
if(tileentityfurnace != null) {
|
||||
for(int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1) {
|
||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
||||
if(itemstack != null) {
|
||||
float f = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
while(itemstack.stackSize > 0) {
|
||||
int j1 = world.rand.nextInt(21) + 10;
|
||||
if(j1 > itemstack.stackSize) j1 = itemstack.stackSize;
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
if(itemstack.hasTagCompound()) entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float) world.rand.nextGaussian() * f3;
|
||||
entityitem.motionY = (float) world.rand.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float) world.rand.nextGaussian() * f3;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.func_147453_f(x, y, z, block);
|
||||
}
|
||||
super.breakBlock(world, x, y, z, block, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
@ -34,8 +34,8 @@ public class GUIICFPress extends GuiInfoContainer {
|
||||
press.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 44, guiTop + 18, 16, 52);
|
||||
press.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 18, 16, 52);
|
||||
|
||||
if(this.isMouseOverSlot(this.inventorySlots.getSlot(4), mouseX, mouseY)) this.func_146283_a(Arrays.asList(new String[] {EnumChatFormatting.YELLOW + "Item input: Top/Bottom"}), mouseX, mouseY);
|
||||
if(this.isMouseOverSlot(this.inventorySlots.getSlot(5), mouseX, mouseY)) this.func_146283_a(Arrays.asList(new String[] {EnumChatFormatting.YELLOW + "Item input: Sides"}), mouseX, mouseY);
|
||||
if(this.isMouseOverSlot(this.inventorySlots.getSlot(4), mouseX, mouseY) && !this.inventorySlots.getSlot(4).getHasStack()) this.func_146283_a(Arrays.asList(new String[] {EnumChatFormatting.YELLOW + "Item input: Top/Bottom"}), mouseX, mouseY);
|
||||
if(this.isMouseOverSlot(this.inventorySlots.getSlot(5), mouseX, mouseY) && !this.inventorySlots.getSlot(5).getHasStack()) this.func_146283_a(Arrays.asList(new String[] {EnumChatFormatting.YELLOW + "Item input: Sides"}), mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -34,12 +34,12 @@ public class ItemICFPellet extends Item {
|
||||
HYDROGEN( 0x4040FF, 1.0D, 1.0D, 1.0D),
|
||||
DEUTERIUM( 0x2828CB, 1.0D, 1.0D, 1.0D),
|
||||
TRITIUM( 0x000092, 1.0D, 1.0D, 1.0D),
|
||||
HELIUM3( 0xFFF09F, 1.0D, 1.0D, 1.0D), //hey you
|
||||
HELIUM4( 0xFF9B60, 1.0D, 1.0D, 1.0D), //yes you
|
||||
LITHIUM( 0xE9E9E9, 1.0D, 1.0D, 1.0D), //fuck off
|
||||
HELIUM3( 0xFFF09F, 1.0D, 1.0D, 1.0D),
|
||||
HELIUM4( 0xFF9B60, 1.0D, 1.0D, 1.0D),
|
||||
LITHIUM( 0xE9E9E9, 1.0D, 1.0D, 1.0D),
|
||||
BERYLLIUM( 0xA79D80, 1.0D, 1.0D, 1.0D),
|
||||
BORON( 0x697F89, 1.0D, 1.0D, 1.0D),
|
||||
//CARBON( 0x454545, 1.0D, 1.0D, 1.0D),
|
||||
CARBON( 0x454545, 1.0D, 1.0D, 1.0D),
|
||||
OXYGEN( 0xB4E2FF, 1.0D, 1.0D, 1.0D),
|
||||
SODIUM( 0xDFE4E7, 1.0D, 1.0D, 1.0D),
|
||||
//aluminium, silicon, phosphorus
|
||||
@ -74,6 +74,8 @@ public class ItemICFPellet extends Item {
|
||||
materialMap.put(Mats.MAT_LITHIUM, EnumICFFuel.LITHIUM);
|
||||
materialMap.put(Mats.MAT_BERYLLIUM, EnumICFFuel.BERYLLIUM);
|
||||
materialMap.put(Mats.MAT_BORON, EnumICFFuel.BORON);
|
||||
materialMap.put(Mats.MAT_GRAPHITE, EnumICFFuel.CARBON);
|
||||
fluidMap.put(Fluids.OXYGEN, EnumICFFuel.OXYGEN);
|
||||
materialMap.put(Mats.MAT_SODIUM, EnumICFFuel.SODIUM);
|
||||
fluidMap.put(Fluids.CHLORINE, EnumICFFuel.CHLORINE);
|
||||
materialMap.put(Mats.MAT_CALCIUM, EnumICFFuel.CALCIUM);
|
||||
@ -183,6 +185,7 @@ public class ItemICFPellet extends Item {
|
||||
list.add(EnumChatFormatting.GREEN + "Depletion: " + String.format(Locale.US, "%.1f", getDurabilityForDisplay(stack) * 100D) + "%");
|
||||
list.add(EnumChatFormatting.YELLOW + "Fuel: " + I18nUtil.resolveKey("icffuel." + getType(stack, true).name().toLowerCase(Locale.US)) + " / " + I18nUtil.resolveKey("icffuel." + getType(stack, false).name().toLowerCase(Locale.US)));
|
||||
list.add(EnumChatFormatting.YELLOW + "Heat required: " + BobMathUtil.getShortNumber(this.getFusingDifficulty(stack)) + "TU");
|
||||
list.add(EnumChatFormatting.YELLOW + "Reactivity multiplier: x" + (int) (getType(stack, true).reactionMult * getType(stack, false).reactionMult * 100) / 100D);
|
||||
if(stack.hasTagCompound() && stack.stackTagCompound.getBoolean("muon")) list.add(EnumChatFormatting.DARK_AQUA + "Muon catalyzed!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,9 +12,11 @@ import com.hbm.items.machine.ItemICFPellet;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
@ -27,12 +29,15 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider, IFluidStandardTransceiver {
|
||||
public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider, IFluidStandardTransceiver, IInfoProviderEC {
|
||||
|
||||
public long laser;
|
||||
public long maxLaser;
|
||||
public long heat;
|
||||
public static final long maxHeat = 1_000_000_000_000L;
|
||||
public long heatup;
|
||||
public int consumption;
|
||||
public int output;
|
||||
|
||||
public FluidTank[] tanks;
|
||||
|
||||
@ -60,7 +65,7 @@ public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider
|
||||
this.trySubscribe(tanks[0].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
|
||||
this.heat += this.laser * 0.25D;
|
||||
if(slots[5] == null || slots[5].getItem() != ModItems.icf_pellet) this.heat += this.laser * 0.25D;
|
||||
boolean markDirty = false;
|
||||
|
||||
//eject depleted pellet
|
||||
@ -87,8 +92,11 @@ public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider
|
||||
}
|
||||
}
|
||||
|
||||
this.heatup = 0;
|
||||
|
||||
if(slots[5] != null && slots[5].getItem() == ModItems.icf_pellet) {
|
||||
this.heat += ItemICFPellet.react(slots[5], this.laser);
|
||||
this.heatup = ItemICFPellet.react(slots[5], this.laser);
|
||||
this.heat += heat;
|
||||
if(ItemICFPellet.getDepletion(slots[5]) >= ItemICFPellet.getMaxDepletion(slots[5])) {
|
||||
slots[5] = new ItemStack(ModItems.icf_pellet_depleted);
|
||||
markDirty = true;
|
||||
@ -97,6 +105,9 @@ public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider
|
||||
tanks[2].setFill(tanks[2].getFill() + (int) Math.ceil(this.heat * 10D / this.maxHeat));
|
||||
if(tanks[2].getFill() > tanks[2].getMaxFill()) tanks[2].setFill(tanks[2].getMaxFill());
|
||||
}
|
||||
|
||||
this.consumption = 0;
|
||||
this.output = 0;
|
||||
|
||||
if(tanks[0].getTankType().hasTrait(FT_Heatable.class)) {
|
||||
FT_Heatable trait = tanks[0].getTankType().getTrait(FT_Heatable.class);
|
||||
@ -111,6 +122,9 @@ public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider
|
||||
tanks[0].setFill(tanks[0].getFill() - step.amountReq * cycles);
|
||||
tanks[1].setFill(tanks[1].getFill() + step.amountProduced * cycles);
|
||||
this.heat -= step.heatReq * cycles;
|
||||
|
||||
this.consumption = step.amountReq * cycles;
|
||||
this.output = step.amountProduced * cycles;
|
||||
}
|
||||
|
||||
for(DirPos pos : getConPos()) {
|
||||
@ -249,4 +263,13 @@ public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIICF(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideExtraInfo(NBTTagCompound data) {
|
||||
data.setBoolean(CompatEnergyControl.B_ACTIVE, heatup > 0);
|
||||
data.setLong(CompatEnergyControl.L_CAPACITY_TU, this.maxHeat);
|
||||
data.setLong(CompatEnergyControl.L_ENERGY_TU, this.heat);
|
||||
data.setDouble(CompatEnergyControl.D_CONSUMPTION_MB, this.consumption);
|
||||
data.setDouble(CompatEnergyControl.D_OUTPUT_MB, this.output);
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,12 +41,17 @@ public class TileEntityICFController extends TileEntityTickingBase implements IE
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata()).getOpposite();
|
||||
BlockPos pos = new BlockPos(0, 0, 0);
|
||||
|
||||
HashSet<BlockPos> validCells = new HashSet();
|
||||
HashSet<BlockPos> validEmitters = new HashSet();
|
||||
HashSet<BlockPos> validCapacitors = new HashSet();
|
||||
|
||||
for(int i = 0; i < cells.size(); i++) {
|
||||
int j = i + 1;
|
||||
|
||||
if(cells.contains(pos.mutate(xCoord + dir.offsetX * j, yCoord, zCoord + dir.offsetZ * j))) {
|
||||
this.cellCount++;
|
||||
validCells.add(pos.clone());
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
@ -54,19 +59,19 @@ public class TileEntityICFController extends TileEntityTickingBase implements IE
|
||||
|
||||
for(BlockPos emitter : emitters) { for(ForgeDirection offset : ForgeDirection.VALID_DIRECTIONS) {
|
||||
pos.mutate(emitter.getX() + offset.offsetX, emitter.getY() + offset.offsetY, emitter.getZ() + offset.offsetZ);
|
||||
if(cells.contains(pos)) { this.emitterCount++; break; }
|
||||
if(validCells.contains(pos)) { this.emitterCount++; validEmitters.add(pos.clone()); break; }
|
||||
}
|
||||
}
|
||||
|
||||
for(BlockPos capacitor : capacitors) { for(ForgeDirection offset : ForgeDirection.VALID_DIRECTIONS) {
|
||||
pos.mutate(capacitor.getX() + offset.offsetX, capacitor.getY() + offset.offsetY, capacitor.getZ() + offset.offsetZ);
|
||||
if(emitters.contains(pos)) { this.capacitorCount++; break; }
|
||||
if(validEmitters.contains(pos)) { this.capacitorCount++; validCapacitors.add(pos.clone()); break; }
|
||||
}
|
||||
}
|
||||
|
||||
for(BlockPos turbo : turbochargers) { for(ForgeDirection offset : ForgeDirection.VALID_DIRECTIONS) {
|
||||
pos.mutate(turbo.getX() + offset.offsetX, turbo.getY() + offset.offsetY, turbo.getZ() + offset.offsetZ);
|
||||
if(capacitors.contains(pos)) { this.turbochargerCount++; break; }
|
||||
if(validCapacitors.contains(pos)) { this.turbochargerCount++; break; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -91,7 +91,7 @@ public class TileEntityICFPress extends TileEntityMachineBase implements IFluidS
|
||||
ItemICFPellet.init();
|
||||
|
||||
EnumICFFuel fuel1 = getFuel(tanks[0], slots[4], 0);
|
||||
EnumICFFuel fuel2 = getFuel(tanks[1], slots[5], 0);
|
||||
EnumICFFuel fuel2 = getFuel(tanks[1], slots[5], 1);
|
||||
|
||||
if(fuel1 == null || fuel2 == null || fuel1 == fuel2) return;
|
||||
|
||||
|
||||
@ -363,6 +363,7 @@ container.machineElectrolyser=Electrolysegerät
|
||||
container.machineFEL=FEL
|
||||
container.machineFunnel=Kombinationstrichter
|
||||
container.machineICF=ICF
|
||||
container.machineICFPress=ICF-Brennstoffpellet-Fabrikant
|
||||
container.machineITER=Kernfusionsreaktor
|
||||
container.machineLargeTurbine=Industrielle Dampfturbine
|
||||
container.machineLiquefactor=Verflüssiger
|
||||
@ -4209,6 +4210,7 @@ tile.machine_gascent.name=Gaszentrifuge
|
||||
tile.machine_generator.name=Atomreaktor (Alt)
|
||||
tile.machine_geo.name=Geothermiegenerator
|
||||
tile.machine_hephaestus.name=Geothermischer Wärmetauscher
|
||||
tile.machine_icf_press.name=ICF-Brennstoffpellet-Fabrikant
|
||||
tile.machine_industrial_boiler.name=Industrieller Boiler
|
||||
tile.machine_industrial_boiler.desc=Großer Boiler zum Verdampfen von Wasser oder$Erhitzen von Öl. Benötigt externe Hitzequelle.$Wärmestransferrate: ΔT*0.01 TU/t$Überdrucksicher
|
||||
tile.machine_industrial_generator.name=Industrieller Generator
|
||||
|
||||
@ -756,6 +756,7 @@ container.machineElectrolyser=Electrolysis Machine
|
||||
container.machineFEL=FEL
|
||||
container.machineFunnel=Combinator Funnel
|
||||
container.machineICF=ICF
|
||||
container.machineICFPress=ICF Fuel Pellet Maker
|
||||
container.machineITER=Fusion Reactor
|
||||
container.machineLargeTurbine=Industrial Steam Turbine
|
||||
container.machineLiquefactor=Liquefactor
|
||||
@ -5269,7 +5270,8 @@ tile.machine_gascent.name=Gas Centrifuge
|
||||
tile.machine_generator.name=Nuclear Reactor (Old)
|
||||
tile.machine_geo.name=Geothermal Electric Generator
|
||||
tile.machine_hephaestus.name=Geothermal Heat Exchanger
|
||||
tile.machine_icf_press.desc=If only there was something that would tell me how or if this thing works$Something like a changelog or something like that$Alas, I'm too fucking stupid to read something like that anyway
|
||||
tile.machine_icf_press.name=ICF Fuel Pellet Maker
|
||||
tile.machine_icf_press.desc=Fills ICF Fuel pellets$Left fuel slot is accepted by top/bottom, right by the sides$Muons and pellets may be supplied from any side
|
||||
tile.machine_industrial_boiler.name=Industrial Boiler
|
||||
tile.machine_industrial_boiler.desc=Large boiler that can boil water or heat up oil.$Requires external heat source.$Heat transfer rate: ΔT*0.01 TU/t$Cannot explode
|
||||
tile.machine_industrial_generator.name=Industrial Generator
|
||||
|
||||
BIN
src/main/resources/assets/hbm/textures/items/circuit.analog.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/circuit.analog.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 428 B |
Binary file not shown.
|
After Width: | Height: | Size: 272 B |
BIN
src/main/resources/assets/hbm/textures/items/circuit.chip.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/circuit.chip.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 342 B |
BIN
src/main/resources/assets/hbm/textures/items/circuit.pcb.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/circuit.pcb.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 388 B |
BIN
src/main/resources/assets/hbm/textures/items/circuit.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/circuit.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 266 B |
Loading…
x
Reference in New Issue
Block a user