mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
fixed solar boiler not saving, patched up oil recipes and fluid textures
This commit is contained in:
parent
9002a295df
commit
a7921b73e0
@ -8,6 +8,7 @@ import static net.minecraftforge.common.util.ForgeDirection.UP;
|
||||
import static net.minecraftforge.common.util.ForgeDirection.WEST;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.BlockContainerBase;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
@ -18,6 +19,7 @@ import api.hbm.block.IToolable;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@ -55,6 +57,11 @@ public abstract class BlockChargeBase extends BlockContainerBase implements IBom
|
||||
return side;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int i, Random rand, int j) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockOnSide(World world, int x, int y, int z, int side) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(side);
|
||||
|
||||
@ -12,6 +12,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@ -75,7 +76,7 @@ public class MachineFractionTower extends BlockDummyable {
|
||||
FluidType type = Fluids.fromID(player.getHeldItem().getItemDamage());
|
||||
frac.tanks[0].setTankType(type);
|
||||
frac.markDirty();
|
||||
player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Changed type to " + type + "!"));
|
||||
player.addChatComponentMessage(new ChatComponentText("Changed type to ").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)).appendSibling(new ChatComponentTranslation("hbmfluid." + type.getName().toLowerCase())).appendSibling(new ChatComponentText("!")));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -930,6 +930,17 @@ public class AssemblerRecipes {
|
||||
new ComparableStack(ModItems.inf_water_mk2, 2)
|
||||
}, 200);
|
||||
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_solidifier), new AStack[] {
|
||||
new OreDictStack(ANY_CONCRETE.any(), 8),
|
||||
new OreDictStack(NB.ingot(), 2),
|
||||
new OreDictStack(AL.plate(), 12),
|
||||
new OreDictStack(ANY_TAR.any(), 8),
|
||||
new ComparableStack(ModItems.hull_big_steel, 3),
|
||||
new ComparableStack(ModItems.catalyst_clay, 4),
|
||||
new ComparableStack(ModItems.coil_copper, 4),
|
||||
new ComparableStack(ModItems.tank_steel, 2)
|
||||
}, 200);
|
||||
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_radiolysis), new AStack[] {
|
||||
new OreDictStack(STEEL.ingot(), 8),
|
||||
new OreDictStack(TCALLOY.ingot(), 4),
|
||||
|
||||
@ -13,7 +13,6 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.util.ItemStackUtil;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
import com.hbm.util.Tuple.Quartet;
|
||||
import com.hbm.util.Tuple.Quintet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -43,8 +42,8 @@ public class RefineryRecipes {
|
||||
public static final int ncrack_frac_diesel = 70;
|
||||
public static final int lcrack_frac_kero = 70;
|
||||
public static final int lcrack_frac_petro = 30;
|
||||
public static final int coal_frac_coalgas = 70;
|
||||
public static final int coal_frac_natgas = 30;
|
||||
public static final int coal_frac_coalgas = 30;
|
||||
public static final int coal_frac_oil = 70;
|
||||
|
||||
//cracking in percent
|
||||
public static final int oil_crack_oil = 80;
|
||||
@ -107,7 +106,7 @@ public class RefineryRecipes {
|
||||
fractions.put(Fluids.NAPHTHA_CRACK, new Pair(new FluidStack(Fluids.HEATINGOIL, ncrack_frac_heat), new FluidStack(Fluids.DIESEL_CRACK, ncrack_frac_diesel)));
|
||||
fractions.put(Fluids.LIGHTOIL, new Pair(new FluidStack(Fluids.DIESEL, light_frac_diesel), new FluidStack(Fluids.KEROSENE, light_frac_kero)));
|
||||
fractions.put(Fluids.LIGHTOIL_CRACK, new Pair(new FluidStack(Fluids.KEROSENE, lcrack_frac_kero), new FluidStack(Fluids.PETROLEUM, lcrack_frac_petro)));
|
||||
fractions.put(Fluids.COALOIL, new Pair(new FluidStack(Fluids.COALGAS, coal_frac_coalgas), new FluidStack(Fluids.GAS, coal_frac_natgas)));
|
||||
fractions.put(Fluids.COALOIL, new Pair(new FluidStack(Fluids.COALGAS, coal_frac_coalgas), new FluidStack(Fluids.OIL, coal_frac_oil)));
|
||||
}
|
||||
|
||||
public static void registerCracking() {
|
||||
|
||||
@ -78,7 +78,6 @@ public class SolidificationRecipes {
|
||||
registerRecipe(LPG, SF_LPG, ModItems.solid_fuel);
|
||||
registerRecipe(BIOGAS, SF_BIOGAS, ModItems.solid_fuel);
|
||||
registerRecipe(BIOFUEL, SF_BIOFUEL, ModItems.solid_fuel);
|
||||
registerRecipe(COALOIL, SF_COALOIL, ModItems.solid_fuel);
|
||||
registerRecipe(AROMATICS, SF_AROMA, ModItems.solid_fuel);
|
||||
registerRecipe(UNSATURATEDS, SF_UNSAT, ModItems.solid_fuel);
|
||||
}
|
||||
|
||||
@ -947,6 +947,7 @@ public class MainRegistry {
|
||||
SILEXRecipes.register();
|
||||
AnvilRecipes.register();
|
||||
PressRecipes.register();
|
||||
RefineryRecipes.registerRefinery();
|
||||
RefineryRecipes.registerFractions();
|
||||
RefineryRecipes.registerCracking();
|
||||
RadiolysisRecipes.registerRadiolysis();
|
||||
|
||||
@ -42,9 +42,9 @@ public class RenderSolidifier extends TileEntitySpecialRenderer {
|
||||
|
||||
double height = (double)liq.tank.getFill() / (double)liq.tank.getMaxFill();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1, 0);
|
||||
GL11.glTranslated(0, 1.25, 0);
|
||||
GL11.glScaled(1, height, 1);
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
GL11.glTranslated(0, -1.25, 0);
|
||||
ResourceManager.solidifier.renderPart("Fluid");
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@ -47,6 +47,8 @@ public class TileEntityMachineLiquefactor extends TileEntityMachineBase implemen
|
||||
this.power = Library.chargeTEFromItems(slots, 1, power, maxPower);
|
||||
tank.updateTank(this);
|
||||
|
||||
this.trySubscribe(worldObj, xCoord, yCoord + 4, zCoord, Library.POS_Y);
|
||||
this.trySubscribe(worldObj, xCoord, yCoord - 1, zCoord, Library.NEG_Y);
|
||||
this.trySubscribe(worldObj, xCoord + 2, yCoord + 1, zCoord, Library.POS_X);
|
||||
this.trySubscribe(worldObj, xCoord - 2, yCoord + 1, zCoord, Library.NEG_X);
|
||||
this.trySubscribe(worldObj, xCoord, yCoord + 1, zCoord + 2, Library.POS_Z);
|
||||
|
||||
@ -47,6 +47,8 @@ public class TileEntityMachineSolidifier extends TileEntityMachineBase implement
|
||||
tank.setType(4, slots);
|
||||
tank.updateTank(this);
|
||||
|
||||
this.trySubscribe(worldObj, xCoord, yCoord + 4, zCoord, Library.POS_Y);
|
||||
this.trySubscribe(worldObj, xCoord, yCoord - 1, zCoord, Library.NEG_Y);
|
||||
this.trySubscribe(worldObj, xCoord + 2, yCoord + 1, zCoord, Library.POS_X);
|
||||
this.trySubscribe(worldObj, xCoord - 2, yCoord + 1, zCoord, Library.NEG_X);
|
||||
this.trySubscribe(worldObj, xCoord, yCoord + 1, zCoord + 2, Library.POS_Z);
|
||||
|
||||
@ -14,6 +14,7 @@ import com.hbm.lib.Library;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
@ -139,6 +140,22 @@ public class TileEntitySolarBoiler extends TileEntity implements IFluidAcceptor,
|
||||
public void clearFluidList(FluidType type) {
|
||||
list.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
this.water.readFromNBT(nbt, "water");
|
||||
this.steam.readFromNBT(nbt, "steam");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
this.water.writeToNBT(nbt, "water");
|
||||
this.steam.writeToNBT(nbt, "steam");
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
|
||||
@ -7,28 +7,21 @@ import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.FluidContainerRegistry;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.recipes.RefineryRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.Tuple.Quintet;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Vec3;
|
||||
@ -47,8 +40,6 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
|
||||
|
||||
private static final int[] slot_access = new int[] {11};
|
||||
|
||||
private String customName;
|
||||
|
||||
public TileEntityMachineRefinery() {
|
||||
super(12);
|
||||
tanks = new FluidTank[5];
|
||||
@ -128,25 +119,7 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
|
||||
|
||||
tanks[0].loadTank(1, 2, slots);
|
||||
|
||||
int ho = RefineryRecipes.oil_frac_heavy;
|
||||
int nt = RefineryRecipes.oil_frac_naph;
|
||||
int lo = RefineryRecipes.oil_frac_light;
|
||||
int pe = RefineryRecipes.oil_frac_petro;
|
||||
|
||||
if(power >= 5 && tanks[0].getFill() >= 100 &&
|
||||
tanks[1].getFill() + ho <= tanks[1].getMaxFill() &&
|
||||
tanks[2].getFill() + nt <= tanks[2].getMaxFill() &&
|
||||
tanks[3].getFill() + lo <= tanks[3].getMaxFill() &&
|
||||
tanks[4].getFill() + pe <= tanks[4].getMaxFill()) {
|
||||
|
||||
tanks[0].setFill(tanks[0].getFill() - 100);
|
||||
tanks[1].setFill(tanks[1].getFill() + ho);
|
||||
tanks[2].setFill(tanks[2].getFill() + nt);
|
||||
tanks[3].setFill(tanks[3].getFill() + lo);
|
||||
tanks[4].setFill(tanks[4].getFill() + pe);
|
||||
sulfur += 1;
|
||||
power -= 5;
|
||||
}
|
||||
refine();
|
||||
|
||||
tanks[1].unloadTank(3, 4, slots);
|
||||
tanks[2].unloadTank(5, 6, slots);
|
||||
@ -157,16 +130,6 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
|
||||
tanks[i].updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
}
|
||||
|
||||
if(sulfur >= maxSulfur) {
|
||||
if(slots[11] == null) {
|
||||
slots[11] = new ItemStack(ModItems.sulfur);
|
||||
sulfur -= maxSulfur;
|
||||
} else if(slots[11] != null && slots[11].getItem() == ModItems.sulfur && slots[11].stackSize < slots[11].getMaxStackSize()) {
|
||||
slots[11].stackSize++;
|
||||
sulfur -= maxSulfur;
|
||||
}
|
||||
}
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setLong("power", this.power);
|
||||
this.networkPack(data, 50);
|
||||
|
||||
@ -242,6 +242,7 @@ container.machineRefinery=Ölraffinerie
|
||||
container.machineSelenium=Hochleistungs-Sternmotor
|
||||
container.machineShredder=Brecher
|
||||
container.machineSILEX=SILEX
|
||||
container.machineSolidifier=Verfestiger
|
||||
container.machineTurbine=Dampfturbine
|
||||
container.machineTurbofan=Turbofan
|
||||
container.machine_schrabidium_transmutator=Schrabidium-Transmutationsgerät
|
||||
@ -460,6 +461,7 @@ hbmfluid.biogas=Biogas
|
||||
hbmfluid.bitumen=Bitumen
|
||||
hbmfluid.carbondioxide=Kohlenstoffdioxid
|
||||
hbmfluid.coolant=Kühlflüssigkeit
|
||||
hbmfluid.coalgas=Kohlebenzin
|
||||
hbmfluid.coaloil=Kohleöl
|
||||
hbmfluid.crackoil=Crack-Öl
|
||||
hbmfluid.cryogel=Kryogel
|
||||
@ -2020,6 +2022,7 @@ item.oil_detector.desc2=Detektor findet nur größere Vorkommen.
|
||||
item.oil_detector.bullseye=Ölvorkommen direkt untertage!
|
||||
item.oil_detector.detected=Ölvorkommen in der Nähe!
|
||||
item.oil_detector.noOil=Kein Öl gefunden.
|
||||
item.oil_tar.coal.name=Kohleteer
|
||||
item.oil_tar.name=Ölteer
|
||||
item.oil_tar.crude.name=Erdölteer
|
||||
item.oil_tar.crack.name=Crackölteer
|
||||
@ -3275,6 +3278,7 @@ tile.machine_shredder.name=Brecher
|
||||
tile.machine_silex.name=Laser-Isotopentrenner (SILEX)
|
||||
tile.machine_siren.name=Sirene
|
||||
tile.machine_solar_boiler.name=Solarturmboiler
|
||||
tile.machine_solidifier.name=Industrielle Verfestigungsmaschine
|
||||
tile.machine_spp_bottom.name=NPE-Potentialgenerator (Unterteil)
|
||||
tile.machine_spp_top.name=NPE-Potentialgenerator (Oberteil)
|
||||
tile.machine_storage_drum.name=Atommüll-Lagertrommel
|
||||
|
||||
@ -375,6 +375,7 @@ container.machineRefinery=Oil Refinery
|
||||
container.machineSelenium=Radial Performance Engine
|
||||
container.machineShredder=Shredder
|
||||
container.machineSILEX=SILEX
|
||||
container.machineSolidifier=Solidifier
|
||||
container.machineTurbine=Steam Turbine
|
||||
container.machineTurbofan=Turbofan
|
||||
container.machine_schrabidium_transmutator=Schrabidium Transmutation Device
|
||||
@ -613,6 +614,7 @@ hbmfluid.biofuel=Biofuel
|
||||
hbmfluid.biogas=Biogas
|
||||
hbmfluid.bitumen=Bitumen
|
||||
hbmfluid.carbondioxide=Carbon Dioxide
|
||||
hbmfluid.coalgas=Coal Gasoline
|
||||
hbmfluid.coaloil=Coal Oil
|
||||
hbmfluid.coolant=Coolant
|
||||
hbmfluid.crackoil=Cracked Oil
|
||||
@ -2243,6 +2245,7 @@ item.oil_detector.desc2=Detector will only find larger deposits.
|
||||
item.oil_detector.bullseye=Oil deposit directly below!
|
||||
item.oil_detector.detected=Oil detected nearby.
|
||||
item.oil_detector.noOil=No oil detected.
|
||||
item.oil_tar.coal.name=Coal Tar
|
||||
item.oil_tar.crude.name=Oil Tar
|
||||
item.oil_tar.crack.name=Crack Oil Tar
|
||||
item.overfuse.name=Singularity Screwdriver
|
||||
@ -3602,6 +3605,7 @@ tile.machine_shredder.name=Shredder
|
||||
tile.machine_silex.name=Laser Isotope Separation Chamber (SILEX)
|
||||
tile.machine_siren.name=Siren
|
||||
tile.machine_solar_boiler.name=Solar Tower Boiler
|
||||
tile.machine_solidifier.name=Industrial Solidification Machine
|
||||
tile.machine_spp_bottom.name=ZPE Potential Generator (Bottom)
|
||||
tile.machine_spp_top.name=ZPE Potential Generator (Top)
|
||||
tile.machine_storage_drum.name=Nuclear Waste Disposal Drum
|
||||
|
||||
BIN
src/main/resources/assets/hbm/textures/gui/fluids/aromatics.png
Normal file
BIN
src/main/resources/assets/hbm/textures/gui/fluids/aromatics.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 610 B |
Binary file not shown.
|
After Width: | Height: | Size: 575 B |
Binary file not shown.
|
After Width: | Height: | Size: 437 B |
Binary file not shown.
|
After Width: | Height: | Size: 609 B |
BIN
src/main/resources/assets/hbm/textures/gui/fluids/salient.png
Normal file
BIN
src/main/resources/assets/hbm/textures/gui/fluids/salient.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 435 B |
Binary file not shown.
|
After Width: | Height: | Size: 608 B |
Loading…
x
Reference in New Issue
Block a user