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. My guess is that the BiomeGenBase island = ... code is running prior to the readFromNBT method.
  2. world.getBlock(x, y, z).isOpaqueCube()
  3. Item Frames aren't living entities (which is why they have no health) so you're kind of SOL.
  4. Draco18s replied to GodOfYeti's topic in Modder Support
    OK, fair; I've seen it in Unity3D. But the command actually spawns a thread and you can't call it from within certain functions (such as the update function) and will throw a compile error if you try. I used it a few times, but I've done my best to avoid it (can't recall an instance off-hand to remember why I needed it).
  5. Change the rotation point.
  6. Mystcraft has dimensions with multiple suns that can move anywhere from "so fast it strobes" to "half as fast as the overworld." Its possible to go slower, but not with the symbols that currently exist. So Mystcraft would be a good test case, though you'd have to ask XCompWiz if there's a way to get the duration of a "day" for his dimensions.
  7. Draco18s replied to GodOfYeti's topic in Modder Support
    Which only works in a multithreaded application, which most applications are not. That's what gets me.
  8. A TileEntity is still supplied by the block. You can set the TE's block's metadata and use that to change the lighting.
  9. Step 1) Find a way to store data about the player somewhere, probably on the player (left as an exercise to the reader) Step 2) If the player is not wearing the equipment, disable the capability of flying and save "I have turned flying off" to the data in step 1 Step 3) Next tick, if "I have turned flying off" is true, set it to false, if capability of flying is still false, turn off isFlying Step 4) Technically optional, save a "I attempted to disable flying" value in step 1 to true, and don't change it to false until your mod enables flying again (ignore checking if flying is not allowed while this value is flagged; it saves some CPU cycles) That way if another mod is allowing flight, your mod only disables the capability for 1 tick and doesn't make the player fall (which gives another mod the opportunity to turn the capability back on) and you don't constantly re-check.
  10. You could also call translate more than once. private String[] names={"color.black","color.white", /*...*/}; translate("wool.name") + translate(names [item.getItemDamage ()]);
  11. Draco18s replied to GodOfYeti's topic in Modder Support
    Why does everyone think that pausing an application is the same thing as a timer?
  12. Ah! This is easy then. Techne automatically gives names to each cuboid which is the variable names when it exports the model as a Java file. You can take the resulting code and modify it to only render those parts when conditions are true. I actually did this recently myself. https://github.com/Draco18s/HarderStuff/blob/master/main/java/com/draco18s/ores/client/ModelAxel.java#L143-145 The block actually uses two different models in total, but that's only because one position is radically different than the others (normally speaking it'd be a separate block, but as I'm not doing a full tech mod I left things abstract). Base look: http://binarymage.com/wiki/lib/exe/fetch.php?cache=&w=854&h=480&media=hardores:2014-11-28_16.20.15.png[/img] And the final look. You can see the result of line 144 towards the left (second, separate, model to the right): http://binarymage.com/wiki/lib/exe/fetch.php?cache=&w=854&h=480&media=hardores:2014-11-28_16.20.43.png[/img] The gearbox model ended up looking flimsy, it it was also a huge pain to try and fix, due to the rotations involved and I said "screw it."
  13. How are you creating the model in the first place? The answer is "yes" but in order to help I'd have to know what object type you're using.
  14. The renderer has access to the TileEntity, so store whatever data you need there.
  15. Well....you obviously know how to set the block metadata for a regular block and make the facing change. Now in your renderer you need to read that data and call GL11.gl_rotate(...)
  16. CUDDLE THOSE BRACES! *Shakes a fist* Then again, the place I had it happen had the semi-colon hiding next to the curly brace anyway. Took a while to find. ^..^; Fortunately I knew where the code was going wrong, so it made the problem easier to locate (specifically, I knew a loop was running forever because the content was never executing and if it did, even once, it was guaranteed to cause an exit condition).
  17. I agree and so does (at least one of) my friends.
  18. I see the typo i had a similar problem a few weeks ago.
  19. Tada. There was no way we could have figured that out from the code you posted. And now you know how to debug.
  20. You shouldn't need to check sides. A packet handler is already sided and the client can't send a packet to itself (SSP exception, but its still threaded).
  21. 5% -> Random(20) == 0. 5% * Looting -> Random(20) <= Looting Mathemagic

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.