-
Posts
3284 -
Joined
-
Last visited
-
Days Won
62
Everything posted by ChampionAsh5357
-
Can't read whatever codeblock you pasted.
-
Configurations should be registered in the main mod constructor.
-
Apply shader to specific part of the screen
ChampionAsh5357 replied to yoinkityyoinks's topic in Modder Support
Once again, I'm unsure. There is probably a way to do it within the program itself. However, it should be preferable to try and find a JSON solution first if possible. -
1.12.2 is not supported on this forum. The currently supported versions are in the blue bar near the top of the forum page.
-
Usually something like should use the new brain system to store the current target of an entity. However, very few entities are implemented with that right now. A simple solution is to check during LivingSetAttackTargetEvent for if your entity is an instance of this and the one being targeted has whatever it does and to set the current attack target to null. However, this is a huge cost in performance. The much more efficient way would be to create your own task that takes in a predicate to check if it should execute or continue executing.
-
How to include mods in a forge mod
ChampionAsh5357 replied to BubbaIsCool11's topic in Modder Support
Put the mods you want in the mods folder and run the game. -
Reaching across logical sides. Don't ever do this. We've already went over not to use this. This is the actual error. You're trying to register your network too late. You probably also haven't registered the message either. This entire thing is a hack. Isolate the code in a different class an use the unsafe version of DistExecutor.
-
That probably means that your VoxelShapes for the other rotations are either not being rotated or the model itself isn't rotating. It could also be you rotated the model in the opposite direction of the VoxelShape.
-
How to include mods in a forge mod
ChampionAsh5357 replied to BubbaIsCool11's topic in Modder Support
Make a modpack. -
Changing the perception speed of the player client side
ChampionAsh5357 replied to PCDCreeper's topic in Modder Support
Independent time streams are quite difficult as technically, each player would need it's own server thread that can scale at will and then playback to the main server thread such that the information can be synced correctly. There are problems with this though because then you get into the paradox of changing the past and not knowing what yet happens in the future with other players. You can slow the main clock time, but all players will be affected whenever this occurs. So, there's not really a good way of making a multiplayer version of this viable. Possible, anything really is with enough thought. However, viability is not something I would recommend in any case unless this was for singleplayer only. Apologies if this wasn't the answer you were looking for. -
Well you're trying to cast a lazy optional to an instance within a network message for some reason.
-
[1.16.3]I want to change the AI of an existing mob
ChampionAsh5357 replied to KGJP's topic in Modder Support
Exactly. -
[1.16.3]I want to change the AI of an existing mob
ChampionAsh5357 replied to KGJP's topic in Modder Support
It will not work outside the dev workspace since the field name is obfuscated. This means that if you try and call "goal", it will not exist at runtime. Therefore, you need to grab the associated srg name. Since the name is mapped in the dev workspace however, this will also throw an error. Enter ObfuscationReflectionHelper. This takes in a srg name and maps it to the current environment you are running on. This way it will work in and out of dev. -
Use ItemStack#damageItem, supply the entity, the amount of damage, and a consumer of the entity instance that executes once the item is destroyed.
-
[1.16.3]I want to change the AI of an existing mob
ChampionAsh5357 replied to KGJP's topic in Modder Support
Nope, you moved the line where that was originally written. Using reflection requires you to make use of ObfuscationReflectionHelper as you need to supply the srg name. -
When is your data being updated? How do you know the value has changed? Send a packet at that location.
-
How to detect if a key is pressed?
ChampionAsh5357 replied to MostafaSabry55's topic in Modder Support
Use InputMappings::isKeyDown and pass in the handle of the main window along with the key code from GLFW. -
Same way it was set up in the prior versions. Only difference is that features can now have multiple placements (e.g. one for height, one for amont, etc.). Use the Features class as an example.
-
[1.16.3]I want to change the AI of an existing mob
ChampionAsh5357 replied to KGJP's topic in Modder Support
That's not how access transformers work. Read the default mdk of where it's placed and how to use it. You can also look at the docs. -
Use a network and send a packet whenever the value changes on the logical server to the logical client.
-
Minecraft gives error when using custom packets
ChampionAsh5357 replied to FoxWare's topic in Modder Support
Learn a bit more about Functional Interfaces. The function is non-static, so why do you need to pass in an instance you already have? The decoder requires a return value, something you are not providing. Look at the parameter needed to supply the method. -
Minecraft gives error when using custom packets
ChampionAsh5357 replied to FoxWare's topic in Modder Support
Learn a bit more about Functional Interfaces. The function is non-static, so why do you need to pass in an instance you already have? The decoder requires a return value, something you are not providing. Look at the parameter needed to supply the method. -
[1.16.3] SpriteRenderer Overlay Texture
ChampionAsh5357 replied to Peerius's topic in Modder Support
If this is a texture for an item (as it seems to be), you could easily animate it using an mcmeta and change the colors within the texture itself or using ColorHandlerEvent$Item. If that's the case, then you would just need to register the factory with the SpriteRenderer instead of recreating it. If you wish to stay on your line of thinking, you will most likely have to reconstruct the ItemRenderer methods with some additional parameters in the correct RenderType.