Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. Do you have either a class that extends BlockContainer or a class that extends Block that Overrides hasTileEntity() and createTileEntity(). If not you didn't do it right. And that tutorial is wrong.
  2. What you should do is look for where it is being called not where it is being made/overriden. This way you can check the other requirements for an entity to spawn. As i dont know what else is checked, but you should look at the super method of getCanSpawnHere and override it if one of those is a problem.
  3. I put the comments there for people looking at that code if what i code isnt open source i dont add those unless i need it for myself.
  4. Oh your welcome i made that because people have a lot of difficulty with those things. I meant use the search feature in your IDE.
  5. I dont have a workspace, but you could search for where getCanSpawnHere and see where it is called. Look around and see what other stuff is checked.
  6. How do you want them to spawn, normally, or at certain positions? If the first arenyou extending the vanilla villager classes?
  7. If you have the instance of the item you can create an ItemStack and use that to get its registered names.
  8. nbt is the name of the variable inside of the method normally. new NBTTagCompound () is a new variable of the type NBTTagCompound which is what you want to pass in to the method.
  9. Let me point it out what is nbt? Why do you have new NBTTagCompoumd () after your setTagCompound?
  10. I'll explain it here. Getter methods are usually used to grab a variable nornally a protected or private one. You can not edit the variable using an =, but you can grab any data within the variable. Setters are a loop on to set a variable = to whatever you pass into the method. These normally are void methods and are used for protected or private variables as well. This is done to ensure you do not have full access to a field from outside where it has been declared.
  11. All i am going to say is look up getters and setters it will tell you what is wrong there.
  12. setTagCompound(...) automatically sets the variable to what is passed into the method. No = is required setTagCompound(...) is a void method. Meaning nothing is returned, seriously look up what getters and setters are.
  13. That is mostly correct except for the = and the second one. It doesnt work. You should look up what getters and setters are in programming, they are a big part.
  14. Well the only null thing i can think of would be the field itself.
  15. Everything else is getTagCompound()
  16. Instead of having your TileEntity contain a field of InventoryBasic why not make it implement ISidedInventory(Used to be able to interact with pipes/hoppers) or IInventory.
  17. Watch this video and preferably the entire playlist.
  18. This is the important part. (NBTTagCompound nbt) If you do not know what that means you are not yet ready to mod anything.
  19. onEntityCollidedWithBlock is called when a entity is inside of the collision box, so if your block is not smaller that the collision box there is no normal way for any Entity to "collide" with it.
  20. It is not right but do not go and do that stuff, instead look at setTagCompound() in the ItemStack class and maybe look up what getter and setter methods are in programming.
  21. It kinda tells you exactly what is wrong in the second one(Hint: It's the ()) and the first one is two == not one. When I said stackTagCompound = someTagCompound there was only one.
×
×
  • Create New...

Important Information

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