Skip to content

Commit

Permalink
add modify placement listener mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
topi-banana committed Nov 29, 2024
1 parent 98f2a41 commit 9816501
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.vulpeus.kyoyu.client.mixins.litematica;

//? if client {
import fi.dy.masa.litematica.schematic.placement.SchematicPlacement;
import fi.dy.masa.litematica.schematic.placement.SchematicPlacementManager;
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(SchematicPlacement.class)
public class SchematicPlacementMixin {
@Inject(method = "onModified(Lfi/dy/masa/litematica/schematic/placement/SchematicPlacementManager;)V", at = @At("HEAD"), remap = false)
public void onModified(SchematicPlacementManager manager, CallbackInfo ci) {
// TODO
// attention when connecting server is compatible
// if (getClient() != null)
}
}
//?}
1 change: 1 addition & 0 deletions src/main/resources/kyoyu.client.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"compatibilityLevel": "${java_compatibility_level}",
"client": [
"litematica.GuiMainMenuMixin",
"litematica.SchematicPlacementMixin",
"litematica.WidgetSchematicPlacementMixin"
],
"injectors": {
Expand Down

0 comments on commit 9816501

Please sign in to comment.