Jump 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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. You've gone all bonkers with the file. The first problem is that BlockPos does not exist in 1.7.10, but you're trying to use it. This is what the class should look like.
  2. Stop using unlocalized name and start using setRegistryName. Don't ever use getUnlocalizedName().substring(5) for anything, ever. Stop doing it. That's bad. Really really bad, perpetuated by a shitty tutorial that follows tons of bad practices and should be taken down.
  3. Also, oh god, that if-stack checking whether the item given was equal to an array of stuff. Jesus christ. Cleaned it up
  4. The NBT in my context was the NBT tag attached to an item stack, not the TileEntity's saveToNBT
  5. So you moved all of your item registration into your ClientProxy. Good job. Now what does the server know about your items? Jack shit is what.
  6. You open the vanilla GUI, which checks to see if the player is using a vanilla workbench, and immediately closes the gui if they are not. You need to open your custom GUI using a GuiHandler and player.openGui(...) which includes passing your mod ID.
  7. What you want is a coremod that operates via ASM. ASM is a very deep, dark abyss and you will get minimal help figuring out how to make a coremod. Primarily because: 1) You should not be modifying base classes at all ever, doing so can very easily introduce mod conflicts. 2) ASM requires understanding Java bytecode, you will need to know this before you can start, at all. 3) Providing resources on how to coremod will cause more people to go "yay, I can modify base classes!" when they didn't need to. Given that you are interested in doing this on 1.9, I suggest actually supplying a patch back to Forge as a Pull Request that inserts an event hook where you want it, that way you don't have to modify vanilla classes.
  8. https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/client/PedestalRenderer.java#L57-L106
  9. And then doesn't give a shit what the actual value of the metadata was, because it performed the same check on all of them: meta == i It doesn't matter what value meta was from the world (because it can only be 0 to 15), at some point during that loop that check will be true. Following that, because you are doing return true in the block-check, as soon as it determines that yes, one of these blocks is what we're looking for it never even fucking checks your loop.
  10. Rather than incrementing a counter every tick, store the start time and compare with the current time.
  11. Also, pretty sure that statement will never return false. //somewhere... stack new ItemStack(yourItem); //somewhere else... stack.getItem().getContainerItem(stack)
  12. Or you can compare the player's lastPos values with its pos values and see if they have changed.
  13. http://www.minecraftforge.net/forum/index.php?topic=22764.0
  14. Do note that in order to add AI tasks, you need to wait until after the entity has spawned in the world. EntityLivingBase#tasks is null until then.
  15. ...look at TileEntitySign and see how it does it?
  16. You need to look at ClassLoaders. ClassLoaders are objects that load other classes when needed. This means that you can write a custom class loader that fetches a class, examines it, makes changes (if it wants), and then passes it off to the JVM.
  17. How long is the sound file (in seconds)? Option a: make it shorter. Option b: make it a sound like the jukebox or minecart, which can be canceled.
  18. Hesus Christie. Put the setRegistryName chunk with the same chunk that does the unlocalized name and max stack size. Or better yet, put all of that into the constructors for those classes, the whole "method returns itself" pattern is dumb IMO.
  19. if(block == otherBlock) ..?
  20. Good job not knowing how proxies work.
  21. And some are weirdly related, like seeds. Seeds are absolutely not the item form of a block, yet when used they create a block, when that block is middle-clicked, you get a seed, and when the block is broken, you get the seed (usually!) But you can also get seeds from breaking tall grass (which has its own itemblock!)
  22. .getUnlocalizedName() == this.getUnlocalizedName(); Hesus Christie! You have no idea what you're doing, do you.
  23. You initialize Items before Blocks, but pass a Block (which is null) to your Item's constructor.

Important Information

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

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.