Everything posted by Draco18s
-
[1.7.10] Rendering a texture overlay on a block
You likely will want a custom TextureAtlasSprite class with a custom load method. I've posted about them here a couple of times.
-
[1.8.8] How to make the player's hunger drain faster?
See: http://minecraft.gamepedia.com/Hunger#Mechanics
-
[1.8] Save NBT-Tags for Item
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.
-
Where is the time the last tick took, avg tick took etc.?
Its not 50,000 nanos. It's 50,000,000. Mili, micro, nano. https://en.wikipedia.org/wiki/Nanosecond
-
Looking for tutorial on "version": "${version}"
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").
-
[1.8.9] Updating 1.7 to 1.8.9
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.
-
Looking for tutorial on "version": "${version}"
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.
-
(Solved) [1.8.9] TESR Animation is smooth but speed changes depending on FPS
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.
-
[1.7.10] Access transformer issue
Reflection's setAccessible(true); would have done that too.
-
[1.7.10] Changing texture based on item in Gui slot
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; }
-
[1.7.10] Changing texture based on item in Gui slot
What part of "read the NBT inside getIconIndex" have you not understood?
-
[1.7.10] Changing texture based on item in Gui slot
You compare it to the date stored in the NBT!
-
[1.8.9] Basic method @Override not working?
You can't override a static method
-
Multiple Potion effect bug ??
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€)
-
[1.7.10] Changing texture based on item in Gui slot
Your getIconIndex method hasn't changed.
-
Multiple Potion effect bug ??
$25? That's far too low. I'm getting $35 contract right now, I wouldn't take less than $75/hr freelance.
-
[1.7.10] Problem with NBT not properly saving
I'm sure it would help if writeSettingsToNBT and readSettingsFromNBT was actually being called somewhere.
-
Multiple Potion effect bug ??
- Multiple Potion effect bug ??
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.- 1.8.9 getExtendedState performance - neighbor block state vs. tile entity
Due note that the tradeoff here is more memory required to maintain the TE. Many things are a trade between CPU and RAM.- [1.8.9] Custom Enchantments
Did you override canApply(ItemStack) ?- 1.8.9 getExtendedState performance - neighbor block state vs. tile entity
3000 nanos is NOTHING. A TE will have more overhead than that.- [1.8.9] Animation only updates when opening GUI
I bet the value returned by getDeviceWashTime() is only calculated server side and synced south detectAndSemdChanges()- [1.8.9] Animation only updates when opening GUI
Show your rendering code- [1.7.10]Newly Modded Saplings don't Render Properly at a Distance [SOLVED]
Java != Javascript - Multiple Potion effect bug ??
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.