even girthier smokestacks

This commit is contained in:
Bob 2023-09-14 23:16:53 +02:00
parent 7e0865775d
commit 82fca1ce88
19 changed files with 1535 additions and 88 deletions

View File

@ -979,6 +979,7 @@ public class ModBlocks {
public static Block machine_flare;
public static Block chimney_brick;
public static Block chimney_industrial;
public static Block machine_refinery;
public static Block machine_vacuum_distill;
@ -2238,6 +2239,7 @@ public class ModBlocks {
oil_pipe = new BlockNoDrop(Material.iron).setBlockName("oil_pipe").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":oil_pipe");
machine_flare = new MachineGasFlare(Material.iron).setBlockName("machine_flare").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
chimney_brick = new MachineChimneyBrick(Material.iron).setBlockName("chimney_brick").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":brick_fire");
chimney_industrial = new MachineChimneyIndustrial(Material.iron).setBlockName("chimney_industrial").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":concrete_colored_ext.machine");
machine_refinery = new MachineRefinery(Material.iron).setBlockName("machine_refinery").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_refinery");
machine_vacuum_distill = new MachineVacuumDistill(Material.iron).setBlockName("machine_vacuum_distill").setHardness(5.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
machine_fraction_tower = new MachineFractionTower(Material.iron).setBlockName("machine_fraction_tower").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
@ -3323,6 +3325,7 @@ public class ModBlocks {
register(machine_fracking_tower);
register(machine_flare);
register(chimney_brick);
register(chimney_industrial);
register(machine_refinery);
register(machine_vacuum_distill);
register(machine_fraction_tower);

View File

@ -1,15 +1,20 @@
package com.hbm.blocks.machine;
import java.util.List;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.TileEntityChimneyBrick;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class MachineChimneyBrick extends BlockDummyable {
public class MachineChimneyBrick extends BlockDummyable implements ITooltipProvider {
public MachineChimneyBrick(Material mat) {
super(mat);
@ -41,4 +46,9 @@ public class MachineChimneyBrick extends BlockDummyable {
this.makeExtra(world, x + dir.offsetX * o, y, z + dir.offsetZ * o + 1);
this.makeExtra(world, x + dir.offsetX * o, y, z + dir.offsetZ * o - 1);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
this.addStandardInfo(stack, player, list, ext);
}
}

View File

@ -0,0 +1,54 @@
package com.hbm.blocks.machine;
import java.util.List;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.TileEntityChimneyIndustrial;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class MachineChimneyIndustrial extends BlockDummyable implements ITooltipProvider {
public MachineChimneyIndustrial(Material mat) {
super(mat);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12) return new TileEntityChimneyIndustrial();
if(meta >= 6) return new TileEntityProxyCombo().fluid();
return null;
}
@Override
public int[] getDimensions() {
return new int[] {22, 0, 1, 1, 1, 1};
}
@Override
public int getOffset() {
return 1;
}
@Override
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
super.fillSpace(world, x, y, z, dir, o);
this.makeExtra(world, x + dir.offsetX * o + 1, y, z + dir.offsetZ * o);
this.makeExtra(world, x + dir.offsetX * o - 1, y, z + dir.offsetZ * o);
this.makeExtra(world, x + dir.offsetX * o, y, z + dir.offsetZ * o + 1);
this.makeExtra(world, x + dir.offsetX * o, y, z + dir.offsetZ * o - 1);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
this.addStandardInfo(stack, player, list, ext);
}
}

View File

@ -452,10 +452,20 @@ public class AnvilRecipes {
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new OreDictStack(STEEL.plate(), 4),
new ComparableStack(Blocks.brick_block, 16)
new ComparableStack(Blocks.brick_block, 16),
new ComparableStack(ModBlocks.steel_grate, 2)
},
new AnvilOutput(new ItemStack(ModBlocks.chimney_brick))).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new OreDictStack(STEEL.plate(), 16),
new OreDictStack(ANY_CONCRETE.any(), 64),
new ComparableStack(ModBlocks.steel_grate, 4),
new ComparableStack(ModItems.filter_coal, 4)
},
new AnvilOutput(new ItemStack(ModBlocks.chimney_industrial))).setTier(3));
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new ComparableStack(ModItems.tank_steel, 1),

View File

@ -215,6 +215,7 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineOilWell.class, new RenderDerrick());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineGasFlare.class, new RenderGasFlare());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityChimneyBrick.class, new RenderChimneyBrick());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityChimneyIndustrial.class, new RenderChimneyIndustrial());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineMiningDrill.class, new RenderMiningDrill());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineMiningLaser.class, new RenderLaserMiner());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineAssembler.class, new RenderAssembler());

View File

@ -83,6 +83,7 @@ public class ResourceManager {
//Flare Stack
public static final IModelCustom oilflare = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/flare_stack.obj"));
public static final IModelCustom chimney_brick = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/chimney_brick.obj"));
public static final IModelCustom chimney_industrial = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/chimney_industrial.obj"));
//Tank
public static final IModelCustom fluidtank = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/fluidtank.obj"));
@ -437,6 +438,7 @@ public class ResourceManager {
//Flare Stack
public static final ResourceLocation oilflare_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/flare_stack.png");
public static final ResourceLocation chimney_brick_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/chimney_brick.png");
public static final ResourceLocation chimney_industrial_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/chimney_industrial.png");
//Tank
public static final ResourceLocation tank_tex = new ResourceLocation(RefStrings.MODID, "textures/models/tank.png");

View File

@ -0,0 +1,56 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.blocks.ModBlocks;
import com.hbm.main.ResourceManager;
import com.hbm.render.item.ItemRenderBase;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.client.IItemRenderer;
public class RenderChimneyIndustrial extends TileEntitySpecialRenderer implements IItemRendererProvider {
@Override
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glRotatef(180, 0F, 1F, 0F);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.chimney_industrial_tex);
ResourceManager.chimney_industrial.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}
@Override
public Item getItemForRenderer() {
return Item.getItemFromBlock(ModBlocks.chimney_industrial);
}
@Override
public IItemRenderer getRenderer() {
return new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -5, 0);
GL11.glScaled(2.75, 2.75, 2.75);
}
public void renderCommon() {
GL11.glScaled(0.25, 0.25, 0.25);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.chimney_industrial_tex);
ResourceManager.chimney_industrial.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glEnable(GL11.GL_CULL_FACE);
}};
}
}

View File

@ -329,6 +329,7 @@ public class TileMappings {
put(TileEntityMachineCatalyticReformer.class, "tileentity_catalytic_reformer");
put(TileEntityMachineCoker.class, "tileentity_coker");
put(TileEntityChimneyBrick.class, "tileentity_chimney_brick");
put(TileEntityChimneyIndustrial.class, "tileentity_chimney_industrial");
put(TileEntityReactorZirnox.class, "tileentity_zirnox");
put(TileEntityZirnoxDestroyed.class, "tileentity_zirnox_destroyed");

View File

@ -0,0 +1,86 @@
package com.hbm.tileentity.machine;
import com.hbm.handler.pollution.PollutionHandler;
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.lib.Library;
import com.hbm.tileentity.INBTPacketReceiver;
import com.hbm.tileentity.TileEntityLoadedBase;
import api.hbm.fluid.IFluidUser;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.util.ForgeDirection;
public abstract class TileEntityChimneyBase extends TileEntityLoadedBase implements IFluidUser, INBTPacketReceiver {
public int onTicks;
@Override
public void updateEntity() {
if(!worldObj.isRemote) {
if(worldObj.getTotalWorldTime() % 20 == 0) {
FluidType[] types = new FluidType[] {Fluids.SMOKE, Fluids.SMOKE_LEADED, Fluids.SMOKE_POISON};
for(FluidType type : types) {
this.trySubscribe(type, worldObj, xCoord + 2, yCoord, zCoord, Library.POS_X);
this.trySubscribe(type, worldObj, xCoord - 2, yCoord, zCoord, Library.NEG_X);
this.trySubscribe(type, worldObj, xCoord, yCoord, zCoord + 2, Library.POS_Z);
this.trySubscribe(type, worldObj, xCoord, yCoord, zCoord - 2, Library.NEG_Z);
}
}
NBTTagCompound data = new NBTTagCompound();
data.setInteger("onTicks", onTicks);
INBTPacketReceiver.networkPack(this, data, 150);
if(onTicks > 0) onTicks--;
} else {
if(onTicks > 0) {
this.spawnParticles();
}
}
}
public void spawnParticles() { }
public void networkUnpack(NBTTagCompound nbt) {
this.onTicks = nbt.getInteger("onTicks");
}
@Override
public boolean canConnect(FluidType type, ForgeDirection dir) {
return (dir == ForgeDirection.NORTH || dir == ForgeDirection.SOUTH || dir == ForgeDirection.EAST || dir == ForgeDirection.WEST) &&
(type == Fluids.SMOKE || type == Fluids.SMOKE_LEADED || type == Fluids.SMOKE_POISON);
}
@Override
public long transferFluid(FluidType type, int pressure, long fluid) {
onTicks = 20;
fluid *= getPollutionMod();
if(type == Fluids.SMOKE) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, fluid / 100F);
if(type == Fluids.SMOKE_LEADED) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.HEAVYMETAL, fluid / 100F);
if(type == Fluids.SMOKE_POISON) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.POISON, fluid / 100F);
return 0;
}
public abstract double getPollutionMod();
@Override
public long getDemand(FluidType type, int pressure) {
return 1_000_000;
}
@Override
public FluidTank[] getAllTanks() {
return new FluidTank[] {};
}
}

View File

@ -1,100 +1,35 @@
package com.hbm.tileentity.machine;
import com.hbm.handler.pollution.PollutionHandler;
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.lib.Library;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.INBTPacketReceiver;
import com.hbm.tileentity.TileEntityLoadedBase;
import api.hbm.fluid.IFluidUser;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityChimneyBrick extends TileEntityLoadedBase implements IFluidUser, INBTPacketReceiver {
public int onTicks;
public class TileEntityChimneyBrick extends TileEntityChimneyBase {
@Override
public void updateEntity() {
if(!worldObj.isRemote) {
if(worldObj.getTotalWorldTime() % 20 == 0) {
FluidType[] types = new FluidType[] {Fluids.SMOKE, Fluids.SMOKE_LEADED, Fluids.SMOKE_POISON};
for(FluidType type : types) {
this.trySubscribe(type, worldObj, xCoord + 2, yCoord, zCoord, Library.POS_X);
this.trySubscribe(type, worldObj, xCoord - 2, yCoord, zCoord, Library.NEG_X);
this.trySubscribe(type, worldObj, xCoord, yCoord, zCoord + 2, Library.POS_Z);
this.trySubscribe(type, worldObj, xCoord, yCoord, zCoord - 2, Library.NEG_Z);
}
}
NBTTagCompound data = new NBTTagCompound();
data.setInteger("onTicks", onTicks);
INBTPacketReceiver.networkPack(this, data, 150);
if(onTicks > 0) onTicks--;
} else {
if(onTicks > 0) {
public void spawnParticles() {
if(worldObj.getTotalWorldTime() % 2 == 0) {
NBTTagCompound fx = new NBTTagCompound();
fx.setString("type", "tower");
fx.setFloat("lift", 10F);
fx.setFloat("base", 0.5F);
fx.setFloat("max", 3F);
fx.setInteger("life", 250 + worldObj.rand.nextInt(50));
fx.setInteger("color",0x404040);
fx.setDouble("posX", xCoord + 0.5);
fx.setDouble("posY", yCoord + 12);
fx.setDouble("posZ", zCoord + 0.5);
MainRegistry.proxy.effectNT(fx);
}
}
if(worldObj.getTotalWorldTime() % 2 == 0) {
NBTTagCompound fx = new NBTTagCompound();
fx.setString("type", "tower");
fx.setFloat("lift", 10F);
fx.setFloat("base", 0.5F);
fx.setFloat("max", 3F);
fx.setInteger("life", 250 + worldObj.rand.nextInt(50));
fx.setInteger("color",0x404040);
fx.setDouble("posX", xCoord + 0.5);
fx.setDouble("posY", yCoord + 12);
fx.setDouble("posZ", zCoord + 0.5);
MainRegistry.proxy.effectNT(fx);
}
}
public void networkUnpack(NBTTagCompound nbt) {
this.onTicks = nbt.getInteger("onTicks");
}
@Override
public boolean canConnect(FluidType type, ForgeDirection dir) {
return (dir == ForgeDirection.NORTH || dir == ForgeDirection.SOUTH || dir == ForgeDirection.EAST || dir == ForgeDirection.WEST) &&
(type == Fluids.SMOKE || type == Fluids.SMOKE_LEADED || type == Fluids.SMOKE_POISON);
}
@Override
public long transferFluid(FluidType type, int pressure, long fluid) {
onTicks = 20;
fluid *= 0.25;
if(type == Fluids.SMOKE) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.SOOT, fluid / 100F);
if(type == Fluids.SMOKE_LEADED) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.HEAVYMETAL, fluid / 100F);
if(type == Fluids.SMOKE_POISON) PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, PollutionType.POISON, fluid / 100F);
return 0;
}
@Override
public long getDemand(FluidType type, int pressure) {
return 1_000_000;
}
@Override
public FluidTank[] getAllTanks() {
return new FluidTank[] {};
public double getPollutionMod() {
return 0.25D;
}
AxisAlignedBB bb = null;

View File

@ -0,0 +1,59 @@
package com.hbm.tileentity.machine;
import com.hbm.main.MainRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
public class TileEntityChimneyIndustrial extends TileEntityChimneyBase {
@Override
public void spawnParticles() {
if(worldObj.getTotalWorldTime() % 2 == 0) {
NBTTagCompound fx = new NBTTagCompound();
fx.setString("type", "tower");
fx.setFloat("lift", 10F);
fx.setFloat("base", 0.75F);
fx.setFloat("max", 3F);
fx.setInteger("life", 250 + worldObj.rand.nextInt(50));
fx.setInteger("color",0x404040);
fx.setDouble("posX", xCoord + 0.5);
fx.setDouble("posY", yCoord + 22);
fx.setDouble("posZ", zCoord + 0.5);
MainRegistry.proxy.effectNT(fx);
}
}
@Override
public double getPollutionMod() {
return 0.25D;
}
AxisAlignedBB bb = null;
@Override
public AxisAlignedBB getRenderBoundingBox() {
if(bb == null) {
bb = AxisAlignedBB.getBoundingBox(
xCoord - 1,
yCoord,
zCoord - 1,
xCoord + 2,
yCoord + 23,
zCoord + 2
);
}
return bb;
}
@Override
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared() {
return 65536.0D;
}
}

View File

@ -213,7 +213,7 @@ public abstract class TileEntityMachineAssemblerBase extends TileEntityMachineBa
}
}
if(!found) return;
if(!found) break outer;
}
}
}

View File

@ -396,8 +396,8 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements
}
}
}
if(!found) return;
if(!found) break outer;
}
}
}

View File

@ -246,8 +246,8 @@ public abstract class TileEntityMachineChemplantBase extends TileEntityMachineBa
}
}
}
if(!found) return;
if(!found) break outer;
}
}
}

View File

@ -3664,6 +3664,9 @@ tile.charger.name=Ladestation
tile.cheater_virus.name=Geliertes Euphemium
tile.cheater_virus_seed.name=Instabiler Euphemiumschrabid-Block
tile.chimney_brick.name=Schornstein
tile.chimney_brick.desc=Kann mit Abgasrohren verbunden werden$Reduziert Abgas um 75%%
tile.chimney_industrial.name=Industrieschornstein
tile.chimney_industrial.desc=Kann mit Abgasrohren verbunden werden$Reduziert Abgas um 90%%
tile.chlorine_gas.name=Chlorgas
tile.cluster_aluminium.name=Aluminiumerzcluster
tile.cluster_copper.name=Kupfererzcluster

View File

@ -4611,6 +4611,9 @@ tile.charger.name=Charging Station
tile.cheater_virus.name=Gelid Euphemium
tile.cheater_virus_seed.name=Unstable Euphemium Schrabide Block
tile.chimney_brick.name=Smokestack
tile.chimney_brick.desc=Connect using exhaust pipes to polluting machines$Reduces pollution emission by 75%%
tile.chimney_industrial.name=Industrial Smokestack
tile.chimney_industrial.desc=Connect using exhaust pipes to polluting machines$Reduces pollution emission by 90%%
tile.chlorine_gas.name=Chlorine Gas
tile.cluster_aluminium.name=Aluminium Ore Cluster
tile.cluster_copper.name=Copper Ore Cluster

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB