-
[1.19.2] How to make villager that doesn’t get attacked by illagers
I have an entity that extends AbstractVillager but I don’t want illagers to be able to attack it (other mobs are fine). I was thinking maybe I could use a mixin to modify the AbstractIllager’s canAttack method, but is there another smooth way to do this?
- [1.19.2] How to replace dependency mod's texture
-
[1.19.2] How to replace dependency mod's texture
I have a mod that depends on another mod and I want my mod to replace one of the dependency mod's textures. I tried doing it the same way you would a vanilla one (recreate the file path and put the texture in the folder) but it didn't seem to work. My mod is guaranteed to load after the dependency mod if that changes anything
-
Mixin works in development environment but not in normal Minecraft
I figured it out! Here's how I solved it: I added: "refmap": "<your_mod_id>.mixins.refmap.json" to my mixin json file and that solved it. You'll also need to add: add sourceSets.main, '<your_mod_id>.mixins.refmap.json' to your build.gradle in the "mixin" block my mixin file looks like this: { "required": true, "minVersion": "0.8", "package": "<your_package>.<your_modid>.mixin", "compatibilityLevel": "JAVA_16", "refmap": "<your_mod_id>.mixins.refmap.json", "mixins": [ "YourMixin1", "YourMixin2" ], "client": [ ], "injectors": { "defaultRequire": 1 } } This was in 1.19.2, but I don't think it should be too different
-
Mixin works in development environment but not in normal Minecraft
Having the same problem. Could you let me know if you ever figure it out?
-
a_random_something started following [1.19.2] Crash when launching my mod outside of IntelliJ
-
[1.19.2] Crash when launching my mod outside of IntelliJ
So I'm making a mod that modifies another mod (Illage and Spillage) with mixins (yes I tried other ways and for what I'm doing there's no other option) and it works fine when launched in IntelliJ, but when I made a .jar of it and exported it and tried to run it, it crashed. (report: https://pastebin.com/G3XNdRKt) I first thought that maybe you can't modify other mods with mixins, but when I looked it up it said you can. Anyone know what's going on?
-
[1.19.2] How to get an item's attack damage
Is there a method or some other way to get the attack damage value (not the durability damage) of an item? basically I want to use an if statement that compares the attack damage of 2 items
-
SOLVED [1.19.2] How to make custom mob drop its inventory
I figured it out. I copied this.inventory.removeAllItems().forEach(this::spawnAtLocation); from the Allay and put it in an overridden dropEquipment method
-
SOLVED [1.19.2] How to make custom mob drop its inventory
I have a mob that has an inventory (a SimpleContainer) and I want it to drop all of it on death. Anyone have any idea how to do that?
-
How to make mob truly invisible
How would I make my mob truly invisible (armor and hand items hidden, only particles showing) when it has the invisible status effect? I put this in its renderer: @Override public boolean shouldRender(T p_115468_, Frustum p_115469_, double p_115470_, double p_115471_, double p_115472_) { return !p_115468_.hasEffect(MobEffects.INVISIBILITY); } but the mob doesn't become visible again after the effect wares off. Anyone have any ideas? EDIT: there also seems to be another issue where the mob doesn't turn invisible when splashed with invis and only turns invisible when it's from the potion it drinks (like a witch). Also, him not appearing when invis wears off isn't just because of this, since when this override was commented out, he still would stay invisible even after I /effect cleared him. Anyone have any guess as to what's going on here? EDIT 2: I'm stupid, the not turning invisible thing was from a previous attempt at doing this that I forgot to remove, but the original issue still stands. However, the shouldRender only seems to run when the mob gets invis from its potion, and not when getting splashed.
-
[1.16.5] java.lang.IllegalArgumentException: Duplicate id value for 16!
I have a modded mob that when I try to spawn it, it won't spawn and a crash happens (doesn't crash whole game though) and it says "Duplicate id value for 16!" and points to the mob's defineSynchedData method. Anyone know what's going on? Here's the method it was pointing to: @Override protected void defineSynchedData() { super.defineSynchedData(); this.entityData.define(MY_BOOLEAN_DATA, false); }
-
SOLVED [1.19.4] How to give items lore
How would I give an item (from my mod) lore? I overrode the appendHoverText method but I haven't been able to figure out how to add something to it. EDIT: I'm stupid. Did a tiny bit of digging in MC code and found the answer right away 🤦♂️
-
SOLVED [1.19.4] How to make mob shoot 3 arrows (like multishot) with a bow
Appreciate the help, but I did manage to figure it out with some tutorials. The main problem was figuring out how to calculate the angles for the arrows to shoot at
-
SOLVED [1.19.4] How to make mob shoot 3 arrows (like multishot) with a bow
I have a mob that shoots a bow and i want it to shoot 3 arrows at once in a spread like multishot, but i have no idea how to go about it. Any ideas?
-
[1.19.4] How to change summoned mob's max health
I have an illager mob that has the summon vex spell from the evoker, but I want it to summon them with less max health. Is there any way to do that within the perform spellcasting method?
IPS spam blocked by CleanTalk.