File tree Expand file tree Collapse file tree 3 files changed +11
-25
lines changed
java/com/cleanroommc/groovyscript Expand file tree Collapse file tree 3 files changed +11
-25
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22
33import com .cleanroommc .groovyscript .GroovyScript ;
44import com .cleanroommc .groovyscript .api .GroovyLog ;
5+ import com .cleanroommc .groovyscript .command .CustomClickAction ;
56import com .cleanroommc .groovyscript .compat .WarningScreen ;
67import com .cleanroommc .groovyscript .compat .content .GroovyBlock ;
78import com .cleanroommc .groovyscript .compat .content .GroovyFluid ;
2829import net .minecraft .item .Item ;
2930import net .minecraft .item .crafting .IRecipe ;
3031import net .minecraft .nbt .NBTTagCompound ;
32+ import net .minecraftforge .client .event .ClientChatEvent ;
3133import net .minecraftforge .client .event .GuiOpenEvent ;
3234import net .minecraftforge .client .event .ModelRegistryEvent ;
3335import net .minecraftforge .client .event .TextureStitchEvent ;
@@ -109,6 +111,15 @@ public static void playerLogin(PlayerEvent.PlayerLoggedInEvent event) {
109111 }
110112 }
111113
114+ @ SubscribeEvent
115+ @ SideOnly (Side .CLIENT )
116+ public static void onClientChatEvent (ClientChatEvent event ) {
117+ if (event .getOriginalMessage ().startsWith (CustomClickAction .PREFIX ) &&
118+ CustomClickAction .runActionHook (event .getOriginalMessage ().substring (CustomClickAction .PREFIX .length ()))) {
119+ event .setCanceled (true );
120+ }
121+ }
122+
112123 @ SubscribeEvent
113124 public static void onItemCrafted (PlayerEvent .ItemCraftedEvent event ) {
114125 if (event .craftMatrix instanceof InventoryCrafting inventoryCrafting ) {
Original file line number Diff line number Diff line change 3535 "client" : [
3636 " DefaultResourcePackAccessor" ,
3737 " GuiCreateWorldMixin" ,
38- " GuiScreenMixin"
3938 ]
4039}
You can’t perform that action at this time.
0 commit comments