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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. 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.
  2. 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.
  3. A TileEntity is still supplied by the block. You can set the TE's block's metadata and use that to change the lighting.
  4. 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.
  5. You could also call translate more than once. private String[] names={"color.black","color.white", /*...*/}; translate("wool.name") + translate(names [item.getItemDamage ()]);
  6. Draco18s replied to GodOfYeti's topic in Modder Support
    Why does everyone think that pausing an application is the same thing as a timer?
  7. 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."
  8. 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.
  9. The renderer has access to the TileEntity, so store whatever data you need there.
  10. 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(...)
  11. 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).
  12. I agree and so does (at least one of) my friends.
  13. I see the typo i had a similar problem a few weeks ago.
  14. Tada. There was no way we could have figured that out from the code you posted. And now you know how to debug.
  15. 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).
  16. 5% -> Random(20) == 0. 5% * Looting -> Random(20) <= Looting Mathemagic
  17. Register a key handler Send a packet to the server Server gets the packet and modify's the item
  18. Well the thing that looks null is an object of type ArrowEffect. Figure out why it is null. Which constructor are you calling, what's the default value, etc.
  19. Null pointer errors are easy to fix. go to the line it indicates, look at it, figure out what objects could possibly be null, backtrace to figure out why.
  20. And...what seems to be the problem?
  21. Try recoding that line so it makes sense. You're checking for "foo is not equal to foo" which will always be false. When you change it to be bar instead, then you're checking "if bar is not equal to foo" which might be true and might be false. What are the lines inside that statement doing? When do you want them to happen?

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.