All block textures now work

This commit is contained in:
modmuss50 2015-11-27 19:54:34 +00:00
parent 1475554f8e
commit 94a2229ed7
26 changed files with 568 additions and 59 deletions

View file

@ -8,7 +8,7 @@ import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.tiles.TileChunkLoader;
public class BlockChunkLoader extends BlockMachineBase {
public class BlockChunkLoader extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockChunkLoader(Material material) {
@ -29,4 +29,26 @@ public class BlockChunkLoader extends BlockMachineBase {
z);
return true;
}
private final String prefix = "techreborn:/blocks/machine/";
@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

@ -6,7 +6,7 @@ import net.minecraft.world.World;
import techreborn.Core;
import techreborn.client.GuiHandler;
public class BlockComputerCube extends BlockMachineBase {
public class BlockComputerCube extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockComputerCube(Material material) {
@ -23,4 +23,26 @@ public class BlockComputerCube extends BlockMachineBase {
return true;
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "computer_cube";
}
@Override
public String getSide(boolean isActive) {
return prefix + "computer_cube" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "computer_cube";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "computer_cube";
}
}

View file

@ -8,7 +8,7 @@ import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.tiles.TileDigitalChest;
public class BlockDigitalChest extends BlockMachineBase {
public class BlockDigitalChest extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockDigitalChest() {
super(Material.rock);
@ -29,4 +29,26 @@ public class BlockDigitalChest extends BlockMachineBase {
return true;
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "quantum_chest";
}
@Override
public String getSide(boolean isActive) {
return prefix + "qchest_side" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "quantum_top";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "machine_bottom";
}
}

View file

@ -3,7 +3,7 @@ package techreborn.blocks;
import net.minecraft.block.material.Material;
public class BlockElectricCraftingTable extends BlockMachineBase {
public class BlockElectricCraftingTable extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockElectricCraftingTable(Material material) {
@ -11,5 +11,26 @@ public class BlockElectricCraftingTable extends BlockMachineBase {
setUnlocalizedName("techreborn.electriccraftingtable");
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "electric_crafting_table_front";
}
@Override
public String getSide(boolean isActive) {
return prefix + "machine_side" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "electric_crafting_table_top";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "machine_bottom";
}
}

View file

@ -1,6 +1,8 @@
package techreborn.blocks;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.EnumFacing;
public class BlockFusionCoil extends BlockMachineBase {
@ -11,5 +13,10 @@ public class BlockFusionCoil extends BlockMachineBase {
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getTextureName(IBlockState blockState, EnumFacing facing) {
return prefix + "fusion_coil";
}
}

View file

@ -9,7 +9,7 @@ import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.tiles.fusionReactor.TileEntityFusionController;
public class BlockFusionControlComputer extends BlockMachineBase {
public class BlockFusionControlComputer extends BlockMachineBase implements IAdvancedRotationTexture {
@ -34,4 +34,26 @@ public class BlockFusionControlComputer extends BlockMachineBase {
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityFusionController();
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "fusion_control_computer_front";
}
@Override
public String getSide(boolean isActive) {
return prefix + "plasma_generator_side_off" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "plasma_generator_side_off";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "plasma_generator_side_off";
}
}

View file

@ -1,6 +1,8 @@
package techreborn.blocks;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.EnumFacing;
public class BlockHighlyAdvancedMachine extends BlockMachineBase {
@ -9,4 +11,12 @@ public class BlockHighlyAdvancedMachine extends BlockMachineBase {
setUnlocalizedName("techreborn.highlyAdvancedMachine");
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getTextureName(IBlockState blockState, EnumFacing facing) {
return prefix + "highlyadvancedmachine";
}
}

View file

@ -2,6 +2,8 @@ package techreborn.blocks;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
@ -17,19 +19,24 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.api.IBlockTextureProvider;
import reborncore.common.BaseTileBlock;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TilePlayerDectector;
import java.util.List;
import java.util.Random;
public class BlockPlayerDetector extends BlockMachineBase {
public class BlockPlayerDetector extends BaseTileBlock implements IBlockTextureProvider {
public PropertyInteger METADATA;
public BlockPlayerDetector() {
super(Material.rock);
setUnlocalizedName("techreborn.playerDetector");
setCreativeTab(TechRebornCreativeTab.instance);
setHardness(2f);
this.setDefaultState(this.blockState.getBaseState().withProperty(METADATA, 0));
}
public static final String[] types = new String[]
@ -50,12 +57,6 @@ public class BlockPlayerDetector extends BlockMachineBase {
}
@Override
public void onBlockAdded(World world, int x, int y, int z) {
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TilePlayerDectector();
@ -89,16 +90,16 @@ public class BlockPlayerDetector extends BlockMachineBase {
return 0;
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemstack) {
super.onBlockPlacedBy(world, x, y, z, player, itemstack);
TileEntity tile = world.getTileEntity(new BlockPos(x, y, z));
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
super.onBlockPlacedBy(worldIn, pos, state, placer, stack);
TileEntity tile = worldIn.getTileEntity(pos);
if (tile instanceof TilePlayerDectector) {
((TilePlayerDectector) tile).owenerUdid = player.getUniqueID().toString();
((TilePlayerDectector) tile).owenerUdid = placer.getUniqueID().toString();
}
}
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer entityplayer, EnumFacing side, float hitX, float hitY, float hitZ) {
// int newMeta = (world.getBlockMetadata(x, y, z) + 1) % 3;
@ -120,4 +121,30 @@ public class BlockPlayerDetector extends BlockMachineBase {
}
return true;
}
@Override
public String getTextureName(IBlockState blockState, EnumFacing facing) {
return "techreborn:blocks/machine/player_detector_" + types[getMetaFromState(blockState)];
}
@Override
public int amoutOfVariants() {
return types.length;
}
@Override
public IBlockState getStateFromMeta(int meta) {
return this.getDefaultState().withProperty(METADATA, meta);
}
@Override
public int getMetaFromState(IBlockState state) {
return (Integer) state.getValue(METADATA);
}
protected BlockState createBlockState() {
METADATA = PropertyInteger.create("Type", 0, types.length);
return new BlockState(this, METADATA);
}
}

View file

@ -16,7 +16,7 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileQuantumChest;
public class BlockQuantumChest extends BlockMachineBase {
public class BlockQuantumChest extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockQuantumChest() {
super(Material.rock);
@ -38,4 +38,26 @@ public class BlockQuantumChest extends BlockMachineBase {
return true;
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "quantum_chest";
}
@Override
public String getSide(boolean isActive) {
return prefix + "qchest_side";
}
@Override
public String getTop(boolean isActive) {
return prefix + "quantum_top";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "machine_bottom";
}
}

View file

@ -9,7 +9,7 @@ import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.tiles.TileQuantumTank;
public class BlockQuantumTank extends BlockMachineBase {
public class BlockQuantumTank extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockQuantumTank() {
@ -33,4 +33,26 @@ public class BlockQuantumTank extends BlockMachineBase {
return true;
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "ThermalGenerator_other";
}
@Override
public String getSide(boolean isActive) {
return prefix + "ThermalGenerator_other";
}
@Override
public String getTop(boolean isActive) {
return prefix + "quantum_top";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "ThermalGenerator_other";
}
}

View file

@ -2,7 +2,7 @@ package techreborn.blocks;
import net.minecraft.block.material.Material;
public class BlockSupercondensator extends BlockMachineBase {
public class BlockSupercondensator extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockSupercondensator(Material material) {
@ -10,4 +10,26 @@ public class BlockSupercondensator extends BlockMachineBase {
setUnlocalizedName("techreborn.supercondensator");
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "supercondensator_front";
}
@Override
public String getSide(boolean isActive) {
return prefix + "supercondensator_side" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "supercondensator_side";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "machine_bottom";
}
}

View file

@ -7,10 +7,11 @@ import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import techreborn.Core;
import techreborn.blocks.BlockMachineBase;
import techreborn.blocks.IAdvancedRotationTexture;
import techreborn.client.GuiHandler;
import techreborn.tiles.TileDieselGenerator;
public class BlockDieselGenerator extends BlockMachineBase {
public class BlockDieselGenerator extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockDieselGenerator(Material material) {
@ -36,5 +37,27 @@ public class BlockDieselGenerator extends BlockMachineBase {
return true;
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "machine_side";
}
@Override
public String getSide(boolean isActive) {
return prefix + "machine_side" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "diesel_generator_top_off";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "machine_bottom";
}
}

View file

@ -4,9 +4,10 @@ import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import techreborn.blocks.BlockMachineBase;
import techreborn.blocks.IAdvancedRotationTexture;
import techreborn.tiles.TileDragonEggSiphoner;
public class BlockDragonEggSiphoner extends BlockMachineBase {
public class BlockDragonEggSiphoner extends BlockMachineBase implements IAdvancedRotationTexture {
@ -21,6 +22,26 @@ public class BlockDragonEggSiphoner extends BlockMachineBase {
return new TileDragonEggSiphoner();
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "dragon_egg_energy_siphon_side_off";
}
@Override
public String getSide(boolean isActive) {
return prefix + "dragon_egg_energy_siphon_side_off" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "dragon_egg_energy_siphon_top";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "machine_bottom";
}
}

View file

@ -7,10 +7,11 @@ import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import techreborn.Core;
import techreborn.blocks.BlockMachineBase;
import techreborn.blocks.IAdvancedRotationTexture;
import techreborn.client.GuiHandler;
import techreborn.tiles.TileGasTurbine;
public class BlockGasTurbine extends BlockMachineBase {
public class BlockGasTurbine extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockGasTurbine(Material material) {
@ -35,6 +36,26 @@ public class BlockGasTurbine extends BlockMachineBase {
return true;
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "machine_side";
}
@Override
public String getSide(boolean isActive) {
return prefix + "machine_side" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "gas_generator_top";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "gas_generator_bottom";
}
}

View file

@ -4,9 +4,10 @@ import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import techreborn.blocks.BlockMachineBase;
import techreborn.blocks.IAdvancedRotationTexture;
import techreborn.tiles.TileHeatGenerator;
public class BlockHeatGenerator extends BlockMachineBase {
public class BlockHeatGenerator extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockHeatGenerator(Material material) {
@ -21,6 +22,26 @@ public class BlockHeatGenerator extends BlockMachineBase {
return new TileHeatGenerator();
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "heat_generator_side";
}
@Override
public String getSide(boolean isActive) {
return prefix + "heat_generator_side" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "heat_generator_top";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "heat_generator_bottom";
}
}

View file

@ -2,8 +2,9 @@ package techreborn.blocks.generator;
import net.minecraft.block.material.Material;
import techreborn.blocks.BlockMachineBase;
import techreborn.blocks.IAdvancedRotationTexture;
public class BlockLightningRod extends BlockMachineBase {
public class BlockLightningRod extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockLightningRod(Material material) {
@ -11,4 +12,26 @@ public class BlockLightningRod extends BlockMachineBase {
setUnlocalizedName("techreborn.lightningrod");
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "idsu_front";
}
@Override
public String getSide(boolean isActive) {
return prefix + "idsu_front" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "lightning_rod_top";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "extreme_voltage_machine_side";
}
}

View file

@ -2,8 +2,9 @@ package techreborn.blocks.generator;
import net.minecraft.block.material.Material;
import techreborn.blocks.BlockMachineBase;
import techreborn.blocks.IAdvancedRotationTexture;
public class BlockMagicEnergyAbsorber extends BlockMachineBase {
public class BlockMagicEnergyAbsorber extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockMagicEnergyAbsorber(Material material) {
super(material);
@ -11,4 +12,26 @@ public class BlockMagicEnergyAbsorber extends BlockMachineBase {
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "magic_energy_absorber_side";
}
@Override
public String getSide(boolean isActive) {
return prefix + "magic_energy_absorber_side" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "magic_energy_absorber_top";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "magic_energy_absorber_bottom";
}
}

View file

@ -2,10 +2,9 @@ package techreborn.blocks.generator;
import net.minecraft.block.material.Material;
import techreborn.blocks.BlockMachineBase;
import techreborn.blocks.IAdvancedRotationTexture;
public class BlockMagicEnergyConverter extends BlockMachineBase {
public class BlockMagicEnergyConverter extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockMagicEnergyConverter(Material material) {
super(material);
@ -13,5 +12,27 @@ public class BlockMagicEnergyConverter extends BlockMachineBase {
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "magic_energy_converter_front_off";
}
@Override
public String getSide(boolean isActive) {
return prefix + "magic_energy_converter_side" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "magic_energy_converter_top";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "magic_energy_converter_bottom";
}
}

View file

@ -2,8 +2,9 @@ package techreborn.blocks.generator;
import net.minecraft.block.material.Material;
import techreborn.blocks.BlockMachineBase;
import techreborn.blocks.IAdvancedRotationTexture;
public class BlockPlasmaGenerator extends BlockMachineBase {
public class BlockPlasmaGenerator extends BlockMachineBase implements IAdvancedRotationTexture {
@ -12,6 +13,26 @@ public class BlockPlasmaGenerator extends BlockMachineBase {
setUnlocalizedName("techreborn.plasmagenerator");
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "plasma_generator_front";
}
@Override
public String getSide(boolean isActive) {
return prefix + "plasma_generator_side_off" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "plasma_generator_side_off";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "plasma_generator_side_off";
}
}

View file

@ -7,10 +7,11 @@ import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import techreborn.Core;
import techreborn.blocks.BlockMachineBase;
import techreborn.blocks.IAdvancedRotationTexture;
import techreborn.client.GuiHandler;
import techreborn.tiles.TileSemifluidGenerator;
public class BlockSemiFluidGenerator extends BlockMachineBase {
public class BlockSemiFluidGenerator extends BlockMachineBase implements IAdvancedRotationTexture {
@ -36,6 +37,26 @@ public class BlockSemiFluidGenerator extends BlockMachineBase {
return true;
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "semifluid_generator_side";
}
@Override
public String getSide(boolean isActive) {
return prefix + "semifluid_generator_side" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "machine_top";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "machine_bottom";
}
}

View file

@ -7,10 +7,11 @@ import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import techreborn.Core;
import techreborn.blocks.BlockMachineBase;
import techreborn.blocks.IAdvancedRotationTexture;
import techreborn.client.GuiHandler;
import techreborn.tiles.TileThermalGenerator;
public class BlockThermalGenerator extends BlockMachineBase {
public class BlockThermalGenerator extends BlockMachineBase implements IAdvancedRotationTexture {
@ -36,4 +37,26 @@ public class BlockThermalGenerator extends BlockMachineBase {
return true;
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return isActive ? prefix + "thermal_generator_side_on" : prefix + "matter_fabricator_off";
}
@Override
public String getSide(boolean isActive) {
return isActive ? prefix + "thermal_generator_side_on" : prefix + "matter_fabricator_off";
}
@Override
public String getTop(boolean isActive) {
return isActive ? prefix + "thermal_generator_top_on" : prefix + "matter_fabricator_off";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "machine_bottom";
}
}

View file

@ -7,10 +7,11 @@ import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import techreborn.Core;
import techreborn.blocks.BlockMachineBase;
import techreborn.blocks.IAdvancedRotationTexture;
import techreborn.client.GuiHandler;
import techreborn.tiles.TileVacuumFreezer;
public class BlockVacuumFreezer extends BlockMachineBase {
public class BlockVacuumFreezer extends BlockMachineBase implements IAdvancedRotationTexture{
public BlockVacuumFreezer(Material material) {
@ -36,4 +37,26 @@ public class BlockVacuumFreezer extends BlockMachineBase {
z);
return true;
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "vacuum_freezer_front";
}
@Override
public String getSide(boolean isActive) {
return prefix + "machine_side" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "vacuum_freezer_top";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "machine_bottom";
}
}

View file

@ -33,29 +33,6 @@ public class BlockAesu extends BlockMachineBase implements IRotationTexture {
return true;
}
//
// @Override
// @SideOnly(Side.CLIENT)
// public void registerBlockIcons(IIconRegister icon) {
// this.blockIcon = icon.registerIcon("techreborn:machine/aesu_side");
// this.iconFront = icon.registerIcon("techreborn:machine/aesu_front");
// this.iconTop = icon.registerIcon("techreborn:machine/aesu_side");
// this.iconBottom = icon.registerIcon("techreborn:machine/aesu_side");
// }
//
// @Override
// @SideOnly(Side.CLIENT)
// public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
// int metadata = getTileRotation(blockAccess, x, y, z);
// if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
// return this.iconFront;
// }
// return metadata == 0 && side == 3 ? this.iconFront
// : side == 1 ? this.iconTop :
// side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
// : (side == metadata ? this.iconFront : this.blockIcon));
// }
private final String prefix = "techreborn:/blocks/machine/";
@Override

View file

@ -9,10 +9,11 @@ import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import techreborn.Core;
import techreborn.blocks.BlockMachineBase;
import techreborn.blocks.IAdvancedRotationTexture;
import techreborn.client.GuiHandler;
import techreborn.tiles.idsu.TileIDSU;
public class BlockIDSU extends BlockMachineBase {
public class BlockIDSU extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockIDSU(Material material) {
@ -44,4 +45,28 @@ public class BlockIDSU extends BlockMachineBase {
}
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "idsu_front";
}
@Override
public String getSide(boolean isActive) {
return prefix + "idsu_side" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "idsu_side";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "idsu_side";
}
}

View file

@ -6,10 +6,11 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import techreborn.Core;
import techreborn.blocks.BlockMachineBase;
import techreborn.blocks.IAdvancedRotationTexture;
import techreborn.client.GuiHandler;
import techreborn.tiles.lesu.TileLesu;
public class BlockLesu extends BlockMachineBase {
public class BlockLesu extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockLesu(Material material) {
@ -32,4 +33,27 @@ public class BlockLesu extends BlockMachineBase {
return true;
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "lesu_front";
}
@Override
public String getSide(boolean isActive) {
return prefix + "lesu_side" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "lesu_side";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "lesu_side";
}
}

View file

@ -9,9 +9,10 @@ import net.minecraft.util.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import techreborn.blocks.BlockMachineBase;
import techreborn.blocks.IAdvancedRotationTexture;
import techreborn.tiles.lesu.TileLesuStorage;
public class BlockLesuStorage extends BlockMachineBase {
public class BlockLesuStorage extends BlockMachineBase implements IAdvancedRotationTexture {
public BlockLesuStorage(Material material) {
super(material);
@ -44,4 +45,26 @@ public class BlockLesuStorage extends BlockMachineBase {
public boolean shouldConnectToBlock(IBlockAccess blockAccess, int x, int y, int z, Block block, int meta) {
return block == (Block) this;
}
private final String prefix = "techreborn:/blocks/machine/";
@Override
public String getFront(boolean isActive) {
return prefix + "lesu_block";
}
@Override
public String getSide(boolean isActive) {
return prefix + "lesu_block" ;
}
@Override
public String getTop(boolean isActive) {
return prefix + "lesu_block";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "lesu_block";
}
}