Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fracking Tower And Bedrock Oil Deposit #86

Open
wants to merge 2 commits into
base: Custom-1.12.2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
234 changes: 117 additions & 117 deletions src/main/java/com/hbm/blocks/BlockDummyable.java

Large diffs are not rendered by default.

101 changes: 26 additions & 75 deletions src/main/java/com/hbm/blocks/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,79 +47,8 @@
import com.hbm.blocks.gas.BlockGasRadon;
import com.hbm.blocks.gas.BlockGasRadonDense;
import com.hbm.blocks.gas.BlockGasRadonTomb;
import com.hbm.blocks.generic.BMPowerBox;
import com.hbm.blocks.generic.BarbedWire;
import com.hbm.blocks.generic.BlockAbsorber;
import com.hbm.blocks.generic.BlockAmmoCrate;
import com.hbm.blocks.generic.BlockAshes;
import com.hbm.blocks.generic.BlockBallsSpawner;
import com.hbm.blocks.generic.BlockBeaconable;
import com.hbm.blocks.generic.BlockBedrockOre;
import com.hbm.blocks.generic.BlockCanCrate;
import com.hbm.blocks.generic.BlockCap;
import com.hbm.blocks.generic.BlockChain;
import com.hbm.blocks.generic.BlockClorine;
import com.hbm.blocks.generic.BlockClorineSeal;
import com.hbm.blocks.generic.BlockCluster;
import com.hbm.blocks.generic.BlockCoalBurning;
import com.hbm.blocks.generic.BlockCoalOil;
import com.hbm.blocks.generic.BlockControlPanel;
import com.hbm.blocks.generic.BlockCrate;
import com.hbm.blocks.generic.BlockDepth;
import com.hbm.blocks.generic.BlockDepthOre;
import com.hbm.blocks.generic.BlockDoorGeneric;
import com.hbm.blocks.generic.BlockFallingRad;
import com.hbm.blocks.generic.BlockFallout;
import com.hbm.blocks.generic.BlockGeysir;
import com.hbm.blocks.generic.BlockGlyph;
import com.hbm.blocks.generic.BlockGoldSand;
import com.hbm.blocks.generic.BlockGrate;
import com.hbm.blocks.generic.BlockHazard;
import com.hbm.blocks.generic.*;
import com.hbm.blocks.generic.BlockHazard.ExtDisplayEffect;
import com.hbm.blocks.generic.BlockHazardFalling;
import com.hbm.blocks.generic.BlockJungleCrate;
import com.hbm.blocks.generic.BlockLithium;
import com.hbm.blocks.generic.BlockMarker;
import com.hbm.blocks.generic.BlockMetalFence;
import com.hbm.blocks.generic.BlockModDoor;
import com.hbm.blocks.generic.BlockMush;
import com.hbm.blocks.generic.BlockMushHuge;
import com.hbm.blocks.generic.BlockNTMDirt;
import com.hbm.blocks.generic.BlockNTMGlass;
import com.hbm.blocks.generic.BlockNTMLadder;
import com.hbm.blocks.generic.BlockNetherCoal;
import com.hbm.blocks.generic.BlockNoDrop;
import com.hbm.blocks.generic.BlockNuclearWaste;
import com.hbm.blocks.generic.BlockOre;
import com.hbm.blocks.generic.BlockOutgas;
import com.hbm.blocks.generic.BlockPinkLog;
import com.hbm.blocks.generic.BlockGenericSlab;
import com.hbm.blocks.generic.BlockGenericStairs;
import com.hbm.blocks.generic.BlockPipe;
import com.hbm.blocks.generic.BlockPlasma;
import com.hbm.blocks.generic.BlockPorous;
import com.hbm.blocks.generic.BlockRadResistant;
import com.hbm.blocks.generic.BlockRailing;
import com.hbm.blocks.generic.BlockRotatablePillar;
import com.hbm.blocks.generic.BlockSmolder;
import com.hbm.blocks.generic.BlockStorageCrate;
import com.hbm.blocks.generic.BlockVent;
import com.hbm.blocks.generic.BlockWriting;
import com.hbm.blocks.generic.DecoBlock;
import com.hbm.blocks.generic.DecoBlockAlt;
import com.hbm.blocks.generic.DecoPoleSatelliteReceiver;
import com.hbm.blocks.generic.DecoPoleTop;
import com.hbm.blocks.generic.DecoSteelPoles;
import com.hbm.blocks.generic.DecoTapeRecorder;
import com.hbm.blocks.generic.Guide;
import com.hbm.blocks.generic.RedBarrel;
import com.hbm.blocks.generic.ReinforcedLamp;
import com.hbm.blocks.generic.Spikes;
import com.hbm.blocks.generic.TrappedBrick;
import com.hbm.blocks.generic.WasteGrassTall;
import com.hbm.blocks.generic.WasteEarth;
import com.hbm.blocks.generic.WasteLog;
import com.hbm.blocks.generic.YellowBarrel;
import com.hbm.blocks.machine.*;
import com.hbm.blocks.machine.pile.BlockGraphite;
import com.hbm.blocks.machine.pile.BlockGraphiteFuel;
Expand Down Expand Up @@ -180,6 +109,7 @@
import com.hbm.tileentity.DoorDecl;

import net.minecraft.block.Block;
import net.minecraft.block.BlockFalling;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
Expand Down Expand Up @@ -399,6 +329,7 @@ public SoundEvent getBreakSound() {
public static final Block ore_oil = new BlockOre(Material.ROCK, "ore_oil").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F);
public static final Block ore_oil_empty = new BlockBase(Material.ROCK, "ore_oil_empty").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F);
public static final Block ore_oil_sand = new BlockFallingBase(Material.SAND, "ore_oil_sand", SoundType.SAND).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(1.0F);
public static final Block ore_bedrock_oil = new BlockBase(Material.ROCK, "ore_bedrock_oil").setCreativeTab(MainRegistry.blockTab).setBlockUnbreakable().setResistance(1000000);

public static final Block ore_meteor_uranium = new BlockOre(Material.ROCK, "ore_meteor_uranium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F);
public static final Block ore_meteor_thorium = new BlockOre(Material.ROCK, "ore_meteor_thorium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F);
Expand Down Expand Up @@ -674,7 +605,22 @@ public SoundEvent getBreakSound() {
public static final Block block_cap_fritz = new BlockCap(Material.IRON, "block_cap_fritz").setSoundType(SoundType.METAL).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab);
public static final Block block_cap_sunset = new BlockCap(Material.IRON, "block_cap_sunset").setSoundType(SoundType.METAL).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab);
public static final Block block_cap_star = new BlockCap(Material.IRON, "block_cap_star").setSoundType(SoundType.METAL).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab);


//PollutedBecauseOilThings
public static final Block plant_dead_generic = new BlockDeadPlant(Material.PLANTS, "plant_dead_generic").setSoundType(SoundType.PLANT).setHardness(0).setResistance(0).setCreativeTab(MainRegistry.blockTab);
public static final Block plant_dead_grass = new BlockDeadPlant(Material.PLANTS, "plant_dead_grass").setSoundType(SoundType.PLANT).setHardness(0).setResistance(0).setCreativeTab(MainRegistry.blockTab);
public static final Block plant_dead_flower = new BlockDeadPlant(Material.PLANTS, "plant_dead_flower").setSoundType(SoundType.PLANT).setHardness(0).setResistance(0).setCreativeTab(MainRegistry.blockTab);
public static final Block plant_dead_big_flower = new BlockDeadPlant(Material.PLANTS, "plant_dead_big_flower").setSoundType(SoundType.PLANT).setHardness(0).setResistance(0).setCreativeTab(MainRegistry.blockTab);
public static final Block plant_dead_fern = new BlockDeadPlant(Material.PLANTS, "plant_dead_fern").setSoundType(SoundType.PLANT).setHardness(0).setResistance(0).setCreativeTab(MainRegistry.blockTab);

public static final Block dirt_dead = new BlockFallingBase(Material.GROUND, "dirt_dead", SoundType.GROUND).setHardness(0.5F).setCreativeTab(MainRegistry.blockTab);
public static final Block dirt_oily = new BlockFallingBase(Material.GROUND, "dirt_oily", SoundType.GROUND).setHardness(0.5F).setCreativeTab(MainRegistry.blockTab);

public static final Block sand_dirty = new BlockFallingBase(Material.SAND, "sand_dirty", SoundType.SAND).setHardness(0.5F).setCreativeTab(MainRegistry.blockTab);
public static final Block sand_dirty_red = new BlockFallingBase(Material.SAND, "sand_dirty_red", SoundType.SAND).setHardness(0.5F).setCreativeTab(MainRegistry.blockTab);

public static final Block stone_cracked = new BlockFallingBase(Material.ROCK, "stone_cracked", SoundType.STONE).setHardness(5.0F).setCreativeTab(MainRegistry.blockTab);

//Bombs
public static final Block nuke_gadget = new NukeGadget(Material.IRON, "nuke_gadget").setCreativeTab(MainRegistry.nukeTab).setHardness(5.0F).setResistance(6000.0F);
public static final int guiID_nuke_gadget = 3;
Expand Down Expand Up @@ -1063,9 +1009,12 @@ public SoundEvent getBreakSound() {

public static final Block machine_well = new MachineOilWell(Material.IRON, "machine_well").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab);
public static final Block machine_pumpjack = new MachinePumpjack(Material.IRON, "machine_pumpjack").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab);
public static final Block machine_fracking_tower = new MachineFrackingTower(Material.IRON, "machine_fracking_tower").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab);
public static final Block oil_pipe = new BlockNoDrop(Material.IRON, "oil_pipe").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
public static final int guiID_machine_well = 40;
public static final int guiID_machine_pumpjack = 51;
public static final int guiID_machine_fracking_tower = 62;


public static final Block machine_flare = new MachineGasFlare(Material.IRON, "machine_flare").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab);
public static final int guiID_machine_flare = 44;
Expand Down Expand Up @@ -1331,7 +1280,8 @@ public SoundEvent getBreakSound() {

public static final Block fluid_duct_mk2 = new BlockFluidPipeMk2(Material.IRON, "fluid_duct_mk2").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
public static final Block fluid_duct_solid = new BlockFluidPipeSolid(Material.IRON, "fluid_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);

public static final Block fluid_duct_neo = new BlockFluidPipeMk2(Material.IRON, "fluid_duct_neo").setHardness(5.0f).setResistance(10.0f).setCreativeTab(null);

public static final Block conveyor = new BlockConveyor(Material.IRON, "conveyor").setHardness(0.0F).setResistance(2.0F).setCreativeTab(null);
public static final Block chain = new BlockChain(Material.IRON, "dungeon_chain").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab);

Expand Down Expand Up @@ -1434,7 +1384,8 @@ public Material setImmovableMobility() {

public static final Block dummy_block_well = new DummyBlockWell(Material.IRON, "dummy_block_well").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
public static final Block dummy_port_well = new DummyBlockWell(Material.IRON, "dummy_port_well").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);



public static final Block dummy_block_pumpjack = new DummyBlockPumpjack(Material.IRON, "dummy_block_pumpjack").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
public static final Block dummy_port_pumpjack = new DummyBlockPumpjack(Material.IRON, "dummy_port_pumpjack").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);

Expand Down
80 changes: 80 additions & 0 deletions src/main/java/com/hbm/blocks/generic/BlockDeadPlant.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
package com.hbm.blocks.generic;

import com.hbm.blocks.ModBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraft.block.BlockBush;

import java.util.Random;

public class BlockDeadPlant extends BlockBush
{
public BlockDeadPlant(Material materialIn, String s) {
super(materialIn);
this.setUnlocalizedName(s);
this.setRegistryName(s);

ModBlocks.ALL_BLOCKS.add(this);

}

@Override
public boolean canPlaceBlockAt(World world, BlockPos pos) {
return this.canBlockStay(world, pos, world.getBlockState(pos));
}

// protected void checkAndDropBlock(World world, BlockPos pos) {
// if (!this.canBlockStay(world, pos)) {
// this.dropBlockAsItem(world, pos, world.getBlockState(pos), 0);
// world.setBlockState(pos, Blocks.AIR.getDefaultState());
// }
//
// }

public boolean canBlockStay(World world, BlockPos pos, IBlockState state) {
Block block = world.getBlockState(pos.down()).getBlock();
return block == Blocks.GRASS || block == Blocks.DIRT || block == ModBlocks.waste_earth || block == ModBlocks.waste_dirt || block == ModBlocks.dirt_dead || block == ModBlocks.dirt_oily;
}


@Override
public Block setSoundType(SoundType sound){
return super.setSoundType(sound);
}

@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
return new AxisAlignedBB(0.09999999403953552D, 0.0D, 0.09999999403953552D, 0.8999999761581421D, 0.4000000059604645D, 0.8999999761581421D);
}



public boolean isOpaqueCube() {
return false;
}

public int getRenderType() {
return 1;
}

public int damageDropped(int meta) {
return meta;
}

public Item getItemDropped(int meta, Random rand, int fortune) {
return Items.AIR;
}


}
2 changes: 1 addition & 1 deletion src/main/java/com/hbm/blocks/machine/DummyBlockFlare.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.TileEntityDummy;
import com.hbm.tileentity.machine.TileEntityDummyFluidPort;
import com.hbm.tileentity.machine.TileEntityMachineGasFlare;
import com.hbm.tileentity.machine.oil.TileEntityMachineGasFlare;

import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.TileEntityDummy;
import com.hbm.tileentity.machine.TileEntityDummyFluidPort;
import com.hbm.tileentity.machine.TileEntityMachinePumpjack;
import com.hbm.tileentity.machine.oil.TileEntityMachinePumpjack;

import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.TileEntityDummy;
import com.hbm.tileentity.machine.TileEntityDummyFluidPort;
import com.hbm.tileentity.machine.TileEntityMachineRefinery;
import com.hbm.tileentity.machine.oil.TileEntityMachineRefinery;

import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/hbm/blocks/machine/DummyBlockWell.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.machine.TileEntityDummy;
import com.hbm.tileentity.machine.TileEntityDummyFluidPort;
import com.hbm.tileentity.machine.TileEntityMachineOilWell;
import com.hbm.tileentity.machine.oil.TileEntityMachineOilWell;

import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
Expand Down
Loading