mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-28 16:06:07 +00:00
* BS + SA * Intellij Cleanups * Add missing overrides * Cleanup fire code * Less allocations * Get rid of BlockTuple -> Far fewer allocations (It was only used for Ordo Fire which isn't very useful for NH) Neuter Ordo fire (will be reworked once we figure out what it should do) Mixin to fix fire rendering on water -- call the subclass's canCatchFire instead of the base class Properly tether the fire spread to 15 blocks from the source, which never burns out. * rm * Spotless
54 lines
1.8 KiB
Java
54 lines
1.8 KiB
Java
/**
|
|
* This class was created by <Vazkii>. It's distributed as part of the ThaumicTinkerer Mod.
|
|
*
|
|
* ThaumicTinkerer is Open Source and distributed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0
|
|
* License (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
|
*
|
|
* ThaumicTinkerer is a Derivative Work on Thaumcraft 4. Thaumcraft 4 (c) Azanor 2012
|
|
* (http://www.minecraftforum.net/topic/1585216-)
|
|
*
|
|
* File Created @ [12 Sep 2013, 18:08:42 (GMT)]
|
|
*/
|
|
package thaumic.tinkerer.client.render.block;
|
|
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.client.renderer.RenderBlocks;
|
|
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
|
import net.minecraft.world.IBlockAccess;
|
|
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
|
import thaumic.tinkerer.client.lib.LibRenderIDs;
|
|
import thaumic.tinkerer.client.render.tile.RenderTileMagnet;
|
|
import thaumic.tinkerer.common.block.tile.TileMagnet;
|
|
|
|
public class RenderMagnet implements ISimpleBlockRenderingHandler {
|
|
|
|
@Override
|
|
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
|
RenderTileMagnet.mob = metadata == 1;
|
|
|
|
GL11.glPushMatrix();
|
|
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
|
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileMagnet(), 0.0D, 0.0D, 0.0D, 0.0F);
|
|
GL11.glPopMatrix();
|
|
}
|
|
|
|
@Override
|
|
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
|
|
RenderBlocks renderer) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean shouldRender3DInInventory(int modelId) {
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public int getRenderId() {
|
|
return LibRenderIDs.idMagnet;
|
|
}
|
|
}
|