Skip to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Animefan8888

Forge Modder
  • Joined

  • Last visited

Everything posted by Animefan8888

  1. How do you want them to spawn, normally, or at certain positions? If the first arenyou extending the vanilla villager classes?
  2. If you have the instance of the item you can create an ItemStack and use that to get its registered names.
  3. 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.
  4. Let me point it out what is nbt? Why do you have new NBTTagCompoumd () after your setTagCompound?
  5. 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.
  6. What tutorial?
  7. All i am going to say is look up getters and setters it will tell you what is wrong there.
  8. 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.
  9. 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.
  10. Well the only null thing i can think of would be the field itself.
  11. Everything else is getTagCompound()
  12. 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.
  13. Watch this video and preferably the entire playlist.
  14. This is the important part. (NBTTagCompound nbt) If you do not know what that means you are not yet ready to mod anything.
  15. 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.
  16. 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.
  17. 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.
  18. Thoughbif you plan on making your own piping system learn more Java first otherwise it will be the most painful experience ever.
  19. What do () mean when they are right next to words...
  20. How much Java do you know?
  21. How many stacks does InventoryBasic have?
  22. stackTagCompound = someTag is when you use setTagCompound(). Everything else is getTagCompound (). I thought that would be obvious.

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.