fixes and fixes

This commit is contained in:
Bob 2022-05-23 18:37:41 +02:00
parent 5dd75258ad
commit 93dee8ac82
4 changed files with 68 additions and 5 deletions

View File

@ -137,7 +137,7 @@ public class Fluids {
GAS = new FlammableOilGas( "GAS", 0xfffeed, 1, 4, 1, EnumSymbol.NONE).setHeatEnergy(10_000);
PETROLEUM = new FlammableOilGas( "PETROLEUM", 0x7cb7c9, 1, 4, 1, EnumSymbol.NONE).setHeatEnergy(25_000);
LPG = new Fuel( "LPG", 0x4747EA, 1, 3, 1, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.HIGH, 450_000).setHeatEnergy(200_000);
BIOGAS = new FlammableOilGas( "BIOGAS", 0xbfd37c, 1, 4, 1, EnumSymbol.NONE);
BIOGAS = new FlammableOilGas( "BIOGAS", 0xbfd37c, 1, 4, 1, EnumSymbol.NONE).setHeatEnergy(25_000);
BIOFUEL = new Fuel( "BIOFUEL", 0xeef274, 1, 2, 0, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.HIGH, 400_000).setHeatEnergy(150_000).addContainers(0x9EB623, ExtContainer.CANISTER);
NITAN = new Fuel( "NITAN", 0x8018ad, 2, 4, 1, EnumSymbol.NONE).setCombustionEnergy(FuelGrade.HIGH, 5_000_000).setHeatEnergy(2_000_000).addContainers(0x6B238C, ExtContainer.CANISTER);
UF6 = new RadioactiveGas( "UF6", 0xD1CEBE, 4, 0, 2, EnumSymbol.RADIATION).addTraits(FluidTrait.CORROSIVE);

View File

@ -81,7 +81,7 @@ public class GUIScreenTemplateFolder extends GuiScreen {
ComparableStack comp = AssemblerRecipes.recipeList.get(i);
if(AssemblerRecipes.hidden.get(comp) == null) {
allStacks.add(ItemAssemblyTemplate.writeType(new ItemStack(ModItems.assembly_template), comp));
allStacks.add(ItemAssemblyTemplate.writeType(new ItemStack(ModItems.assembly_template, 1, i), comp));
}
}
// Chemistry Templates

View File

@ -1,12 +1,18 @@
package com.hbm.tileentity.machine;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import com.hbm.blocks.BlockDummyable;
import com.hbm.interfaces.IFluidAcceptor;
import com.hbm.interfaces.IFluidSource;
import com.hbm.inventory.FluidTank;
import com.hbm.inventory.UpgradeManager;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
import com.hbm.lib.Library;
import com.hbm.util.fauxpointtwelve.DirPos;
import api.hbm.fluid.IFluidStandardTransceiver;
@ -17,7 +23,7 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChunkCoordinates;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityMachineAssemfac extends TileEntityMachineAssemblerBase implements IFluidStandardTransceiver {
public class TileEntityMachineAssemfac extends TileEntityMachineAssemblerBase implements IFluidStandardTransceiver, IFluidAcceptor, IFluidSource {
public AssemblerArm[] arms;
@ -71,6 +77,10 @@ public class TileEntityMachineAssemfac extends TileEntityMachineAssemblerBase im
this.sendFluid(steam.getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
}
if(steam.getFill() > 0) {
this.fillFluidInit(steam.getTankType());
}
NBTTagCompound data = new NBTTagCompound();
data.setLong("power", this.power);
data.setIntArray("progress", this.progress);
@ -384,4 +394,57 @@ public class TileEntityMachineAssemfac extends TileEntityMachineAssemblerBase im
public FluidTank[] getReceivingTanks() {
return new FluidTank[] { water };
}
@Override
public void setFillForSync(int fill, int index) { }
@Override
public void setFluidFill(int fill, FluidType type) {
if(type == water.getTankType()) water.setFill(fill);
if(type == steam.getTankType()) steam.setFill(fill);
}
@Override
public void setTypeForSync(FluidType type, int index) { }
@Override
public int getFluidFill(FluidType type) {
if(type == water.getTankType()) return water.getFill();
if(type == steam.getTankType()) return steam.getFill();
return 0;
}
@Override
public void fillFluidInit(FluidType type) {
for(DirPos pos : getConPos()) {
this.fillFluid(pos.getX(), pos.getY(), pos.getZ(), this.getTact(), type);
}
}
@Override
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
}
@Override
public boolean getTact() {
return worldObj.getTotalWorldTime() % 2 == 0;
}
private List<IFluidAcceptor> list = new ArrayList();
@Override
public List<IFluidAcceptor> getFluidList(FluidType type) {
return type == steam.getTankType() ? this.list : new ArrayList();
}
@Override
public void clearFluidList(FluidType type) {
this.list.clear();
}
@Override
public int getMaxFluidFill(FluidType type) {
return type == water.getTankType() ? water.getMaxFill() : 0;
}
}

View File

@ -367,8 +367,8 @@ public class DesertAtom003
world.setBlock(x + 20, y + 4, z + 7, Blocks.vine, 4, 3);
world.setBlock(x + 23, y + 4, z + 7, Library.getRandomConcrete(), 0, 3);
world.setBlock(x + 25, y + 4, z + 7, Block8, 3, 3);
world.setBlock(x + 26, y + 4, z + 7, Block19, 3, 3);
world.setBlock(x + 27, y + 4, z + 7, Block19, 3, 3);
world.setBlock(x + 26, y + 4, z + 7, Block19, 12, 3);
world.setBlock(x + 27, y + 4, z + 7, Block19, 12, 3);
world.setBlock(x + 28, y + 4, z + 7, Block20, 3, 3);
TileEntity tank0 = world.getTileEntity(x + 28, y + 4, z + 7);
if(tank0 instanceof TileEntityMachineUF6Tank)