From 856d3242f34f7a787f02b086c0cb4b5b97eb34ca Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Tue, 2 Apr 2024 02:38:25 +0200 Subject: Improve texture --- .../potatocrime/mixin/OnEnterPotatoWorldPatch.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/main/java/moe/nea/potatocrime/mixin/OnEnterPotatoWorldPatch.java (limited to 'src/main/java/moe/nea/potatocrime/mixin/OnEnterPotatoWorldPatch.java') diff --git a/src/main/java/moe/nea/potatocrime/mixin/OnEnterPotatoWorldPatch.java b/src/main/java/moe/nea/potatocrime/mixin/OnEnterPotatoWorldPatch.java new file mode 100644 index 0000000..7d41687 --- /dev/null +++ b/src/main/java/moe/nea/potatocrime/mixin/OnEnterPotatoWorldPatch.java @@ -0,0 +1,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); + } +} -- cgit