mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
more ICF crap
This commit is contained in:
parent
be9a87c6af
commit
47d75369bd
@ -12,6 +12,8 @@
|
||||
* 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
|
||||
* Removed unused permanent wings
|
||||
|
||||
## Fixed
|
||||
* Fixed ICF laser parts being considered valid when bordering an otherwise invalid dependency block
|
||||
* Fixed ICF laser parts being considered valid when bordering an otherwise invalid dependency block
|
||||
* Fixed soyuz launcher NEI recipe showing the wrong amount of items
|
||||
@ -96,7 +96,7 @@ public class ConstructionHandler extends NEIUniversalHandler {
|
||||
new ItemStack(ModBlocks.struct_scaffold, 63),
|
||||
ItemStackUtil.addTooltipToStack(new ItemStack(ModBlocks.struct_scaffold, 384), EnumChatFormatting.RED + "6x64"),
|
||||
new ItemStack(ModBlocks.concrete_smooth, 38),
|
||||
ItemStackUtil.addTooltipToStack(new ItemStack(ModBlocks.concrete_smooth, 320), EnumChatFormatting.RED + "4x64"),};
|
||||
ItemStackUtil.addTooltipToStack(new ItemStack(ModBlocks.concrete_smooth, 320), EnumChatFormatting.RED + "5x64"),};
|
||||
|
||||
bufferedRecipes.put(soysauce, new ItemStack(ModBlocks.soyuz_launcher));
|
||||
bufferedTools.put(soysauce, new ItemStack(ModBlocks.struct_soyuz_core));
|
||||
|
||||
@ -10,6 +10,8 @@ import com.hbm.inventory.gui.GUIICF;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemICFPellet;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatEnergyControl;
|
||||
@ -17,6 +19,7 @@ import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
||||
import api.hbm.tile.IInfoProviderEC;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
@ -65,7 +68,6 @@ public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider
|
||||
this.trySubscribe(tanks[0].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
|
||||
}
|
||||
|
||||
if(slots[5] == null || slots[5].getItem() != ModItems.icf_pellet) this.heat += this.laser * 0.25D;
|
||||
boolean markDirty = false;
|
||||
|
||||
//eject depleted pellet
|
||||
@ -95,15 +97,25 @@ public class TileEntityICF extends TileEntityMachineBase implements IGUIProvider
|
||||
this.heatup = 0;
|
||||
|
||||
if(slots[5] != null && slots[5].getItem() == ModItems.icf_pellet) {
|
||||
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;
|
||||
if(ItemICFPellet.getFusingDifficulty(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;
|
||||
}
|
||||
|
||||
tanks[2].setFill(tanks[2].getFill() + (int) Math.ceil(this.heat * 2.5D / this.maxHeat));
|
||||
if(tanks[2].getFill() > tanks[2].getMaxFill()) tanks[2].setFill(tanks[2].getMaxFill());
|
||||
|
||||
NBTTagCompound dPart = new NBTTagCompound();
|
||||
dPart.setString("type", "hadron");
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(dPart, xCoord + 0.5, yCoord + 3.5, zCoord + 0.5), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 25));
|
||||
}
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
if(heatup == 0) {
|
||||
this.heat += this.laser * 0.25D;
|
||||
}
|
||||
|
||||
this.consumption = 0;
|
||||
|
||||
@ -59,13 +59,13 @@ 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(validCells.contains(pos)) { this.emitterCount++; validEmitters.add(pos.clone()); break; }
|
||||
if(validCells.contains(pos)) { this.emitterCount++; validEmitters.add(emitter.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(validEmitters.contains(pos)) { this.capacitorCount++; validCapacitors.add(pos.clone()); break; }
|
||||
if(validEmitters.contains(pos)) { this.capacitorCount++; validCapacitors.add(capacitor.clone()); break; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,50 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.machine.MachineICF;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityICFStruct extends TileEntity {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if(worldObj.isRemote) return;
|
||||
if(worldObj.getTotalWorldTime() % 20 != 0) return;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata());
|
||||
|
||||
for(int i = -8; i <= 8; i++) {
|
||||
|
||||
if(!cbarp(ModBlocks.icf_component, 0, 1, 0, i, dir)) return;
|
||||
if(i != 0) if(!cbarp(ModBlocks.icf_component, 0, 0, 0, i, dir)) return;
|
||||
if(!cbarp(ModBlocks.icf_component, 0, -1, 0, i, dir)) return;
|
||||
if(!cbarp(ModBlocks.icf_component, 2, 0, 3, i, dir)) return;
|
||||
|
||||
for(int j = -1; j <= 1; j++) if(!cbarp(ModBlocks.icf_component, Math.abs(i) <= 2 ? 2 : 4, j, 1, i, dir)) return;
|
||||
for(int j = -1; j <= 1; j++) if(!cbarp(ModBlocks.icf_component, Math.abs(i) <= 2 ? 2 : 4, j, 2, i, dir)) return;
|
||||
for(int j = -1; j <= 1; j++) if(j != 0) if(!cbarp(ModBlocks.icf_component, Math.abs(i) <= 2 ? 2 : 4, j, 3, i, dir)) return;
|
||||
for(int j = -1; j <= 1; j++) if(!cbarp(ModBlocks.icf_component, Math.abs(i) <= 2 ? 2 : 4, j, 4, i, dir)) return;
|
||||
for(int j = -1; j <= 1; j++) if(!cbarp(ModBlocks.icf_component, Math.abs(i) <= 2 ? 2 : 4, j, 5, i, dir)) return;
|
||||
}
|
||||
|
||||
BlockDummyable.safeRem = true;
|
||||
worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.icf, this.getBlockMetadata() + BlockDummyable.offset, 3);
|
||||
((MachineICF) ModBlocks.icf).fillSpace(worldObj, xCoord + dir.offsetX, yCoord, zCoord + dir.offsetZ, dir, -((MachineICF) ModBlocks.icf).getOffset());
|
||||
BlockDummyable.safeRem = false;
|
||||
}
|
||||
|
||||
/** check block at relative position */
|
||||
public boolean cbarp(Block block, int meta, int x, int y, int z, ForgeDirection dir) {
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
int ix = xCoord + dir.offsetX * z + rot.offsetX * z;
|
||||
int iy = yCoord + y;
|
||||
int iz = zCoord + dir.offsetZ * x + rot.offsetZ * x;
|
||||
|
||||
return worldObj.getBlock(ix, iy, iz) == block && worldObj.getBlockMetadata(ix, iy, iz) == meta;
|
||||
}
|
||||
}
|
||||
|
||||
BIN
src/main/resources/assets/hbm/textures/gui/gui_scrapper.png
Normal file
BIN
src/main/resources/assets/hbm/textures/gui/gui_scrapper.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Loading…
x
Reference in New Issue
Block a user