Jump to content

iwishiwasgood

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by iwishiwasgood

  1. I beleive I have figured it out, just me being careless and not paying enough attention. I'll get it working the way I want and then I can post my code if anyone is interested.
  2. Not sure if this has been answered already but I've found by far the easiest method to doing this is like so: //entity player MovingObjectPosition lastPosition = player.rayTrace(100, 1.0F); player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "Position [ X: " + lastPosition.blockX + " Y: " + lastPosition.blockY + 1 + " Z: " + lastPosition.blockZ + " ]")); //I add 1 because when spawning things, it makes more sense to get the block above where they are focused so that the entity isn't spawned in the block
  3. I've been trying to figure this out for a while but I just can't seem to get it to work properly. The best example of what I want to do is shown in the minecraft chat itself: I can get images and such to draw properly, but I can't get text from the fontRenderer to draw over the images/textures I load. So that's basically it, I'm also trying to do this without actually loading any resources. If anyone can help me I'd appreciate it greatly!
  4. Well I'm in single player however it does initialize an internal server when you launch so perhaps that it, could explain why they don't stick either. I'll see if I can find anything on spawning them on the server too. Thanks for the suggestion!
  5. It would appear you aren't storing your key, not the integer, so when you call the get method it just returns 0 by default. Never done anything like this before though so I couldn't shed any light on how to fix that. Random question, maybe the cause it isn't stored? Why is this: public PacketRequestChangeExp setExp(int exp) { this.exp = exp; return this; } returning a packetrequest object if you never use it? It looks like it is meant to be a void, and you use it like that is there any reason it is set up this way?
  6. I currently use spawnEntityinWorld, perhaps there is another method, I'm not sure, new to this as well BUT as for the location say you have your entity pandasauruss EntityPandasauruss pandasauruss = new EntityPandasauruss(Minecraft.theWorld); pandasauruss.setPositionAndUpdate(player.posX, player.posY, player.posZ); The player.posX, etc. would change to be where your egg landed but same concept. Perhaps that will work for you.
  7. Ctrl+F shows me that you're missing Minecraft.theWorld.spawnEntityInWorld(yourEntityObject); Would this be correct? Also, be sure you're setting a location for your entity!
  8. Hey everyone, first post. I started using forge a few days ago and I've been doing pretty well, however, I've been stumped by this one. I can spawn mobs (villagers in this case) but for whatever reason they don't seem to be solid ie: you can't hit them, you can walk through them, whatever. The isAIEnabled property returns true, and they move, but only in a straight line, any help? Here's an image to show you what I'm talking about: And here's a snippet of the code: case 8: EntityVillager villager = new EntityVillager(Commands.getGame().theWorld); villager.setPositionAndUpdate(player.posX, player.posY, player.posZ); Commands.getGame().theWorld.spawnEntityInWorld(villager); villager.setAIMoveSpeed((float)0.5); break; Thanks everyone!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.