Add source files to again satisfy modrinth
This commit is contained in:
parent
b22c968912
commit
5012d004ce
7 changed files with 336 additions and 0 deletions
17
src/main/java/dev/zontreck/libzontreck/chat/HoverTip.java
Normal file
17
src/main/java/dev/zontreck/libzontreck/chat/HoverTip.java
Normal file
|
@ -0,0 +1,17 @@
|
|||
package dev.zontreck.libzontreck.chat;
|
||||
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.HoverEvent;
|
||||
import net.minecraft.network.chat.HoverEvent.Action;
|
||||
|
||||
/*
|
||||
* Because of some weird behavior with java not liking that both HoverEvent and ClickEvent have an Action implementation, these must both be in a custom factory here where Action can be imported by itself in both files
|
||||
*/
|
||||
public class HoverTip {
|
||||
|
||||
public static HoverEvent get(String text)
|
||||
{
|
||||
return new HoverEvent(Action.SHOW_TEXT, Component.literal(text));
|
||||
}
|
||||
|
||||
}
|
Reference in a new issue