Hey when I created a mod for minecraft 1.1.0 full my mob worked but all of a sudden my mob now has an issue spawning because I copied and changed to my liking the render and a little of the model files and now they don't really work because they show their shadows and weapons but not their textures or model but everything including burning works how do I fix this just ask for some code
Rollback Post to RevisionRollBack
I may be crazy, or maybe you're the crazy one, time will spill it soon enough click us, or we die
Digging out this because I'm having problems with my throwable item. I'm using modloader, but when I rightclick, my entity is invisible, but can still hit mobs. Here's my code related to that :
mod_Legendscraft
package net.minecraft.src;
import java.util.Random;
import java.util.Map;
public class mod_Legendscraft extends BaseMod{
public static final Item BoomerangHammer = new ItemBoomerangHammer(504).setItemName("BoomerangHammer");
public void addRenderer(Map map)
{
map.put(EntityBoomerangHammer.class, new RenderSnowball(mod_Legendscraft.BoomerangHammer.iconIndex));
}
public void load()
{
//Trowable items
ModLoader.registerEntityID(EntityBoomerangHammer.class, "BoomerangHammer", 551);
ModLoader.addEntityTracker(this, EntityBoomerangHammer.class, 551, 64, 20, true);
("/gui/items.png" , "/Legendscraft/items/BoomerangHammer.png");
BoomerangHammer.setCreativeTab(CreativeTabs.tabCombat);
ModLoader.addName(BoomerangHammer, "Boomerang Hammer");
public Entity spawnEntity(int entityId, World worldClient, double x,double y, double z){
switch (entityId){
case 552:
return new EntityBoomerangHammer(worldClient, x, y, z);
default:
return null;
}
}
public Packet23VehicleSpawn getSpawnPacket(Entity entity, int type){
if (entity instanceof EntityBoomerangHammer)
return new Packet23VehicleSpawn(entity, type);
else
return null;
}
public String getVersion()
{
return "Legendscraft V0.22 for Minecraft 1.4.7";
}
}
ItemBoomerangHammer
package net.minecraft.src;
import java.util.List;
import java.util.Random;
public class ItemBoomerangHammer extends Item
{
public ItemBoomerangHammer(int i)
{
super(i);
maxStackSize = 1;
}
public boolean isItLanded = false;
public boolean isItLanded2 = false;
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
if (!entityplayer.capabilities.isCreativeMode)
{
--itemstack.stackSize;
}
world.playSoundAtEntity(entityplayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
if (!world.isRemote){
EntityBoomerangHammer myBoomerang = new EntityBoomerangHammer(world, entityplayer);
myBoomerang.itemboomerang = this;
world.spawnEntityInWorld(myBoomerang);
}
return itemstack;
}
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{
par3List.add("Acts like a boomerang");//the color code trick works here aswell
}
public String Version()
{
return "LegendsCraft V0.1 for Minecraft 1.4.7";
}
}
EntityBoomerangHammer
package net.minecraft.src;
public class EntityBoomerangHammer extends EntityThrowable
{
public EntityBoomerangHammer(World par1World)
{
super(par1World);
}
public EntityBoomerangHammer(World par1World, EntityLiving par2EntityLiving)
{
super(par1World, par2EntityLiving);
}
public EntityBoomerangHammer(World par1World, double par2, double par4, double par6)
{
super(par1World, par2, par4, par6);
}
//Make a connection between the item and the entity, so it can access to variables from the other class
public ItemBoomerangHammer itemboomerang = null;
/**
* Called when this EntityThrowable hits a block or entity.
*/
protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
{
if (par1MovingObjectPosition.entityHit != null)
{
byte var2 = 6;
par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), var2);
}
for (int var3 = 0; var3 < 8; ++var3)
{
this.worldObj.spawnParticle("snowballpoof", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
}
if (!this.worldObj.isRemote)
{
this.setDead();
}
}
}
RenderBoomerangHammer
package net.minecraft.src;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
public class RenderBoomerangHammer extends Render
{
/**
* Have the icon index (in items.png) that will be used to render the image. Currently, eggs and snowballs uses this
* classes.
*/
private int itemIconIndex;
/*public RenderBoomerangHammer(int par1)
{
this.itemIconIndex = par1;
}*/
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
GL11.glPushMatrix();
GL11.glTranslatef((float)par2, (float)par4, (float)par6);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glScalef(0.5F, 0.5F, 0.5F);
this.loadTexture("/Legendscraft/Items/BoomerangHammer.png");
}
private void func_77026_a(Tessellator par1Tessellator, int par2)
{
float var3 = (float)(par2 % 16 * 16 + 0) / 256.0F;
float var4 = (float)(par2 % 16 * 16 + 16) / 256.0F;
float var5 = (float)(par2 / 16 * 16 + 0) / 256.0F;
float var6 = (float)(par2 / 16 * 16 + 16) / 256.0F;
float var7 = 1.0F;
float var8 = 0.5F;
float var9 = 0.25F;
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
par1Tessellator.startDrawingQuads();
par1Tessellator.setNormal(0.0F, 1.0F, 0.0F);
par1Tessellator.addVertexWithUV((double)(0.0F - var8), (double)(0.0F - var9), 0.0D, (double)var3, (double)var6);
par1Tessellator.addVertexWithUV((double)(var7 - var8), (double)(0.0F - var9), 0.0D, (double)var4, (double)var6);
par1Tessellator.addVertexWithUV((double)(var7 - var8), (double)(var7 - var9), 0.0D, (double)var4, (double)var5);
par1Tessellator.addVertexWithUV((double)(0.0F - var8), (double)(var7 - var9), 0.0D, (double)var3, (double)var5);
par1Tessellator.draw();
}
}
Hey, I still have the problem.
I edited Packet24MobSpawn.java:46 from
this.type = (byte)EntityList.getEntityID(par1EntityLiving);
to
this.type = (byte)EntityList.getEntityID(par1EntityLiving) & 256;
and I changed my entity's id from 130 to 125 but still not works.
I really checked that my change DID apply to the minecraft, but the mob is still invisible, yeah, invisible, because pressure plates worked on them..
Hey, I still have the problem.
I edited Packet24MobSpawn.java:46 from
this.type = (byte)EntityList.getEntityID(par1EntityLiving);
to
this.type = (byte)EntityList.getEntityID(par1EntityLiving) & 256;
and I changed my entity's id from 130 to 125 but still not works.
I really checked that my change DID apply to the minecraft, but the mob is still invisible, yeah, invisible, because pressure plates worked on them..
Sorry, It was because I didn't implement tracker of entity
Digging out this because I'm having problems with my throwable item. I'm using modloader, but when I rightclick, my entity is invisible, but can still hit mobs. Here's my code related to that :
mod_Legendscraft
package net.minecraft.src;
import java.util.Random;
import java.util.Map;
public class mod_Legendscraft extends BaseMod{
public static final Item BoomerangHammer = new ItemBoomerangHammer(504).setItemName("BoomerangHammer");
public void addRenderer(Map map)
{
map.put(EntityBoomerangHammer.class, new RenderSnowball(mod_Legendscraft.BoomerangHammer.iconIndex));
}
public void load()
{
//Trowable items
ModLoader.registerEntityID(EntityBoomerangHammer.class, "BoomerangHammer", 551);
ModLoader.addEntityTracker(this, EntityBoomerangHammer.class, 551, 64, 20, true);
("/gui/items.png" , "/Legendscraft/items/BoomerangHammer.png");
BoomerangHammer.setCreativeTab(CreativeTabs.tabCombat);
ModLoader.addName(BoomerangHammer, "Boomerang Hammer");
public Entity spawnEntity(int entityId, World worldClient, double x,double y, double z){
switch (entityId){
case 552:
return new EntityBoomerangHammer(worldClient, x, y, z);
default:
return null;
}
}
public Packet23VehicleSpawn getSpawnPacket(Entity entity, int type){
if (entity instanceof EntityBoomerangHammer)
return new Packet23VehicleSpawn(entity, type);
else
return null;
}
public String getVersion()
{
return "Legendscraft V0.22 for Minecraft 1.4.7";
}
}
ItemBoomerangHammer
package net.minecraft.src;
import java.util.List;
import java.util.Random;
public class ItemBoomerangHammer extends Item
{
public ItemBoomerangHammer(int i)
{
super(i);
maxStackSize = 1;
}
public boolean isItLanded = false;
public boolean isItLanded2 = false;
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
if (!entityplayer.capabilities.isCreativeMode)
{
--itemstack.stackSize;
}
world.playSoundAtEntity(entityplayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
if (!world.isRemote){
EntityBoomerangHammer myBoomerang = new EntityBoomerangHammer(world, entityplayer);
myBoomerang.itemboomerang = this;
world.spawnEntityInWorld(myBoomerang);
}
return itemstack;
}
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{
par3List.add("Acts like a boomerang");//the color code trick works here aswell
}
public String Version()
{
return "LegendsCraft V0.1 for Minecraft 1.4.7";
}
}
EntityBoomerangHammer
package net.minecraft.src;
public class EntityBoomerangHammer extends EntityThrowable
{
public EntityBoomerangHammer(World par1World)
{
super(par1World);
}
public EntityBoomerangHammer(World par1World, EntityLiving par2EntityLiving)
{
super(par1World, par2EntityLiving);
}
public EntityBoomerangHammer(World par1World, double par2, double par4, double par6)
{
super(par1World, par2, par4, par6);
}
//Make a connection between the item and the entity, so it can access to variables from the other class
public ItemBoomerangHammer itemboomerang = null;
/**
* Called when this EntityThrowable hits a block or entity.
*/
protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
{
if (par1MovingObjectPosition.entityHit != null)
{
byte var2 = 6;
par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), var2);
}
for (int var3 = 0; var3 < 8; ++var3)
{
this.worldObj.spawnParticle("snowballpoof", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
}
if (!this.worldObj.isRemote)
{
this.setDead();
}
}
}
RenderBoomerangHammer
package net.minecraft.src;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
public class RenderBoomerangHammer extends Render
{
/**
* Have the icon index (in items.png) that will be used to render the image. Currently, eggs and snowballs uses this
* classes.
*/
private int itemIconIndex;
/*public RenderBoomerangHammer(int par1)
{
this.itemIconIndex = par1;
}*/
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
GL11.glPushMatrix();
GL11.glTranslatef((float)par2, (float)par4, (float)par6);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glScalef(0.5F, 0.5F, 0.5F);
this.loadTexture("/Legendscraft/Items/BoomerangHammer.png");
}
private void func_77026_a(Tessellator par1Tessellator, int par2)
{
float var3 = (float)(par2 % 16 * 16 + 0) / 256.0F;
float var4 = (float)(par2 % 16 * 16 + 16) / 256.0F;
float var5 = (float)(par2 / 16 * 16 + 0) / 256.0F;
float var6 = (float)(par2 / 16 * 16 + 16) / 256.0F;
float var7 = 1.0F;
float var8 = 0.5F;
float var9 = 0.25F;
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
par1Tessellator.startDrawingQuads();
par1Tessellator.setNormal(0.0F, 1.0F, 0.0F);
par1Tessellator.addVertexWithUV((double)(0.0F - var8), (double)(0.0F - var9), 0.0D, (double)var3, (double)var6);
par1Tessellator.addVertexWithUV((double)(var7 - var8), (double)(0.0F - var9), 0.0D, (double)var4, (double)var6);
par1Tessellator.addVertexWithUV((double)(var7 - var8), (double)(var7 - var9), 0.0D, (double)var4, (double)var5);
par1Tessellator.addVertexWithUV((double)(0.0F - var8), (double)(var7 - var9), 0.0D, (double)var3, (double)var5);
par1Tessellator.draw();
}
}
I hope that someone will be able to help me
I am having this problem too but with entities period
What if your entity is a name such as the ones I am having troubles with: [WARNING] Skipping TileEntity with id DragonBlockS01TileEntityRender
[WARNING] Skipping TileEntity with id DragonBlockS01TileEntityRender
[WARNING] Skipping TileEntity with id DragonBlockS01TileEntityRender
[WARNING] Skipping TileEntity with id DragonBlockS01TileEntityRender
[WARNING] Skipping TileEntity with id DragonBlockS01TileEntityRender
[WARNING] Skipping Entity with id JinRyuu_DragonBlockC.kami
[INFO] Preparing spawn area: 54%
[WARNING] Skipping Entity with id JinRyuu_DragonBlockC.EnergyAttack
[WARNING] Skipping TileEntity with id DragonBlockS01TileEntityRender
[WARNING] Skipping TileEntity with id DragonBlockS01TileEntityRender
[WARNING] Skipping Entity with id JinRyuu_DragonBlockC.EnergyAttack
[INFO] Done (2.932s)! For help, type "help" or "?"
[WARNING] Skipping Entity with id JinRyuu_DragonBlockC.kami
[WARNING] Skipping Entity with id JinRyuu_DragonBlockC.karin
I may be crazy, or maybe you're the crazy one, time will spill it soon enough
click us, or we die
The model looks nothing like that, and I know the texture exists because changing RenderBoat's texture to it makes the texture show up.
mod_Legendscraft
ItemBoomerangHammer
EntityBoomerangHammer
RenderBoomerangHammer
I hope that someone will be able to help me
I edited Packet24MobSpawn.java:46 from
this.type = (byte)EntityList.getEntityID(par1EntityLiving);
to
this.type = (byte)EntityList.getEntityID(par1EntityLiving) & 256;
and I changed my entity's id from 130 to 125 but still not works.
I really checked that my change DID apply to the minecraft, but the mob is still invisible, yeah, invisible, because pressure plates worked on them..
Sorry, It was because I didn't implement tracker of entity
I am having this problem too but with entities period
I may be crazy, or maybe you're the crazy one, time will spill it soon enough
click us, or we die
[WARNING] Skipping TileEntity with id DragonBlockS01TileEntityRender
[WARNING] Skipping TileEntity with id DragonBlockS01TileEntityRender
[WARNING] Skipping TileEntity with id DragonBlockS01TileEntityRender
[WARNING] Skipping TileEntity with id DragonBlockS01TileEntityRender
[WARNING] Skipping Entity with id JinRyuu_DragonBlockC.kami
[INFO] Preparing spawn area: 54%
[WARNING] Skipping Entity with id JinRyuu_DragonBlockC.EnergyAttack
[WARNING] Skipping TileEntity with id DragonBlockS01TileEntityRender
[WARNING] Skipping TileEntity with id DragonBlockS01TileEntityRender
[WARNING] Skipping Entity with id JinRyuu_DragonBlockC.EnergyAttack
[INFO] Done (2.932s)! For help, type "help" or "?"
[WARNING] Skipping Entity with id JinRyuu_DragonBlockC.kami
[WARNING] Skipping Entity with id JinRyuu_DragonBlockC.karin