diff options
| author | Lorenz <ESs95s3P5z8Pheb> | 2022-07-14 12:06:07 +0200 |
|---|---|---|
| committer | Lorenz <ESs95s3P5z8Pheb> | 2022-07-14 12:06:07 +0200 |
| commit | a5c540d977a3510812cac7fac340fe17e7d10983 (patch) | |
| tree | dbbe5b208e6871378a10868d1206d1d78beeb950 /src/main/java/at/lorenz/mod/mixinhooks | |
| parent | d6c99ed30a2b1cb228b2fdc3d3178cf1f369dc53 (diff) | |
| download | skyhanni-a5c540d977a3510812cac7fac340fe17e7d10983.tar.gz skyhanni-a5c540d977a3510812cac7fac340fe17e7d10983.tar.bz2 skyhanni-a5c540d977a3510812cac7fac340fe17e7d10983.zip | |
renamed mod to SkyHanni
Diffstat (limited to 'src/main/java/at/lorenz/mod/mixinhooks')
5 files changed, 0 insertions, 133 deletions
diff --git a/src/main/java/at/lorenz/mod/mixinhooks/GuiContainerHook.kt b/src/main/java/at/lorenz/mod/mixinhooks/GuiContainerHook.kt deleted file mode 100644 index 101bb56a1..000000000 --- a/src/main/java/at/lorenz/mod/mixinhooks/GuiContainerHook.kt +++ /dev/null @@ -1,61 +0,0 @@ -package at.lorenz.mod.mixinhooks - -import at.lorenz.mod.events.GuiContainerEvent -import at.lorenz.mod.events.GuiContainerEvent.CloseWindowEvent -import at.lorenz.mod.events.GuiContainerEvent.SlotClickEvent -import net.minecraft.client.gui.inventory.GuiContainer -import net.minecraft.inventory.Slot -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo - -class GuiContainerHook(guiAny: Any) { - - val gui: GuiContainer - - init { - gui = guiAny as GuiContainer - } - - fun closeWindowPressed(ci: CallbackInfo) { - if (CloseWindowEvent(gui, gui.inventorySlots).postAndCatch()) ci.cancel() - } - - fun backgroundDrawn(mouseX: Int, mouseY: Int, partialTicks: Float, ci: CallbackInfo) { - GuiContainerEvent.BackgroundDrawnEvent( - gui, - gui.inventorySlots, - mouseX, - mouseY, - partialTicks - ).postAndCatch() - } - - fun foregroundDrawn(mouseX: Int, mouseY: Int, partialTicks: Float, ci: CallbackInfo) { - GuiContainerEvent.ForegroundDrawnEvent(gui, gui.inventorySlots, mouseX, mouseY, partialTicks).postAndCatch() - } - - fun onDrawSlot(slot: Slot, ci: CallbackInfo) { - if (GuiContainerEvent.DrawSlotEvent.Pre( - gui, - gui.inventorySlots, - slot - ).postAndCatch() - ) ci.cancel() - } - - fun onDrawSlotPost(slot: Slot, ci: CallbackInfo) { - GuiContainerEvent.DrawSlotEvent.Post(gui, gui.inventorySlots, slot).postAndCatch() - } - - fun onMouseClick(slot: Slot?, slotId: Int, clickedButton: Int, clickType: Int, ci: CallbackInfo) { - if ( - SlotClickEvent( - gui, - gui.inventorySlots, - slot, - slotId, - clickedButton, - clickType - ).postAndCatch() - ) ci.cancel() - } -}
\ No newline at end of file diff --git a/src/main/java/at/lorenz/mod/mixinhooks/NetHandlerPlayClientHook.kt b/src/main/java/at/lorenz/mod/mixinhooks/NetHandlerPlayClientHook.kt deleted file mode 100644 index 41a59201e..000000000 --- a/src/main/java/at/lorenz/mod/mixinhooks/NetHandlerPlayClientHook.kt +++ /dev/null @@ -1,9 +0,0 @@ -package at.lorenz.mod.mixinhooks - -import at.lorenz.mod.events.PacketEvent -import net.minecraft.network.Packet -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo - -fun onSendPacket(packet: Packet<*>, ci: CallbackInfo) { - if (PacketEvent.SendEvent(packet).postAndCatch()) ci.cancel() -}
\ No newline at end of file diff --git a/src/main/java/at/lorenz/mod/mixinhooks/NetworkManagerHook.kt b/src/main/java/at/lorenz/mod/mixinhooks/NetworkManagerHook.kt deleted file mode 100644 index 5f18be8d5..000000000 --- a/src/main/java/at/lorenz/mod/mixinhooks/NetworkManagerHook.kt +++ /dev/null @@ -1,10 +0,0 @@ -package at.lorenz.mod.mixinhooks - -import at.lorenz.mod.events.PacketEvent -import io.netty.channel.ChannelHandlerContext -import net.minecraft.network.Packet -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo - -fun onReceivePacket(context: ChannelHandlerContext, packet: Packet<*>, ci: CallbackInfo) { - if (PacketEvent.ReceiveEvent(packet).postAndCatch()) ci.cancel() -}
\ No newline at end of file diff --git a/src/main/java/at/lorenz/mod/mixinhooks/RenderItemHook.kt b/src/main/java/at/lorenz/mod/mixinhooks/RenderItemHook.kt deleted file mode 100644 index f978fe823..000000000 --- a/src/main/java/at/lorenz/mod/mixinhooks/RenderItemHook.kt +++ /dev/null @@ -1,28 +0,0 @@ -package at.lorenz.mod.mixinhooks - -import at.lorenz.mod.events.GuiRenderItemEvent -import net.minecraft.client.gui.FontRenderer -import net.minecraft.item.ItemStack -import net.minecraft.util.ResourceLocation -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo - -val RES_ITEM_GLINT = ResourceLocation("textures/misc/enchanted_item_glint.png") - -var skipGlint = false - -fun renderItemOverlayPost( - fr: FontRenderer, - stack: ItemStack?, - xPosition: Int, - yPosition: Int, - text: String?, - ci: CallbackInfo -) { - GuiRenderItemEvent.RenderOverlayEvent.Post( - fr, - stack, - xPosition, - yPosition, - text - ).postAndCatch() -}
\ No newline at end of file diff --git a/src/main/java/at/lorenz/mod/mixinhooks/RenderManagerHook.kt b/src/main/java/at/lorenz/mod/mixinhooks/RenderManagerHook.kt deleted file mode 100644 index 69242d651..000000000 --- a/src/main/java/at/lorenz/mod/mixinhooks/RenderManagerHook.kt +++ /dev/null @@ -1,25 +0,0 @@ -package at.lorenz.mod.mixinhooks - -import at.lorenz.mod.events.CheckRenderEntityEvent -import net.minecraft.client.renderer.culling.ICamera -import net.minecraft.entity.Entity -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable - -fun shouldRender( - entityIn: Entity, - camera: ICamera, - camX: Double, - camY: Double, - camZ: Double, - cir: CallbackInfoReturnable<Boolean> -) { - if ( - CheckRenderEntityEvent( - entityIn, - camera, - camX, - camY, - camZ - ).postAndCatch() - ) cir.returnValue = false -}
\ No newline at end of file |
