Most items now render correctly in inventory

This commit is contained in:
Robert S 2014-08-17 10:51:54 -04:00
parent d77e3b5783
commit ede81dc74c
15 changed files with 15 additions and 23 deletions

View file

@ -1,6 +1,7 @@
package resonantinduction.archaic
import cpw.mods.fml.client.registry.ClientRegistry
import resonantinduction.archaic.firebox.{RenderHotPlate, TileHotPlate}
import resonantinduction.archaic.process.{RenderMillstone, TileMillstone, RenderCastingMold, TileCastingMold}
class ClientProxy extends CommonProxy
@ -9,5 +10,6 @@ class ClientProxy extends CommonProxy
{
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileCastingMold], new RenderCastingMold)
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileMillstone], new RenderMillstone)
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileHotPlate], new RenderHotPlate)
}
}

View file

@ -99,7 +99,6 @@ public class TileEngineeringTable extends TileInventory implements IPacketReceiv
super(Material.wood);
bounds(new Cuboid(0, 0, 0, 1, 0.9f, 1));
isOpaqueCube(false);
normalRender(false);
itemBlock(ItemBlockSaved.class);
}

View file

@ -15,8 +15,7 @@ import resonantinduction.atomic.machine.extractor.RenderChemicalExtractor
import resonantinduction.atomic.machine.extractor.TileChemicalExtractor
import resonantinduction.atomic.machine.plasma.RenderPlasmaHeater
import resonantinduction.atomic.machine.plasma.TilePlasmaHeater
import resonantinduction.atomic.machine.quantum.GuiQuantumAssembler
import resonantinduction.atomic.machine.quantum.TileQuantumAssembler
import resonantinduction.atomic.machine.quantum.{RenderQuantumAssembler, GuiQuantumAssembler, TileQuantumAssembler}
import resonantinduction.atomic.machine.reactor.GuiReactorCell
import resonantinduction.atomic.machine.reactor.RenderReactorCell
import resonantinduction.atomic.machine.reactor.TileReactorCell
@ -49,6 +48,7 @@ class ClientProxy extends CommonProxy {
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileThermometer], new RenderThermometer)
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileChemicalExtractor], new RenderChemicalExtractor)
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileReactorCell], new RenderReactorCell)
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileQuantumAssembler], new RenderQuantumAssembler)
RenderingRegistry.registerEntityRenderingHandler(classOf[EntityParticle], new RenderParticle)
}

View file

@ -47,7 +47,7 @@ public class TileChemicalExtractor extends TileProcess implements IFluidHandler
super(Material.iron);
energy().setCapacity(ENERGY * 2);
this.setSizeInventory(7);
this.isOpaqueCube(true);
this.isOpaqueCube(false);
this.normalRender(false);
inputSlot = 1;
outputSlot = 2;

View file

@ -28,17 +28,6 @@ public class RenderPlasmaHeater extends RenderTaggedTile
super.renderTileEntityAt(t, x, y, z, f);
}
GL11.glPushMatrix();
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
bindTexture(TEXTURE);
GL11.glPushMatrix();
GL11.glRotated(Math.toDegrees(tileEntity.rotation), 0, 1, 0);
MODEL.renderOnly("rrot", "srot");
GL11.glPopMatrix();
MODEL.renderAllExcept("rrot", "srot");
GL11.glPopMatrix();
}
}

View file

@ -12,6 +12,7 @@ import net.minecraft.util.DamageSource;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.common.MinecraftForge;
import org.lwjgl.opengl.GL11;
import resonant.api.event.PlasmaEvent.SpawnPlasmaEvent;
import resonant.content.prefab.java.TileAdvanced;
import resonant.engine.grid.thermal.ThermalGrid;
@ -103,4 +104,5 @@ public class TilePlasma extends TileAdvanced
{
temperature = newTemperature;
}
}

View file

@ -6,6 +6,7 @@ import cpw.mods.fml.common.network.ByteBufUtils;
import io.netty.buffer.ByteBuf;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.Packet;
import net.minecraft.world.World;
@ -16,6 +17,7 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTank;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
import org.lwjgl.opengl.GL11;
import resonant.api.ITagRender;
import resonant.engine.ResonantEngine;
import resonant.lib.config.Config;
@ -224,5 +226,4 @@ public class TilePlasmaHeater extends TileElectric implements IPacketReceiver, I
{
return FluidUtility.playerActivatedFluidItem(world(), x(), y(), z(), player, side);
}
}

View file

@ -60,7 +60,6 @@ class TileReactorCell extends TileInventory(Material.iron) with IMultiBlockStruc
textureName = "machine"
isOpaqueCube = false
normalRender = false
customItemRender = true
override def onWorldJoin {
updatePositionStatus

View file

@ -9,6 +9,7 @@ import net.minecraft.entity.player.EntityPlayer
import net.minecraft.tileentity.TileEntity
import net.minecraft.world.World
import resonantinduction.electrical.battery.{RenderBattery, TileBattery}
import resonantinduction.electrical.generator.{TileMotor, RenderMotor}
import resonantinduction.electrical.laser.emitter.{RenderLaserEmitter, TileLaserEmitter}
import resonantinduction.electrical.laser.focus.crystal.{RenderFocusCrystal, TileFocusCrystal}
import resonantinduction.electrical.laser.focus.mirror.{RenderMirror, TileMirror}
@ -28,6 +29,7 @@ import universalelectricity.core.transform.vector.Vector3
override def init {
//RenderingRegistry.registerBlockHandler(new BlockRenderingHandler.type)
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileMotor], new RenderMotor)
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileTesla], new RenderTesla)
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileBattery], new RenderBattery)
ClientRegistry.bindTileEntitySpecialRenderer(classOf[TileLaserEmitter], RenderLaserEmitter)

View file

@ -21,7 +21,7 @@ import resonantinduction.core.Reference;
*/
public class RenderMotor extends TileEntitySpecialRenderer implements ISimpleItemRenderer
{
public static final IModelCustom MODEL = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.modelPath() + "generator.tcn"));
public static final IModelCustom MODEL = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.domain(), Reference.modelPath() + "generator.tcn"));
public static final ResourceLocation TEXTURE = new ResourceLocation(Reference.domain(), Reference.modelPath() + "generator.png");
@Override

View file

@ -19,7 +19,6 @@ class TileSolarPanel extends TileEnergyDistribution(Material.iron) {
setTextureName("solarPanel_top")
bounds(new Cuboid(0, 0, 0, 1, 0.3f, 1))
isOpaqueCube(false)
normalRender(false)
@SideOnly(Side.CLIENT) override def registerIcons(iconReg: IIconRegister) {
SpatialBlock.icon.put("solarPanel_side", iconReg.registerIcon(Reference.prefix + "solarPanel_side"))

View file

@ -4,6 +4,8 @@ import cpw.mods.fml.client.registry.ClientRegistry;
import net.minecraft.item.Item;
import resonant.content.wrapper.ItemRenderHandler;
import resonantinduction.mechanical.fluid.pipe.RenderPipe;
import resonantinduction.mechanical.fluid.transport.RenderPump;
import resonantinduction.mechanical.fluid.transport.TilePump;
import resonantinduction.mechanical.gear.RenderGear;
import resonantinduction.mechanical.gearshaft.RenderGearShaft;
import resonantinduction.mechanical.process.crusher.RenderMechanicalPiston;
@ -32,5 +34,6 @@ public class ClientProxy extends CommonProxy
ClientRegistry.bindTileEntitySpecialRenderer(TileWaterTurbine.class, new RenderWaterTurbine());
ClientRegistry.bindTileEntitySpecialRenderer(TileWindTurbine.class, new RenderWindTurbine());
ClientRegistry.bindTileEntitySpecialRenderer(TileElectricTurbine.class, new RenderElectricTurbine());
ClientRegistry.bindTileEntitySpecialRenderer(TilePump.class, new RenderPump());
}
}

View file

@ -35,8 +35,6 @@ public class TileDetector extends TileFilterable implements IPacketIDReceiver
{
super();
setTextureName(Reference.prefix() + "material_metal_side");
this.isOpaqueCube(false);
this.normalRender(false);
this.canProvidePower(true);
}

View file

@ -43,7 +43,6 @@ public class TileBreaker extends TileAdvanced implements IRotatable, IPacketRece
public TileBreaker()
{
super(Material.iron);
normalRender(false);
//rotationMask = Byte.parseByte("111111", 2);
}

View file

@ -50,7 +50,6 @@ public class TilePlacer extends TileInventory implements IRotatable, IPacketRece
public TilePlacer()
{
super(Material.rock);
normalRender(false);
setSizeInventory(1);
//rotationMask = Byte.parseByte("111111", 2);
}