diff options
| author | Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> | 2023-09-04 03:05:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-04 03:05:22 +0100 |
| commit | 76719d65a90d98e228a914774d3b11ed9f01ac8e (patch) | |
| tree | ce0d35f954e441e9cc4aa95aa347073728e6f4ee /src/main/java/gtPlusPlus/core/block | |
| parent | 0393b582eb3edcb5c575330804b6747577a55e27 (diff) | |
| download | GT5-Unofficial-76719d65a90d98e228a914774d3b11ed9f01ac8e.tar.gz GT5-Unofficial-76719d65a90d98e228a914774d3b11ed9f01ac8e.tar.bz2 GT5-Unofficial-76719d65a90d98e228a914774d3b11ed9f01ac8e.zip | |
Clean-up v2 (#729)
* Remove test items from NEI with no texture
* Add number formatting to hand pumps
* Remove heavy plates (no recipes & completely unused).
* Remove helium generator (no texture, no recipe)
* Remove fire pit and fire starter (no use, no recipe, no textures)
* Remove giant chicken and associated unused stuff, has no texture and is unobtainable. Used to be relevant but isn't anymore.
* Remove villagers with silly trades like 1 motor + 1 hull = 1 hull. Why?
* Remove trade bench, no recipe, missing textures. Unused.
* Remove farm processors, no texture, no recipe. Unused.
* Remove MAX tier components, these exist in GT now, have no recipe here and are unused.
* Hide untextured light block from NEI
* Update buildscript
* Remove unused backpacks, no recipe and contains dupe bugs. Bad.
* Remove eatotronic, universal toolbox and magic tool bag. All 3 are missing textures and uncraftable.
* Remove eatotronic, universal toolbox and magic tool bag. All 3 are missing textures and uncraftable. part 2
* Remove dragon catcher (what?), no texture, no recipe, unused.
* Remove empty item, does nothing, has no recipe, no idea why it is here.
* Empty item v2 removal
* Revert "Empty item v2 removal"
This reverts commit 75bcd3ccfaf55bbfe2c12b2e4167d5c37636030d.
* Revert "Remove empty item, does nothing, has no recipe, no idea why it is here."
This reverts commit e41a9f484392776331c58530ab1faa5ef978ef36.
* Remove debug square. No recipe, unused.
* Number formatting overflow covers
* Remove JVM garbage collection block. Unused, no recipe.
* Remove nanotubes, no recipe for them. Unused.
* Remove "git" item, doesn't seem to work. Has no recipe.
* Remove uncraftable food with awful textures.
* Remove "bat king" mob, unused content. Does not spawn.
* Remove uncraftable doors with bad textures. Unused content.
* Remove uncraftable, unlocalised redstone stuff that crashes game when placed.
* Remove weird spawner item. No recipe, does not exist in world.
* Remove sunnarium bit, no recipe, no usage.
* Remove unused modularity table and some misc uncraftable, unused items.
* Remove Interconnecting Storage Crate, no recipe, unused.
* Delete worse debug power gen, this already exists as part of GT. Unneeded duplication.
* Delete unused placeholder circuit
* Delete uncraftable generator hatches.
* Spotless
* Remove XP tank thing, unused and uncraftable.
* Remove null item, this fluid registry only seemed to register one null fluid. All others exist?
* Remove EU -> RF battery. Unused in GTNH.
* Remove some shelf nonsense, why is this in this mod?
* Remove some weird random tools. These have no realistic usage in GTNH.
* Remove firemaker. Useless in GTNH.
* Removed helium blob. Deprecated item, not used anymore, uncraftable.
* spotlessApply (#730)
Co-authored-by: GitHub GTNH Actions <>
* Stop modulators generating unused blocks with no textures
* Remove more unused untextured casings
* Remove more unused untextured casings
* Remove more unused untextured casings
* Remove more unused untextured casings
* Remove more unused untextured casings
* Remove some weird methods and uncraftable mining parts, probably part of deprecated multiblock.
* spotlessApply (#732)
Co-authored-by: GitHub GTNH Actions <>
* Remove gem shards, unused.
* Remove unused atoms
* Remove unused gum
* Remove unused elements/materials
* Bye bye
* Remove some unused reflection stuff
* Remove control cores, obsolete now.
* Remove mob killing thing with no texture and no recipe.
* Remove uncraftable covers
* Remove pizza gloves
* Net and rope removal, unused
* Remove force crop
* Removal of some old event stuff
* Remove unused nuclear chem items
* Remove player safe, mostly because of the horrible event code that was intercepting every block break. I can't see any real usage of this via discord.
* Remove Force material and associated other nonsense. Also remove some nuclear chem stuff.
* Remove force for realsies
* Skookum Chooker purge.
* Remove some enderio compat, these plates/dusts are added via GT5 anyway now. This is obsolete.
* spotlessApply (#733)
Co-authored-by: GitHub GTNH Actions <>
* Unused textures
* Bump dep
* Revert "Remove force for realsies"
This reverts commit 0d288912a99f9dabce56d2a2623d4d3510f4804e.
* Revert "Remove Force material and associated other nonsense. Also remove some nuclear chem stuff."
This reverts commit 3455e6e916defe1f2aef923be6f9696a6cf3095b.
* Remove nuclear items that are unused
* spotlessApply (#734)
Co-authored-by: GitHub GTNH Actions <>
---------
Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com>
Co-authored-by: Connor Colenso <colen@CONNORSPC>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/main/java/gtPlusPlus/core/block')
16 files changed, 4 insertions, 2436 deletions
diff --git a/src/main/java/gtPlusPlus/core/block/ModBlocks.java b/src/main/java/gtPlusPlus/core/block/ModBlocks.java index 9957ae3f92..5058ac51cd 100644 --- a/src/main/java/gtPlusPlus/core/block/ModBlocks.java +++ b/src/main/java/gtPlusPlus/core/block/ModBlocks.java @@ -1,37 +1,24 @@ package gtPlusPlus.core.block; import net.minecraft.block.Block; -import net.minecraft.block.material.Material; import net.minecraftforge.fluids.Fluid; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.general.BlockCompressedObsidian; -import gtPlusPlus.core.block.general.BlockNet; -import gtPlusPlus.core.block.general.BlockTankXpConverter; -import gtPlusPlus.core.block.general.FirePit; import gtPlusPlus.core.block.general.FluidTankInfinite; import gtPlusPlus.core.block.general.HellFire; import gtPlusPlus.core.block.general.LightGlass; import gtPlusPlus.core.block.general.MiningExplosives; -import gtPlusPlus.core.block.general.PlayerDoors; import gtPlusPlus.core.block.general.antigrief.BlockWitherProof; -import gtPlusPlus.core.block.general.redstone.BlockGenericRedstoneDetector; -import gtPlusPlus.core.block.general.redstone.BlockGenericRedstoneTest; import gtPlusPlus.core.block.machine.CircuitProgrammer; import gtPlusPlus.core.block.machine.DecayablesChest; -import gtPlusPlus.core.block.machine.EggBox; import gtPlusPlus.core.block.machine.FishTrap; -import gtPlusPlus.core.block.machine.HeliumGenerator; -import gtPlusPlus.core.block.machine.Machine_ModularityTable; import gtPlusPlus.core.block.machine.Machine_PestKiller; import gtPlusPlus.core.block.machine.Machine_PooCollector; import gtPlusPlus.core.block.machine.Machine_ProjectTable; import gtPlusPlus.core.block.machine.Machine_RoundRobinator; import gtPlusPlus.core.block.machine.Machine_SuperJukebox; -import gtPlusPlus.core.block.machine.Machine_TradeTable; import gtPlusPlus.core.block.machine.VolumetricFlaskSetter; -import gtPlusPlus.core.block.machine.bedrock.Mining_Head_Fake; -import gtPlusPlus.core.block.machine.bedrock.Mining_Pipe_Fake; import gtPlusPlus.core.fluids.FluidRegistryHandler; public final class ModBlocks { @@ -39,18 +26,9 @@ public final class ModBlocks { public static Block blockRoundRobinator; public static Block blockCircuitProgrammer; public static Block blockVolumetricFlaskSetter; - public static Block blockFakeMiningPipe; - public static Block blockFakeMiningHead; public static Block blockFishTrap; public static Block blockDecayablesChest; - public static Block blockEggBox; - - // Blocks - // public static Block blockBloodSteel; - // public static Block blockStaballoy; - // WIP TODO public static Block blockToolBuilder; - public static Block blockGriefSaver; public static Block blockCasingsMisc; public static Block blockCasings2Misc; @@ -64,32 +42,18 @@ public final class ModBlocks { public static Block blockCustomMachineCasings; public static Block blockCustomPipeGearCasings; - public static Block blockMetaTileEntity; - public static Block blockHeliumGenerator; - public static Block blockNHG; - public static Block blockCharger; - public static Block MatterFabricatorEffectBlock; public static Fluid fluidSludge = new Fluid("fluid.sludge"); public static Block blockFluidSludge; - public static Block blockFirePit; - - public static Block blockOreFluorite; - public static Block blockMiningExplosive; public static Block blockHellfire; public static Block blockInfiniteFLuidTank; public static Block blockProjectTable; - public static Block blockTradeTable; - public static Block blockModularTable; - public static Block blockWitherGuard; - public static Block blockXpConverter; public static Block blockCompressedObsidian; - public static Block blockNet; public static Block blockPlayerDoorWooden; public static Block blockPlayerDoorIron; @@ -97,8 +61,6 @@ public final class ModBlocks { public static Block blockPlayerDoorCustom_Ice; public static Block blockPlayerDoorCustom_Cactus; - public static Block blockCustomMobSpawner; - public static Block blockCustomSuperLight; public static Block blockCustomJukebox; public static Block blockPooCollector; @@ -120,41 +82,18 @@ public final class ModBlocks { FluidRegistryHandler.registerFluids(); // Workbench - blockHeliumGenerator = new HeliumGenerator(); - blockFirePit = new FirePit(); blockFishTrap = new FishTrap(); blockInfiniteFLuidTank = new FluidTankInfinite(); blockMiningExplosive = new MiningExplosives(); blockHellfire = new HellFire(); blockProjectTable = new Machine_ProjectTable(); - blockTradeTable = new Machine_TradeTable(); - blockModularTable = new Machine_ModularityTable(); blockWitherGuard = new BlockWitherProof(); - blockXpConverter = new BlockTankXpConverter(); blockCompressedObsidian = new BlockCompressedObsidian(); - blockNet = new BlockNet(); - - blockFakeMiningPipe = new Mining_Pipe_Fake(); - blockFakeMiningHead = new Mining_Head_Fake(); blockCircuitProgrammer = new CircuitProgrammer(); blockDecayablesChest = new DecayablesChest(); - blockEggBox = new EggBox(); - - blockPlayerDoorWooden = new PlayerDoors(Material.wood, "door_wood", true); - blockPlayerDoorIron = new PlayerDoors(Material.iron, "door_iron", true); - blockPlayerDoorCustom_Glass = new PlayerDoors(Material.glass, "door_glass", false); - blockPlayerDoorCustom_Ice = new PlayerDoors(Material.ice, "door_ice", false); - blockPlayerDoorCustom_Cactus = new PlayerDoors( - Material.cactus, - "door_cactus", - false, - 0.6f, - Block.soundTypeGrass, - "Cactus"); - - // blockCustomSuperLight = new BlockSuperLight(); + blockCustomJukebox = new Machine_SuperJukebox(); blockPooCollector = new Machine_PooCollector(); @@ -165,7 +104,5 @@ public final class ModBlocks { blockVolumetricFlaskSetter = new VolumetricFlaskSetter(); - new BlockGenericRedstoneDetector(); - new BlockGenericRedstoneTest(); } } diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockNet.java b/src/main/java/gtPlusPlus/core/block/general/BlockNet.java deleted file mode 100644 index c462021374..0000000000 --- a/src/main/java/gtPlusPlus/core/block/general/BlockNet.java +++ /dev/null @@ -1,37 +0,0 @@ -package gtPlusPlus.core.block.general; - -import static gregtech.api.enums.Mods.GTPlusPlus; - -import java.util.Random; - -import net.minecraft.block.BlockWeb; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.Item; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.ModItems; - -public class BlockNet extends BlockWeb { - - public BlockNet() { - this.setCreativeTab(AddToCreativeTab.tabBlock); - this.setLightOpacity(1); - this.setHardness(4.0F); - this.setBlockName("blockNet"); - GameRegistry.registerBlock(this, "blockNet"); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister iIcon) { - this.blockIcon = iIcon.registerIcon(GTPlusPlus.ID + ":" + "net"); - } - - @Override - public Item getItemDropped(final int p_149650_1_, final Random p_149650_2_, final int p_149650_3_) { - return ModItems.itemRope; - } -} diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockSuperLight.java b/src/main/java/gtPlusPlus/core/block/general/BlockSuperLight.java index a9c309d5c7..f62fc50a69 100644 --- a/src/main/java/gtPlusPlus/core/block/general/BlockSuperLight.java +++ b/src/main/java/gtPlusPlus/core/block/general/BlockSuperLight.java @@ -179,7 +179,6 @@ public class BlockSuperLight extends BlockContainer { else if (enable && aLight == 0) { aBlocksToUpdate.put(new BlockPos(xOff, yOff, zOff, this.worldObj)); if (aBlockGet instanceof BlockAir) { - Logger.INFO("Lit air."); this.worldObj.setBlock( xOff, yOff, @@ -188,7 +187,6 @@ public class BlockSuperLight extends BlockContainer { 0, 3); } - // aBlockGet.setLightLevel(15); aLitCounter++; } // Turning Lights off diff --git a/src/main/java/gtPlusPlus/core/block/general/BlockTankXpConverter.java b/src/main/java/gtPlusPlus/core/block/general/BlockTankXpConverter.java deleted file mode 100644 index 57b70c1927..0000000000 --- a/src/main/java/gtPlusPlus/core/block/general/BlockTankXpConverter.java +++ /dev/null @@ -1,156 +0,0 @@ -package gtPlusPlus.core.block.general; - -import static gregtech.api.enums.Mods.GTPlusPlus; - -import java.util.Random; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.EnumCreatureType; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.item.base.itemblock.ItemBlockEntityBase; - -public class BlockTankXpConverter extends BlockContainer { - - @SideOnly(Side.CLIENT) - private IIcon textureTop; - - @SideOnly(Side.CLIENT) - private IIcon textureBottom; - - @SideOnly(Side.CLIENT) - private IIcon textureFront; - - public BlockTankXpConverter() { - super(Material.iron); - this.setBlockName("blockTankXpConverter"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - GameRegistry.registerBlock(this, ItemBlockEntityBase.class, "blockTankXpConverter"); - this.generateRainbowMap(); - if (!this.getTickRandomly()) { - this.setTickRandomly(true); - } - } - - /** - * Gets the block's texture. Args: side, meta - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int ordinalSide, final int meta) { - return ordinalSide == 1 ? this.textureTop - : (ordinalSide == 0 ? this.textureBottom - : ((ordinalSide != 2) && (ordinalSide != 4) ? this.blockIcon : this.textureFront)); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister p_149651_1_) { - this.blockIcon = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "SwirlGray"); - this.textureTop = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "SwirlGray"); - this.textureBottom = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "SwirlGray"); - this.textureFront = p_149651_1_.registerIcon(GTPlusPlus.ID + ":" + "SwirlGray"); - } - - /** - * Called upon block activation (right click on the block.) - */ - @Override - public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, - final int side, final float lx, final float ly, final float lz) { - - return true; - - /* - * if (world.isRemote) { return true; } else { boolean mDidScrewDriver = false; // Check For Screwdriver try { - * final ItemStack mHandStack = PlayerUtils.getItemStackInPlayersHand(world, player.getDisplayName()); final - * Item mHandItem = mHandStack.getItem(); if (((mHandItem instanceof GT_MetaGenerated_Tool_01) && - * ((mHandItem.getDamage(mHandStack) == 22) || (mHandItem.getDamage(mHandStack) == 150)))) { final - * TileEntityXpConverter tile = (TileEntityXpConverter) world.getTileEntity(x, y, z); if (tile != null) { - * mDidScrewDriver = true; tile.onScrewdriverRightClick((byte) side, player, x, y, z); } } } catch (final - * Throwable t) { mDidScrewDriver = false; } if (!mDidScrewDriver) { try { final TileEntityXpConverter tile = - * (TileEntityXpConverter) world.getTileEntity(x, y, z); if (tile != null) { tile.onRightClick((byte) side, - * player, x, y, z); } } catch (final Throwable t) { } final TileEntityXpConverter tank = - * (TileEntityXpConverter) world.getTileEntity(x, y, z); if (tank != null) { if (tank.tankEssence.getFluid() != - * null) { PlayerUtils.messagePlayer(player, "This tank contains " + tank.tankEssence.getFluidAmount() + "L of " - * + tank.tankEssence.getFluid().getLocalizedName()); } if (tank.tankLiquidXp.getFluid() != null) { - * PlayerUtils.messagePlayer(player, "This tank contains " + tank.tankLiquidXp.getFluidAmount() + "L of " + - * tank.tankLiquidXp.getFluid().getLocalizedName()); } if ((tank.tankEssence.getFluid() != null) && - * (tank.tankLiquidXp.getFluid() != null)) { PlayerUtils.messagePlayer(player, "This is worth " + - * EnchantingUtils.getLevelForLiquid(tank.tankLiquidXp.getFluidAmount()) + " levels."); } } } } return true; - */ } - - @Override - public int getRenderBlockPass() { - return 1; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int p_149915_2_) { - // return new TileEntityXpConverter(); - return null; - } - - @Override - public void onBlockAdded(final World world, final int x, final int y, final int z) { - super.onBlockAdded(world, x, y, z); - } - - @Override - public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, - final int z) { - return false; - } - - private final boolean generateRainbowMap() { - return true; - } - - @Override - public int getBlockColor() { - return super.getBlockColor(); - } - - @Override - public int colorMultiplier(final IBlockAccess p_149720_1_, final int p_149720_2_, final int p_149720_3_, - final int p_149720_4_) { - return super.colorMultiplier(p_149720_1_, p_149720_2_, p_149720_3_, p_149720_4_); - } - - @Override - public void updateTick(final World world, final int x, final int y, final int z, final Random rand) { - // this.mRainbowTick++; - super.updateTick(world, x, y, z, rand); - } - - @Override - public void randomDisplayTick(final World world, final int x, final int y, final int z, final Random rand) { - // this.mRainbowTick++; - super.randomDisplayTick(world, x, y, z, rand); - } - - @Override - public int tickRate(final World p_149738_1_) { - return 20; - } - - @Override - public int getLightValue() { - return 6; - } -} diff --git a/src/main/java/gtPlusPlus/core/block/general/FirePit.java b/src/main/java/gtPlusPlus/core/block/general/FirePit.java deleted file mode 100644 index 4b4390bc78..0000000000 --- a/src/main/java/gtPlusPlus/core/block/general/FirePit.java +++ /dev/null @@ -1,238 +0,0 @@ -package gtPlusPlus.core.block.general; - -import static net.minecraftforge.common.util.ForgeDirection.DOWN; -import static net.minecraftforge.common.util.ForgeDirection.EAST; -import static net.minecraftforge.common.util.ForgeDirection.NORTH; -import static net.minecraftforge.common.util.ForgeDirection.SOUTH; -import static net.minecraftforge.common.util.ForgeDirection.UP; -import static net.minecraftforge.common.util.ForgeDirection.WEST; - -import java.util.List; -import java.util.Random; - -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.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.block.base.BasicBlock; -import gtPlusPlus.core.creative.AddToCreativeTab; -import gtPlusPlus.core.tileentities.general.TileEntityFirepit; - -public class FirePit extends BasicBlock { - - private static IIcon[] TEXTURE; - public static final int META_ANTIBUILDER = 2; - private int meta; - - public FirePit() { - super("blockFirePit", Material.wood); - this.setBlockName("blockFirePit"); - this.setCreativeTab(AddToCreativeTab.tabMachines); - this.setHardness(10.0F); - this.setResistance(35.0F); - this.setStepSound(Block.soundTypeWood); - GameRegistry.registerBlock(this, "blockFirePit"); - } - - @Override - public int tickRate(final World aParWorld) { - return 30; - } - - @Override - public TileEntity createNewTileEntity(final World world, final int i) { - return new TileEntityFirepit(); - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister par1IconRegister) { - TEXTURE = new IIcon[] { par1IconRegister.registerIcon(this.getTextureName() + "_layer_0"), - par1IconRegister.registerIcon(this.getTextureName() + "_layer_1") }; - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - @Override - public void getSubBlocks(final Item par1, final CreativeTabs par2CreativeTabs, final List par3List) { - par3List.add(new ItemStack(par1, 1, 2)); - } - - @Override - public void updateTick(final World par1World, final int x, final int y, final int z, final Random par5Random) { - if (!par1World.isRemote) { - // Sets meta. - this.meta = par1World.getBlockMetadata(x, y, z); - // If Raining, Put out. - if (par1World.isRaining() - && (par1World.canLightningStrikeAt(x, y, z) || par1World.canLightningStrikeAt(x - 1, y, z) - || par1World.canLightningStrikeAt(x + 1, y, z) - || par1World.canLightningStrikeAt(x, y, z - 1) - || par1World.canLightningStrikeAt(x, y, z + 1))) { - // Fire goes out - par1World.setBlockMetadataWithNotify(x, y, z, 1, 4); - } - if (isNeighborBurning(par1World, x, y, z)) { - // Fire can ignite from a nearby flame source. - par1World.setBlockMetadataWithNotify(x, y, z, 2, 4); - } - } - } - - @Override - public Item getItemDropped(final int meta, final Random par2Random, final int par3) { - switch (meta) { - case 0: - return null; - default: - break; - } - return Item.getItemFromBlock(this); - } - - @Override - public int damageDropped(final int meta) { - return meta; - } - - @Override - public boolean isOpaqueCube() { - return false; - } - - @Override - public int getRenderType() { - return -1; - } - - @Override - @SideOnly(Side.CLIENT) - public int getRenderBlockPass() { - return 1; - } - - @Override - public boolean renderAsNormalBlock() { - return false; - } - - /* - * @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World aParWorld, int x, int y, int z){ return - * null; } - */ - - @Override - protected boolean canSilkHarvest() { - return false; - } - - @Override - @SideOnly(Side.CLIENT) - public void randomDisplayTick(final World p_149734_1_, final int p_149734_2_, final int p_149734_3_, - final int p_149734_4_, final Random p_149734_5_) { - int l; - float f; - float f1; - float f2; - if (this.meta == 2) { - if (p_149734_5_.nextInt(24) == 0) { - p_149734_1_.playSound( - p_149734_2_ + 0.5F, - p_149734_3_ + 0.5F, - p_149734_4_ + 0.5F, - "fire.fire", - 1.0F + p_149734_5_.nextFloat(), - (p_149734_5_.nextFloat() * 0.7F) + 0.3F, - false); - } - } - if (this.meta == 2) { - if (!World.doesBlockHaveSolidTopSurface(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_) - && !Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_, UP)) { - if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_ - 1, p_149734_3_, p_149734_4_, EAST)) { - for (l = 0; l < 2; ++l) { - f = p_149734_2_ + (p_149734_5_.nextFloat() * 0.1F); - f1 = p_149734_3_ + p_149734_5_.nextFloat(); - f2 = p_149734_4_ + p_149734_5_.nextFloat(); - p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - } - } - if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_ + 1, p_149734_3_, p_149734_4_, WEST)) { - for (l = 0; l < 2; ++l) { - f = p_149734_2_ + 1 - (p_149734_5_.nextFloat() * 0.1F); - f1 = p_149734_3_ + p_149734_5_.nextFloat(); - f2 = p_149734_4_ + p_149734_5_.nextFloat(); - p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - } - } - if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ - 1, SOUTH)) { - for (l = 0; l < 2; ++l) { - f = p_149734_2_ + p_149734_5_.nextFloat(); - f1 = p_149734_3_ + p_149734_5_.nextFloat(); - f2 = p_149734_4_ + (p_149734_5_.nextFloat() * 0.1F); - p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - } - } - if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ + 1, NORTH)) { - for (l = 0; l < 2; ++l) { - f = p_149734_2_ + p_149734_5_.nextFloat(); - f1 = p_149734_3_ + p_149734_5_.nextFloat(); - f2 = p_149734_4_ + 1 - (p_149734_5_.nextFloat() * 0.1F); - p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - } - } - if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_ + 1, p_149734_4_, DOWN)) { - for (l = 0; l < 2; ++l) { - f = p_149734_2_ + p_149734_5_.nextFloat(); - f1 = p_149734_3_ + 1 - (p_149734_5_.nextFloat() * 0.1F); - f2 = p_149734_4_ + p_149734_5_.nextFloat(); - p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - } - } - } else { - if (this.meta == 2) { - for (l = 0; l < 3; ++l) { - f = p_149734_2_ + p_149734_5_.nextFloat(); - f1 = p_149734_3_ + (p_149734_5_.nextFloat() * 0.5F) + 0.5F; - f2 = p_149734_4_ + p_149734_5_.nextFloat(); - p_149734_1_.spawnParticle("largesmoke", f, f1, f2, 0.0D, 0.0D, 0.0D); - } - } - } - } - } - - @SideOnly(Side.CLIENT) - public static IIcon getFireIcon(final int p_149840_1_) { - return FirePit.TEXTURE[p_149840_1_]; - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(final int ordinalSide, final int meta) { - return FirePit.TEXTURE[0]; - } - - private static boolean isNeighborBurning(final World world, final int x, final int y, final int z) { - return canCatchFire(world, x + 1, y, z, WEST) || canCatchFire(world, x - 1, y, z, EAST) - || canCatchFire(world, x, y - 1, z, UP) - || canCatchFire(world, x, y + 1, z, DOWN) - || canCatchFire(world, x, y, z - 1, SOUTH) - || canCatchFire(world, x, y, z + 1, NORTH); - } - - public static boolean canCatchFire(final World world, final int x, final int y, final int z, - final ForgeDirection face) { - return world.getBlock(x, y, z).isFireSource(world, x, y, z, face); - } -} diff --git a/src/main/java/gtPlusPlus/core/block/general/LightGlass.java b/src/main/java/gtPlusPlus/core/block/general/LightGlass.java index 4bc120678f..64b2455e41 100644 --- a/src/main/java/gtPlusPlus/core/block/general/LightGlass.java +++ b/src/main/java/gtPlusPlus/core/block/general/LightGlass.java @@ -7,9 +7,11 @@ import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.BlockAir; import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.ItemStack; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import codechicken.nei.api.API; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -28,7 +30,6 @@ public class LightGlass extends BlockAir { private int hex; public LightGlass(final boolean bool) { - // super("blockMFEffect", Material.air, bool); super(); this.setCreativeTab(AddToCreativeTab.tabBlock); this.setBlockName("blockMFEffect"); @@ -38,9 +39,7 @@ public class LightGlass extends BlockAir { setStepSound(Block.soundTypeGlass); GameRegistry.registerBlock(this, "blockMFEffect"); - /* - * this.setLightOpacity(0); this.setTickRandomly(true); this.setResistance(1); - */ + API.hideItem(new ItemStack(this)); } /** diff --git a/src/main/java/gtPlusPlus/core/block/general/PlayerDoors.java b/src/main/java/gtPlusPlus/core/block/general/PlayerDoors.java deleted file mode 100644 index d5cd3ef2fa..0000000000 --- a/src/main/java/gtPlusPlus/core/block/general/PlayerDoors.java +++ /dev/null @@ -1,485 +0,0 @@ -package gtPlusPlus.core.block.general; - -import static gregtech.api.enums.Mods.GTPlusPlus; - -import java.util.HashMap; -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockDoor; -import net.minecraft.block.ITileEntityProvider; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.IconFlipped; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.IIcon; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; - -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gtPlusPlus.core.item.base.itemblock.ItemBlockDoor; -import gtPlusPlus.core.tileentities.general.TileEntityPlayerDoorBase; -import gtPlusPlus.core.util.Utils; - -public class PlayerDoors extends BlockDoor implements ITileEntityProvider |
