mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
fixed fluid tank conversion, some new mining drill stuff
This commit is contained in:
parent
ee567ae27a
commit
6e3114f83e
@ -1016,6 +1016,7 @@ public class ModBlocks {
|
|||||||
public static Block machine_drill;
|
public static Block machine_drill;
|
||||||
public static Block drill_pipe;
|
public static Block drill_pipe;
|
||||||
public static final int guiID_machine_drill = 45;
|
public static final int guiID_machine_drill = 45;
|
||||||
|
public static Block machine_excavator;
|
||||||
|
|
||||||
public static Block machine_mining_laser;
|
public static Block machine_mining_laser;
|
||||||
public static Block barricade;
|
public static Block barricade;
|
||||||
@ -2223,6 +2224,7 @@ public class ModBlocks {
|
|||||||
fraction_spacer = new FractionSpacer(Material.iron).setBlockName("fraction_spacer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
fraction_spacer = new FractionSpacer(Material.iron).setBlockName("fraction_spacer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_catalytic_cracker = new MachineCatalyticCracker(Material.iron).setBlockName("machine_catalytic_cracker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_catalytic_cracker = new MachineCatalyticCracker(Material.iron).setBlockName("machine_catalytic_cracker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_drill = new MachineMiningDrill(Material.iron).setBlockName("machine_drill").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_drill");
|
machine_drill = new MachineMiningDrill(Material.iron).setBlockName("machine_drill").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_drill");
|
||||||
|
machine_excavator = new MachineExcavator().setBlockName("machine_excavator").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
drill_pipe = new BlockNoDrop(Material.iron).setBlockName("drill_pipe").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":drill_pipe");
|
drill_pipe = new BlockNoDrop(Material.iron).setBlockName("drill_pipe").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":drill_pipe");
|
||||||
machine_mining_laser = new MachineMiningLaser(Material.iron).setBlockName("machine_mining_laser").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_mining_laser");
|
machine_mining_laser = new MachineMiningLaser(Material.iron).setBlockName("machine_mining_laser").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_mining_laser");
|
||||||
barricade = new BlockNoDrop(Material.sand).setBlockName("barricade").setHardness(1.0F).setResistance(2.5F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":barricade");
|
barricade = new BlockNoDrop(Material.sand).setBlockName("barricade").setHardness(1.0F).setResistance(2.5F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":barricade");
|
||||||
@ -3260,6 +3262,7 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(fraction_spacer, fraction_spacer.getUnlocalizedName());
|
GameRegistry.registerBlock(fraction_spacer, fraction_spacer.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_catalytic_cracker, machine_catalytic_cracker.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_catalytic_cracker, machine_catalytic_cracker.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_drill, machine_drill.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_drill, machine_drill.getUnlocalizedName());
|
||||||
|
register(machine_excavator);
|
||||||
GameRegistry.registerBlock(machine_mining_laser, ItemBlockBase.class, machine_mining_laser.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_mining_laser, ItemBlockBase.class, machine_mining_laser.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(barricade, barricade.getUnlocalizedName());
|
GameRegistry.registerBlock(barricade, barricade.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_turbofan, ItemBlockBase.class, machine_turbofan.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_turbofan, ItemBlockBase.class, machine_turbofan.getUnlocalizedName());
|
||||||
|
|||||||
31
src/main/java/com/hbm/blocks/machine/MachineExcavator.java
Normal file
31
src/main/java/com/hbm/blocks/machine/MachineExcavator.java
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.tileentity.machine.TileEntityMachineExcavator;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class MachineExcavator extends BlockDummyable {
|
||||||
|
|
||||||
|
public MachineExcavator() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
return new TileEntityMachineExcavator();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getDimensions() {
|
||||||
|
return new int[] {0, 0, 0, 0, 0, 0};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getOffset() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -260,6 +260,7 @@ public class ClientProxy extends ServerProxy {
|
|||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHeatBoiler.class, new RenderBoiler());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHeatBoiler.class, new RenderBoiler());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySteamEngine.class, new RenderSteamEngine());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySteamEngine.class, new RenderSteamEngine());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineCombustionEngine.class, new RenderCombustionEngine());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineCombustionEngine.class, new RenderCombustionEngine());
|
||||||
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineExcavator.class, new RenderExcavator());
|
||||||
//Foundry
|
//Foundry
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryBasin.class, new RenderFoundry());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryBasin.class, new RenderFoundry());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryMold.class, new RenderFoundry());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryMold.class, new RenderFoundry());
|
||||||
|
|||||||
12
src/main/java/com/hbm/render/tileentity/RenderExcavator.java
Normal file
12
src/main/java/com/hbm/render/tileentity/RenderExcavator.java
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package com.hbm.render.tileentity;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
|
public class RenderExcavator extends TileEntitySpecialRenderer {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
package com.hbm.tileentity.machine;
|
||||||
|
|
||||||
|
import com.hbm.tileentity.TileEntityMachineBase;
|
||||||
|
|
||||||
|
public class TileEntityMachineExcavator extends TileEntityMachineBase {
|
||||||
|
|
||||||
|
public TileEntityMachineExcavator() {
|
||||||
|
super(10);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateEntity() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -71,18 +71,16 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
|
|||||||
//meta below 121 means that it's an old multiblock configuration
|
//meta below 121 means that it's an old multiblock configuration
|
||||||
if(this.getBlockMetadata() < 12) {
|
if(this.getBlockMetadata() < 12) {
|
||||||
//get old direction
|
//get old direction
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata());
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata()).getRotation(ForgeDirection.DOWN);
|
||||||
//remove tile from the world to prevent inventory dropping
|
//remove tile from the world to prevent inventory dropping
|
||||||
worldObj.removeTileEntity(xCoord, yCoord, zCoord);
|
worldObj.removeTileEntity(xCoord, yCoord, zCoord);
|
||||||
//use fillspace to create a new multiblock configuration
|
//use fillspace to create a new multiblock configuration
|
||||||
|
worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.machine_fluidtank, dir.ordinal() + 10, 3);
|
||||||
MultiblockHandlerXR.fillSpace(worldObj, xCoord, yCoord, zCoord, ((BlockDummyable) ModBlocks.machine_fluidtank).getDimensions(), ModBlocks.machine_fluidtank, dir);
|
MultiblockHandlerXR.fillSpace(worldObj, xCoord, yCoord, zCoord, ((BlockDummyable) ModBlocks.machine_fluidtank).getDimensions(), ModBlocks.machine_fluidtank, dir);
|
||||||
//set the tile entity to the one we have now
|
//load the tile data to restore the old values
|
||||||
worldObj.setTileEntity(xCoord, yCoord, zCoord, this);
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
//reset cached metadata
|
this.writeToNBT(data);
|
||||||
this.blockMetadata = -1;
|
worldObj.getTileEntity(xCoord, yCoord, zCoord).readFromNBT(data);
|
||||||
//validate again
|
|
||||||
this.validate();
|
|
||||||
//cancel update tick just to be sure
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
3430
src/main/resources/assets/hbm/models/machines/mining_drill.obj
Normal file
3430
src/main/resources/assets/hbm/models/machines/mining_drill.obj
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user