mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-23 15:48:34 +01:00
fix worm
This commit is contained in:
parent
5160ac2ea8
commit
a4f07f9885
2 changed files with 9 additions and 3 deletions
|
@ -24,6 +24,7 @@ public final class InitEntities{
|
||||||
ModUtil.LOGGER.info("Initializing Entities...");
|
ModUtil.LOGGER.info("Initializing Entities...");
|
||||||
|
|
||||||
EntityRegistry.registerModEntity(new ResourceLocation(ModUtil.MOD_ID, "worm"), EntityWorm.class, ModUtil.MOD_ID+".worm", 0, ActuallyAdditions.instance, 64, 1, false);
|
EntityRegistry.registerModEntity(new ResourceLocation(ModUtil.MOD_ID, "worm"), EntityWorm.class, ModUtil.MOD_ID+".worm", 0, ActuallyAdditions.instance, 64, 1, false);
|
||||||
|
RenderWorm.fixItemStack();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|
|
@ -26,14 +26,18 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class RenderWorm extends Render<EntityWorm>{
|
public class RenderWorm extends Render<EntityWorm>{
|
||||||
|
|
||||||
public static final IRenderFactory FACTORY = new IRenderFactory(){
|
public static final IRenderFactory<EntityWorm> FACTORY = new IRenderFactory<EntityWorm>(){
|
||||||
@Override
|
@Override
|
||||||
public Render createRenderFor(RenderManager manager){
|
public Render<EntityWorm> createRenderFor(RenderManager manager){
|
||||||
return new RenderWorm(manager);
|
return new RenderWorm(manager);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final ItemStack STACK = new ItemStack(InitItems.itemWorm);
|
private static ItemStack STACK = ItemStack.EMPTY;
|
||||||
|
|
||||||
|
public static void fixItemStack(){
|
||||||
|
STACK = new ItemStack(InitItems.itemWorm);
|
||||||
|
}
|
||||||
|
|
||||||
protected RenderWorm(RenderManager renderManager){
|
protected RenderWorm(RenderManager renderManager){
|
||||||
super(renderManager);
|
super(renderManager);
|
||||||
|
@ -47,6 +51,7 @@ public class RenderWorm extends Render<EntityWorm>{
|
||||||
@Override
|
@Override
|
||||||
public void doRender(EntityWorm entity, double x, double y, double z, float entityYaw, float partialTicks){
|
public void doRender(EntityWorm entity, double x, double y, double z, float entityYaw, float partialTicks){
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
|
bindEntityTexture(entity);
|
||||||
GlStateManager.translate(x, y+0.7F, z);
|
GlStateManager.translate(x, y+0.7F, z);
|
||||||
double boop = Minecraft.getSystemTime()/70D;
|
double boop = Minecraft.getSystemTime()/70D;
|
||||||
GlStateManager.rotate(-(float)((boop%360)), 0, 1, 0);
|
GlStateManager.rotate(-(float)((boop%360)), 0, 1, 0);
|
||||||
|
|
Loading…
Reference in a new issue