mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
fluid duct agony 2: revengeance
This commit is contained in:
parent
b05384f2e5
commit
081df1c8fe
@ -1673,7 +1673,7 @@ public class ModBlocks {
|
||||
therm_endo = new BombThermo(Material.iron).setBlockName("therm_endo").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(6000.0F);
|
||||
therm_exo = new BombThermo(Material.iron).setBlockName("therm_exo").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(6000.0F);
|
||||
emp_bomb = new BombFloat(Material.iron).setBlockName("emp_bomb").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(6000.0F);
|
||||
det_cord = new ExplosiveCharge(Material.iron).setBlockName("det_cord").setCreativeTab(MainRegistry.nukeTab).setHardness(0.1F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":det_cord");
|
||||
det_cord = new DetCord(Material.iron).setBlockName("det_cord").setCreativeTab(MainRegistry.nukeTab).setHardness(0.1F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":det_cord");
|
||||
det_charge = new ExplosiveCharge(Material.iron).setBlockName("det_charge").setCreativeTab(MainRegistry.nukeTab).setHardness(0.1F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":det_charge");
|
||||
det_nuke = new ExplosiveCharge(Material.iron).setBlockName("det_nuke").setCreativeTab(MainRegistry.nukeTab).setHardness(0.1F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":det_nuke");
|
||||
det_miner = new DetMiner(Material.iron, RefStrings.MODID + ":det_miner_top").setBlockName("det_miner").setCreativeTab(MainRegistry.nukeTab).setHardness(0.1F).setResistance(0.0F).setBlockTextureName(RefStrings.MODID + ":det_miner_side");
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
package com.hbm.blocks.bomb;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IBomb.BombReturnCode;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -12,7 +9,7 @@ import net.minecraft.world.World;
|
||||
|
||||
public class DetCord extends Block implements IDetConnectible {
|
||||
|
||||
protected DetCord(Material p_i45394_1_) {
|
||||
public DetCord(Material p_i45394_1_) {
|
||||
super(p_i45394_1_);
|
||||
}
|
||||
|
||||
|
||||
@ -52,14 +52,12 @@ public class BlockFluidDuctSolid extends BlockContainer implements IBlockMultiPa
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColorFromPass(IBlockAccess world, int x, int y, int z, boolean inv) {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int colorMultiplier(IBlockAccess world, int x, int y, int z) {
|
||||
|
||||
if(RenderBlockMultipass.currentPass == 0)
|
||||
return 0xffffff;
|
||||
|
||||
if(inv)
|
||||
return Fluids.NONE.getColor();
|
||||
|
||||
TileEntityFluidDuctSimple te = (TileEntityFluidDuctSimple) world.getTileEntity(x, y, z);
|
||||
|
||||
if(te != null) {
|
||||
@ -68,4 +66,9 @@ public class BlockFluidDuctSolid extends BlockContainer implements IBlockMultiPa
|
||||
|
||||
return 0xffffff;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColorFromPass(IBlockAccess world, int x, int y, int z, boolean inv) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ import com.hbm.hazard.type.*;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemBreedingRod.BreedingRodType;
|
||||
import com.hbm.items.machine.ItemRTGPelletDepleted.DepletedRTGMaterial;
|
||||
import com.hbm.items.special.ItemHolotapeImage.EnumHoloImage;
|
||||
import com.hbm.util.Compat;
|
||||
import com.hbm.util.Compat.ReikaIsotope;
|
||||
|
||||
@ -434,8 +435,9 @@ public class HazardRegistry {
|
||||
|
||||
HazardSystem.register(solinium_propellant, makeData(EXPLOSIVE, 10F));
|
||||
HazardSystem.register(solinium_core, new HazardData().addEntry(RADIATION, sa327 * nugget * 8).addEntry(BLINDING, 5F));
|
||||
|
||||
|
||||
HazardSystem.register(nuke_fstbmb, makeData(DIGAMMA, 0.01F));
|
||||
HazardSystem.register(new ItemStack(ModItems.holotape_image, 1, EnumHoloImage.HOLO_RESTORED.ordinal()), makeData(DIGAMMA, 1F));
|
||||
|
||||
/*
|
||||
* Blacklist
|
||||
|
||||
@ -8,7 +8,6 @@ import com.hbm.interfaces.IFluidDuct;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.conductor.TileEntityFluidDuct;
|
||||
import com.hbm.tileentity.conductor.TileEntityFluidDuctSimple;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
@ -85,9 +84,10 @@ public class ItemFluidIdentifier extends Item {
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float f1, float f2, float f3) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te instanceof TileEntityFluidDuctSimple) {
|
||||
|
||||
TileEntityFluidDuctSimple duct = (TileEntityFluidDuctSimple) te;
|
||||
|
||||
if(!world.isRemote) {
|
||||
TileEntityFluidDuctSimple duct = (TileEntityFluidDuctSimple) te;
|
||||
FluidType type = Fluids.fromID(stack.getItemDamage());
|
||||
|
||||
if (player.isSneaking()) {
|
||||
@ -97,7 +97,7 @@ public class ItemFluidIdentifier extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
//world.markBlockForUpdate(x, y, z);
|
||||
|
||||
player.swingItem();
|
||||
}
|
||||
@ -132,7 +132,7 @@ public class ItemFluidIdentifier extends Item {
|
||||
TileEntity te = world.getTileEntity(nextX, nextY, nextZ);
|
||||
if (te instanceof TileEntityFluidDuctSimple && ((TileEntityFluidDuctSimple) te).getType() == oldType) {
|
||||
|
||||
TileEntityFluidDuct nextDuct = (TileEntityFluidDuct) te;
|
||||
TileEntityFluidDuctSimple nextDuct = (TileEntityFluidDuctSimple) te;
|
||||
long connectionsCount = Arrays.stream(nextDuct.connections).filter(Objects::nonNull).count();
|
||||
|
||||
if (connectionsCount > 1) {
|
||||
|
||||
@ -46,6 +46,9 @@ public class ItemHolotapeImage extends ItemHoloTape {
|
||||
HOLO_NV_CRATER( EnumChatFormatting.GOLD, "Brown", "031-MOUNTAIN", "The tape contains an audio track that is mostly gabled sound and garbage noise. There is an image file on it, depicting a large dome in blue light surrounded by many smaller buildings. In the distance, there is a smaller dome with red lights."),
|
||||
HOLO_NV_DIVIDE( EnumChatFormatting.GOLD, "Brown", "032-ROAD", "The tape contains an audio track that is mostly gabled sound and garbage noise. There is an image file on it, depicting a large chasm with broken highways and destroyed buildings littering the landscape."),
|
||||
HOLO_NV_BM( EnumChatFormatting.GOLD, "Brown", "033-BROADCAST", "The tape contains an audio track that is mostly gabled sound and garbage noise. There is an image file on it, depicting a satellite broadcasting station on top of a hill. In the distance, there is a very large person walking hand in hand with a robot into the sunset."),
|
||||
HOLO_O_1( EnumChatFormatting.WHITE, "Chroma", "X00-TRANSCRIPT", "[Start of Automated Audio Transcript] <unintelligible> in a boardroom, right, and they're trying to come up with some new ideas. So one guy just says they should reuse this other characteer from somewhere else, who has like this night-theme you know, and just change the entire schtick to day. So when they had to come up with a name, one guy said, why not take the original name, replace the N with a D, because of night to day, right, and run with it? Now the name sounds like 'Dicks'! Funniest thing I've ever heard! [End of Transcript]"),
|
||||
HOLO_O_2( EnumChatFormatting.WHITE, "Chroma", "X01-NEWS", "The tape contains a news article, reporting an unusually pale person throwing flashbangs at people in public. The image at the bottom shows one of the incidents, unsurprisingly the light from one of the flashbangs made it unrecognizable."),
|
||||
HOLO_O_3( EnumChatFormatting.WHITE, "Chroma", "X02-FICTION", "The tape contains an article from a science fiction magazine, engaging with various reader comments about what to do with a time machine. One of those comments suggests engaging in various unsanitary acts with the future self, being signed off with just the initial '~D'."),
|
||||
;
|
||||
|
||||
private String name;
|
||||
|
||||
@ -19,6 +19,7 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.TileEntityProxyBase;
|
||||
import com.hbm.tileentity.TileEntityProxyInventory;
|
||||
import com.hbm.tileentity.conductor.TileEntityFluidDuct;
|
||||
import com.hbm.tileentity.conductor.TileEntityFluidDuctSimple;
|
||||
import com.hbm.tileentity.conductor.TileEntityGasDuct;
|
||||
import com.hbm.tileentity.conductor.TileEntityGasDuctSolid;
|
||||
import com.hbm.tileentity.conductor.TileEntityOilDuct;
|
||||
@ -495,17 +496,17 @@ public class Library {
|
||||
|
||||
if(tileentity instanceof IFluidDuct)
|
||||
{
|
||||
if(tileentity instanceof TileEntityFluidDuct && ((TileEntityFluidDuct)tileentity).getType() == type)
|
||||
if(tileentity instanceof TileEntityFluidDuctSimple && ((TileEntityFluidDuctSimple)tileentity).getType() == type)
|
||||
{
|
||||
if(Library.checkUnionListForFluids(((TileEntityFluidDuct)tileentity).uoteab, that))
|
||||
if(Library.checkUnionListForFluids(((TileEntityFluidDuctSimple)tileentity).uoteab, that))
|
||||
{
|
||||
for(int i = 0; i < ((TileEntityFluidDuct)tileentity).uoteab.size(); i++)
|
||||
for(int i = 0; i < ((TileEntityFluidDuctSimple)tileentity).uoteab.size(); i++)
|
||||
{
|
||||
if(((TileEntityFluidDuct)tileentity).uoteab.get(i).source == that)
|
||||
if(((TileEntityFluidDuctSimple)tileentity).uoteab.get(i).source == that)
|
||||
{
|
||||
if(((TileEntityFluidDuct)tileentity).uoteab.get(i).ticked != newTact)
|
||||
if(((TileEntityFluidDuctSimple)tileentity).uoteab.get(i).ticked != newTact)
|
||||
{
|
||||
((TileEntityFluidDuct)tileentity).uoteab.get(i).ticked = newTact;
|
||||
((TileEntityFluidDuctSimple)tileentity).uoteab.get(i).ticked = newTact;
|
||||
transmitFluid(x, y + 1, z, that.getTact(), that, worldObj, type);
|
||||
transmitFluid(x, y - 1, z, that.getTact(), that, worldObj, type);
|
||||
transmitFluid(x - 1, y, z, that.getTact(), that, worldObj, type);
|
||||
@ -516,7 +517,7 @@ public class Library {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
((TileEntityFluidDuct)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleansForFluids(that, newTact));
|
||||
((TileEntityFluidDuctSimple)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleansForFluids(that, newTact));
|
||||
}
|
||||
}
|
||||
if(tileentity instanceof TileEntityGasDuct && ((TileEntityGasDuct)tileentity).type.name().equals(type.name()))
|
||||
|
||||
@ -14,6 +14,7 @@ import static com.hbm.inventory.OreDictManager.*;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemBattery;
|
||||
import com.hbm.items.special.ItemCircuitStarComponent.CircuitComponentType;
|
||||
import com.hbm.items.special.ItemHolotapeImage.EnumHoloImage;
|
||||
import com.hbm.items.special.ItemPlasticScrap.ScrapType;
|
||||
import com.hbm.items.tool.ItemGuideBook.BookType;
|
||||
import com.hbm.util.EnchantmentUtil;
|
||||
@ -554,8 +555,9 @@ public class CraftingManager {
|
||||
addShapelessAuto(new ItemStack(ModItems.crystal_charred, 1), new Object[] { ST.dust(), CO.dust(), BR.dust(), NB.dust(), TS.dust(), CE.dust(), ModBlocks.block_meteor, AL.block(), Items.water_bucket });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.crystal_virus, 1), new Object[] { "STS", "THT", "STS", 'S', ModItems.particle_strange, 'T', W.dust(), 'H', ModItems.crystal_horn });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.crystal_pulsar, 32), new Object[] { "STS", "THT", "STS", 'S', ModItems.cell_uf6, 'T', AL.dust(), 'H', ModItems.crystal_charred });
|
||||
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_duct, 8), new Object[] { "SAS", " ", "SAS", 'S', STEEL.plate(), 'A', AL.plate() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fluid_duct_solid, 8), new Object[] { "SAS", "A A", "SAS", 'S', STEEL.ingot(), 'A', AL.plate() });
|
||||
//addRecipeAuto(new ItemStack(ModBlocks.machine_assembler, 1), new Object[] { "WWW", "MCM", "ISI", 'W', KEY_ANYPANE, 'M', ModItems.motor, 'C', ModItems.circuit_aluminium, 'I', "blockCopper", 'S', STEEL.block() });
|
||||
addRecipeAuto(new ItemStack(ModItems.template_folder, 1), new Object[] { "LPL", "BPB", "LPL", 'P', Items.paper, 'L', KEY_BLUE, 'B', KEY_WHITE });
|
||||
//addRecipeAuto(new ItemStack(ModItems.turret_control, 1), new Object[] { "R12", "PPI", " I", 'R', REDSTONE.dust(), '1', ModItems.circuit_aluminium, '2', ModItems.circuit_red_copper, 'P', STEEL.plate(), 'I', STEEL.ingot() });
|
||||
@ -855,6 +857,8 @@ public class CraftingManager {
|
||||
addShapelessAuto(new ItemStack(ModItems.book_guide, 1, BookType.RBMK.ordinal()), new Object[] { Items.book, Items.potato });
|
||||
addShapelessAuto(new ItemStack(ModItems.book_guide, 1, BookType.HADRON.ordinal()), new Object[] { Items.book, ModItems.fuse });
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.holotape_image, 1, EnumHoloImage.HOLO_RESTORED.ordinal()), new Object[] { new ItemStack(ModItems.holotape_image, 1, EnumHoloImage.HOLO_DIGAMMA.ordinal()), ModItems.screwdriver, ModItems.ducttape, ModItems.armor_polish });
|
||||
|
||||
if(GeneralConfig.enableBabyMode) {
|
||||
addShapelessAuto(new ItemStack(ModItems.cordite, 3), new Object[] { ModItems.ballistite, Items.gunpowder, new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
addShapelessAuto(new ItemStack(ModItems.ingot_semtex, 3), new Object[] { Items.slime_ball, Blocks.tnt, KNO.dust() });
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.render.block;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.IBlockMultiPass;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
@ -24,7 +26,41 @@ public class RenderBlockMultipass implements ISimpleBlockRenderingHandler {
|
||||
public static int currentPass = 0;
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) { }
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
block.setBlockBoundsForItemRender();
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, -1.0F, 0.0F);
|
||||
renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, metadata));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||
renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 1, metadata));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, -1.0F);
|
||||
renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 2, metadata));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||
renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 3, metadata));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
|
||||
renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 4, metadata));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata));
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||
@ -46,8 +82,8 @@ public class RenderBlockMultipass implements ISimpleBlockRenderingHandler {
|
||||
|
||||
for(int i = 0; i < passes; i++) {
|
||||
currentPass = i;
|
||||
System.out.println(multi.getColorFromPass(world, x, y, z, false));
|
||||
tessellator.setColorOpaque_I(multi.getColorFromPass(world, x, y, z, false));
|
||||
//System.out.println(multi.getColorFromPass(world, x, y, z, false));
|
||||
//tessellator.setColorOpaque_I(multi.getColorFromPass(world, x, y, z, false));
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
@ -58,7 +94,7 @@ public class RenderBlockMultipass implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -2,8 +2,8 @@ package com.hbm.render.block;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.bomb.DetCord;
|
||||
import com.hbm.blocks.bomb.IDetConnectible;
|
||||
import com.hbm.blocks.test.TestConductor;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
@ -33,7 +33,7 @@ public class RenderDetCord implements ISimpleBlockRenderingHandler {
|
||||
GL11.glRotated(180, 0, 1, 0);
|
||||
GL11.glScaled(1.25D, 1.25D, 1.25D);
|
||||
tessellator.startDrawingQuads();
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.cable_neo, "CX", iicon, tessellator, 0, false);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.cable_neo, "CZ", iicon, tessellator, 0, false);
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
@ -60,13 +60,15 @@ public class RenderDetCord implements ISimpleBlockRenderingHandler {
|
||||
boolean pZ = IDetConnectible.isConnectible(world, x, y, z + 1, Library.NEG_Z);
|
||||
boolean nZ = IDetConnectible.isConnectible(world, x, y, z - 1, Library.POS_Z);
|
||||
|
||||
int mask = 0 + (pX ? 32 : 0) + (nX ? 16 : 0) + (pY ? 8 : 0) + (nY ? 4 : 0) + (pZ ? 2 : 0) + (nZ ? 1 : 0);
|
||||
|
||||
tessellator.addTranslation(x + 0.5F, y + 0.5F, z + 0.5F);
|
||||
|
||||
if(pX && nX && !pY && !nY && !pZ && !nZ)
|
||||
if(mask == 0b110000 || mask == 0b100000 || mask == 0b010000)
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.cable_neo, "CX", iicon, tessellator, 0, true);
|
||||
else if(!pX && !nX && pY && nY && !pZ && !nZ)
|
||||
else if(mask == 0b001100 || mask == 0b001000 || mask == 0b000100)
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.cable_neo, "CY", iicon, tessellator, 0, true);
|
||||
else if(!pX && !nX && !pY && !nY && pZ && nZ)
|
||||
else if(mask == 0b000011 || mask == 0b000010 || mask == 0b000001)
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.cable_neo, "CZ", iicon, tessellator, 0, true);
|
||||
|
||||
else {
|
||||
@ -91,6 +93,6 @@ public class RenderDetCord implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return TestConductor.renderID;
|
||||
return DetCord.renderID;
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,35 +23,8 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityFluidDuct extends TileEntityFluidDuctSimple {
|
||||
|
||||
public ForgeDirection[] connections = new ForgeDirection[6];
|
||||
|
||||
public TileEntityFluidDuct() { }
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
this.updateConnections();
|
||||
}
|
||||
|
||||
public void updateConnections() {
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord + 1, zCoord, type)) connections[0] = ForgeDirection.UP;
|
||||
else connections[0] = null;
|
||||
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord - 1, zCoord, type)) connections[1] = ForgeDirection.DOWN;
|
||||
else connections[1] = null;
|
||||
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord, zCoord - 1, type)) connections[2] = ForgeDirection.NORTH;
|
||||
else connections[2] = null;
|
||||
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord + 1, yCoord, zCoord, type)) connections[3] = ForgeDirection.EAST;
|
||||
else connections[3] = null;
|
||||
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord, zCoord + 1, type)) connections[4] = ForgeDirection.SOUTH;
|
||||
else connections[4] = null;
|
||||
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord - 1, yCoord, zCoord, type)) connections[5] = ForgeDirection.WEST;
|
||||
else connections[5] = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
|
||||
@ -7,6 +7,7 @@ import com.hbm.calc.UnionOfTileEntitiesAndBooleansForFluids;
|
||||
import com.hbm.interfaces.IFluidDuct;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.lib.Library;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
@ -14,11 +15,16 @@ import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityFluidDuctSimple extends TileEntity implements IFluidDuct {
|
||||
|
||||
private FluidType lastType = Fluids.NONE;
|
||||
protected FluidType type = Fluids.NONE;
|
||||
public List<UnionOfTileEntitiesAndBooleansForFluids> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForFluids>();
|
||||
|
||||
|
||||
public ForgeDirection[] connections = new ForgeDirection[6];
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket() {
|
||||
@ -64,4 +70,29 @@ public class TileEntityFluidDuctSimple extends TileEntity implements IFluidDuct
|
||||
public FluidType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
this.updateConnections();
|
||||
|
||||
if(lastType != type) {
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
lastType = type;
|
||||
}
|
||||
}
|
||||
|
||||
public void updateConnections() {
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord + 1, zCoord, type)) connections[0] = ForgeDirection.UP;
|
||||
else connections[0] = null;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord - 1, zCoord, type)) connections[1] = ForgeDirection.DOWN;
|
||||
else connections[1] = null;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord, zCoord - 1, type)) connections[2] = ForgeDirection.NORTH;
|
||||
else connections[2] = null;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord + 1, yCoord, zCoord, type)) connections[3] = ForgeDirection.EAST;
|
||||
else connections[3] = null;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord, zCoord + 1, type)) connections[4] = ForgeDirection.SOUTH;
|
||||
else connections[4] = null;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord - 1, yCoord, zCoord, type)) connections[5] = ForgeDirection.WEST;
|
||||
else connections[5] = null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1530,6 +1530,7 @@ item.hev_boots.name=HEV Mark IV Stiefel
|
||||
item.hev_plate.name=HEV Mark IV Brustpanzer
|
||||
item.hev_helmet.name=HEV Mark IV Helm
|
||||
item.hev_legs.name=HEV Mark IV Beinschutz
|
||||
item.holotape_image.name=Holoband
|
||||
item.horseshoe_magnet.name=Hufeisenmagnet
|
||||
item.hull_big_aluminium.name=Große Aluminiumhülle
|
||||
item.hull_big_steel.name=Große Stahlhülle
|
||||
@ -3058,6 +3059,7 @@ tile.fireworks.color=Farbe: %s
|
||||
tile.flame_war.name=Flamewar aus der Box
|
||||
tile.float_bomb.name=Schwebebombe
|
||||
tile.fluid_duct.name=Universelles Flüssigkeitsrohr
|
||||
tile.fluid_duct_solid.name=Geschirmtes universelles Flüssigkeitsrohr
|
||||
tile.foam_layer.name=Schaumdecke
|
||||
tile.fraction_spacer.name=Fraktionierungsturm-Teiler
|
||||
tile.frozen_dirt.name=Gefrorene Erde
|
||||
|
||||
@ -1702,6 +1702,7 @@ item.hev_boots.name=HEV Mark IV Boots
|
||||
item.hev_plate.name=HEV Mark IV Chestplate
|
||||
item.hev_helmet.name=HEV Mark IV Helmet
|
||||
item.hev_legs.name=HEV Mark IV Leggings
|
||||
item.holotape_image.name=Holotape
|
||||
item.horseshoe_magnet.name=Horseshoe Magnet
|
||||
item.hull_big_aluminium.name=Big Aluminium Shell
|
||||
item.hull_big_steel.name=Big Steel Shell
|
||||
@ -3372,6 +3373,7 @@ tile.fireworks.color=Color: %s
|
||||
tile.flame_war.name=Flame War in a Box
|
||||
tile.float_bomb.name=Levitation Bomb
|
||||
tile.fluid_duct.name=Universal Fluid Duct
|
||||
tile.fluid_duct_solid.name=Coated Universal Fluid Duct
|
||||
tile.foam_layer.name=Foam layer
|
||||
tile.fraction_spacer.name=Fractioning Tower Separator
|
||||
tile.frozen_dirt.name=Frozen Dirt
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 348 B After Width: | Height: | Size: 339 B |
Loading…
x
Reference in New Issue
Block a user