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. Extend my method such that you have a log version (recurses itself and calls the leaf version) and a leaf version (recurses only itself).
  2. 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.
  3. Question: What is your goal? By which I mean: what are you going to do with that information?
  4. If you hover over the red squiggly line it will tell you the problem.
  5. 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."
  6. 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.
  7. 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).
  8. 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)
  9. 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.
  10. You don't have a state -> metadata function override. I don't remember what it's called.
  11. 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.
  12. 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
  13. Also is it really that difficult to manually assign an entity ID value? You have to edit every one of those other parameters...
  14. 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).
  15. It kind of depends. In the case of crash logs the spoiler is more important due to size (it is readable either way).
  16. 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.
  17. You need to overrode the shouldRefresh() method (or similar, I don't know it's exact name).
  18. 1) learn how to read stack traces 2) learn how to Google "bbcode spoiler"
  19. You likely will want a custom TextureAtlasSprite class with a custom load method. I've posted about them here a couple of times.
  20. See: http://minecraft.gamepedia.com/Hunger#Mechanics
  21. NBTdata is easy. However, you are using a gui which means that the data you are setting is on the client which means you need packets.
  22. Its not 50,000 nanos. It's 50,000,000. Mili, micro, nano. https://en.wikipedia.org/wiki/Nanosecond
  23. I handle multiple sub-projects (core library + child mods) so here's how I've handled things. It's litterally all in my gradle file, does a bit more than what you want, but here it is: def releaseVersion = "12" def majorVersion = "20" def minorVersion = "0" //bugpatch or testing versions def libVersion = "a" def oresVersion = "c" def hazardsVersion = "a" def wildlifeVersion = "a" def industryVersion = "b" def prePend = "1.7.10-" def packageVersion = releaseVersion+"."+majorVersion+"."+minorVersion+libVersion+oresVersion+hazardsVersion+wildlifeVersion+industryVersion libVersion = releaseVersion+"."+majorVersion+"."+minorVersion+libVersion oresVersion = releaseVersion+"."+majorVersion+"."+minorVersion+oresVersion hazardsVersion = releaseVersion+"."+majorVersion+"."+minorVersion+hazardsVersion wildlifeVersion = releaseVersion+"."+majorVersion+"."+minorVersion+wildlifeVersion industryVersion = releaseVersion+"."+majorVersion+"."+minorVersion+industryVersion version = "" group= "com.draco18s.harderores" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "1.7.10-HardStuff"+packageVersion minecraft { version = "1.7.10-10.13.2.1291" runDir = "eclipse" assetDir = "eclipse/assets" replace "{@version:lib}":libVersion,"{@version:ore}":oresVersion,"{@version:haz}":hazardsVersion,"{@version:wld}":wildlifeVersion,"{@version:ind}":industryVersion,"required-after:HardLib""required-after:HardLib@["+releaseVersion+"."+majorVersion+",]"),"/*{uncomment}":"","{uncomment}*/":"" } The "replace" directive looks for each "search" string and replaces it with the string specified after the : So"{@version:lib}":libVersion means "find '{@version:lib}' and replace it with (the value stored in the variable) libVersion. Each is comma separated. I've got a few extras that just version numbers, for instance, I have a "require-after" marker that inserts the core library version number required (which only uses the "a.b" portion of the "a.b.cx" version number) as well as chunks of code that I literally cannot run in dev (Intellisense says its OK, but the linked jars don't actually work in a deobf environment) so they're just commented out with a {uncomment} marker to enable them during the build process. (If anyone cares, it was for Reika's API, which I actually don't use any more because he can't be arsed to make his API backwards compatible when he updates it and the bug reports come to me because it crashes with a "MethodNotFoundException").

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.