Skip to content

Alpha Release: EntityInteract Event, Jump Events, and Sided Perks

Caltinor edited this page Feb 20, 2022 · 1 revision

this is the sixth alpha and brings two new events to the mod and one major rework.

Here is everything in this release:

  1. Xp Scheduler Added
  2. Removed ReqType.CRAFT
  3. Added Entity Interact Event
  4. Added Jump, Sprint Jump, and Crouch Jump Events
  5. Added Tooltip Client Toggles
  6. Make Perks Sided
  7. NBT system had a refactor

1. Xp Scheduler

this is really a backend addition, but I put it in now for future events. This is designed to catch xp gains that occur when a player is offline. So for example, if your furnace is smelting items and you leave the chunk loaded somehow, when you log back on, you will have new XP gains.

The important thing to note with this implementation is that all XP is gained immediately when a player joins. this means that any event triggers and perks will all fire as though the player just performed an xp awarding event.

2. Removal of Crafting Reqs

oof. so this thing. tl;dr crafting reqs are a pain to do right, so they were removed.

The long explanation is this. Crafting reqs worked, somewhat, because Harmony removed them from the player's recipe book every time the player's level changed. This worked well so long as you only used pmmo and mods that don't have any non-vanilla crafting. The problem is certain mods like JEI would still allow you to craft items because they bypassed the recipe book. this meant that sometimes you could craft when you didn't have the req, and other times you couldn't. In short, it was very unreliable.

So, I looked into how to make it reliable. I found a way, but it requires mixing into every vanilla crafting menu and adding a req check. It's no small feat, and one that doesn't take a high priority. So, for the time being Crafting Reqs have been removed. They will return later, when higher priorities have been addressed.

3. Entity_Interact Event

right click entity, fire an event. you can make villagers have reqs to interact, and if you use NBT reqs, you can make different professions or even tiers gated behind levels. have fun.

4. Jump Events

there's not much to say here. there's config settings in the server config to let you decide what XP to award for jumps.

5. Tooltip Client Toggles

In the client config, you can now toggle specific tooltips on and off. So if you don't care about weapon reqs, turn them off. bonuses take up to much space, turn them off. And since this is a client config, only your tooltips are affected. Changes to the config take effect live, so no need to restart your client. if you use a mod like Configured, you can change them more easily.

6. Perks are now sided

So this is really a technical change, but worth mentioning. Perks can now be registered to fire only on specific sides. It's worth noting that certain events only fire on one side, so keep that in mind when designing your perks or configuring them. A perk can fire on both. For example this was used to fix the double jump issue.

7. NBT system refactor

I moved an important method to a new class. Things should still work fine, but needs testing.

Testing Notes

  • Test the sidedness of perks (double jump is a good candidate)
  • Try using NBT with entity reqs to gate specific villagers (also to further test the NBT system)
  • Test NBT reqs/xpGains to ensure the refactor didn't break anything.
  • have some fun!
Clone this wiki locally