[Suggestion] 1.12.1 Support
l3eta opened this issue ยท 3 comments
All that is required is the changes of PlayerMovementManager
@SubscribeEvent
public static void updateMovementState(LivingUpdateEvent event) {
//Honestly think this is better than the old onClientTick callback which fires quite a bit.
//This will fire alot so let's just make it not fire as much
EntityLivingBase base = event.getEntityLiving();
if (base instanceof EntityPlayerSP) {
final EntityPlayerSP owner = (EntityPlayerSP) base;
final MovementInput input = owner.movementInput;
if (input.jump && !wasJumping) {
input.jump = postMovementEvent(owner, PlayerMovementEvent.Type.JUMP);
}
if (input.sneak && !wasSneaking) {
input.sneak = postMovementEvent(owner, PlayerMovementEvent.Type.SNEAK);
}
wasJumping = input.jump;
wasSneaking = input.sneak;
}
}
And I have tested with elevators and it works.
Uh, no? I requested this and few other hooks and fixes in Forge to make my life easier, so why would I replace that back with workarounds.
It's not to replace it's to allow for 1.12.1 versions, Forge for 1.12.1 doesn't have the hooks for those. At least not the version I'm building on. I wasn't meaning like replace your current code, but a simple build and release on a branch for 1.12.1 would be useful for those who want openblocks but can't use the other mods that are unavailable for 1.12.2 (I've had to build about 5 mods just to get the ones I want on 1.12.1
My target is 14.22.1.2485
As I stated it's just a suggestion if you're not wanting it just close the ticket.
Yes, 1.12.1 Forge does not have that hook (and few others, like LivingDamageEvent
). It also crashes when sleeping bag is used. And has few rendering glitches. That's why I don't bother with that.
can't use the other mods that are unavailable for 1.12.2
That's the real issue. There is no good reason to not have forward compatibility for minor Forge releases, so they should either work or are completely broken.