diff options
| author | miozune <miozune@gmail.com> | 2022-10-09 18:10:02 +0900 |
|---|---|---|
| committer | miozune <miozune@gmail.com> | 2022-10-09 18:10:02 +0900 |
| commit | a265085bd7742ebf1e2e95e4bf7397ba5bea01dc (patch) | |
| tree | 92d6b48c083729e8952f0d02372682393145792e /src/main/java/common/blocks | |
| parent | 46bafc67d318bbe7c5ffbb34d857958ebe72a6e5 (diff) | |
| download | GT5-Unofficial-a265085bd7742ebf1e2e95e4bf7397ba5bea01dc.tar.gz GT5-Unofficial-a265085bd7742ebf1e2e95e4bf7397ba5bea01dc.tar.bz2 GT5-Unofficial-a265085bd7742ebf1e2e95e4bf7397ba5bea01dc.zip | |
updateBuildScript & spotlessApply
Diffstat (limited to 'src/main/java/common/blocks')
23 files changed, 1024 insertions, 1025 deletions
diff --git a/src/main/java/common/blocks/BaseGTUpdateableBlock.java b/src/main/java/common/blocks/BaseGTUpdateableBlock.java index 6f554101ca..77ee67469f 100644 --- a/src/main/java/common/blocks/BaseGTUpdateableBlock.java +++ b/src/main/java/common/blocks/BaseGTUpdateableBlock.java @@ -1,6 +1,5 @@ package common.blocks; - import gregtech.api.GregTech_API; import net.minecraft.block.Block; import net.minecraft.block.material.Material; @@ -23,7 +22,7 @@ public abstract class BaseGTUpdateableBlock extends Block { } @Override - public int damageDropped(int meta){ + public int damageDropped(int meta) { return meta; } diff --git a/src/main/java/common/blocks/Block_BeamTransmitter.java b/src/main/java/common/blocks/Block_BeamTransmitter.java index af7a837fdd..be29bde3fd 100644 --- a/src/main/java/common/blocks/Block_BeamTransmitter.java +++ b/src/main/java/common/blocks/Block_BeamTransmitter.java @@ -1,7 +1,6 @@ package common.blocks; import common.tileentities.TE_BeamTransmitter; -import common.tileentities.TE_SpaceElevatorTether; import cpw.mods.fml.common.registry.GameRegistry; import kekztech.KekzCore; import net.minecraft.block.Block; @@ -41,15 +40,12 @@ public class Block_BeamTransmitter extends Block { } @Override - public boolean isOpaqueCube() - { + public boolean isOpaqueCube() { return false; } @Override - public boolean renderAsNormalBlock() - { + public boolean renderAsNormalBlock() { return false; } - } diff --git a/src/main/java/common/blocks/Block_ControlRod.java b/src/main/java/common/blocks/Block_ControlRod.java index 808881dead..9849816a2a 100644 --- a/src/main/java/common/blocks/Block_ControlRod.java +++ b/src/main/java/common/blocks/Block_ControlRod.java @@ -7,22 +7,22 @@ import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; public class Block_ControlRod extends BaseGTUpdateableBlock { - - private static final Block_ControlRod instance = new Block_ControlRod(); - - private Block_ControlRod() { - super(Material.iron); - } - - public static Block registerBlock() { - final String blockName = "kekztech_controlrod_block"; - instance.setBlockName(blockName); - instance.setCreativeTab(CreativeTabs.tabMisc); - instance.setBlockTextureName(KekzCore.MODID + ":" + "ControlRod"); - instance.setHardness(5.0f); - instance.setResistance(6.0f); - GameRegistry.registerBlock(instance, blockName); - - return instance; - } + + private static final Block_ControlRod instance = new Block_ControlRod(); + + private Block_ControlRod() { + super(Material.iron); + } + + public static Block registerBlock() { + final String blockName = "kekztech_controlrod_block"; + instance.setBlockName(blockName); + instance.setCreativeTab(CreativeTabs.tabMisc); + instance.setBlockTextureName(KekzCore.MODID + ":" + "ControlRod"); + instance.setHardness(5.0f); + instance.setResistance(6.0f); + GameRegistry.registerBlock(instance, blockName); + + return instance; + } } diff --git a/src/main/java/common/blocks/Block_GDCUnit.java b/src/main/java/common/blocks/Block_GDCUnit.java index aab81e1aeb..c86a55f200 100644 --- a/src/main/java/common/blocks/Block_GDCUnit.java +++ b/src/main/java/common/blocks/Block_GDCUnit.java @@ -1,28 +1,28 @@ -package common.blocks;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-import kekztech.KekzCore;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.creativetab.CreativeTabs;
-
-public class Block_GDCUnit extends BaseGTUpdateableBlock {
-
- private static final Block_GDCUnit instance = new Block_GDCUnit();
-
- private Block_GDCUnit() {
- super(Material.iron);
- }
-
- public static Block registerBlock() {
- final String blockName = "kekztech_gdcceramicelectrolyteunit_block";
- instance.setBlockName(blockName);
- instance.setCreativeTab(CreativeTabs.tabMisc);
- instance.setBlockTextureName(KekzCore.MODID + ":" + "GDCCeramicElectrolyteUnit");
- instance.setHardness(5.0f);
- instance.setResistance(6.0f);
- GameRegistry.registerBlock(instance, blockName);
-
- return instance;
- }
-}
+package common.blocks; + +import cpw.mods.fml.common.registry.GameRegistry; +import kekztech.KekzCore; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.creativetab.CreativeTabs; + +public class Block_GDCUnit extends BaseGTUpdateableBlock { + + private static final Block_GDCUnit instance = new Block_GDCUnit(); + + private Block_GDCUnit() { + super(Material.iron); + } + + public static Block registerBlock() { + final String blockName = "kekztech_gdcceramicelectrolyteunit_block"; + instance.setBlockName(blockName); + instance.setCreativeTab(CreativeTabs.tabMisc); + instance.setBlockTextureName(KekzCore.MODID + ":" + "GDCCeramicElectrolyteUnit"); + instance.setHardness(5.0f); + instance.setResistance(6.0f); + GameRegistry.registerBlock(instance, blockName); + + return instance; + } +} diff --git a/src/main/java/common/blocks/Block_IchorJar.java b/src/main/java/common/blocks/Block_IchorJar.java index 0c2417b2f1..e7cf3c77eb 100644 --- a/src/main/java/common/blocks/Block_IchorJar.java +++ b/src/main/java/common/blocks/Block_IchorJar.java @@ -6,6 +6,9 @@ import common.tileentities.TE_IchorVoidJar; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; @@ -24,200 +27,204 @@ import thaumcraft.common.config.ConfigItems; import thaumcraft.common.items.ItemEssence; import thaumcraft.common.tiles.TileJarFillable; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - public class Block_IchorJar extends BlockJar { - - private static final Block_IchorJar INSTANCE = new Block_IchorJar(); - - private Block_IchorJar() { - super(); - - super.setHardness(12.0F); - super.setResistance(3.0f); - } - - public static Block registerBlock() { - final String blockName = "kekztech_ichorjar_block"; - INSTANCE.setBlockName(blockName); - INSTANCE.setHarvestLevel("pickaxe", 3); - GameRegistry.registerBlock(INSTANCE, IB_IchorJar.class, blockName); - - return INSTANCE; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister ir) { - super.iconLiquid = ir.registerIcon("thaumcraft:animatedglow"); - super.iconJarSide = ir.registerIcon("kekztech:ichor_jar_side"); - super.iconJarTop = ir.registerIcon("kekztech:ichor_jar_top"); - super.iconJarTopVoid = ir.registerIcon("kekztech:ichor_jar_top_void"); - super.iconJarSideVoid = ir.registerIcon("kekztech:ichor_jar_side_void"); - super.iconJarBottom = ir.registerIcon("kekztech:ichor_jar_bottom"); - } - - @Override - @SideOnly(Side.CLIENT) - @SuppressWarnings({"unchecked"}) - public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { - par3List.add(new ItemStack(par1, 1, 0)); // Normal jar - par3List.add(new ItemStack(par1, 1, 3)); // Void jar - } - - @Override - public TileEntity createTileEntity(World world, int meta) { - if(meta == 3) { - return new TE_IchorVoidJar(); - } else { - return new TE_IchorJar(); - } - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float f1, float f2, float f3) { - // Call parent method to handle jar emptying, labels stuff etc - super.onBlockActivated(world, x, y, z, player, side, f1, f2, f3); - // Interact with Essentia Phials if the player holds one - final ItemStack heldItem = player.getHeldItem(); - if(heldItem != null && heldItem.getItem() == ConfigItems.itemEssence) { - final TileEntity te = world.getTileEntity(x, y, z); - if(te instanceof TE_IchorJar) { - return dealWithPhial(world, player, x, y, z); - } else if(te instanceof TE_IchorVoidJar) { - return dealWithPhial(world, player, x, y, z); - } - } - - return true; - } - - /** - * Handle compatibility with Essentia Phials - * @param world - * Pass through from onBlockActivated() - * @param player - * Pass through from onBlockActivated() - * @param x - * Pass through from onBlockActivated() - * @param y - * Pass through from onBlockActivated() - * @param z - * Pass through from onBlockActivated() - * @return Not sure tbh - */ - private boolean dealWithPhial(World world, EntityPlayer player, int x, int y, int z) { - final TileJarFillable jarTE = (TileJarFillable) world.getTileEntity(x, y, z); - final ItemStack heldItem = player.getHeldItem(); - // Check whether to fill or to drain the phial - if(heldItem.getItemDamage() == 0) { - if(jarTE.amount >= 8){ - if (world.isRemote) { - player.swingItem(); - return false; - } - - final Aspect jarAspect = Aspect.getAspect(jarTE.aspect.getTag()); - if(jarTE.takeFromContainer(jarAspect, 8)) { - // Take an empty phial from the player's inventory - heldItem.stackSize--; - // Fill a new phial - final ItemStack filledPhial = new ItemStack(ConfigItems.itemEssence, 1, 1); - final AspectList phialContent = new AspectList().add(jarAspect, 8); - ((ItemEssence) ConfigItems.itemEssence).setAspects(filledPhial, phialContent); - // Drop on ground if there's no inventory space - if (!player.inventory.addItemStackToInventory(filledPhial)) { - world.spawnEntityInWorld(new EntityItem(world, (float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F, filledPhial)); - } - - world.playSoundAtEntity(player, "game.neutral.swim", 0.25F, 1.0F); - player.inventoryContainer.detectAndSendChanges(); - return true; - } - } - } else { - final AspectList phialContent = ((ItemEssence) ConfigItems.itemEssence).getAspects(heldItem); - if(phialContent != null && phialContent.size() == 1) { - final Aspect phialAspect = phialContent.getAspects()[0]; - if(jarTE.amount + 8 <= jarTE.maxAmount && jarTE.doesContainerAccept(phialAspect)) { - if (world.isRemote) { - player.swingItem(); - return false; - } - - if(jarTE.addToContainer(phialAspect, 8) == 0) { - world.markBlockForUpdate(x, y, z); - jarTE.markDirty(); - heldItem.stackSize--; - // Drop on ground if there's no inventory space - if (!player.inventory.addItemStackToInventory(new ItemStack(ConfigItems.itemEssence, 1, 0))) { - world.spawnEntityInWorld(new EntityItem(world, (float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F, new ItemStack(ConfigItems.itemEssence, 1, 0))); - } - - world.playSoundAtEntity(player, "game.neutral.swim", 0.25F, 1.0F); - player.inventoryContainer.detectAndSendChanges(); - return true; - } - } - } - } - - return true; - } - - @Override - public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { - final TileEntity te = world.getTileEntity(x, y, z); - if(te instanceof TE_IchorJar) { - final TE_IchorJar ite = (TE_IchorJar) te; - breakBlockWarpy(world, x, y, z, ite.amount, 200, 6.0F); - } else if(te instanceof TE_IchorVoidJar) { - final TE_IchorVoidJar ite = (TE_IchorVoidJar) te; - breakBlockWarpy(world, x, y, z, ite.amount, 200, 6.0F); - } - super.breakBlock(world, x, y, z, par5, par6); - } - - private void breakBlockWarpy(World world, int x, int y, int z, int fillAmount, int iterations, float explosionStrength){ - if(fillAmount > 0) { - // Create a decent explosion in the center of the block (TNT has strength 4.0F) - world.createExplosion(null, x + 0.5D, y + 0.5D, z + 0.5D, explosionStrength, false); - - // Place a lot of Flux in the area - final int limit = fillAmount / 16; - int created = 0; - for(int i = 0; i < iterations; i++) { - final int xf = x + world.rand.nextInt(7) - world.rand.nextInt(7); - final int yf = x + world.rand.nextInt(7) - world.rand.nextInt(7); - final int zf = x + world.rand.nextInt(7) - world.rand.nextInt(7); - if(world.isAirBlock(xf, yf, zf)) { - if(yf > y) { - world.setBlock(xf, yf, zf, ConfigBlocks.blockFluxGas, 8, 3); - } else { - world.setBlock(xf, yf, zf, ConfigBlocks.blockFluxGoo, 8, 3); - } - - if(created++ > limit) { - break; - } - } - } - } - } - - @Override - public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int meta, int fortune) { - return new ArrayList<>(Collections.singleton(new ItemStack(this, 1, (meta == 3) ? 3 : 0))); - } - - @Override - public void onBlockHarvested(World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer) { - } - - @Override - public boolean canDropFromExplosion(Explosion e) { - return false; - } + + private static final Block_IchorJar INSTANCE = new Block_IchorJar(); + + private Block_IchorJar() { + super(); + + super.setHardness(12.0F); + super.setResistance(3.0f); + } + + public static Block registerBlock() { + final String blockName = "kekztech_ichorjar_block"; + INSTANCE.setBlockName(blockName); + INSTANCE.setHarvestLevel("pickaxe", 3); + GameRegistry.registerBlock(INSTANCE, IB_IchorJar.class, blockName); + + return INSTANCE; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister ir) { + super.iconLiquid = ir.registerIcon("thaumcraft:animatedglow"); + super.iconJarSide = ir.registerIcon("kekztech:ichor_jar_side"); + super.iconJarTop = ir.registerIcon("kekztech:ichor_jar_top"); + super.iconJarTopVoid = ir.registerIcon("kekztech:ichor_jar_top_void"); + super.iconJarSideVoid = ir.registerIcon("kekztech:ichor_jar_side_void"); + super.iconJarBottom = ir.registerIcon("kekztech:ichor_jar_bottom"); + } + + @Override + @SideOnly(Side.CLIENT) + @SuppressWarnings({"unchecked"}) + public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { + par3List.add(new ItemStack(par1, 1, 0)); // Normal jar + par3List.add(new ItemStack(par1, 1, 3)); // Void jar + } + + @Override + public TileEntity createTileEntity(World world, int meta) { + if (meta == 3) { + return new TE_IchorVoidJar(); + } else { + return new TE_IchorJar(); + } + } + + @Override + public boolean onBlockActivated( + World world, int x, int y, int z, EntityPlayer player, int side, float f1, float f2, float f3) { + // Call parent method to handle jar emptying, labels stuff etc + super.onBlockActivated(world, x, y, z, player, side, f1, f2, f3); + // Interact with Essentia Phials if the player holds one + final ItemStack heldItem = player.getHeldItem(); + if (heldItem != null && heldItem.getItem() == ConfigItems.itemEssence) { + final TileEntity te = world.getTileEntity(x, y, z); + if (te instanceof TE_IchorJar) { + return dealWithPhial(world, player, x, y, z); + } else if (te instanceof TE_IchorVoidJar) { + return dealWithPhial(world, player, x, y, z); + } + } + + return true; + } + + /** + * Handle compatibility with Essentia Phials + * @param world + * Pass through from onBlockActivated() + * @param player + * Pass through from onBlockActivated() + * @param x + * Pass through from onBlockActivated() + * @param y + * Pass through from onBlockActivated() + * @param z + * Pass through from onBlockActivated() + * @return Not sure tbh + */ + private boolean dealWithPhial(World world, EntityPlayer player, int x, int y, int z) { + final TileJarFillable jarTE = (TileJarFillable) world.getTileEntity(x, y, z); + final ItemStack heldItem = player.getHeldItem(); + // Check whether to fill or to drain the phial + if (heldItem.getItemDamage() == 0) { + if (jarTE.amount >= 8) { + if (world.isRemote) { + player.swingItem(); + return false; + } + + final Aspect jarAspect = Aspect.getAspect(jarTE.aspect.getTag()); + if (jarTE.takeFromContainer(jarAspect, 8)) { + // Take an empty phial from the player's inventory + heldItem.stackSize--; + // Fill a new phial + final ItemStack filledPhial = new ItemStack(ConfigItems.itemEssence, 1, 1); + final AspectList phialContent = new AspectList().add(jarAspect, 8); + ((ItemEssence) ConfigItems.itemEssence).setAspects(filledPhial, phialContent); + // Drop on ground if there's no inventory space + if (!player.inventory.addItemStackToInventory(filledPhial)) { + world.spawnEntityInWorld(new EntityItem( + world, (float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F, filledPhial)); + } + + world.playSoundAtEntity(player, "game.neutral.swim", 0.25F, 1.0F); + player.inventoryContainer.detectAndSendChanges(); + return true; + } + } + } else { + final AspectList phialContent = ((ItemEssence) ConfigItems.itemEssence).getAspects(heldItem); + if (phialContent != null && phialContent.size() == 1) { + final Aspect phialAspect = phialContent.getAspects()[0]; + if (jarTE.amount + 8 <= jarTE.maxAmount && jarTE.doesContainerAccept(phialAspect)) { + if (world.isRemote) { + player.swingItem(); + return false; + } + + if (jarTE.addToContainer(phialAspect, 8) == 0) { + world.markBlockForUpdate(x, y, z); + jarTE.markDirty(); + heldItem.stackSize--; + // Drop on ground if there's no inventory space + if (!player.inventory.addItemStackToInventory(new ItemStack(ConfigItems.itemEssence, 1, 0))) { + world.spawnEntityInWorld(new EntityItem( + world, + (float) x + 0.5F, + (float) y + 0.5F, + (float) z + 0.5F, + new ItemStack(ConfigItems.itemEssence, 1, 0))); + } + + world.playSoundAtEntity(player, "game.neutral.swim", 0.25F, 1.0F); + player.inventoryContainer.detectAndSendChanges(); + return true; + } + } + } + } + + return true; + } + + @Override + public void breakBlock(World world, int x, int y, int z, Block par5, int par6) { + final TileEntity te = world.getTileEntity(x, y, z); + if (te instanceof TE_IchorJar) { + final TE_IchorJar ite = (TE_IchorJar) te; + breakBlockWarpy(world, x, y, z, ite.amount, 200, 6.0F); + } else if (te instanceof TE_IchorVoidJar) { + final TE_IchorVoidJar ite = (TE_IchorVoidJar) te; + breakBlockWarpy(world, x, y, z, ite.amount, 200, 6.0F); + } + super.breakBlock(world, x, y, z, par5, par6); + } + + private void breakBlockWarpy( + World world, int x, int y, int z, int fillAmount, int iterations, float explosionStrength) { + if (fillAmount > 0) { + // Create a decent explosion in the center of the block (TNT has strength 4.0F) + world.createExplosion(null, x + 0.5D, y + 0.5D, z + 0.5D, explosionStrength, false); + + // Place a lot of Flux in the area + final int limit = fillAmount / 16; + int created = 0; + for (int i = 0; i < iterations; i++) { + final int xf = x + world.rand.nextInt(7) - world.rand.nextInt(7); + final int yf = x + world.rand.nextInt(7) - world.rand.nextInt(7); + final int zf = x + world.rand.nextInt(7) - world.rand.nextInt(7); + if (world.isAirBlock(xf, yf, zf)) { + if (yf > y) { + world.setBlock(xf, yf, zf, ConfigBlocks.blockFluxGas, 8, 3); + } else { + world.setBlock(xf, yf, zf, ConfigBlocks.blockFluxGoo, 8, 3); + } + + if (created++ > limit) { + break; + } + } + } + } + } + + @Override + public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int meta, int fortune) { + return new ArrayList<>(Collections.singleton(new ItemStack(this, 1, (meta == 3) ? 3 : 0))); + } + + @Override + public void onBlockHarvested( + World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer) {} + + @Override + public boolean canDropFromExplosion(Explosion e) { + return false; + } } diff --git a/src/main/java/common/blocks/Block_ItemProxyCable.java b/src/main/java/common/blocks/Block_ItemProxyCable.java index ce2f1e9820..57b5fc6138 100644 --- a/src/main/java/common/blocks/Block_ItemProxyCable.java +++ b/src/main/java/common/blocks/Block_ItemProxyCable.java @@ -1,5 +1,6 @@ package common.blocks; +import client.renderer.ConduitRenderer; import common.itemBlocks.IB_ItemProxyCable; import common.tileentities.TE_ItemProxyCable; import cpw.mods.fml.common.registry.GameRegistry; @@ -11,56 +12,55 @@ import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; -import client.renderer.ConduitRenderer; public class Block_ItemProxyCable extends Block { - - private static Block_ItemProxyCable instance = new Block_ItemProxyCable(); - - private Block_ItemProxyCable() { - super(Material.glass); - } - - public static Block registerBlock() { - final String blockName = "kekztech_itemproxycable_block"; - instance.setBlockName(blockName); - instance.setCreativeTab(CreativeTabs.tabMisc); - instance.setBlockTextureName(KekzCore.MODID + ":" + "TFFTCasing"); - instance.setHardness(3.0f); - instance.setResistance(2.0f); - GameRegistry.registerBlock(instance, IB_ItemProxyCable.class, blockName); - - return instance; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - public TileEntity createTileEntity(World world, int p_149915_2_) { - return new TE_ItemProxyCable(); - } - @Override - public boolean hasTileEntity(int metadata) { - return true; - } + private static Block_ItemProxyCable instance = new Block_ItemProxyCable(); + + private Block_ItemProxyCable() { + super(Material.glass); + } + + public static Block registerBlock() { + final String blockName = "kekztech_itemproxycable_block"; + instance.setBlockName(blockName); + instance.setCreativeTab(CreativeTabs.tabMisc); + instance.setBlockTextureName(KekzCore.MODID + ":" + "TFFTCasing"); + instance.setHardness(3.0f); + instance.setResistance(2.0f); + GameRegistry.registerBlock(instance, IB_ItemProxyCable.class, blockName); + + return instance; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public TileEntity createTileEntity(World world, int p_149915_2_) { + return new TE_ItemProxyCable(); + } + + @Override + public boolean hasTileEntity(int metadata) { + return true; + } - @Override - @SideOnly(Side.CLIENT) - public int getRenderBlockPass() { - return 1; - } + @Override + @SideOnly(Side.CLIENT) + public int getRenderBlockPass() { + return 1; + } - @Override - public int getRenderType() { - return ConduitRenderer.RID; - } + @Override + public int getRenderType() { + return ConduitRenderer.RID; + } - @Override - public boolean renderAsNormalBlock() { - return false; - } + @Override + public boolean renderAsNormalBlock() { + return false; + } } diff --git a/src/main/java/common/blocks/Block_ItemProxyEndpoint.java b/src/main/java/common/blocks/Block_ItemProxyEndpoint.java index 00e0426250..7c7712988d 100644 --- a/src/main/java/common/blocks/Block_ItemProxyEndpoint.java +++ b/src/main/java/common/blocks/Block_ItemProxyEndpoint.java @@ -13,49 +13,49 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class Block_ItemProxyEndpoint extends Block { - - private static final Block_ItemProxyEndpoint instance = new Block_ItemProxyEndpoint(); - - private Block_ItemProxyEndpoint() { - super(Material.glass); - } - - public static Block registerBlock() { - final String blockName = "kekztech_itemproxyendpoint_block"; - instance.setBlockName(blockName); - instance.setCreativeTab(CreativeTabs.tabMisc); - instance.setBlockTextureName(KekzCore.MODID + ":" + "ItemProxyEndpoint"); - instance.setHardness(3.0f); - instance.setResistance(2.0f); - instance.setHarvestLevel("wrench", 2); - GameRegistry.registerBlock(instance, IB_ItemProxyEndpoint.class, blockName); - - return instance; - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float lx, float ly, float lz) { - if(world.isRemote) { - return true; - } - - final TileEntity te = world.getTileEntity(x, y, z); - if(te instanceof TE_ItemProxyEndpoint) { - player.openGui(KekzCore.instance, GuiHandler.ITEM_PROXY_ENDPOINT, world, x, y, z); - return true; - } else { - return false; - } - } - - @Override - public TileEntity createTileEntity(World world, int p_149915_2_) { - return new TE_ItemProxyEndpoint(); - } - - @Override - public boolean hasTileEntity(int metadata) { - return true; - } - -}
\ No newline at end of file + + private static final Block_ItemProxyEndpoint instance = new Block_ItemProxyEndpoint(); + + private Block_ItemProxyEndpoint() { + super(Material.glass); + } + + public static Block registerBlock() { + final String blockName = "kekztech_itemproxyendpoint_block"; + instance.setBlockName(blockName); + instance.setCreativeTab(CreativeTabs.tabMisc); + instance.setBlockTextureName(KekzCore.MODID + ":" + "ItemProxyEndpoint"); + instance.setHardness(3.0f); + instance.setResistance(2.0f); + instance.setHarvestLevel("wrench", 2); + GameRegistry.registerBlock(instance, IB_ItemProxyEndpoint.class, blockName); + + return instance; + } + + @Override + public boolean onBlockActivated( + World world, int x, int y, int z, EntityPlayer player, int side, float lx, float ly, float lz) { + if (world.isRemote) { + return true; + } + + final TileEntity te = world.getTileEntity(x, y, z); + if (te instanceof TE_ItemProxyEndpoint) { + player.openGui(KekzCore.instance, GuiHandler.ITEM_PROXY_ENDPOINT, world, x, y, z); + return true; + } else { + return false; + } + } + + @Override + public TileEntity createTileEntity(World world, int p_149915_2_) { + return new TE_ItemProxyEndpoint(); + } + + @Override + public boolean hasTileEntity(int metadata) { + return true; + } +} diff --git a/src/main/java/common/blocks/Block_ItemProxySource.java b/src/main/java/com |
