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. While true, it is not 100% accurate, as the player may still mine the sides of the block from this position. Or the top, from a less inclined angle.
  2. Which has its value overwritten by the if statement. Imagine looking down and mining the side of a block. Your code there days the top was mined. Anyway, you actually might want to look at World#doRaytrace() and EntityPlayer#lookVec()
  3. Not really, no. My algorithm is the closest I came. It does very well even in the roofed forest, though it can occasionally trim the tops of a neighboring tree.
  4. God damn function names not matching what they mean.
  5. Extend my method such that you have a log version (recurses itself and calls the leaf version) and a leaf version (recurses only itself).
  6. You need a TileEntity for this. Setting up a block to have a TileEntity is very easy. Once you have a TileEntity you override onUpdate and voila, that method gets called every tick.
  7. Question: What is your goal? By which I mean: what are you going to do with that information?
  8. If you hover over the red squiggly line it will tell you the problem.
  9. I would separate out into as many blocks as make sense, depending on what your divisions are, rather than arbitrarily saying "these 16 on this block and these four on the other because there were too many."
  10. I wrote an algorithm once. It was recursive and likely not the best, but it worked. Kill current block and every log above this one. Then recurse for every adjacent log next to this one, if the block above is air, also recurse for its neighbors.
  11. Ore-type-by meta isn't really worth doing unless you have a good reason. If your set on it, try and group things intelligently (eg by harvest level) just to make the coding easy (rather than having to do lookups by meta).
  12. If its a required mod missing, you can throw a CustomModLoadingErrorDisplayException instead. I did this myself, as I needed to detect a version of a mod that didn't report its version number to Forge. https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/hardlib/client/ClientProxy.java#L22-L24 (Edit: misread, you were comparing, however this might still be useful information for others)
  13. You need a bit more than just the CompressedStreamTools IIRC, but that's a good chunk of it. Its been a while since I did NBT file work (I was rendering camera views, sending them to the server for saving, and retransmitting for viewing, ), but I think the CST won't do the file IO, you'll have to handle that yourself.
  14. You don't have a state -> metadata function override. I don't remember what it's called.
  15. This might be overkill, but here's a TextureAtlasSprite class I use to smash two textures together (and allows for colorization as well). You should be able to make use of it for your ore blocks at least. Colorization is a hue alteration on the HSV spectrum (retains the desired grayscale contrast better). https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/hardlib/client/TextureAtlasDynamic.java Do be aware that any loading problems don't have their errors handled nicely. Vanilla's TextureAtlasSprite class will go "I couldn't find resource x:y" this class will just vomit a stack trace.
  16. And ta da, I remembered to come back and post the code I use. https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/hardlib/client/TextureAtlasDynamic.java
  17. Also is it really that difficult to manually assign an entity ID value? You have to edit every one of those other parameters...
  18. I was unable to find that method in Item, could you give me more information about it? Per coolAlias, it probably won't help you anyway. Problem is I forget the exact name, its like shouldItemStackRefresh or something along those lines. Search the Item class for "refresh" and you'll find it. Its used to make the game realize that minor changes to an equipped item should or should not be treated as switching inventory slots (the animation and stuff).
  19. It kind of depends. In the case of crash logs the spoiler is more important due to size (it is readable either way).
  20. I am currently mobile, so it is difficult for me to locate my previous posts. If you find them, though, I posted a class that takes in two icon reference strings (same as the iiconregister) and combines them into a single texture.
  21. You need to overrode the shouldRefresh() method (or similar, I don't know it's exact name).
  22. 1) learn how to read stack traces 2) learn how to Google "bbcode spoiler"

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.