mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
bit of fixes
This commit is contained in:
parent
292d167d61
commit
e1b9c6f6f5
@ -235,7 +235,7 @@ public class HazardRegistry {
|
||||
registerOtherWaste(waste_plate_mox, mox * ingot * 100);
|
||||
registerOtherWaste(waste_plate_pu239, pu239 * ingot * 100);
|
||||
registerOtherWaste(waste_plate_sa326, sa326 * ingot * 100);
|
||||
registerOtherWaste(waste_plate_ra226be, po210 * billet * 3);
|
||||
registerOtherWaste(waste_plate_ra226be, po210 * nugget * 3);
|
||||
|
||||
HazardSystem.register(debris_graphite, new HazardData().addEntry(RADIATION, 70F).addEntry(HOT, 5F));
|
||||
HazardSystem.register(debris_metal, makeData(RADIATION, 5F));
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotMachineOutput;
|
||||
import com.hbm.items.machine.ItemBreedingRod;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineReactorBreeding;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -47,7 +48,8 @@ public class ContainerMachineReactorBreeding extends Container {
|
||||
return null;
|
||||
}
|
||||
|
||||
} else if (!this.mergeItemStack(stack, 0, 1, false)) {
|
||||
} else if(stack.getItem() instanceof ItemBreedingRod)
|
||||
if (!this.mergeItemStack(stack, 0, 1, false)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotMachineOutput;
|
||||
import com.hbm.items.machine.ItemPlateFuel;
|
||||
import com.hbm.tileentity.machine.TileEntityReactorResearch;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
@ -45,8 +46,7 @@ private TileEntityReactorResearch reactor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index)
|
||||
{
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
ItemStack var3 = null;
|
||||
Slot slot = (Slot) this.inventorySlots.get(index);
|
||||
|
||||
@ -55,13 +55,16 @@ private TileEntityReactorResearch reactor;
|
||||
var3 = stack.copy();
|
||||
|
||||
if (index <= 12) {
|
||||
if (!this.mergeItemStack(stack, 13, this.inventorySlots.size(), true))
|
||||
{
|
||||
if (!this.mergeItemStack(stack, 13, this.inventorySlots.size(), true)){
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
if (!this.mergeItemStack(stack, 0, 13, true))
|
||||
if(stack.getItem() instanceof ItemPlateFuel) {
|
||||
if (!this.mergeItemStack(stack, 0, 12, true))
|
||||
return null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
if (stack.stackSize == 0) {
|
||||
slot.putStack((ItemStack) null);
|
||||
|
||||
@ -92,6 +92,8 @@ public class ContainerReactorZirnox extends Container {
|
||||
|
||||
if(!this.mergeItemStack(stack, 0, 24, true))
|
||||
return null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import com.hbm.inventory.container.ContainerReactorZirnox;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.AuxButtonPacket;
|
||||
import com.hbm.packet.NBTControlPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.machine.TileEntityReactorZirnox;
|
||||
|
||||
@ -12,6 +13,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIReactorZirnox extends GuiInfoContainer {
|
||||
@ -62,18 +64,23 @@ public class GUIReactorZirnox extends GuiInfoContainer {
|
||||
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
|
||||
NBTTagCompound control = new NBTTagCompound();
|
||||
|
||||
|
||||
if(guiLeft + 144 <= x && guiLeft + 144 + 14 > x && guiTop + 35 < y && guiTop + 35 + 14 >= y) {
|
||||
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(zirnox.xCoord, zirnox.yCoord, zirnox.zCoord, 0, 0));
|
||||
control.setBoolean("control", true);
|
||||
|
||||
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(control, zirnox.xCoord, zirnox.yCoord, zirnox.zCoord));
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("hbm:block.rbmk_az5_cover"), 0.5F));
|
||||
}
|
||||
|
||||
if(guiLeft + 151 <= x && guiLeft + 151 + 36 > x && guiTop + 51 < y && guiTop + 51 + 36 >= y) {
|
||||
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
PacketDispatcher.wrapper.sendToServer(new AuxButtonPacket(zirnox.xCoord, zirnox.yCoord, zirnox.zCoord, 0, 1));
|
||||
}
|
||||
control.setBoolean("vent", true); //sus impostre like amogus
|
||||
|
||||
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(control, zirnox.xCoord, zirnox.yCoord, zirnox.zCoord));
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("hbm:block.rbmk_az5_cover"), 0.5F));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -15,9 +15,7 @@ import com.hbm.tileentity.machine.TileEntityMachineBattery;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineMiningLaser;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineMissileAssembly;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineReactorLarge;
|
||||
import com.hbm.tileentity.machine.TileEntityReactorResearch;
|
||||
import com.hbm.tileentity.machine.TileEntityRadioRec;
|
||||
import com.hbm.tileentity.machine.TileEntityReactorControl;
|
||||
import com.hbm.tileentity.machine.TileEntityReactorZirnox;
|
||||
import com.hbm.tileentity.machine.TileEntitySoyuzLauncher;
|
||||
|
||||
@ -201,23 +199,6 @@ public class AuxButtonPacket implements IMessage {
|
||||
base.handleButtonPacket(m.value, m.id);
|
||||
}
|
||||
|
||||
if(te instanceof TileEntityReactorZirnox) {
|
||||
TileEntityReactorZirnox zirnox = (TileEntityReactorZirnox)te;
|
||||
|
||||
if(m.id == 0) {
|
||||
zirnox.isOn = !zirnox.isOn;
|
||||
}
|
||||
|
||||
if(m.id == 1) {
|
||||
int fill = zirnox.carbonDioxide.getFill();
|
||||
zirnox.carbonDioxide.setFill(fill - 1000);
|
||||
if(zirnox.carbonDioxide.getFill() < 0) {
|
||||
zirnox.carbonDioxide.setFill(0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//why make new packets when you can just abuse and uglify the existing ones?
|
||||
if(te == null && m.value == 999) {
|
||||
|
||||
|
||||
@ -23,7 +23,6 @@ import com.hbm.tileentity.machine.TileEntityMachineReactorLarge;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineReactorLarge.ReactorFuelType;
|
||||
import com.hbm.tileentity.turret.TileEntityTurretCIWS;
|
||||
import com.hbm.tileentity.turret.TileEntityTurretCheapo;
|
||||
import com.hbm.tileentity.machine.TileEntityReactorResearch;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineSeleniumEngine;
|
||||
import com.hbm.tileentity.machine.TileEntityRadioRec;
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@ import com.hbm.lib.Library;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
@ -4,8 +4,6 @@ import java.util.HashMap;
|
||||
|
||||
import com.hbm.blocks.machine.MachineNukeFurnace;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.recipes.BreederRecipes;
|
||||
import com.hbm.inventory.recipes.BreederRecipes.BreederRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemBreedingRod.*;
|
||||
import com.hbm.items.special.ItemCustomLore;
|
||||
|
||||
@ -13,6 +13,7 @@ import com.hbm.explosion.ExplosionNukeGeneric;
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
@ -31,9 +32,10 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityReactorZirnox extends TileEntityMachineBase implements IFluidContainer, IFluidAcceptor, IFluidSource {
|
||||
public class TileEntityReactorZirnox extends TileEntityMachineBase implements IFluidContainer, IFluidAcceptor, IFluidSource, IControlReceiver {
|
||||
|
||||
public int heat;
|
||||
public static final int maxHeat = 100000;
|
||||
@ -480,5 +482,26 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(EntityPlayer player) {
|
||||
return Vec3.createVectorHelper(xCoord - player.posX, yCoord - player.posY, zCoord - player.posZ).lengthVector() < 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveControl(NBTTagCompound data) {
|
||||
if(data.hasKey("control")) {
|
||||
this.isOn = !this.isOn;
|
||||
}
|
||||
|
||||
if(data.hasKey("vent")) {
|
||||
int fill = this.carbonDioxide.getFill();
|
||||
this.carbonDioxide.setFill(fill - 1000);
|
||||
if(this.carbonDioxide.getFill() < 0)
|
||||
this.carbonDioxide.setFill(0);
|
||||
}
|
||||
|
||||
this.markDirty();
|
||||
}
|
||||
|
||||
}
|
||||
@ -2201,7 +2201,7 @@ item.plate_dineutronium.name=Dineutronium Compound Plate
|
||||
item.plate_euphemium.name=Euphemium Compound Plate
|
||||
item.plate_fuel_mox.name=HEMOX Plate Fuel
|
||||
item.plate_fuel_pu239.name=HEP-239 Plate Fuel
|
||||
item.plate_fuel_ra226be.name=Ra-226Be Plate Fuel
|
||||
item.plate_fuel_ra226be.name=Ra226Be Plate Fuel
|
||||
item.plate_fuel_sa326.name=HES-326 Plate Fuel
|
||||
item.plate_fuel_u233.name=HEU-233 Plate Fuel
|
||||
item.plate_fuel_u235.name=HEU-235 Plate Fuel
|
||||
@ -2855,7 +2855,7 @@ item.waste_mox.name=Depleted MOX Fuel
|
||||
item.waste_natural_uranium.name=Depleted Natural Uranium Fuel
|
||||
item.waste_plate_mox.name=Depleted HEMOX Plate Fuel
|
||||
item.waste_plate_pu239.name=Depleted HEP-239 Plate Fuel
|
||||
item.waste_plate_ra226be.name=Depleted Ra-226Be Plate Fuel
|
||||
item.waste_plate_ra226be.name=Depleted Ra226Be Plate Fuel
|
||||
item.waste_plate_sa326.name=Depleted HES-326 Plate Fuel
|
||||
item.waste_plate_u233.name=Depleted HEU-233 Plate Fuel
|
||||
item.waste_plate_u235.name=Depleted HEU-235 Plate Fuel
|
||||
@ -3573,7 +3573,7 @@ tile.reactor_element.name=Reactor Chamber
|
||||
tile.reactor_hatch.name=Reactor Access Hatch
|
||||
tile.reactor_inserter.name=Reactor Fuel Inserter
|
||||
tile.machine_reactor_small.name=Research Reactor
|
||||
tile.reactor_zirnox.name=ZIRNOX Nuclear Reactor
|
||||
tile.machine_zirnox.name=ZIRNOX Nuclear Reactor
|
||||
tile.red_barrel.name=Explosive Barrel
|
||||
tile.red_cable.name=Red Copper Cable
|
||||
tile.red_connector.name=Electricity Connector
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user