From 3dfd657c27f0efe2e20841a3e93a92c7881e8f6f Mon Sep 17 00:00:00 2001 From: miozune Date: Sun, 10 Sep 2023 16:26:06 +0900 Subject: Remove Space Elevator things --- src/main/java/client/ClientProxy.java | 8 - .../java/client/renderer/TESR_SECapacitor.java | 78 ------- src/main/java/client/renderer/TESR_SETether.java | 79 ------- src/main/java/common/Blocks.java | 3 - src/main/java/common/TileEntities.java | 2 - .../java/common/blocks/Block_SpaceElevator.java | 62 ----- .../blocks/Block_SpaceElevatorCapacitor.java | 82 ------- .../common/blocks/Block_SpaceElevatorTether.java | 67 ------ .../java/common/itemBlocks/IB_SpaceElevator.java | 37 --- .../itemBlocks/IB_SpaceElevatorCapacitor.java | 22 -- .../common/tileentities/GTMTE_SpaceElevator.java | 260 --------------------- .../tileentities/TE_SpaceElevatorCapacitor.java | 53 ----- .../tileentities/TE_SpaceElevatorTether.java | 24 -- src/main/resources/assets/kekztech/lang/en_US.lang | 8 - src/main/resources/assets/kekztech/lang/zh_CN.lang | 8 - .../assets/kekztech/textures/blocks/CoilHolder.png | Bin 228 -> 0 bytes .../textures/blocks/SpaceElevatorBase_side.png | Bin 242 -> 0 bytes .../textures/blocks/SpaceElevatorBase_top.png | Bin 203 -> 0 bytes .../blocks/SpaceElevatorCapacitor_side_0.png | Bin 184 -> 0 bytes .../SpaceElevatorCapacitor_side_fullbase.png | Bin 183 -> 0 bytes .../SpaceElevatorCapacitor_side_renderbase.png | Bin 171 -> 0 bytes .../blocks/SpaceElevatorCapacitor_top_fullbase.png | Bin 213 -> 0 bytes .../kekztech/textures/blocks/Tether_side.png | Bin 169 -> 0 bytes 23 files changed, 793 deletions(-) delete mode 100644 src/main/java/client/renderer/TESR_SECapacitor.java delete mode 100644 src/main/java/client/renderer/TESR_SETether.java delete mode 100644 src/main/java/common/blocks/Block_SpaceElevator.java delete mode 100644 src/main/java/common/blocks/Block_SpaceElevatorCapacitor.java delete mode 100644 src/main/java/common/blocks/Block_SpaceElevatorTether.java delete mode 100644 src/main/java/common/itemBlocks/IB_SpaceElevator.java delete mode 100644 src/main/java/common/itemBlocks/IB_SpaceElevatorCapacitor.java delete mode 100644 src/main/java/common/tileentities/GTMTE_SpaceElevator.java delete mode 100644 src/main/java/common/tileentities/TE_SpaceElevatorCapacitor.java delete mode 100644 src/main/java/common/tileentities/TE_SpaceElevatorTether.java delete mode 100644 src/main/resources/assets/kekztech/textures/blocks/CoilHolder.png delete mode 100644 src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorBase_side.png delete mode 100644 src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorBase_top.png delete mode 100644 src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorCapacitor_side_0.png delete mode 100644 src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorCapacitor_side_fullbase.png delete mode 100644 src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorCapacitor_side_renderbase.png delete mode 100644 src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorCapacitor_top_fullbase.png delete mode 100644 src/main/resources/assets/kekztech/textures/blocks/Tether_side.png diff --git a/src/main/java/client/ClientProxy.java b/src/main/java/client/ClientProxy.java index 50b78a4d0a..9dfaea0d33 100644 --- a/src/main/java/client/ClientProxy.java +++ b/src/main/java/client/ClientProxy.java @@ -1,12 +1,7 @@ package client; import common.CommonProxy; -import common.tileentities.TE_SpaceElevatorCapacitor; -import common.tileentities.TE_SpaceElevatorTether; -import client.renderer.TESR_SECapacitor; -import client.renderer.TESR_SETether; -import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -15,9 +10,6 @@ public class ClientProxy extends CommonProxy { @Override public void preInit(final FMLPreInitializationEvent e) { super.preInit(e); - // Register TESR - ClientRegistry.bindTileEntitySpecialRenderer(TE_SpaceElevatorTether.class, new TESR_SETether()); - ClientRegistry.bindTileEntitySpecialRenderer(TE_SpaceElevatorCapacitor.class, new TESR_SECapacitor()); } @Override diff --git a/src/main/java/client/renderer/TESR_SECapacitor.java b/src/main/java/client/renderer/TESR_SECapacitor.java deleted file mode 100644 index 0da33dee66..0000000000 --- a/src/main/java/client/renderer/TESR_SECapacitor.java +++ /dev/null @@ -1,78 +0,0 @@ -package client.renderer; - -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; - -import common.tileentities.TE_SpaceElevatorCapacitor; - -import kekztech.KekzCore; - -public class TESR_SECapacitor extends TileEntitySpecialRenderer { - - private static final ResourceLocation capSide = new ResourceLocation( - KekzCore.MODID, - "textures/blocks/SpaceElevatorCapacitor_side_renderbase.png"); - - @Override - public void renderTileEntityAt(TileEntity te, double x, double y, double z, float partialTick) { - final Tessellator tessellator = Tessellator.instance; - final TE_SpaceElevatorCapacitor teCap = (TE_SpaceElevatorCapacitor) te; - // Setup vertices - final double fbr_x = x + 1; - final double fbr_z = z + 1; - - final double ftr_y = y + 1; - - final double uv_a_u = 1.0D; - final double uv_a_v = 1.0D; - - final double uv_b_u = 1.0D; - final double uv_b_v = 0.0D; - - final double uv_c_u = 0.0D; - final double uv_c_v = 0.0D; - - final double uv_d_u = 0.0D; - final double uv_d_v = 1.0D; - // Render sides - super.bindTexture(capSide); - - // Prepare Tessellator - tessellator.startDrawingQuads(); - // Render the caps as red if there are maintenance issues - if (teCap.isDamaged()) { - final float wave = (float) Math.abs(Math.sin((te.getWorldObj().getTotalWorldTime() + partialTick) / 20.0D)); - final int redSat = 64 + (int) Math.ceil(191 * wave); - tessellator.setColorRGBA(redSat, 0, 0, 255); - } else { - final int sat = (int) Math.ceil(teCap.getChargeLevel() * 255); - tessellator.setColorRGBA(0, 0, sat, 255); - } - tessellator.setBrightness(255); - // (DOWN and UP faces are not rendered as they will not ever be visible in the Space Elevator structure) - // NORTH - tessellator.addVertexWithUV(x, y, z, uv_a_u, uv_a_v); - tessellator.addVertexWithUV(x, ftr_y, z, uv_b_u, uv_b_v); - tessellator.addVertexWithUV(fbr_x, ftr_y, z, uv_c_u, uv_c_v); - tessellator.addVertexWithUV(fbr_x, y, z, uv_d_u, uv_d_v); - // SOUTH - tessellator.addVertexWithUV(fbr_x, y, fbr_z, uv_a_u, uv_a_v); - tessellator.addVertexWithUV(fbr_x, ftr_y, fbr_z, uv_b_u, uv_b_v); - tessellator.addVertexWithUV(x, ftr_y, fbr_z, uv_c_u, uv_c_v); - tessellator.addVertexWithUV(x, y, fbr_z, uv_d_u, uv_d_v); - // WEST - tessellator.addVertexWithUV(x, y, fbr_z, uv_a_u, uv_a_v); - tessellator.addVertexWithUV(x, ftr_y, fbr_z, uv_b_u, uv_b_v); - tessellator.addVertexWithUV(x, ftr_y, z, uv_c_u, uv_c_v); - tessellator.addVertexWithUV(x, y, z, uv_d_u, uv_d_v); - // EAST - tessellator.addVertexWithUV(fbr_x, y, z, uv_a_u, uv_a_v); - tessellator.addVertexWithUV(fbr_x, ftr_y, z, uv_b_u, uv_b_v); - tessellator.addVertexWithUV(fbr_x, ftr_y, fbr_z, uv_c_u, uv_c_v); - tessellator.addVertexWithUV(fbr_x, y, fbr_z, uv_d_u, uv_d_v); - // Draw! - tessellator.draw(); - } -} diff --git a/src/main/java/client/renderer/TESR_SETether.java b/src/main/java/client/renderer/TESR_SETether.java deleted file mode 100644 index 5d5c0581c1..0000000000 --- a/src/main/java/client/renderer/TESR_SETether.java +++ /dev/null @@ -1,79 +0,0 @@ -package client.renderer; - -import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import kekztech.KekzCore; - -public class TESR_SETether extends TileEntitySpecialRenderer { - - private static final ResourceLocation tetherBeamTexture = new ResourceLocation( - KekzCore.MODID, - "textures/effects/Tether_beam.png"); - - @Override - public void renderTileEntityAt(TileEntity te, double x, double y, double z, float partialTick) { - float beamLengthScale = 1.0F; // [0.0F, 1.0F] -> linear scale from 0 to 256 - GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F); - - // Get Tessellator instance - final Tessellator tessellator = Tessellator.instance; - // Bind beam texture and set texture params - super.bindTexture(tetherBeamTexture); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F); - GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); - // Set render flags for inner beam - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_CULL_FACE); - GL11.glDisable(GL11.GL_BLEND); - GL11.glDepthMask(true); - OpenGlHelper.glBlendFunc(770, 1, 1, 0); - // Prepare Tessellator - tessellator.startDrawingQuads(); - tessellator.setColorRGBA(255, 255, 255, 32); - // Variables stuff II - final double halfBeamWidth = 0.38D; - final double d_rot1 = 0.5D + Math.cos(2.356194490192345D) * halfBeamWidth; // rotates the beam... - final double d_rot2 = 0.5D + Math.sin(2.356194490192345D) * halfBeamWidth; - final double d_rot3 = 0.5D + Math.cos((Math.PI / 4D)) * halfBeamWidth; - final double d_rot4 = 0.5D + Math.sin((Math.PI / 4D)) * halfBeamWidth; - final double d_rot5 = 0.5D + Math.cos(3.9269908169872414D) * halfBeamWidth; - final double d_rot6 = 0.5D + Math.sin(3.9269908169872414D) * halfBeamWidth; - final double d_rot7 = 0.5D + Math.cos(5.497787143782138D) * halfBeamWidth; - final double d_rot8 = 0.5D + Math.sin(5.497787143782138D) * halfBeamWidth; // ...until here - final double height = 256.0F * beamLengthScale; - final double uv_x1 = 0.0D; - final double uv_x2 = 1.0D; - final double uv_y1 = -1.0D; // This makes the beam stream upwards if you add a time sensitive number to it - final double uv_y2 = (double) (256.0F * beamLengthScale) * (0.5D / halfBeamWidth) + uv_y1; - // Construct mesh with texture - tessellator.addVertexWithUV(x + d_rot1, y + height, z + d_rot2, uv_x2, uv_y2); - tessellator.addVertexWithUV(x + d_rot1, y, z + d_rot2, uv_x2, uv_y1); - tessellator.addVertexWithUV(x + d_rot3, y, z + d_rot4, uv_x1, uv_y1); - tessellator.addVertexWithUV(x + d_rot3, y + height, z + d_rot4, uv_x1, uv_y2); - tessellator.addVertexWithUV(x + d_rot7, y + height, z + d_rot8, uv_x2, uv_y2); - tessellator.addVertexWithUV(x + d_rot7, y, z + d_rot8, uv_x2, uv_y1); - tessellator.addVertexWithUV(x + d_rot5, y, z + d_rot6, uv_x1, uv_y1); - tessellator.addVertexWithUV(x + d_rot5, y + height, z + d_rot6, uv_x1, uv_y2); - tessellator.addVertexWithUV(x + d_rot3, y + height, z + d_rot4, uv_x2, uv_y2); - tessellator.addVertexWithUV(x + d_rot3, y, z + d_rot4, uv_x2, uv_y1); - tessellator.addVertexWithUV(x + d_rot7, y, z + d_rot8, uv_x1, uv_y1); - tessellator.addVertexWithUV(x + d_rot7, y + height, z + d_rot8, uv_x1, uv_y2); - tessellator.addVertexWithUV(x + d_rot5, y + height, z + d_rot6, uv_x2, uv_y2); - tessellator.addVertexWithUV(x + d_rot5, y, z + d_rot6, uv_x2, uv_y1); - tessellator.addVertexWithUV(x + d_rot1, y, z + d_rot2, uv_x1, uv_y1); - tessellator.addVertexWithUV(x + d_rot1, y + height, z + d_rot2, uv_x1, uv_y2); - // Draw! - tessellator.draw(); - - // Reset render flags - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_TEXTURE_2D); - GL11.glDepthMask(true); - } -} diff --git a/src/main/java/common/Blocks.java b/src/main/java/common/Blocks.java index f43482b909..d2fb863968 100644 --- a/src/main/java/common/Blocks.java +++ b/src/main/java/common/Blocks.java @@ -23,9 +23,6 @@ public class Blocks { public static Block jarThaumiumReinforced; public static Block jarIchor; public static Block lscLapotronicEnergyUnit; - public static Block spaceElevatorStructure; - public static Block spaceElevatorCapacitor; - public static Block spaceElevatorTether; public static Block largeHexPlate; diff --git a/src/main/java/common/TileEntities.java b/src/main/java/common/TileEntities.java index 9ad4fdb99f..0825b872f0 100644 --- a/src/main/java/common/TileEntities.java +++ b/src/main/java/common/TileEntities.java @@ -3,7 +3,6 @@ package common; import common.tileentities.GTMTE_LapotronicSuperCapacitor; import common.tileentities.GTMTE_SOFuelCellMK1; import common.tileentities.GTMTE_SOFuelCellMK2; -import common.tileentities.GTMTE_SpaceElevator; import common.tileentities.GTMTE_TFFT; import common.tileentities.GTMTE_TFFTHatch; import common.tileentities.TE_IchorJar; @@ -21,7 +20,6 @@ public class TileEntities { // public static GTMTE_ModularNuclearReactor mdr; public static GTMTE_TFFT tfft; public static GTMTE_LapotronicSuperCapacitor lsc; - public static GTMTE_SpaceElevator se; // Singleblocks public static GTMTE_TFFTHatch tfftHatch; diff --git a/src/main/java/common/blocks/Block_SpaceElevator.java b/src/main/java/common/blocks/Block_SpaceElevator.java deleted file mode 100644 index 2f491db0a4..0000000000 --- a/src/main/java/common/blocks/Block_SpaceElevator.java +++ /dev/null @@ -1,62 +0,0 @@ -package common.blocks; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -import common.itemBlocks.IB_SpaceElevator; - -import cpw.mods.fml.common.registry.GameRegistry; - -public class Block_SpaceElevator extends BaseGTUpdateableBlock { - - private static final Block_SpaceElevator INSTANCE = new Block_SpaceElevator(); - - private IIcon baseTop; - private IIcon baseSide; - private IIcon coilHolder; - - private Block_SpaceElevator() { - super(Material.iron); - } - - public static Block registerBlock() { - final String blockName = "kekztech_spaceelevator_block"; - INSTANCE.setBlockName(blockName); - INSTANCE.setCreativeTab(CreativeTabs.tabMisc); - INSTANCE.setHardness(7.0f); - INSTANCE.setResistance(10.0f); - GameRegistry.registerBlock(INSTANCE, IB_SpaceElevator.class, blockName); - - return INSTANCE; - } - - @Override - public void registerBlockIcons(IIconRegister ir) { - baseTop = ir.registerIcon("kekztech:SpaceElevatorBase_top"); - baseSide = ir.registerIcon("kekztech:SpaceElevatorBase_side"); - coilHolder = ir.registerIcon("kekztech:CoilHolder"); - } - - @Override - @SuppressWarnings({ "unchecked" }) - public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { - par3List.add(new ItemStack(par1, 1, 0)); - par3List.add(new ItemStack(par1, 1, 1)); - } - - @Override - public IIcon getIcon(int side, int meta) { - if (meta == 0) { - return (side < 2) ? baseTop : baseSide; - } else { - return coilHolder; - } - } -} diff --git a/src/main/java/common/blocks/Block_SpaceElevatorCapacitor.java b/src/main/java/common/blocks/Block_SpaceElevatorCapacitor.java deleted file mode 100644 index b6816ba7e8..0000000000 --- a/src/main/java/common/blocks/Block_SpaceElevatorCapacitor.java +++ /dev/null @@ -1,82 +0,0 @@ -package common.blocks; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import common.itemBlocks.IB_SpaceElevatorCapacitor; -import common.tileentities.TE_SpaceElevatorCapacitor; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class Block_SpaceElevatorCapacitor extends BaseGTUpdateableBlock { - - private static final Block_SpaceElevatorCapacitor INSTANCE = new Block_SpaceElevatorCapacitor(); - - private IIcon top; - private IIcon side; - - private Block_SpaceElevatorCapacitor() { - super(Material.iron); - } - - public static Block registerBlock() { - final String blockName = "kekztech_spaceelevatorcapacitor_block"; - INSTANCE.setBlockName(blockName); - INSTANCE.setCreativeTab(CreativeTabs.tabMisc); - INSTANCE.setHardness(5.0f); - INSTANCE.setResistance(3.0f); - GameRegistry.registerBlock(INSTANCE, IB_SpaceElevatorCapacitor.class, blockName); - - return INSTANCE; - } - - @Override - public void registerBlockIcons(IIconRegister ir) { - top = ir.registerIcon("kekztech:SpaceElevatorCapacitor_top_fullbase"); - side = ir.registerIcon("kekztech:SpaceElevatorCapacitor_side_fullbase"); - } - - @Override - public IIcon getIcon(int side, int meta) { - return (side < 2) ? this.top : this.side; - } - - @Override - public TileEntity createTileEntity(World world, int p_149915_2_) { - return new TE_SpaceElevatorCapacitor(); - } - - @Override - public boolean hasTileEntity(int metadata) { - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public int getRenderBlockPass() { - return 0; - } - - @Override - public boolean renderAsNormalBlock() { - return false; - } - - @Override - public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) { - return false; - } - - @Override - public int getLightValue() { - return 2; - } -} diff --git a/src/main/java/common/blocks/Block_SpaceElevatorTether.java b/src/main/java/common/blocks/Block_SpaceElevatorTether.java deleted file mode 100644 index c6ed0f54b0..0000000000 --- a/src/main/java/common/blocks/Block_SpaceElevatorTether.java +++ /dev/null @@ -1,67 +0,0 @@ -package common.blocks; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -import common.tileentities.TE_SpaceElevatorTether; - -import cpw.mods.fml.common.registry.GameRegistry; - -public class Block_SpaceElevatorTether extends BaseGTUpdateableBlock { - - private static final Block_SpaceElevatorTether INSTANCE = new Block_SpaceElevatorTether(); - - private IIcon top; - private IIcon side; - - private Block_SpaceElevatorTether() { - super(Material.glass); - } - - public static Block registerBlock() { - final String blockName = "kekztech_spaceelevatortether_block"; - INSTANCE.setBlockName(blockName); - INSTANCE.setCreativeTab(CreativeTabs.tabMisc); - INSTANCE.setHardness(15.0f); - INSTANCE.setResistance(15.0f); - GameRegistry.registerBlock(INSTANCE, blockName); - - return INSTANCE; - } - - @Override - public void registerBlockIcons(IIconRegister ir) { - top = ir.registerIcon("kekztech:Tether_top"); - side = ir.registerIcon("kekztech:Tether_side"); - } - - @Override - public IIcon getIcon(int side, int meta) { - return (side < 2) ? this.top : this.side; - } - - @Override - public TileEntity createTileEntity(World world, int p_149915_2_) { - return new TE_SpaceElevatorTether(); - } - - @Override - public boolean hasTileEntity(int metadata) { - return true; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - public boolean renderAsNormalBlock() { - return false; - } -} diff --git a/src/main/java/common/itemBlocks/IB_SpaceElevator.java b/src/main/java/common/itemBlocks/IB_SpaceElevator.java deleted file mode 100644 index 8b7668207b..0000000000 --- a/src/main/java/common/itemBlocks/IB_SpaceElevator.java +++ /dev/null @@ -1,37 +0,0 @@ -package common.itemBlocks; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; - -public class IB_SpaceElevator extends ItemBlock { - - public IB_SpaceElevator(Block block) { - super(block); - } - - @Override - public int getMetadata(int meta) { - return meta; - } - - @Override - public boolean getHasSubtypes() { - return true; - } - - @Override - public String getUnlocalizedName(ItemStack stack) { - return super.getUnlocalizedName() + "." + stack.getItemDamage(); - } - - @SuppressWarnings("unchecked") - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List lines, boolean advancedTooltips) { - lines.add(StatCollector.translateToLocal("tile.kekztech_spaceelevator_block.desc")); - } -} diff --git a/src/main/java/common/itemBlocks/IB_SpaceElevatorCapacitor.java b/src/main/java/common/itemBlocks/IB_SpaceElevatorCapacitor.java deleted file mode 100644 index fc367ae6a5..0000000000 --- a/src/main/java/common/itemBlocks/IB_SpaceElevatorCapacitor.java +++ /dev/null @@ -1,22 +0,0 @@ -package common.itemBlocks; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.StatCollector; - -public class IB_SpaceElevatorCapacitor extends ItemBlock { - - public IB_SpaceElevatorCapacitor(Block block) { - super(block); - } - - @SuppressWarnings("unchecked") - @Override - public void addInformation(ItemStack stack, EntityPlayer player, List lines, boolean advancedTooltips) { - lines.add(StatCollector.translateToLocal("tile.kekztech_spaceelevatorcapacitor_block.desc")); - } -} diff --git a/src/main/java/common/tileentities/GTMTE_SpaceElevator.java b/src/main/java/common/tileentities/GTMTE_SpaceElevator.java deleted file mode 100644 index 421a2e2760..0000000000 --- a/src/main/java/common/tileentities/GTMTE_SpaceElevator.java +++ /dev/null @@ -1,260 +0,0 @@ -package common.tileentities; - -import java.util.ArrayList; -import java.util.HashSet; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.common.util.ForgeDirection; - -import common.Blocks; - -import gregtech.api.enums.Dyes; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import gregtech.api.objects.GT_RenderedTexture; -import util.Vector3i; -import util.Vector3ic; - -public class GTMTE_SpaceElevator extends GT_MetaTileEntity_MultiBlockBase { - - private static final Block BASE_BLOCK = Blocks.spaceElevatorStructure; - private static final Block CAP_BLOCK = Blocks.spaceElevatorCapacitor; - private static final Block TETHER_BLOCK = Blocks.spaceElevatorTether; - private static final int BASE_META = 0; - private static final int COIL_HOLDER_META = 1; - private static final String glassNameBorosilicate = "BW_GlasBlocks"; - private static final int HATCH_OVERLAY_ID = 16; - - // Scan positions for capacitor banks - // Start with top left bank, clockwise - // Start with top middle pillar within bank, clockwise, middle last - private static final int[] bankOffsetsX = { -7, 5, 5, -7 }; - private static final int[] bankOffsetsY = { -7, -7, 5, 5 }; - private static final int[] scanOffsetsX = { 1, 2, 1, 0, 1 }; - private static final int[] scanOffsetsY = { 0, 1, 2, 1, 1 }; - - private final HashSet capacitors = new HashSet<>(); - private long lastLaunchEUCost = 0; - - public GTMTE_SpaceElevator(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GTMTE_SpaceElevator(String aName) { - super(aName); - } - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity var1) { - return new GTMTE_SpaceElevator((super.mName)); - } - - @Override - public String[] getDescription() { - return new String[] { "Disabled" }; - /* - * final MultiBlockTooltipBuilder b = new MultiBlockTooltipBuilder(); - * b.addInfo("Access for your Space Station!") - * .addInfo("Check out the wiki on my github if you are having trouble with the structure") - * .addInfo("Regenerative Breaking will recover up to X% of the energy spent on launch") - * .addInfo("Energy recovered depends on coil tier: +10% per coil tier, up to 90%") .addSeparator() - * .beginStructureBlock(15, 11, 15) .addController("Bottom Center") - * .addEnergyHatch("Instead of any casing in the bottom floor") - * .addMaintenanceHatch("Instead of any casing in the bottom floor") - * .addCasingInfo("Solid Steel Machine Casing", 320) .addOtherStructurePart("Any EBF coil", - * "40x, have to be all the same") .addOtherStructurePart("Space Elevator Tether", "4x") - * .addOtherStructurePart("Space Elevator Cabin Block", "42x") - * .addOtherStructurePart("Space Elevator Cabin Guide", "8x") .signAndFinalize("Kekzdealer"); - * if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { return b.getInformation(); } else { return - * b.getStructureInformation(); } - */ - } - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing, - int colorIndex, boolean aActive, boolean aRedstone) { - ITexture[] sTexture = new ITexture[] { new GT_RenderedTexture( - Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, - Dyes.getModulation(-1, Dyes._NULL.mRGBa)) }; - if (side == facing && aActive) { - sTexture = new ITexture[] { new GT_RenderedTexture( - Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW, - Dyes.getModulation(-1, Dyes._NULL.mRGBa)) }; - } - return sTexture; - } - - @Override - public boolean isCorrectMachinePart(ItemStack stack) { - return true; - } - - @Override - public boolean checkRecipe(ItemStack stack) { - this.mProgresstime = 1; - this.mMaxProgresstime = 1; - this.mEUt = 0; - this.mEfficiencyIncrease = 10000; - return true; - } - - public Vector3ic rotateOffsetVector(Vector3ic forgeDirection, int x, int y, int z) { - final Vector3i offset = new Vector3i(0, 0, 0); - // either direction on y-axis - if (forgeDirection.y() == -1) { - offset.x = x; - offset.y = z; - offset.z = y; - } - - return offset; - } - - @Override - public boolean checkMachine(IGregTechTileEntity thisController, ItemStack guiSlotItem) { - // Make sure the controller is either facing up or down - if (thisController.getFrontFacing().offsetY != 0) { - return false; - } - - // Figure out the vector for the direction the back face of the controller is facing - final Vector3ic forgeDirection = new Vector3i( - thisController.getBackFacing().offsetX, - thisController.getBackFacing().offsetY, - thisController.getBackFacing().offsetZ); - boolean formationChecklist = true; - int minCasingAmount = 320; - int firstCoilMeta = -1; - capacitors.clear(); - - // Base floor - for (int X = -7; X <= 7; X++) { - for (int Y = -7; Y <= 7; Y++) { - if (X == 0 && Y == 0) { - continue; // Skip controller - } - - final Vector3ic offset = rotateOffsetVector(forgeDirection, X, Y, 0); - final IGregTechTileEntity currentTE = thisController - .getIGregTechTileEntityOffset(offset.x(), offset.y(), offset.z()); - - // Tries to add TE as either of those kinds of hatches. - // The number is the texture index number for the texture that needs to be painted over the hatch - // texture - if (!super.addMaintenanceToMachineList(currentTE, HATCH_OVERLAY_ID) - && !this.addEnergyInputToMachineList(currentTE, HATCH_OVERLAY_ID)) { - - // If it's not a hatch, is it the right casing for this machine? Check block and block meta. - if ((thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == BASE_BLOCK) - && (thisController.getMetaIDOffset(offset.x(), offset.y(), offset.z()) == BASE_META)) { - // Seems to be valid casing. Decrement counter. - minCasingAmount--; - } else { - formationChecklist = false; - } - } - } - } - System.out.println(""); - // Capacitor banks - for (int bank = 0; bank < 4; bank++) { - for (int Z = 1; Z <= 5; Z++) { - for (int scan = 0; scan < 5; scan++) { - final Vector3ic offset = rotateOffsetVector( - forgeDirection, - bankOffsetsX[bank] + scanOffsetsX[scan], - bankOffsetsY[bank] + scanOffsetsY[scan], - Z); - if (Z == 1 || Z == 5) { - // Check for casings - if (thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == BASE_BLOCK - && thisController.getMetaIDOffset(offset.x(), offset.y(), offset.z()) == BASE_META) { - minCasingAmount--; - } else { - formationChecklist = false; - } - } else { - if (scan == 4) { - // Check for capacitors - final TileEntity te = thisController - .getTileEntityOffset(offset.x(), offset.y(), offset.z()); - if (thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == CAP_BLOCK - && te instanceof TE_SpaceElevatorCapacitor) { - capacitors.add((TE_SpaceElevatorCapacitor) te); - } else { - formationChecklist = false; - } - } else { - // Check for Glass - if (!thisController.getBlockOffset(offset.x(), offset.y(), offset.z()).getUnlocalizedName() - .equals(glassNameBorosilicate)) { - formationChecklist = false; - } - } - } - } - } - } - // Anchor - - // Coil holders - - // Coils - - if (minCasingAmount > 0) { - formationChecklist = false; - } - - for (TE_SpaceElevatorCapacitor cap : capacitors) { - cap.setIsDamaged(false); - } - - return formationChecklist; - } - - @Override - public String[] getInfoData() { - final ArrayList ll = new ArrayList<>(); - ll.add(EnumChatFormatting.YELLOW + "Operational Data:" + EnumChatFormatting.RESET); - - ll.add( - "Maintenance Status: " + ((super.getRepairStatus() == super.getIdealStatus()) - ? EnumChatFormatting.GREEN + "Working perfectly" + EnumChatFormatting.RESET - : EnumChatFormatting.RED + "Has Problems" + EnumChatFormatting.RESET)); - ll.add("---------------------------------------------"); - - final String[] a = new String[ll.size()]; - return ll.toArray(a); - } - - @Override - public boolean isGivingInformation() { - return true; - } - - @Override - public int getMaxEfficiency(ItemStack stack) { - return 10000; - } - - @Override - public int getPollutionPerTick(ItemStack stack) { - return 0; - } - - @Override - public int getDamageToComponent(ItemStack stack) { - return 0; - } - - @Override - public boolean explodesOnComponentBreak(ItemStack stack) { - return false; - } -} diff --git a/src/main/java/common/tileentities/TE_SpaceElevatorCapacitor.java b/src/main/java/common/tileentities/TE_SpaceElevatorCapacitor.java deleted file mode 100644 index ea5211bfba..0000000000 --- a/src/main/java/common/tileentities/TE_SpaceElevatorCapacitor.java +++ /dev/null @@ -1,53 +0,0 @@ -package common.tileentities; - -import net.minecraft.tileentity.TileEntity; - -public class TE_SpaceElevatorCapacitor extends TileEntity { - - private float chargeLevel = 0.0F; - private boolean isDamaged = true; - - /** - * Called by {@link GTMTE_SpaceElevator} while charging - * - * @param charge Current elevator charge - * @param maxCharge Charge level it is trying to reach - */ - public void updateChargeLevel(int charge, int maxCharge) { - chargeLevel = ((float) charge) / ((float) maxCharge); - } - - /** - * Called by {@link client.renderer.TESR_SECapacitor} to calculate the block's colour saturation - * - * @return Charge level from 0.0F to 1.0F - */ - public float getChargeLevel() { - return chargeLevel; - } - - /** - * Called by {@link GTMTE_SpaceElevator} in case of power loss - */ - public void resetChargeLevel() { - chargeLevel = 0.0F; - } - - /** - * Called by {@link GTMTE_SpaceElevator} in case of maintenance issues - * - * @param isDamaged has maintenance issue - */ - public void setIsDamaged(boolean isDamaged) { - this.isDamaged = isDamaged; - } - - /** - * Called by {@link client.renderer.TESR_SECapacitor} to check whether the block should be rendered red - * - * @return should be rendered red - */ - public boolean isDamaged() { - return isDamaged; - } -} diff --git a/src/main/java/common/tileentities/TE_SpaceElevatorTether.java b/src/main/java/common/tileentities/TE_SpaceElevatorTether.java deleted file mode 100644 index 7e76a9c14d..0000000000 --- a/src/main/java/common/tileentities/TE_SpaceElevatorTether.java +++ /dev/null @@ -1,24 +0,0 @@ -package common.tileentities; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class TE_SpaceElevatorTether extends TileEntity { - - @SideOnly(Side.CLIENT) - @Override - public double getMaxRenderDistanceSquared() { - // 4k is standard, 65k is what the vanilla beacon uses - return 65536.0D; - } - - @Override - @SideOnly(Side.CLIENT) - public AxisAlignedBB getRenderBoundingBox() { - // Make it so the beam is still rendered even when the source block is out of sight - return INFINITE_EXTENT_AABB; - } -} diff --git a/src/main/resources/assets/kekztech/lang/en_US.lang b/src/main/resources/assets/kekztech/lang/en_US.lang index 2b6912fb43..c9d42d2065 100644 --- a/src/main/resources/assets/kekztech/lang/en_US.lang +++ b/src/main/resources/assets/kekztech/lang/en_US.lang @@ -174,14 +174,6 @@ tc.research_name.ICHORJAR=Ichor Jars tc.research_text.ICHORJAR=Much better jars kekztech.research_page.ICHORJAR.0=This is it!

By infusing a jar with just a single piece of Ichor you have created something to rival digitized Essentia storage without sacrificing any of the beauty of Warded Jars.

Ichor Jars can hold an astounding 4096 Essentia and fit nicely into your recently aquired set of Ichor based achievements.

You definitely don't want to disturb these jars. Luckily Ichor is resilient enough to make accidentially destroying one unlikely. -# -------- Space Elevator: Block -tile.kekztech_spaceelevator_block.0.name=Space Elevator Base -tile.kekztech_spaceelevator_block.1.name=Space Elevator Coil Holder -tile.kekztech_spaceelevator_block.desc=Part of the Space Elevator Base Station -tile.kekztech_spaceelevatorcapacitor_block.name=Space Elevator Capacitor -tile.kekztech_spaceelevatorcapacitor_block.desc=The see-through is good for your FPS! -tile.kekztech_spaceelevatortether_block.name=Space Elevator Tether - # -------- Cosmetic Blocks tile.kekztech_largehextile_block.name=Large Hex Tile diff --git a/src/main/resources/assets/kekztech/lang/zh_CN.lang b/src/main/resources/assets/kekztech/lang/zh_CN.lang index 49dd9258f8..eb56ee7aa2 100644 --- a/src/main/resources/assets/kekztech/lang/zh_CN.lang +++ b/src/main/resources/assets/kekztech/lang/zh_CN.lang @@ -167,14 +167,6 @@ tc.research_name.ICHORJAR=灵液源质罐子 tc.research_text.ICHORJAR=非常好的罐子 kekztech.research_page.ICHORJAR.0=就是这个!

将一点灵液注魔进源质罐子,你获得了可以与数字化源质存储相匹敌,同时还不用牺牲美感的新罐子.

灵液源质罐子可以装下惊人的4096点源质,非常适合你刚解锁的这些基于灵液的注魔.

你绝对不会想打扰这些罐子的.不过幸运的是,灵液源质罐子拥有足够的柔韧性,不太容易被误操作摧毁. -# -------- Space Elevator: Block -tile.kekztech_spaceelevator_block.0.name=太空电梯基座 -tile.kekztech_spaceelevator_block.1.name=太空电梯线圈 -tile.kekztech_spaceelevator_block.desc=太空电梯基站的一部分 -tile.kekztech_spaceelevatorcapacitor_block.name=太空电梯电容 -tile.kekztech_spaceelevatorcapacitor_block.desc=透视对你的FPS有好处! -tile.kekztech_spaceelevatortether_block.name=太空电梯线缆 - # -------- Cosmetic Blocks tile.kekztech_largehextile_block.name=大六角瓷砖 diff --git a/src/main/resources/assets/kekztech/textures/blocks/CoilHolder.png b/src/main/resources/assets/kekztech/textures/blocks/CoilHolder.png deleted file mode 100644 index 12f87ce0f8..0000000000 Binary files a/src/main/resources/assets/kekztech/textures/blocks/CoilHolder.png and /dev/null differ diff --git a/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorBase_side.png b/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorBase_side.png deleted file mode 100644 index 876c26f8cb..0000000000 Binary files a/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorBase_side.png and /dev/null differ diff --git a/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorBase_top.png b/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorBase_top.png deleted file mode 100644 index 05afd9318a..0000000000 Binary files a/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorBase_top.png and /dev/null differ diff --git a/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorCapacitor_side_0.png b/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorCapacitor_side_0.png deleted file mode 100644 index 4715a813ed..0000000000 Binary files a/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorCapacitor_side_0.png and /dev/null differ diff --git a/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorCapacitor_side_fullbase.png b/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorCapacitor_side_fullbase.png deleted file mode 100644 index 84f5909b9e..0000000000 Binary files a/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorCapacitor_side_fullbase.png and /dev/null differ diff --git a/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorCapacitor_side_renderbase.png b/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorCapacitor_side_renderbase.png deleted file mode 100644 index 32aee141d9..0000000000 Binary files a/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorCapacitor_side_renderbase.png and /dev/null differ diff --git a/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorCapacitor_top_fullbase.png b/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorCapacitor_top_fullbase.png deleted file mode 100644 index f1c045b5af..0000000000 Binary files a/src/main/resources/assets/kekztech/textures/blocks/SpaceElevatorCapacitor_top_fullbase.png and /dev/null differ diff --git a/src/main/resources/assets/kekztech/textures/blocks/Tether_side.png b/src/main/resources/assets/kekztech/textures/blocks/Tether_side.png deleted file mode 100644 index b98c084e74..0000000000 Binary files a/src/main/resources/assets/kekztech/textures/blocks/Tether_side.png and /dev/null differ -- cgit