OreCruncher
Forge Modder-
Posts
165 -
Joined
-
Last visited
Everything posted by OreCruncher
-
Not sure exactly how you want your implementation to go, but I do something similar with text popoffs in my mod. I detect health changes (up/down) and criticals in the server thread, and then send a custom message to the client with the necessary data. The client then generates a particle effect around the entity in question rendering the text. Server side detection is here. Client side handling is here. The text pop-off particle is here.
-
Currently I have three separate config dialogs/pages that enumerate the sounds registered in Minecraft. One dialog/page allows the user to toggle sound blocking (a boolean), another for sound culling (a boolean), and a third for volume scale factor (an int/float). What I would like to do is merge them together into a single dialog where a sound would be listed, and to the right ( and before the default/reset buttons Forge provides) I would like to add two buttons (one each for blocking and culling) and a slider (for volume). There doesn't appear to be one provided by Forge so my hope is that someone has done this already and as a pointer to some code I could look at. Failing that, is this something that would be possible if I implemented my own IConfigEntry (or derives from ListBaseEntry) that aggregates the necessary controls, or would it be climbing a mountain?
-
[1.10.2] Check players position every x seconds
OreCruncher replied to LichtHund's topic in Modder Support
What you can do inside the tick handler is do something like "if(worldTicks % 20 == 0) { do something }" if you want to do something every second. Change "20" to some other value to have it execute more/less frequently. -
Ah! I was suspecting in the back of my mind that I could do an identity compare. Thanks!
-
Is there a way to compare two IBlockState instances? For example, if one block state is a "minecraft:stone:0" and the other is "minecraft:stone:1" they aren't the same. I know I can roll my own - just wondering if there was an already built-in method for doing so.
-
[1.10.2][UNSOLVED] Help With Custom OpenGL Shader
OreCruncher replied to Kaiodenic's topic in Modder Support
I would also be interested in a decent tutorial on shaders RE: Minecraft. -
When displaying a web link in a mod's config page is there a way to have it render specific text rather than the URL itself? What I have in mind is similar to what Minecraft does with chat text where an "open_url" click event can be defined but having some other text rendered.
-
What I found is that non-attenuated sounds are located at 0,0,0 in the world. For my system I can hear that sound relative to where the player is located and facing. Not sure why that is. It's why I did the 32 blocks above the player thing.
-
I do that very thing in my mod. Some notes: Works better if you set the sound to have no attenuation (volume doesn't diminish with distance) I place the sound location 32 blocks above the player rather than right near by. Reason is that the sound position is updated once per tick and depending on the sound it would have clicks because the player position moves during a partial tick. Having the actual source location above the player reduces this impact.
-
Not sure exactly storing the seed in the NBT would work well. Main reason is that setting the seed, and then asking for a random number will give the same random number over and over. It may be better to have the server entirely in control, telling the client when to play the burp sound.
-
[Solved]Design Approach for adding snow for seasonal change
OreCruncher replied to aw_wolfe's topic in Modder Support
Sounds like Tough as Nails. The repo is on Github if you want to take a peek. -
This is called every single render pass for a given particle. If my study is correct lighting is updated once a tick, and it stands to reason that the light values could be collected during the Particle update routine and cached in prep for the render pass. I did some testing in a sandbox with my mod where it would be possible to render quite a number of particle effects (1K+), in this case rain splash effects. By caching and reusing the light value I gained an extra 20-30FPS over what it would have been without the tweak. My question is whether or not caching the light value per tick rather than determining the values each render pass is the right thing to do. From a performance increase perspective I would think so, but if it makes a difference in rendering it may not be the best thing to do. Any opinions?
-
Finding blocks connected to a start position
OreCruncher replied to Jay Avery's topic in Modder Support
On the surface this seems like a good optimization, but I think it would break down when doing modded trees that change the structure of a birch tree. Currently working on a modpack that has birch, oak, spruce, etc. that defy the normal vanilla growth patterns. -
I get this occasionally. It clears up eventually. Time may vary depending on where the problem is along the connection path.
-
[1.11.2] Keybinds not Registering properly
OreCruncher replied to 2veryicey's topic in Modder Support
Check out my key handler for one of my mods. -
Finding blocks connected to a start position
OreCruncher replied to Jay Avery's topic in Modder Support
Other thing to do is spread the scan/break operation across several ticks. Of course this would require maintaining some state for the operation but that shouldn't be too much an issue. -
What may be confusing to you is that this isn't a standard Java style API - it's a REST style API.
-
Look here. But if you are looking for a general version check to notify the player of a new version I would suggest you use the Forge API as Draco indicates above.
-
I have a mod that does something similar to this. It uses schematic files (ones generated by WorldEdit and some other tools) as the NBT template source. I haven't looked at the NBT structure logic of Minecraft to see how compatible it is.
-
To what end, though? The reason it is being asked is that the more detail/requirements that we have about the problem you are trying to solve the better we can answer your question.
-
It seems he is wondering about Side.CLIENT and Side.SERVER. A stab in the dark, but maybe he is having an issue with his mod being installed server side and trying to access client side only logic.
-
I have not implemented anything within the Sponge framework so I don't really know. I suspect, though, there will be some work porting the code from the Bukkit plugin framework to the Sponge plugin framework.
-
Actually it is capped at +/- 30M if my memory serves. May as well be infinite. And based on my recollection of Worldborder it is possible to have similar functionality as a server side Forge mod.
-
[1.11] Make entity face BlockPos before mining it
OreCruncher replied to Coron's topic in Modder Support
That I do not know. However, there may be some code in the EntityAI that does this. IIRC mobs do turn and face the player on occasion when the player is being looked at.