mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
exposure chamber stuff
This commit is contained in:
parent
8fac493947
commit
57059d6a5e
@ -728,8 +728,9 @@ public class ModBlocks {
|
||||
public static Block machine_generator;
|
||||
|
||||
public static Block machine_industrial_generator;
|
||||
|
||||
|
||||
public static Block machine_cyclotron;
|
||||
public static Block machine_exposure_chamber;
|
||||
|
||||
public static Block hadron_plating;
|
||||
public static Block hadron_plating_blue;
|
||||
@ -1892,6 +1893,7 @@ public class ModBlocks {
|
||||
machine_generator = new MachineGenerator(Material.iron).setBlockName("machine_generator").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
|
||||
machine_industrial_generator = new MachineIGenerator(Material.iron).setBlockName("machine_industrial_generator").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":industrial_generator");
|
||||
machine_cyclotron = new MachineCyclotron(Material.iron).setBlockName("machine_cyclotron").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":cyclotron");
|
||||
machine_exposure_chamber = new MachineExposureChamber(Material.iron).setBlockName("machine_exposure_chamber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_aluminium");
|
||||
machine_radgen = new MachineRadGen(Material.iron).setBlockName("machine_radgen").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_radgen");
|
||||
|
||||
hadron_plating = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating");
|
||||
@ -3190,6 +3192,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_industrial_generator, machine_industrial_generator.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_radgen, machine_radgen.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_cyclotron, machine_cyclotron.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_exposure_chamber, machine_exposure_chamber.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_rtg_grey, machine_rtg_grey.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_geo, machine_geo.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_amgen, machine_amgen.getUnlocalizedName());
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineExposureChamber;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachineExposureChamber extends BlockDummyable {
|
||||
|
||||
public MachineExposureChamber(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineExposureChamber();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {4, 0, 2, 2, 2, 2};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return super.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
}
|
||||
@ -218,6 +218,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePuF6Tank.class, new RenderPuF6Tank());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineIGenerator.class, new RenderIGenerator());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineCyclotron.class, new RenderCyclotron());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineExposureChamber.class, new RenderExposureChamber());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineOilWell.class, new RenderDerrick());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineGasFlare.class, new RenderGasFlare());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityChimneyBrick.class, new RenderChimneyBrick());
|
||||
|
||||
@ -182,6 +182,9 @@ public class ResourceManager {
|
||||
//Cyclotron
|
||||
public static final IModelCustom cyclotron = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/cyclotron.obj"));
|
||||
|
||||
//Exposure Chamber
|
||||
public static final IModelCustom exposure_chamber = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/exposure_chamber.obj"));
|
||||
|
||||
//RTG
|
||||
public static final IModelCustom rtg = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/rtg.obj"));
|
||||
|
||||
@ -593,6 +596,9 @@ public class ResourceManager {
|
||||
public static final ResourceLocation cyclotron_coin = new ResourceLocation(RefStrings.MODID, "textures/models/machines/cyclotron_coin.png");
|
||||
public static final ResourceLocation cyclotron_coin_filled = new ResourceLocation(RefStrings.MODID, "textures/models/machines/cyclotron_coin_filled.png");
|
||||
|
||||
//Exposure Chamber
|
||||
public static final ResourceLocation exposure_chamber_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/exposure_chamber.png");
|
||||
|
||||
//RTG
|
||||
public static final ResourceLocation rtg_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/rtg.png");
|
||||
public static final ResourceLocation rtg_cell_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/rtg_cell.png");
|
||||
|
||||
@ -0,0 +1,48 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class RenderExposureChamber extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(tileEntity.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 4: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 2: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.exposure_chamber_tex);
|
||||
ResourceManager.exposure_chamber.renderPart("Chamber");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated((tileEntity.getWorldObj().getTotalWorldTime() % 360D + f) * 5, 0, 1, 0);
|
||||
GL11.glTranslated(0, Math.sin((tileEntity.getWorldObj().getTotalWorldTime() % (Math.PI * 16D) + f) * 0.125) * 0.0625, 0);
|
||||
ResourceManager.exposure_chamber.renderPart("Core");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated((tileEntity.getWorldObj().getTotalWorldTime() % 360D + f) * 10, 0, 1, 0);
|
||||
ResourceManager.exposure_chamber.renderPart("Magnets");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -22,8 +22,8 @@ public abstract class TileEntityMachineBase extends TileEntityLoadedBase impleme
|
||||
|
||||
private String customName;
|
||||
|
||||
public TileEntityMachineBase(int scount) {
|
||||
slots = new ItemStack[scount];
|
||||
public TileEntityMachineBase(int slotCount) {
|
||||
slots = new ItemStack[slotCount];
|
||||
}
|
||||
|
||||
/** The "chunks is modified, pls don't forget to save me" effect of markDirty, minus the block updates */
|
||||
|
||||
@ -90,6 +90,7 @@ public class TileMappings {
|
||||
put(TileEntityPartEmitter.class, "tileentity_partemitter");
|
||||
put(TileEntityDummy.class, "tileentity_dummy");
|
||||
put(TileEntityMachineCyclotron.class, "tileentity_cyclotron");
|
||||
put(TileEntityMachineExposureChamber.class, "tileentity_exposure_chamber");
|
||||
put(TileEntityMachineRTG.class, "tileentity_machine_rtg");
|
||||
put(TileEntityStructureMarker.class, "tileentity_structure_marker");
|
||||
put(TileEntityMachineMiningDrill.class, "tileentity_mining_drill");
|
||||
|
||||
@ -0,0 +1,49 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntityMachineExposureChamber extends TileEntityMachineBase {
|
||||
|
||||
public TileEntityMachineExposureChamber() {
|
||||
super(7);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.exposureChamber";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 2,
|
||||
yCoord,
|
||||
zCoord - 2,
|
||||
xCoord + 3,
|
||||
yCoord + 5,
|
||||
zCoord + 3
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||
@ -443,6 +443,12 @@ public class TileEntityWatz extends TileEntityMachineBase implements IFluidStand
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
private void disassemble() {
|
||||
|
||||
int count = 20;
|
||||
@ -515,12 +521,6 @@ public class TileEntityWatz extends TileEntityMachineBase implements IFluidStand
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user