Jump to content

a_random_something

Members
  • Posts

    16
  • Joined

  • Last visited

Everything posted by a_random_something

  1. 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?
  2. Thanks, it works! I assumed I couldn't do that because it used mixins on the other mod, but it's fine
  3. 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
  4. 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
  5. Having the same problem. Could you let me know if you ever figure it out?
  6. 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?
  7. 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
  8. I figured it out. I copied this.inventory.removeAllItems().forEach(this::spawnAtLocation); from the Allay and put it in an overridden dropEquipment method
  9. 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?
  10. 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.
  11. 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); }
  12. 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 🤦‍♂️
  13. 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
  14. 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?
  15. 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?
  16. Is there an event to subscribe to or another way to run code only once whenever a wandering trader comes into existence from anything (natural, /summon, spawn egg, etc.)? I want to do a 1 in 20 chance whenever a trader spawns to give him a tag from my mod that makes him turn into another mob when you try to hit or trade with him
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.