Add source files to again satisfy modrinth

This commit is contained in:
Tara 2022-10-12 19:02:29 -07:00 committed by GitHub
parent b22c968912
commit 5012d004ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 336 additions and 0 deletions

View 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));
}
}