Update some texture paths, fix ore harvestibility, and fix ore recipes

This commit is contained in:
TheDoctorSoda 2016-03-13 22:25:06 -07:00
parent 72b2f01b9a
commit 801b497d86
29 changed files with 1281 additions and 1 deletions

View file

@ -62,7 +62,7 @@ public class BlockOre2 extends BaseBlock implements ITexturedBlock, IOreNameProv
setUnlocalizedName("techreborn.ore2");
setCreativeTab(TechRebornCreativeTabMisc.instance);
setHardness(2.0f);
setHarvestLevel("pickaxe", 2);
setHarvestLevel("pickaxe", 1);
this.setDefaultState(this.blockState.getBaseState().withProperty(METADATA, 0));
}

View file

@ -0,0 +1,65 @@
package techreborn.blocks.advanced_machine;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileBlastFurnace;
public class BlockBlastFurnace extends BlockMachineBase implements IRotationTexture {
public BlockBlastFurnace(Material material) {
super();
setUnlocalizedName("techreborn.blastfurnace");
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
return new TileBlastFurnace();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if (!player.isSneaking())
player.openGui(Core.INSTANCE, GuiHandler.blastFurnaceID, world, x, y, z);
return true;
}
@Override
public boolean isAdvanced() {
return true;
}
private final String prefix = "techreborn:blocks/machine/advanced_machines/";
@Override
public String getFrontOff() {
return prefix + "industrial_blast_furnace_front_off";
}
@Override
public String getFrontOn() {
return prefix + "industrial_blast_furnace_front_on";
}
@Override
public String getSide() {
return prefix + "advanced_machine_side";
}
@Override
public String getTop() {
return prefix + "advanced_machine_top";
}
@Override
public String getBottom() {
return prefix + "advanced_machine_bottom";
}
}

View file

@ -0,0 +1,60 @@
package techreborn.blocks.advanced_machine;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileCentrifuge;
public class BlockCentrifuge extends BlockMachineBase implements IRotationTexture {
public BlockCentrifuge() {
super();
setUnlocalizedName("techreborn.centrifuge");
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileCentrifuge();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if (!player.isSneaking()) {
player.openGui(Core.INSTANCE, GuiHandler.centrifugeID, world, x, y, z);
}
return true;
}
private final String prefix = "techreborn:blocks/machine/advanced_machines/";
@Override
public String getFrontOff() {
return prefix + "industrial_centrifuge_side_off";
}
@Override
public String getFrontOn() {
return prefix + "industrial_centrifuge_side_on";
}
@Override
public String getSide() {
return getFrontOff();
}
@Override
public String getTop() {
return prefix + "industrial_centrifuge_top_off";
}
@Override
public String getBottom() {
return prefix + "industrial_centrifuge_bottom";
}
}

View file

@ -0,0 +1,42 @@
package techreborn.blocks.advanced_machine;
import net.minecraft.block.material.Material;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IRotationTexture;
import techreborn.client.TechRebornCreativeTab;
public class BlockDistillationTower extends BlockMachineBase implements IRotationTexture {
public BlockDistillationTower(Material material) {
super();
setUnlocalizedName("techreborn.distillationtower");
setCreativeTab(TechRebornCreativeTab.instance);
}
private final String prefix = "techreborn:blocks/machine/advanced_machines/";
@Override
public String getFrontOff() {
return prefix + "distillation_tower_front_off";
}
@Override
public String getFrontOn() {
return prefix + "distillation_tower_front_off";
}
@Override
public String getSide() {
return prefix + "advanced_machine_side";
}
@Override
public String getTop() {
return prefix + "industrial_centrifuge_top_off";
}
@Override
public String getBottom() {
return prefix + "industrial_centrifuge_bottom";
}
}

View file

@ -0,0 +1,60 @@
package techreborn.blocks.advanced_machine;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileImplosionCompressor;
public class BlockImplosionCompressor extends BlockMachineBase implements IRotationTexture {
public BlockImplosionCompressor(Material material) {
super();
setUnlocalizedName("techreborn.implosioncompressor");
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileImplosionCompressor();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if (!player.isSneaking())
player.openGui(Core.INSTANCE, GuiHandler.implosionCompresserID, world, x, y, z);
return true;
}
private final String prefix = "techreborn:blocks/machine/advanced_machines/";
@Override
public String getFrontOff() {
return prefix + "implosion_compressor_front_off";
}
@Override
public String getFrontOn() {
return prefix + "implosion_compressor_front_on";
}
@Override
public String getSide() {
return prefix + "advanced_machine_side";
}
@Override
public String getTop() {
return prefix + "industrial_centrifuge_top_off";
}
@Override
public String getBottom() {
return prefix + "implosion_compressor_bottom";
}
}

View file

@ -0,0 +1,60 @@
package techreborn.blocks.advanced_machine;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileIndustrialElectrolyzer;
public class BlockIndustrialElectrolyzer extends BlockMachineBase implements IRotationTexture {
public BlockIndustrialElectrolyzer(Material material) {
super();
setUnlocalizedName("techreborn.industrialelectrolyzer");
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
return new TileIndustrialElectrolyzer();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if (!player.isSneaking())
player.openGui(Core.INSTANCE, GuiHandler.industrialElectrolyzerID, world, x, y, z);
return true;
}
private final String prefix = "techreborn:blocks/machine/advanced_machines/";
@Override
public String getFrontOff() {
return prefix + "industrial_electrolyzer_front_off";
}
@Override
public String getFrontOn() {
return prefix + "industrial_electrolyzer_front_on";
}
@Override
public String getSide() {
return prefix + "industrial_electrolyzer_front_off";
}
@Override
public String getTop() {
return prefix + "machine_top";
}
@Override
public String getBottom() {
return prefix + "machine_bottom";
}
}

View file

@ -0,0 +1,64 @@
package techreborn.blocks.advanced_machine;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileIndustrialGrinder;
public class BlockIndustrialGrinder extends BlockMachineBase implements IRotationTexture {
public BlockIndustrialGrinder(Material material) {
super();
setUnlocalizedName("techreborn.industrialgrinder");
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileIndustrialGrinder();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if(fillBlockWithFluid(world, new BlockPos(x, y, z), player)){
return true;
}
if (!player.isSneaking())
player.openGui(Core.INSTANCE, GuiHandler.industrialGrinderID, world, x, y, z);
return true;
}
private final String prefix = "techreborn:blocks/machine/advanced_machines/";
@Override
public String getFrontOff() {
return prefix + "industrial_grinder_front_off";
}
@Override
public String getFrontOn() {
return prefix + "industrial_grinder_front_on";
}
@Override
public String getSide() {
return prefix + "machine_side";
}
@Override
public String getTop() {
return prefix + "industrial_grinder_top_off";
}
@Override
public String getBottom() {
return prefix + "industrial_centrifuge_bottom";
}
}

View file

@ -0,0 +1,64 @@
package techreborn.blocks.advanced_machine;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileIndustrialSawmill;
public class BlockIndustrialSawmill extends BlockMachineBase implements IRotationTexture {
public BlockIndustrialSawmill(Material material) {
super();
setUnlocalizedName("techreborn.industrialsawmill");
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
return new TileIndustrialSawmill();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if(fillBlockWithFluid(world, new BlockPos(x, y, z), player)){
return true;
}
if (!player.isSneaking())
player.openGui(Core.INSTANCE, GuiHandler.sawMillID, world, x, y, z);
return true;
}
private final String prefix = "techreborn:blocks/machine/advanced_machines/";
@Override
public String getFrontOff() {
return prefix + "industrial_sawmill_front_off";
}
@Override
public String getFrontOn() {
return prefix + "industrial_sawmill_front_on";
}
@Override
public String getSide() {
return prefix + "advanced_machine_side";
}
@Override
public String getTop() {
return prefix + "advanced_machine_side";
}
@Override
public String getBottom() {
return prefix + "advanced_machine_side";
}
}

View file

@ -0,0 +1,74 @@
package techreborn.blocks.iron_machines;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileAlloyFurnace;
import java.util.ArrayList;
import java.util.List;
public class BlockAlloyFurnace extends BlockMachineBase implements IRotationTexture {
public BlockAlloyFurnace(Material material) {
super();
setUnlocalizedName("techreborn.alloyfurnace");
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
return new TileAlloyFurnace();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if (!player.isSneaking())
player.openGui(Core.INSTANCE, GuiHandler.alloyFurnaceID, world, x, y, z);
return true;
}
@Override
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
List<ItemStack> items = new ArrayList<ItemStack>();
items.add(new ItemStack(this));
return items;
}
private final String prefix = "techreborn:blocks/machine/iron_machines/";
@Override
public String getFrontOff() {
return prefix + "alloy_furnace_front_off";
}
@Override
public String getFrontOn() {
return prefix + "alloy_furnace_front_on";
}
@Override
public String getSide() {
return prefix + "iron_machine_side";
}
@Override
public String getTop() {
return prefix + "iron_machine_top";
}
@Override
public String getBottom() {
return prefix + "iron_machine_bottom";
}
}

View file

@ -0,0 +1,112 @@
package techreborn.blocks.iron_machines;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileIronFurnace;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class BlockIronFurnace extends BlockMachineBase implements IRotationTexture {
public BlockIronFurnace() {
super();
setUnlocalizedName("techreborn.ironfurnace");
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
return new TileIronFurnace();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if (!player.isSneaking())
player.openGui(Core.INSTANCE, GuiHandler.ironFurnace, world, x, y, z);
return true;
}
@Override
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
List<ItemStack> items = new ArrayList<ItemStack>();
items.add(new ItemStack(this));
return items;
}
@SideOnly(Side.CLIENT)
@SuppressWarnings("incomplete-switch")
public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
{
if (this.isActive(state))
{
EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
double d0 = (double)pos.getX() + 0.5D;
double d1 = (double)pos.getY() + rand.nextDouble() * 6.0D / 16.0D;
double d2 = (double)pos.getZ() + 0.5D;
double d3 = 0.52D;
double d4 = rand.nextDouble() * 0.6D - 0.3D;
switch (enumfacing)
{
case WEST:
worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 - d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
break;
case EAST:
worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d3, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
break;
case NORTH:
worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D, new int[0]);
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 - d3, 0.0D, 0.0D, 0.0D, new int[0]);
break;
case SOUTH:
worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D, new int[0]);
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 + d3, 0.0D, 0.0D, 0.0D, new int[0]);
}
}
}
private final String prefix = "techreborn:blocks/machine/iron_machines/";
@Override
public String getFrontOff() {
return prefix + "iron_furnace_front_off";
}
@Override
public String getFrontOn() {
return prefix + "iron_furnace_front_on";
}
@Override
public String getSide() {
return prefix + "iron_machine_side";
}
@Override
public String getTop() {
return prefix + "iron_machine_top";
}
@Override
public String getBottom() {
return prefix + "iron_machine_bottom";
}
}

View file

@ -0,0 +1,58 @@
package techreborn.blocks.machine;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IAdvancedRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileChunkLoader;
public class BlockChunkLoader extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockChunkLoader(Material material) {
super();
setUnlocalizedName("techreborn.chunkloader");
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
return new TileChunkLoader();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z,
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if (!player.isSneaking())
player.openGui(Core.INSTANCE, GuiHandler.chunkloaderID, world, x, y,
z);
return true;
}
private final String prefix = "techreborn:blocks/machine/greg_machines/";
@Override
public String getFront(boolean isActive) {
return prefix + "industrial_chunk_loader_side";
}
@Override
public String getSide(boolean isActive) {
return prefix + "industrial_chunk_loader_side" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "machine_top";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "machine_bottom";
}
}

View file

@ -0,0 +1,60 @@
package techreborn.blocks.tier1;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileAlloySmelter;
public class BlockAlloySmelter extends BlockMachineBase implements IRotationTexture {
public BlockAlloySmelter(Material material) {
super();
setUnlocalizedName("techreborn.alloysmelter");
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
return new TileAlloySmelter();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if (!player.isSneaking())
player.openGui(Core.INSTANCE, GuiHandler.alloySmelterID, world, x, y, z);
return true;
}
private final String prefix = "techreborn:blocks/machine/tier1_machines/";
@Override
public String getFrontOff() {
return prefix + "electric_alloy_furnace_front_off";
}
@Override
public String getFrontOn() {
return prefix + "electric_alloy_furnace_front_on";
}
@Override
public String getSide() {
return prefix + "tier1_machine_side";
}
@Override
public String getTop() {
return prefix + "tier1_machine_top";
}
@Override
public String getBottom() {
return prefix + "tier1_machine_bottom";
}
}

View file

@ -0,0 +1,61 @@
package techreborn.blocks.tier1;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.teir1.TileCompressor;
public class BlockCompressor extends BlockMachineBase implements IRotationTexture{
public BlockCompressor(Material material) {
super();
setUnlocalizedName("techreborn.compressor");
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileCompressor();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if (!player.isSneaking()){
player.openGui(Core.INSTANCE, GuiHandler.compressorID, world, x, y, z);
}
return true;
}
private final String prefix = "techreborn:blocks/machine/tier1_machines/";
@Override
public String getFrontOff() {
return prefix + "compressor_front_off";
}
@Override
public String getFrontOn() {
return prefix + "compressor_front_on";
}
@Override
public String getSide() {
return prefix + "tier1_machine_side";
}
@Override
public String getTop() {
return prefix + "tier1_machine_top";
}
@Override
public String getBottom() {
return prefix + "tier1_machine_bottom";
}
}

View file

@ -0,0 +1,61 @@
package techreborn.blocks.tier1;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.teir1.TileElectricFurnace;
public class BlockElectricFurnace extends BlockMachineBase implements IRotationTexture{
public BlockElectricFurnace(Material material) {
super();
setUnlocalizedName("techreborn.electricfurnace");
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileElectricFurnace();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if (!player.isSneaking()){
player.openGui(Core.INSTANCE, GuiHandler.electricFurnaceID, world, x, y, z);
}
return true;
}
private final String prefix = "techreborn:blocks/machine/tier1_machines/";
@Override
public String getFrontOff() {
return prefix + "electric_furnace_front_off";
}
@Override
public String getFrontOn() {
return prefix + "electric_furnace_front_on";
}
@Override
public String getSide() {
return prefix + "tier1_machine_side" ;
}
@Override
public String getTop() {
return prefix + "tier1_machine_top";
}
@Override
public String getBottom() {
return prefix + "tier1_machine_bottom";
}
}

View file

@ -0,0 +1,61 @@
package techreborn.blocks.tier1;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.teir1.TileExtractor;
public class BlockExtractor extends BlockMachineBase implements IRotationTexture{
public BlockExtractor(Material material) {
super();
setUnlocalizedName("techreborn.extractor");
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileExtractor();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if (!player.isSneaking()){
player.openGui(Core.INSTANCE, GuiHandler.extractorID, world, x, y, z);
}
return true;
}
private final String prefix = "techreborn:blocks/machine/tier1_machines/";
@Override
public String getFrontOff() {
return prefix + "extractor_front_off";
}
@Override
public String getFrontOn() {
return prefix + "extractor_front_on";
}
@Override
public String getSide() {
return prefix + "tier1_machine_side";
}
@Override
public String getTop() {
return prefix + "tier1_machine_top";
}
@Override
public String getBottom() {
return prefix + "tier1_machine_bottom";
}
}

View file

@ -0,0 +1,56 @@
package techreborn.blocks.tier1;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IAdvancedRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.teir1.TileGrinder;
public class BlockGrinder extends BlockMachineBase implements IAdvancedRotationTexture{
public BlockGrinder(Material material) {
super();
setUnlocalizedName("techreborn.grinder");
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileGrinder();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if (!player.isSneaking()){
player.openGui(Core.INSTANCE, GuiHandler.grinderID, world, x, y, z);
}
return true;
}
private final String prefix = "techreborn:blocks/machine/tier1_machines/";
@Override
public String getFront(boolean isActive) {
return isActive ? prefix + "grinder_front_on" : prefix + "grinder_front_off";
}
@Override
public String getSide(boolean isActive) {
return prefix + "tier1_machine_side";
}
@Override
public String getTop(boolean isActive) {
return isActive ? prefix + "grinder_top_on" : prefix + "grinder_top_off";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "tier1_machine_bottom";
}
}

View file

@ -0,0 +1,61 @@
package techreborn.blocks.tier1;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.teir1.TileRecycler;
public class BlockRecycler extends BlockMachineBase implements IRotationTexture{
public BlockRecycler(Material material) {
super();
setUnlocalizedName("techreborn.recycler");
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileRecycler();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if (!player.isSneaking()){
player.openGui(Core.INSTANCE, GuiHandler.recyclerID, world, x, y, z);
}
return true;
}
private final String prefix = "techreborn:blocks/machine/tier1_machines/";
@Override
public String getFrontOff() {
return prefix + "recycler_front_off";
}
@Override
public String getFrontOn() {
return prefix + "recycler_front_on";
}
@Override
public String getSide() {
return prefix + "tier1_machine_side";
}
@Override
public String getTop() {
return prefix + "tier1_machine_top";
}
@Override
public String getBottom() {
return prefix + "tier1_machine_bottom";
}
}

View file

@ -694,6 +694,8 @@ public class ModRecipes {
GameRegistry.addSmelting(ItemDusts.getDustByName("gold", 1), new ItemStack(Items.gold_ingot), 1F);
GameRegistry.addSmelting(ItemParts.getPartByName("rubberSap"), ItemParts.getPartByName("rubber"), 1F);
GameRegistry.addSmelting(new ItemStack(Items.iron_ingot), ItemIngots.getIngotByName("refinediron"), 1F);
GameRegistry.addSmelting(BlockOre2.getOreByName("copper"), ItemIngots.getIngotByName("copper"), 1F);
GameRegistry.addSmelting(BlockOre2.getOreByName("tin"), ItemIngots.getIngotByName("tin"), 1F);
Core.logHelper.info("Smelting Recipes Added");
}

View file

@ -0,0 +1,259 @@
package techreborn.world;
import java.util.Random;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraftforge.fml.common.IWorldGenerator;
import techreborn.Core;
import techreborn.config.ConfigTechReborn;
import techreborn.init.ModBlocks;
public class TROreGen implements IWorldGenerator {
public static ConfigTechReborn config;
WorldGenMinable oreGalena;
WorldGenMinable oreIridium;
WorldGenMinable oreRuby;
WorldGenMinable oreSapphire;
WorldGenMinable oreBauxite;
WorldGenMinable orePyrite;
WorldGenMinable oreCinnabar;
WorldGenMinable oreSphalerite;
WorldGenMinable oreTungston;
WorldGenMinable oreSheldonite;
WorldGenMinable orePeridot;
WorldGenMinable oreSodalite;
WorldGenMinable oreTetrahedrite;
WorldGenMinable oreCassiterite;
WorldGenMinable oreLead;
WorldGenMinable oreSilver;
WorldGenMinable oreCopper;
WorldGenMinable oreTin;
public TROreGen() {
// World
oreGalena = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Galena"), ConfigTechReborn.GalenaOreRare);
oreIridium = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Iridium"), ConfigTechReborn.IridiumOreRare);
oreRuby = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Ruby"), ConfigTechReborn.RubyOreRare);
oreSapphire = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Sapphire"), ConfigTechReborn.SapphireOreRare);
oreBauxite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Bauxite"), ConfigTechReborn.BauxiteOreRare);
oreTetrahedrite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Tetrahedrite"), ConfigTechReborn.TetrahedriteOreRare);
oreCassiterite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Cassiterite"), ConfigTechReborn.CassiteriteOreRare);
oreLead = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Lead"), ConfigTechReborn.LeadOreRare);
oreSilver = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Silver"), ConfigTechReborn.SilverOreRare);
oreCopper = new WorldGenMinable(ModBlocks.ore2.getBlockStateFromName("copper"), ConfigTechReborn.CopperOreRare);
oreTin = new WorldGenMinable(ModBlocks.ore2.getBlockStateFromName("tin"), ConfigTechReborn.TinOreRare);
// Nether
orePyrite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Pyrite"), ConfigTechReborn.PyriteOreRare);
oreCinnabar = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Cinnabar"), ConfigTechReborn.CinnabarOreRare);
oreSphalerite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Sphalerite"), ConfigTechReborn.SphaleriteOreRare);
// End
oreTungston = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Tungston"), ConfigTechReborn.TungstenOreRare);
oreSheldonite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Sheldonite"), ConfigTechReborn.SheldoniteOreRare);
orePeridot = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Peridot"), ConfigTechReborn.PeridotOreRare);
oreSodalite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Sodalite"), ConfigTechReborn.SodaliteOreRare);
Core.logHelper.info("WorldGen Loaded");
}
public void retroGen(Random random, int chunkX, int chunkZ, World world) {
//TODO
generateUndergroundOres(random, chunkX, chunkZ, world);
generateHellOres(random, chunkX, chunkZ, world);
generateEndOres(random, chunkX, chunkZ, world);
world.getChunkFromChunkCoords(chunkX, chunkZ).setChunkModified();
}
@Override
public void generate(Random random, int xChunk, int zChunk, World world,
IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
if (world.provider.isSurfaceWorld()) {
generateUndergroundOres(random, xChunk * 16, zChunk * 16, world);
} else if (world.provider.getDimensionId() == 0) {
generateHellOres(random, xChunk * 16, zChunk * 16, world);
} else if (world.provider.getDimensionId() == 1) {
generateEndOres(random, xChunk * 16, zChunk * 16, world);
}
}
void generateUndergroundOres(Random random, int xChunk, int zChunk, World world) {
int xPos, yPos, zPos;
if (config.GalenaOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 10);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
oreGalena.generate(world, random, pos);
}
}
if (config.IridiumOreTrue) {
for (int i = 0; i <= 1; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 10);
zPos = zChunk + random.nextInt(1);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
oreIridium.generate(world, random, pos);
}
}
if (config.RubyOreTrue) {
for (int i = 0; i <= 3; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 10);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
oreRuby.generate(world, random, pos);
}
}
if (config.SapphireOreTrue) {
for (int i = 0; i <= 3; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 10);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
oreSapphire.generate(world, random, pos);
}
}
if (config.BauxiteOreTrue) {
for (int i = 0; i <= 10; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 10);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
oreBauxite.generate(world, random, pos);
}
}
if (config.TetrahedriteOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 10);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
oreTetrahedrite.generate(world, random, pos);
}
}
if (config.CassiteriteOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
oreCassiterite.generate(world, random, pos);
}
}
if (config.LeadOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
oreLead.generate(world, random, pos);
}
}
if (config.SilverOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
oreSilver.generate(world, random, pos);
}
}
if (config.CopperOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
oreCopper.generate(world, random, pos);
}
}
if (config.TinOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
oreTin.generate(world, random, pos);
}
}
}
void generateHellOres(Random random, int xChunk, int zChunk, World world) {
int xPos, yPos, zPos;
if (config.PyriteOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 10);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
orePyrite.generate(world, random, pos);
}
}
if (config.CinnabarOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 10);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
oreCinnabar.generate(world, random, pos);
}
}
if (config.SphaleriteOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 10);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
oreSphalerite.generate(world, random, pos);
}
}
}
void generateEndOres(Random random, int xChunk, int zChunk, World world) {
int xPos, yPos, zPos;
if (config.TungstenOreTrue) {
for (int i = 0; i <= 2; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 10);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
oreTungston.generate(world, random, pos);
}
}
if (config.SheldoniteOreTrue) {
for (int i = 0; i <= 3; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 10);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
oreSheldonite.generate(world, random, pos);
}
}
if (config.PeridotOreTrue) {
for (int i = 0; i <= 3; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 10);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
orePeridot.generate(world, random, pos);
}
}
if (config.SodaliteOreTrue) {
for (int i = 0; i <= 3; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 10 + random.nextInt(60 - 10);
zPos = zChunk + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
oreSodalite.generate(world, random, pos);
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 569 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B