build in script load from resources, fixed entity value position errors, added 2 more events, added event test
This commit is contained in:
1 parent
3b6c1d045e
commit
435794569e
9 files changed
+511
-343
No files matched your search
@@ -22,6 +22,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import static carpet.script.CarpetEventServer.Event.PLAYER_ATTACKS_ENTITY;
|
||||
import static carpet.script.CarpetEventServer.Event.PLAYER_CLICKS_BLOCK;
|
||||
import static carpet.script.CarpetEventServer.Event.PLAYER_DEPLOYS_ELYTRA;
|
||||
import static carpet.script.CarpetEventServer.Event.PLAYER_DROPS_ITEM;
|
||||
import static carpet.script.CarpetEventServer.Event.PLAYER_DROPS_STACK;
|
||||
import static carpet.script.CarpetEventServer.Event.PLAYER_INERACTSW_WITH_ENTITY;
|
||||
import static carpet.script.CarpetEventServer.Event.PLAYER_RELEASED_ITEM;
|
||||
import static carpet.script.CarpetEventServer.Event.PLAYER_RIDES;
|
||||
@@ -49,6 +51,29 @@ public class ServerPlayNetworkHandler_scarpetEventsMixin
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "onPlayerAction", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/server/network/ServerPlayerEntity;dropSelectedItem(Z)Z",
|
||||
ordinal = 0,
|
||||
shift = At.Shift.BEFORE
|
||||
))
|
||||
private void onQItem(PlayerActionC2SPacket playerActionC2SPacket_1, CallbackInfo ci)
|
||||
{
|
||||
PLAYER_DROPS_ITEM.onPlayerEvent(player);
|
||||
}
|
||||
|
||||
@Inject(method = "onPlayerAction", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/server/network/ServerPlayerEntity;dropSelectedItem(Z)Z",
|
||||
ordinal = 1,
|
||||
shift = At.Shift.BEFORE
|
||||
))
|
||||
private void onCtrlQItem(PlayerActionC2SPacket playerActionC2SPacket_1, CallbackInfo ci)
|
||||
{
|
||||
PLAYER_DROPS_STACK.onPlayerEvent(player);
|
||||
}
|
||||
|
||||
|
||||
@Inject(method = "onPlayerMove", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/server/network/ServerPlayerEntity;jump()V"
|
||||
|
||||
Reference in new issue
Block a user