
imadnsn
Members-
Posts
186 -
Joined
-
Last visited
Everything posted by imadnsn
-
Well the first rule of any network based application is to "never trust the data from the client side". Minecraft handles everything important on the server side, sending packets to the clients with the changes so the client render and do client-sided stuff. If the client wanted something to happen it sends network packets of the specifics that the server should handle, those packets usually cannot contain harmful information because the server only accepts certain packets and handle them according to their type. Let's say the player on the client clicked the keybind for jump, the client sends a packet to the server that the jump keybind has been pressed. The server will recognize the packet as a keybind packet and handle the code so that the player would jump on the server, then it sends back the new position to the client so it would render the player position Client packets can be manipulated by external sources, resulting in things like fly hacks. However, the server still is in control of all what it does, and how information is handled is up to the implementation. In the case of multiplayer, the client is on the player's PC but the server is somewhere else on the net, it is impossible to force the server to execute code. The only way to change anything is using the packet system, and like I said, the server only handles the packets it knows how to handle.
-
can't you at least make the number of values that that float can be as least as possible? I mean sure you won't have to use all these million possible values, maybe rounding to a precision or something.
-
Do you want the direction to be in terms of pitch and yaw? if so, do you want them relative to the player's pitch and yaw or absolute? Either way I suggest looking up ray tracing
-
if the animation is repetitive, did you use a cache where you store the baked models? you should access it when there's an animation to see if there's already a baked model with the data you want and if not re-bake and add to the cache. Prevents re-baking on every animation tick
-
this might just be your PC and all the running stuff behind Minecraft (like your IDE), AFAIK it shouldn't be a problem.
-
capitalized class names is a java convention to make things look easier to understand, the problem is with the capitalized paths (or package names) or capitalized MODID because the package names depend on it
-
gradle.properties is a file editable using notepad or any simple text editor, it is just not of the .txt extension. Inside you just put org.gradle.jvmargs=-Xmx2G
-
also it is in the user files on the system, if you're using Windows, it's in something like "C:\Users\*user*\.gradle\gradle.properties" make sure it is not a .txt file when you make it
-
the code in the last reply isn't complete, unless you're trying to justify why you're using this.prevSourcePos , which you didn't.
-
Where in the world did you get setCustomModelResourceLocation.register() from? setCustomModelResourceLocation() is a method not a field just use it directly
-
So I'm making an item in my mod with 2 parts that may be changeable according to the item's NBT, I made a custom model for this item with a custom model loader and all, but I am facing a problem. I'm trying to make all possible models from those 2 parts, it would be no problem for my mod's parts to use ModelBakety.registerItemVariants and iterate through all possible combinations. However, the problem comes if I ever want another mod to register its own variants that may include my mods parts and other mods' custom ones. Since the models get loaded between preInit and init, no one can guarantee which mod's code runs first in preInit, and what variants to what parts can be registered in a certain mod's preInit, or if even my item was already initialized to register the variants (I may note that my items initialize in a static constructor of my items container but registered later on, which might suggest that they are always initialized when called). Can I in anyway get over such problems? Is there a way to make some code run before the loading but after preInit? and if not, would these problems be solved if I create a registry for those parts, where mods must register their custom ones, then register all variants whether my mod was already pre-initialized or not? The latter idea will cause variants overlapping if that's a problem.
-
[1.10.2] Change which liquids are infinite
imadnsn replied to josephcsible's topic in Modder Support
That moment when you don't check the commiters. I feel stupid now but it's still true at least -
[1.10.2] Change which liquids are infinite
imadnsn replied to josephcsible's topic in Modder Support
I just saw this on forge changelog and decided to comment here for the record Build 1.10.2-12.18.1.2023: josephcsible: Add CreateFluidSourceEvent to control infinite fluid sources josephcsible: Add a test for CreateFluidSourceEvent josephcsible: Use CreateFluidSourceEvent for mod fluids as well this might aid you in your problem without the need of ASM -
ofc it doesn't, it's called EnumHand.MAIN_HAND
-
Funny thing I actually looked at that code before and saw that but somehow because the variable was mc for ModContainer I assumed it was a Minecraft
-
According to the error, Base is null Base.render(scale); To know why, look at the method you call constructor, it is "void" and has two "Model" in its name. Shouldn't the line public void ModelModelGreenGoblinGlider() be public ModelGreenGoblinGlider()
-
First you never call your proxy's init, which should be preInit for registering renders Second your setRegistryName doesn't have your ModID, there's an overload of setRegistryName(String, String) where the first string is your modid and the second is the item unique name Third, stop using getUnlocalizedName to set the renderer name, the whole registry name thing is there to stop people from using it. Lastly, instead of calling itemModelMesher.register, you should actually call ModelLoader.setCustomModelResourceLocation Edit: I almost forgot you must set your client-only methods in client-only classes like your proxy. Either that or set the "renders" and the "registerRender" methods as @Sideonly(Side.CLIENT)
-
Is it ok to run this constantly onUpdate in an item?
imadnsn replied to American2050's topic in Modder Support
Storing the descriptions in NBT is pointless, no one looks at them or know they're there but you. unless the go see it in an NBT explorer. -
[SOLVED!][1.10.2] Help with custom fence gate blockstate
imadnsn replied to MCrafterzz's topic in Modder Support
I noticed the exception is not for the model of mm:dark_nether_bricks_fence_gate but for mm:nether_bricks_fence_gate is that a change of name or another json? in any way the error may not be for the block you posted in the first place -
[SOLVED!][1.10.2] Help with custom fence gate blockstate
imadnsn replied to MCrafterzz's topic in Modder Support
hmm it still says it's missing variants, post the new json that you modified -
[SOLVED!][1.10.2] Help with custom fence gate blockstate
imadnsn replied to MCrafterzz's topic in Modder Support
you posted the error that said there's an exception but didn't continue. post what was after those 2 lines because it tells you what the exception was. -
[SOLVED!][1.10.2] Help with custom fence gate blockstate
imadnsn replied to MCrafterzz's topic in Modder Support
what's the exception -
So he should annotate the method to be client only?