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 likely will want a custom TextureAtlasSprite class with a custom load method. I've posted about them here a couple of times.
  2. See: http://minecraft.gamepedia.com/Hunger#Mechanics
  3. 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.
  4. Its not 50,000 nanos. It's 50,000,000. Mili, micro, nano. https://en.wikipedia.org/wiki/Nanosecond
  5. 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").
  6. All of the methods you have indicated no longer take integer x y z parameters but a single BlockPos object, which is a wrapper around integer x y z.
  7. Gradle has a replace method/option. I use it for my mod versions, but I can't get at my code atm to provide an example.
  8. Partial ticks is what happens when you take "1.73489 ticks elapsed" (13ms left until next tick) and express it as "1 tick" (plus a little bit). So you add, not multiply.
  9. Reflection's setAccessible(true); would have done that too.
  10. You really need to go learn programming before modding. What you are trying to do is really quite straight forward. This won't solve your problem, but it will show you how I handled something similar. @Override public IIcon getIcon(ItemStack stack, int pass) { IIcon i = itemIcon; if(pass == 0) { if(stack.stackTagCompound == null) { return itemIcon; } i = (IIcon) ArtifactsAPI.itemicons.icons.get(stack.stackTagCompound.getString("icon").toLowerCase()); if(i == null) { i = itemIcon; } } else { if(stack.stackTagCompound == null) { return (IIcon) ArtifactsAPI.itemicons.icons.get("overlay_artifact1"); } i = (IIcon) ArtifactsAPI.itemicons.icons.get("overlay_"+stack.stackTagCompound.getString("icon").toLowerCase()); if(i == null) { i = (IIcon) ArtifactsAPI.itemicons.icons.get("overlay_artifact1"); } } return i; }
  11. What part of "read the NBT inside getIconIndex" have you not understood?
  12. You compare it to the date stored in the NBT!
  13. You can't override a static method
  14. If anyone doesn't get that this is a joke... then I don't even know. Roughly equal to a Euro, calling them equal is good enough for forum work. It's really about 8 cents weak on the dollar side ($1.08 = 1€)
  15. Your getIconIndex method hasn't changed.
  16. $25? That's far too low. I'm getting $35 contract right now, I wouldn't take less than $75/hr freelance.
  17. I'm sure it would help if writeSettingsToNBT and readSettingsFromNBT was actually being called somewhere.
  18. This is kiiiiiind of a big deal with the regeneration effect. Because regeneration heals you when the ticks remaining % 10 == 0. If it's always 400 ticks left, then it's always %10==0, ergo it heals every tick.
  19. Due note that the tradeoff here is more memory required to maintain the TE. Many things are a trade between CPU and RAM.
  20. Did you override canApply(ItemStack) ?
  21. 3000 nanos is NOTHING. A TE will have more overhead than that.
  22. I bet the value returned by getDeviceWashTime() is only calculated server side and synced south detectAndSemdChanges()

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.