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 don't put any kind of cooldown on transferring non-player entities.
  2. getHarvestTool takes an integer and returns a string. getHarvestLevel takes an integer and returns an integer. isToolEffective takes a string and an integer and returns a boolean. I fail to see how your NBT item is relevant.
  3. I've also had similar problems using only one matrix push/pop. Add a second one between the translate and the rotate.
  4. Block#getHarvestTool(), Block#getHarvestLevel(), Block#isToolEffective()?
  5. Try putting the registration of the event handler in your client proxy?
  6. Its funny what reading does. [14:07:11] [server thread/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.
  7. return handleClientMessage(Minecraft.getMinecraft().thePlayer, message, ctx); Oh jesus christ. The server still has to LOAD the code for this class and make sure it's valid. It can't do that if you include a reference to a client sided object.
  8. Anything inside a package called "client" is for the client only and is marked @SideOnly(Side.CLIENT)
  9. Client code present on dedicated server. Fix yo shit.
  10. Draco18s replied to a post in a topic in Modder Support
    Event ev = new MyCustomEvent(); theEventBus.post(ev); Where theEventBus is a reference to an event bus (as there are several), eg. MinecraftForge.EVENT_BUS.post(ev), and you can even write your own if you feel the need, it's basically just a priority-sorted list of the listener functions which are called in order when post() is executed.
  11. The emphasis here is that you implement writeNBT and readNBT, you don't call them (the only common exception being getDescriptionPacket and onDataPacket, as that's a form of save/load except that it's the sync between server and client rather than to disk*). *IMO the override implementation used is something that should have been in the base TileEntity class, but which isn't because very few of the Vanilla TEs use it as they have special packets that sync their data, rather than the generic packet used for mod TEs.
  12. Draco18s replied to a post in a topic in Modder Support
    You extend Event and post it to the bus. Which bus is up to you, but at least pick one that makes sense. Don't put an update event on the ore gen bus, for example.
  13. sin(10) = 0.174 sin(-10) = -0.174 You can't just arbitrarily modify the rotation value. If you absolutely must use a positive value, add 360 (in degrees, or 2*PI in radians).
  14. Unless you are doing Dirty Things and know what you're trying to do. E.g. configure an entity that is placed as part of structure generation, and the values you want to set aren't public (for example, making a spawner spawn a custom mob on a much longer than default timer or place a specific painting). NBT can give you access to values that aren't, and shouldn't be, public but sometimes you have to go "I need this to be like this for a good reason." (Note: if either of those two examples can be done without modifying the NBT, using reflection, or ASM, I'd be happy to update the code).
  15. http://lmgtfy.com/?q=local+to+global+coordinate+transformation Long story short: it involves a lot of math, and its a lot of math that has existing packages to help you with. But doing it by hand is quite possible and really not that hard, as long as you understand how to multiply matricies (the MSDN link is probably the most useful).
  16. The only thing to be aware of is that the EntityConstructed event fires before those fields are initialized.
  17. And what magical itemstack is this?
  18. You don't. Can't. You get it from the event object, like your already doing.
  19. Then you need to set the event to canceled and set the EntityItem to dead. OR Remove the item from the player's inventory. Nulling the local variable doesn't do anything, you need to null the inventory's reference to it.
  20. Honestly, no idea. I managed to get that, due to having multiple jar files I wish to publish (so I have a task for each one). Not sure why you're getting what you're getting with the regular build, and I don't know enough about the build scripts to know how to tweak the default task.
  21. Well, the "width" and "height" there aren't "size on screen" they're "width and height of the texture region." And right now your code says "use as many texture pixels as the game window is large."
  22. Apologies, for some reason I missed the scroll bar before. I remember even checking twice to see if there was more (as I was seeing only the one section). Hmm. Ok then. Try adding this: task exclusionBuild(type: Jar) { baseName = archivesBaseName+"_noAPIs" from zipTree(jar.outputs.getFiles().getSingleFile()).matching { exclude 'mcmod.info','enviromine/**','cofh/**' } } exclusionBuild.dependsOn('reobf') Then, instead of "gradlew build" do "gradlew build exclusionBuild" (You can name the task whatever you'd like, of course).
  23. Might help if you bound the texture before drawing it to the screen.

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.