Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

KGJP

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About KGJP

  • Rank
    Tree Puncher

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I was able to do this by overriding TemptGoal and manipulating AttackTarget and delayTemptCounter. I'm glad there's a great existing class,... Thanks for the pork and carrots.
  2. Assumptions and what we want to achieve No longer a target for MonsterEntity while equipped with an iron chest plate. You also want to make the same motion if you have an iron chest plate in your right or left hand What I've tried As an example, F "Ignored by Zombies" Override the following goal of ZombieEntity this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, true)); Extract the goals of zombieEntity.targetSelector. Find the above goal that targets PlayerEntity and extract th
  3. I see, so you're saying that what you're running now is the runClient development environment? So when you write it out to a jar file, the current code won't work?
  4. You mean you have to describe it at the top? Set<PrioritizedGoal> goals = (Set) privateFieldGoals.get(zombie.targetSelector); goals.removeAll(goals.stream() .filter(prioritizedGoal -> prioritizedGoal.getPriority() == 2) .collect(Collectors.toList())); It worked with the code I wrote. What is the benefit of using the ObfuscationReflectionHelper that Forge provides?
  5. http://tutorials.jenkov.com/java-reflection/private-fields-and-methods.html You can do this kind of hack-like coding with Java features. I'd like to try it with this. private static Field privateFieldGoals; static { try { privateFieldGoals = GoalSelector.class.getDeclaredField("goals"); privateFieldGoals.setAccessible(true); } catch (NoSuchFieldException e) { System.err.println("Error"); } }
  6. I went to that page and implemented it. I believe it is as written, but what is wrong with it?
  7. jar { manifest { attributes([ "Specification-Title" : "examplemod", "Specification-Vendor" : "examplemodsareus", "Specification-Version" : "1", // We are version 1 of ourselves "Implementation-Title" : project.name, "Implementation-Version" : "${version}", "Implementation-Vendor" : "examplemodsareus", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) accessTransformer = file('src/main/resources/META-INF/accesstransfo
  8. Assumptions and what we want to achieve If you can change or delete the goals added to the goalSelector and targetSelector, you can solve this problem. (See below for targetSelector only) What I tried below is an example: "Erase the movement of existing zombies from trying to target the player What I've tried 1. reassign the new instance to targetSelector public final GoalSelector goalSelector; public final GoalSelector targetSelector; → Can't do it for final. 2. writing code to eliminate a specific goal @SubscribeEvent pu
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.