Jump to content

Recommended Posts

Posted (edited)

I'm trying to make a potion which when applied to a zombie will cause it to run away from the player till the effect is over, kind of like how skeletons run away from wolves. But I have currently no idea how do make the zombie do that. Is there a way to do that?

Edited by PadFoot2008
Posted

Thanks for the help. But I tried doing that but it isn't work. In fact, for some reason, none of the event classes or mixins added by me seem to work. Could there be a specific reason for that? Also adding breakpoints doesn't work too. It did use to work, but it suddenly stopped working. I've also been getting java.io.IOException each time I run the mod. 

Just for extra info, I'm using IntelliJ IDE.

Posted

Also what I'm trying to do is that holding this particular staff I made would cause Zombies to stay away from the player an eight block radius and any Zombies that're coming towards the player to attack them will quickly go out the radius as soon as the player brings the staff into their main hand. Could you also suggest a way to make that happen?

Posted

yeah but it will a little complex 

create an item and in the 

// ########## ########## ########## ##########

@Override

public void inventoryTick(ItemStack helditem, Level warudo, Entity entity, int slot, boolean p_41408_) {

System.out.println("inventoryTick [" + slot + "], " + ((warudo.isClientSide)? "Local World":"Server World")  );

check if its in player hand 

check surrounding area for zombie 

for any zombie finded check distance to player 

any zombie closer than 5 blocks knockback in the oposite direction of the player 

}

Posted (edited)

Thanks for replying. It does work except I can't seem to knock them back away from the player, instead they get pulled towards the player and stay at the player's location and when I switch to another item they get thrown away. How do I knock them back away from the player?

Edited by PadFoot2008
Posted
  Reveal hidden contents

knockback-edit.gif

 

this part i also need this for another idea i have

in this point is need to do some math is need to convert the rotation of the player to x/y/z values probably a math.sen math.cos of the player y rot  and multiply it for the streng of the push  

                coso.push(x * str, y * str, z * str); 

 

Posted
  On 3/15/2023 at 10:23 AM, PadFoot2008 said:

In fact, for some reason, none of the event classes or mixins added by me seem to work. Could there be a specific reason for that?

Expand  

Are you sure that you have the mixins defined in a mixins file? Are you sure that your build.gradle recognizes the file?

I'm not good at modding, but at least I can read a crash report (well enough). That's something, right?

Posted

do not use mixins for this. maybe you'll need access transformers for some fields (where the zombie is trying to walk to) but you do not need mizins.

respond to "entity joins world". add your ai goal to zombies list of goals.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • My parents made a big decision a few years ago they sold our longtime family home in Manhattan New York with the dream of starting a new chapter After decades in the city they wanted a quieter lifestyle with more space and the chance to build their dream home from the ground up They had their eyes on the neighboring state of Pennsylvania which offered more affordable land and a slower pace of life After selling the Manhattan home and an adjacent plot of land they were financially ready to make the move After some searching they found what looked like the perfect opportunity a piece of land listed for sale in the Poconos region of Pennsylvania The area was known for its scenic beauty peaceful environment and growing development potential The seller painted a convincing picture of rising property values and urged them to act quickly to secure a prime spot The deal seemed urgent but my parents were excited and eager to get started The seller requested a $30,000 USD down payment to reserve the plot with the catch being that the payment needed to be made in cryptocurrency Bitcoin specifically While it raised a few red flags the seller provided what looked like valid documents including supposed title information and a property map Trusting the process my parents sent the payment Almost immediately after that communication started to break down The phone numbers were suddenly unreachable emails bounced and the website they had been using disappeared Worse still when they tried to verify the land records with the local county office they learned there was no such property under the seller’s name It was a total scam The emotional and financial hit was crushing They had put down a large part of their life savings and it felt like everything had come crashing down Thankfully hope returned when my dad happened to run into an old college friend while visiting a mutual acquaintance in New Jersey During their catch-up my dad shared what had happened and that friend immediately recommended Byte phantom cyber services a cyber-forensics and scam recovery team that specialized in crypto fraud At first my parents were skeptical after all it felt like they had already been fooled once But they decided to reach out The team at Byte phantom cyber services was prompt professional and surprisingly knowledgeable They launched an investigation tracked the blockchain transactions and followed the digital trail using specialized tools Over the following weeks they kept my parents updated and eventually succeeded in recovering the entire $30,000 that had been scammed It was an incredible relief Not only did they recover the lost funds but they also learned valuable lessons about digital security and the importance of verifying everything especially when it comes to unconventional payment methods With their money back they resumed their search this time more carefully and eventually found a legitimate piece of land in the Lehigh Valley area of Pennsylvania where they are now happily building their new home  
    • I didn’t even notice that side of the report, as I expected it was a bunch of client mods, thanks for the advice
    • Yea it looks like it. Looks like I have to wait for a fix for that. Just don't level up fishermen ahaha.
    • Also make a test without all mods related to worldgeneration and the xaero mods - like betterdungeons, integrated-api etc
    • Make a test without all Create addons: - create_buffers__beams_overhauled 1.0.0 - create_central_kitchen 1.4.1 - create_confectionery 1.1.0 - create_copper_and_zinc 1.6.0 - create_crush_everything 1.0.2 - create_dd 0.1b.Release-Early-Dev - create_easy_structures 0.2 - create_enchantment_industry 1.3.2-for-create-6.0.4 - create_questing 1.0.0 - create_sa 2.1.0 - createbb 3.1.1 - createcasing 1.7.1-fix2 - createdeco 2.0.3-1.20.1-forge One or more of these may not compatible with Create 6
  • Topics

×
×
  • Create New...

Important Information

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