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. [ForgeModLoader] Caught exception from AddedCompat: java.lang.NullPointerException You have a NPE. That is, you're trying to copy a stack that doesn't exist yet.
  2. Edit: Nevermind, I was being dumb.
  3. Tile Entities are still blocks. There is still a block class involved, so feel free to utilize it.
  4. Draco18s replied to Iceverin99's topic in Modder Support
    Firstly: don't end all of your posts with as then no one will take you seriously, as that emoticon is essentially saying, "I'm joking!" Secondly: as NBT tags can only be applied to ItemStacks, it cannot go in your constructor.
  5. Yeah, you're not going to be pulling that off anytime soon. Also, Stop Capitalizing Every Word Like its the Title of a Book. It Makes You Look Uneducated.
  6. Draco18s replied to Iceverin99's topic in Modder Support
    this.stackTagCompound = new NBTTagCompound("tag");
  7. addInformation does add tooltips, but I think that Multimap func_111205_h() is the one I was thinking of. If you're trying to override it and then get the multimap for your own purposes, super.func_111205_h() will give you what ItemSword is already adding, which you don't want. You'd have to look at the base Item class's implementation.
  8. It can't find your texture.
  9. I think ItemSword handles that. I recall running across it recently, but not recently enough to remember where I saw it.
  10. You only need this if you use more than one texture per block/item. If it's one texture you can do setTextureName("generic:picturename");
  11. If you're trying to render a standard cube, use an ISimpleBlockRenderingHandler not a TileEntitySpecialRenderer
  12. ...Yes, or it will have a default unlocalized name. If it has the default unlocalized name, then it will be identical to every other block with the default unlocalized name and that can't be uniquely localized!
  13. protected BlockDirWTileEntity(int id) ?
  14. What vanilla item has the id 3877? That's right, NOTHING. What is an item that is NOTHING? Why it's NULL. Congradulations, you have a NPE.
  15. The thing is, Mojang is trying to create their own, official, API so that Forge isn't needed for most mods.
  16. No shit. Might want to go finish learning Java.
  17. world.getBlockTileEntity(...)
  18. Gah! x..X Don't use static variables like that. While it's not messing up when executed, its generally not good practice. Those are prime examples of values that should be passed to the various functions that use them.
  19. Look over my mod (the display pedestal linked above) as my block works in the exact way that you desire. Only the owner can open it (if owner is a blank string, then the first person to interact with it is the owner) and only the only can break it (or explosions, I specifically allow it to be destroyed by explosions).
  20. if(nbt != null) { nbt.setInteger("Test", nbt.getInteger("Test") + 1); entityplayer.sendChatToPlayer("" + nbt.getInteger("Test")); }
  21. You probably just need to implement: public Packet getDescriptionPacket() { NBTTagCompound nbtTag = new NBTTagCompound(); this.writeToNBT(nbtTag); return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, nbtTag); } public void onDataPacket(INetworkManager net, Packet132TileEntityData packet) { readFromNBT(packet.data); }
  22. You also need a packet handler. https://github.com/Draco18s/Artifacts/tree/master/draco18s/artifacts/network And set up your mod as a network mod: @NetworkMod(clientSideRequired = true, serverSideRequired = false, clientPacketHandlerSpec = @SidedPacketHandler(channels = {"GenericRandom"}, packetHandler = PacketHandlerClient.class), serverPacketHandlerSpec = @SidedPacketHandler(channels = {"GenericRandom"}, packetHandler = PacketHandlerServer.class))
  23. Client-server disparity. You'd want to look at this: https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/entity/TileEntityDisplayPedestal.java
  24. Put it inside /src/minecraft along side the rest of the source code.

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.