-
Posts
1773 -
Joined
-
Last visited
-
Days Won
61
Everything posted by V0idWa1k3r
-
https://mcforge.readthedocs.io/en/latest/concepts/sides/
-
This happens because Item#onItemRightClick is executed once for each side - once for client, once for server. You need to check for the side you are on before doing actions. As a sidenote: ItemBase is an antipattern. There is already an ItemBase, it's called Item.
-
[1.12.2] Question why placing block triggers like 50 chunk updates
V0idWa1k3r replied to jabelar's topic in Modder Support
It doesn't mean there were 50 chunks being updated. This info means that RenderChunk#rebuildChunk was triggered 50 times. -
[1.12.2] Question why placing block triggers like 50 chunk updates
V0idWa1k3r replied to jabelar's topic in Modder Support
It's not the setBlockState that triggers the updates, it's mostly relighting of stuff since the game stores light data alongside vertex data. Thus when a light level of a block changes the game has to recalculate all light levels in the affected radius. You can actually replicate this in vanilla with no mods involved - place like a 16x16x16 cube of fences, then place a torch next to it. Enjoy the game not responding for a bit. Related: https://bugs.mojang.com/browse/MC-126518 Unless your block does something insane placing a block is simply changing some bits in the underlying chunk array, sending newighbour change event to all surrounding blocks(all 6 of them), checking for relighting and sending the data to the clients. And in any case even if it was the case it would cause tickrate lag, not framerate lag. Unfortunately with the way the game handles lighting there is no clean way of implementing your mod without causing framerate lag. Even the dynamic lights mod that got integrated into OF with it's edits to the base game to avoid placing blocks still causes lighting updates and triggers framerate lag. -
Are you using a custom layer for that or a vanilla one? If it's a custom layer you need to show it's implementation to us. If you are using a vanilla one is the model of your entity an instance of BodelBiped? And if it is are you overriding ModelBiped#postRenderArm?
-
Rendering overlay fixed with other gui elements
V0idWa1k3r replied to Toma™'s topic in Modder Support
GuiIngame, GuiIngameForge. -
Intercepting WorldServer.addWeatherEffect Argument
V0idWa1k3r replied to Caffeinated Pinkie's topic in Modder Support
Unless your FieldAccess somehow accesses the obfuscation database this code won't work in the obfuscated environment because that field will not be named weatherEffects, it will be field_73007_j. Same here. EntityLigntningBolt.effectOnly will be field_184529_d in the obfuscated environment. Actually now when I look at your FieldAccess and the way you use it it is broken. It grabs the class from the object passed, then tries to find a declared field with that name. Well, what if somebody creates a child class of EntityLightningBolt? Now your reflection will explode since the new class doesn't declare any of the fields you are asking it for. See https://stackoverflow.com/questions/16966629/what-is-the-difference-between-getfields-and-getdeclaredfields-in-java-reflectio Also } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { e.printStackTrace(); } This is the worst way to handle exceptions. If something went horribly wrong don't just print the stacktrace into the console and continue as if nothing happened. Crash the game. -
Don't do this. First of all you don't need to do this. It also cases state leaks. If you are enabling blend then specify the blend function too, you never know what it was set to beforehand. Same here, actually. Maybe not as relevant in minecraft since hardly anyone changes the alpha test function but you never know.
-
Post your updated code.
-
[1.12.2] Deleting Variants in JSON Recipies
V0idWa1k3r replied to wokiloki's topic in Modder Support
As far as I am aware forge replaces the ingredients in the vanilla's recipe with oreDictionary to accept everything that is plankWood. Your best bet would be to remove the recipe from the registry or replace it with a noop implementation and just have your recipes load normally. -
Intellij installing settings pls help!!!
V0idWa1k3r replied to WarriorOfDoom's topic in Modder Support
https://www.jetbrains.com/help/idea/install-and-set-up-product.html https://mcforge.readthedocs.io/en/latest/gettingstarted/#terminal-free-intellij-idea-configuration -
Don't access OpenGL methods directly, use GlStateManager. ...why? Is the color not being applied at all, or is it not changing based on the values of the capability? If it's the latter you likely don't have those values synced to the client.
-
Are you sure there are items in the ore dictionary with those names? I don't know about gemRuby, but there is no woodStick in it by default. There is stickWood though.
-
1.7.10 is no longer supported on this forum due to it's age. Update to a modern version of minecraft to receive support.
-
Rendering overlay fixed with other gui elements
V0idWa1k3r replied to Toma™'s topic in Modder Support
You need to calculate your UI's position based on "anchors". Anchors are basically positions on screen around which the game's UI is drawn. They are either sides/corners of the screen or the width/height / 2. The hotbar for example is drawn at { x = width / 2 - sizeX / 2, height - sizeY }. There is no real way to 'lock' your position to their position apart from using similar calculations. As an unrelated note: You don't need to pop/push matrix here - you are not changing it in any way. When enabling blend you should also specify the blend function since you don't know what it was set to beforehand. -
[1.12.2][SOLVED] Preventing players from moving
V0idWa1k3r replied to Sunser's topic in Modder Support
The player movement happens entirely on the client, it just periodically sends packets to the server notifying it of the new position. So your options are either reset the player's position each tick on the server or cancel the input on the client. -
Then your resourcelocation would be {%modid%, %filename%}
-
I don't know. I have not seen your folder structure nor have you told it to us. I don't know which folder contains your loottable file and thus which path you should use. The base path is assets/%modid%/loot_tables/%filename%.
-
Where did the inject/ came from? It wasn't there in your previous message. Is your loottable located withing the inject folder?
-
-
You can see how minecraft renders it's lightning bolt to start. In general the game barely uses raw opengl, it mostly uses a lot of wrappers/helper classes around it. Rendering is mostlydone with BufferBuilder, opengl knowledge won't really help you here and you should never use opengl directly if the game has a wrapper/helper instead. So I would suggest familiarizing yourself with the BufferBuilder instead of learning opengl.
-
Intercepting WorldServer.addWeatherEffect Argument
V0idWa1k3r replied to Caffeinated Pinkie's topic in Modder Support
Doesn't fire for lightnings since they are weather effects and not normal entities - the World#spawnEntity is never called for them. My suggestion still stands What? Throwable#printStackTrace just dumps the stacktrace to the console, it doesn't crash anything(in fact I would assume it can't) -
Vanilla entity and player collision detection
V0idWa1k3r replied to DocBrian's topic in Modder Support
World#getEntitiesWithinAABBExcludingEntity(or rather Chunk#getEntitiesWithinAABBForEntity) iterates all entities and checks whether their bounding boxes intersect with the passed one.