
Everything posted by ChampionAsh5357
-
Modding crash report
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.
-
[1.16.3]No longer a target for MonsterEntity while equipped with an iron chest plate
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
Put the mods you want in the mods folder and run the game.
-
[1.15] performEffect does not work
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.
-
[1.16.1] Voxel Shapes Broken
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
Make a modpack.
-
Changing the perception speed of the player client side
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.
-
[1.12.2] Creating a brewing recipe to an already existing potion
Somewhere on the interwebs. However, I cannot direct you to any particular place. Apologies.
-
[1.12.2] Creating a brewing recipe to an already existing potion
You need to update to at least the LTS of 1.15.2 to receive support on the forum. You can view the currently supported versions in the blue bar at the top of this forum.
-
[1.15] performEffect does not work
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
Exactly.
-
[1.16.3]I want to change the AI of an existing mob
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.
-
[1.16.3] Damage item
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
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.
-
[1.15] performEffect does not work
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?
Use InputMappings::isKeyDown and pass in the handle of the main window along with the key code from GLFW.
-
ConfiguredFeature
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
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.
-
[1.15] performEffect does not work
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
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
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
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.
-
[1.16.3] BiomeLoadingEvent
Read the javadocs on the method and use a bit of inspection to determine how to grab the generation builder and attach the ConfiguredFeature. Features can now have multiple placements as a warning.
-
Minecraft gives error when using custom packets
Use Forge's network system.
-
[1.15] performEffect does not work
Along with what I already mentioned, you need to sync the data to the logical client with a packet whenever the value changes.
IPS spam blocked by CleanTalk.