connected pain has finally ended

This commit is contained in:
Bob 2021-10-07 19:32:04 +02:00
parent 0da3781cff
commit d19e073c41
31 changed files with 187 additions and 45 deletions

View File

@ -1423,12 +1423,12 @@ public class ModBlocks {
block_cap_star = new BlockCap(Material.iron, RefStrings.MODID + ":block_cap_star_top").setStepSound(Block.soundTypeMetal).setBlockName("block_cap_star").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":block_cap_star");
deco_titanium = new BlockOre(Material.iron).setBlockName("deco_titanium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_titanium");
deco_red_copper = new BlockOre(Material.iron).setBlockName("deco_red_copper").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_red_copper");
deco_tungsten = new BlockOre(Material.iron).setBlockName("deco_tungsten").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_tungsten");
deco_aluminium = new BlockOre(Material.iron).setBlockName("deco_aluminium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_aluminium");
deco_steel = new BlockOre(Material.iron).setBlockName("deco_steel").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_steel");
deco_lead = new BlockOre(Material.iron).setBlockName("deco_lead").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_lead");
deco_beryllium = new BlockOre(Material.iron).setBlockName("deco_beryllium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_beryllium");
deco_red_copper = new BlockDecoCT(Material.iron).setBlockName("deco_red_copper").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_red_copper");
deco_tungsten = new BlockDecoCT(Material.iron).setBlockName("deco_tungsten").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_tungsten");
deco_aluminium = new BlockDecoCT(Material.iron).setBlockName("deco_aluminium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_aluminium");
deco_steel = new BlockDecoCT(Material.iron).setBlockName("deco_steel").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_steel");
deco_lead = new BlockDecoCT(Material.iron).setBlockName("deco_lead").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_lead");
deco_beryllium = new BlockDecoCT(Material.iron).setBlockName("deco_beryllium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_beryllium");
deco_asbestos = new BlockOutgas(Material.cloth, true, 5, true).setBlockName("deco_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_asbestos");
deco_rbmk = new BlockGeneric(Material.iron).setBlockName("deco_rbmk").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_side");
deco_rbmk_smooth = new BlockGeneric(Material.iron).setBlockName("deco_rbmk_smooth").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":rbmk/rbmk_top");
@ -1441,7 +1441,7 @@ public class ModBlocks {
asphalt_light = new BlockSpeedy(Material.rock, 1.15).setBlockName("asphalt_light").setCreativeTab(MainRegistry.blockTab).setLightLevel(1F).setHardness(15.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":asphalt_light");
reinforced_brick = new BlockGeneric(Material.rock).setBlockName("reinforced_brick").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(8000.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_brick");
reinforced_glass = new BlockNTMGlass(0, RefStrings.MODID + ":reinforced_glass", Material.rock).setBlockName("reinforced_glass").setCreativeTab(MainRegistry.blockTab).setLightOpacity(0).setHardness(15.0F).setResistance(200.0F);
reinforced_glass = new BlockNTMGlassCT(0, RefStrings.MODID + ":reinforced_glass", Material.rock).setBlockName("reinforced_glass").setCreativeTab(MainRegistry.blockTab).setLightOpacity(0).setHardness(15.0F).setResistance(200.0F);
reinforced_light = new BlockGeneric(Material.rock).setBlockName("reinforced_light").setCreativeTab(MainRegistry.blockTab).setLightLevel(1.0F).setHardness(15.0F).setResistance(300.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_light");
reinforced_sand = new BlockGeneric(Material.rock).setBlockName("reinforced_sand").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(400.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_sand");
reinforced_lamp_off = new ReinforcedLamp(Material.rock, false).setBlockName("reinforced_lamp_off").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(300.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_lamp_off");

View File

@ -0,0 +1,37 @@
package com.hbm.blocks.generic;
import com.hbm.render.block.ct.CT;
import com.hbm.render.block.ct.CTStitchReceiver;
import com.hbm.render.block.ct.IBlockCT;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
public class BlockDecoCT extends BlockOre implements IBlockCT{
public BlockDecoCT(Material mat) {
super(mat);
}
@Override
public int getRenderType() {
return CT.renderID;
}
@SideOnly(Side.CLIENT)
public CTStitchReceiver rec;
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
this.blockIcon = reg.registerIcon(this.getTextureName());
this.rec = IBlockCT.primeReceiver(reg, this.getTextureName(), this.blockIcon);
}
@Override
public IIcon[] getFragments() {
return rec.fragCache;
}
}

View File

@ -0,0 +1,41 @@
package com.hbm.blocks.generic;
import com.hbm.render.block.ct.CT;
import com.hbm.render.block.ct.CTStitchReceiver;
import com.hbm.render.block.ct.IBlockCT;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
public class BlockNTMGlassCT extends BlockNTMGlass implements IBlockCT {
public BlockNTMGlassCT(int layer, String name, Material material) {
super(layer, name, material);
}
public BlockNTMGlassCT(int layer, String name, Material material, boolean doesDrop) {
super(layer, name, material, doesDrop);
}
@Override
public int getRenderType() {
return CT.renderID;
}
@SideOnly(Side.CLIENT)
public CTStitchReceiver rec;
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
super.registerBlockIcons(reg);
this.rec = IBlockCT.primeReceiver(reg, this.blockIcon.getIconName(), this.blockIcon);
}
@Override
public IIcon[] getFragments() {
return rec.fragCache;
}
}

View File

@ -1,9 +1,18 @@
package com.hbm.blocks.machine;
import com.hbm.render.block.ct.CT;
import com.hbm.render.block.ct.CTStitchReceiver;
import com.hbm.render.block.ct.IBlockCT;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
public class BlockHadronCoil extends Block {
public class BlockHadronCoil extends Block implements IBlockCT {
public int factor;
@ -11,4 +20,28 @@ public class BlockHadronCoil extends Block {
super(mat);
this.factor = factor;
}
@Override
public int getRenderType() {
return CT.renderID;
}
@SideOnly(Side.CLIENT)
public CTStitchReceiver rec;
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
this.blockIcon = reg.registerIcon(this.getTextureName());
this.rec = IBlockCT.primeReceiver(reg, this.getTextureName(), this.blockIcon);
}
@Override
public IIcon[] getFragments() {
return rec.fragCache;
}
@Override
public boolean canConnect(IBlockAccess world, int x, int y, int z, IBlockCT block) {
return block instanceof BlockHadronCoil;
}
}

View File

@ -1,21 +0,0 @@
package com.hbm.blocks.machine;
import com.hbm.tileentity.conductor.TileEntityWireCoated;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class WireCoated extends BlockContainer {
public WireCoated(Material p_i45386_1_) {
super(p_i45386_1_);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityWireCoated();
}
}

View File

@ -0,0 +1,46 @@
package com.hbm.blocks.network;
import com.hbm.render.block.ct.CT;
import com.hbm.render.block.ct.CTStitchReceiver;
import com.hbm.render.block.ct.IBlockCT;
import com.hbm.tileentity.conductor.TileEntityWireCoated;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class WireCoated extends BlockContainer implements IBlockCT {
public WireCoated(Material p_i45386_1_) {
super(p_i45386_1_);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityWireCoated();
}
@Override
public int getRenderType() {
return CT.renderID;
}
@SideOnly(Side.CLIENT)
public CTStitchReceiver rec;
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
this.blockIcon = reg.registerIcon(this.getTextureName());
this.rec = IBlockCT.primeReceiver(reg, this.getTextureName(), this.blockIcon);
}
@Override
public IIcon[] getFragments() {
return rec.fragCache;
}
}

View File

@ -1,5 +1,6 @@
package com.hbm.blocks.test;
import com.hbm.render.block.ct.CT;
import com.hbm.render.block.ct.CTStitchReceiver;
import com.hbm.render.block.ct.IBlockCT;
@ -16,12 +17,10 @@ public class TestCT extends Block implements IBlockCT {
public TestCT(Material p_i45394_1_) {
super(p_i45394_1_);
}
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
@Override
public int getRenderType() {
return renderID;
return CT.renderID;
}
@Override

View File

@ -27,7 +27,9 @@ public class HazardTypeRadiation extends HazardTypeBase {
if(target instanceof EntityPlayer && !GeneralConfig.enable528)
reacher = ((EntityPlayer) target).inventory.hasItem(ModItems.reacher);
level *= stack.stackSize;
if(level > 0) {
float rad = level / 20F;

View File

@ -1,6 +1,6 @@
package com.hbm.render.block;
import com.hbm.blocks.test.TestCT;
import com.hbm.render.block.ct.CT;
import com.hbm.render.block.ct.CTContext;
import com.hbm.render.block.ct.RenderBlocksCT;
@ -8,7 +8,6 @@ import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class RenderBlockCT implements ISimpleBlockRenderingHandler {
@ -37,6 +36,6 @@ public class RenderBlockCT implements ISimpleBlockRenderingHandler {
@Override
public int getRenderId() {
return TestCT.renderID;
return CT.renderID;
}
}

View File

@ -3,6 +3,8 @@ package com.hbm.render.block.ct;
import java.util.ArrayList;
import java.util.List;
import cpw.mods.fml.client.registry.RenderingRegistry;
public class CT {
/* LEXICAL ORDER */
@ -75,6 +77,8 @@ public class CT {
return i >= v && i < v + 4;
}
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
/* _____________________
* / I am in great pain. \
* \ Please kill me. /

View File

@ -3,7 +3,6 @@ package com.hbm.render.block.ct;
import net.minecraft.block.Block;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import static com.hbm.render.block.ct.CT.*;
@ -16,12 +15,12 @@ public class CTContext {
//dim 2: 8x neighbors (TL, TC, TR, CL, CR, BL, BC, BR)
//dim 3: 3x coord (x/y/z, [-1;1])
public static int[][][] access = new int[][][] {
lcfs(ForgeDirection.NORTH, ForgeDirection.EAST), //DOWN guess
lcfs(ForgeDirection.SOUTH, ForgeDirection.EAST), //UP guess
lcfs(ForgeDirection.SOUTH, ForgeDirection.WEST), //DOWN guess
lcfs(ForgeDirection.NORTH, ForgeDirection.WEST), //UP guess
lcfs(ForgeDirection.UP, ForgeDirection.EAST), //NORTH
lcfs(ForgeDirection.UP, ForgeDirection.WEST), //SOUTH
lcfs(ForgeDirection.UP, ForgeDirection.NORTH), //WEST
lcfs(ForgeDirection.UP, ForgeDirection.EAST) //EAST
lcfs(ForgeDirection.UP, ForgeDirection.SOUTH) //EAST
};
//lexical coordinates from side

View File

@ -43,6 +43,11 @@ public class RenderBlocksCT extends RenderBlocks {
if(!this.enableAO)
return;
/*this.tl = new VertInfo(this.colorRedTopLeft, this.colorGreenTopLeft, this.colorBlueTopLeft, this.brightnessTopLeft);
this.tr = new VertInfo(this.colorRedTopRight, this.colorGreenTopRight, this.colorBlueTopRight, this.brightnessTopRight);
this.bl = new VertInfo(this.colorRedBottomLeft, this.colorGreenBottomLeft, this.colorBlueBottomLeft, this.brightnessBottomLeft);
this.br = new VertInfo(this.colorRedBottomRight, this.colorGreenBottomRight, this.colorBlueBottomRight, this.brightnessBottomRight);*/
this.tl = new VertInfo(this.colorRedTopLeft, this.colorGreenTopLeft, this.colorBlueTopLeft, this.brightnessTopLeft);
this.tr = new VertInfo(this.colorRedTopRight, this.colorGreenTopRight, this.colorBlueTopRight, this.brightnessTopRight);
this.bl = new VertInfo(this.colorRedBottomLeft, this.colorGreenBottomLeft, this.colorBlueBottomLeft, this.brightnessBottomLeft);
@ -180,10 +185,10 @@ public class RenderBlocksCT extends RenderBlocks {
double[] fcr = avgCoords(ftr, fbr);
double[] fcc = avgCoords(ftc, fbc);
IIcon atl = ModBlocks.block_steel.getIcon(0, 0);
/*IIcon atl = ModBlocks.block_steel.getIcon(0, 0);
IIcon atr = ModBlocks.block_copper.getIcon(0, 0);
IIcon abl = ModBlocks.block_tungsten.getIcon(0, 0);
IIcon abr = ModBlocks.block_aluminium.getIcon(0, 0);
IIcon abr = ModBlocks.block_aluminium.getIcon(0, 0);*/
/*drawSubFace(ftl, this.tl, ftc, this.tc, fcl, this.cl, fcc, this.cc, atl);
drawSubFace(ftc, this.tc, ftr, this.tr, fcc, this.cc, fcr, this.cr, atr);
@ -201,8 +206,6 @@ public class RenderBlocksCT extends RenderBlocks {
boolean debugColor = false;
System.out.println(icon.getIconName());
/// ORDER: I DON'T FUCKING KNOW AT THIS POINT ///
if(debugColor) tess.setColorOpaque_F(1F, 1F, 0F);
drawVert(ftr, icon.getMaxU(), icon.getMinV(), ntr);

View File

@ -93,7 +93,7 @@ public class TileEntityMachineFrackingTower extends TileEntityOilDrillBase imple
this.tanks[2].setFill(tanks[2].getFill() - 10);
for(int i = 0; i < 100; i++) {
for(int i = 0; i < 10; i++) {
int rX = xCoord + (int)(worldObj.rand.nextGaussian() * 75);
int rZ = zCoord + (int)(worldObj.rand.nextGaussian() * 75);
int rY = worldObj.getHeightValue(rX, rZ) - 1;

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 898 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 896 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 B

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 439 B

After

Width:  |  Height:  |  Size: 643 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 B

After

Width:  |  Height:  |  Size: 864 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B