blob: 7d41687e6a590b835e3883e94135345602f171fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package moe.nea.potatocrime.mixin;
import moe.nea.potatocrime.events.OnEnterPotatoWorld;
import net.minecraft.entity.Entity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(Entity.class)
public class OnEnterPotatoWorldPatch {
@Inject(method = "tickPortal", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/entity/Entity;moveToWorld(Lnet/minecraft/server/world/ServerWorld;Z)Lnet/minecraft/entity/Entity;",
shift = At.Shift.AFTER
))
private void onMoveToWorld(CallbackInfo ci) {
OnEnterPotatoWorld.Companion.getEVENT().invoker().onEnterPotatoWorld((Entity) (Object) this);
}
}
|