This commit is contained in:
Shadows_of_Fire 2017-07-07 16:01:23 -04:00
parent 5160ac2ea8
commit a4f07f9885
2 changed files with 9 additions and 3 deletions

View file

@ -24,6 +24,7 @@ public final class InitEntities{
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);
RenderWorm.fixItemStack();
}
@SideOnly(Side.CLIENT)

View file

@ -26,14 +26,18 @@ import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class RenderWorm extends Render<EntityWorm>{
public static final IRenderFactory FACTORY = new IRenderFactory(){
public static final IRenderFactory<EntityWorm> FACTORY = new IRenderFactory<EntityWorm>(){
@Override
public Render createRenderFor(RenderManager manager){
public Render<EntityWorm> createRenderFor(RenderManager 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){
super(renderManager);
@ -47,6 +51,7 @@ public class RenderWorm extends Render<EntityWorm>{
@Override
public void doRender(EntityWorm entity, double x, double y, double z, float entityYaw, float partialTicks){
GlStateManager.pushMatrix();
bindEntityTexture(entity);
GlStateManager.translate(x, y+0.7F, z);
double boop = Minecraft.getSystemTime()/70D;
GlStateManager.rotate(-(float)((boop%360)), 0, 1, 0);