mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-14 01:04:16 +00:00
There Vexatos.
This commit is contained in:
1 parent
ec35892295
commit
58e54e4950
2 files changed
+43
No files matched your search
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Jul 25, 2015, 8:02:41 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.api.item;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Why would you ever want this ._.
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TinyPotatoRenderEvent extends Event {
|
||||
|
||||
public final TileEntity tile;
|
||||
public final String name;
|
||||
public final double x, y, z;
|
||||
public final float partTicks;
|
||||
|
||||
public TinyPotatoRenderEvent(TileEntity tile, String name, double x, double y, double z, float partTicks) {
|
||||
this.tile = tile;
|
||||
this.name = name;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.partTicks = partTicks;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -21,10 +21,12 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import vazkii.botania.api.item.TinyPotatoRenderEvent;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.client.model.ModelTinyPotato;
|
||||
import vazkii.botania.common.block.tile.TileTinyPotato;
|
||||
@@ -68,6 +70,7 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
String name = potato.name.toLowerCase();
|
||||
|
||||
mc.renderEngine.bindTexture(TextureMap.locationItemsTexture);
|
||||
float scale = 1F / 4F;
|
||||
GL11.glTranslatef(0F, 1F, 0F);
|
||||
@@ -116,6 +119,8 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
|
||||
MinecraftForge.EVENT_BUS.post(new TinyPotatoRenderEvent(potato, potato.name, d0, d1, d2, var8));
|
||||
|
||||
GL11.glRotatef(-rotZ, 0F, 0F, 1F);
|
||||
GL11.glRotatef(-rotY, 0F, 1F, 0F);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
|
||||
Reference in new issue
Block a user