Finalize mod downgrade to 1.18.2
This commit is contained in:
parent
7657509044
commit
954642b922
5 changed files with 22 additions and 9 deletions
|
@ -11,6 +11,7 @@ import net.minecraft.server.MinecraftServer;
|
|||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||
import net.minecraftforge.event.server.ServerStartedEvent;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
|
@ -51,7 +52,7 @@ public class LibZontreck {
|
|||
public static class ForgeEventBus
|
||||
{
|
||||
@SubscribeEvent
|
||||
public void onPlayerTick(LivingEvent.LivingTickEvent ev)
|
||||
public void onPlayerTick(LivingUpdateEvent ev)
|
||||
{
|
||||
if(ev.getEntity().level.isClientSide)return;
|
||||
|
||||
|
|
|
@ -1,17 +1,33 @@
|
|||
package dev.zontreck.libzontreck.chat;
|
||||
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.HoverEvent;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
import net.minecraft.network.chat.HoverEvent.Action;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
/*
|
||||
* 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 {
|
||||
|
||||
/**
|
||||
* This will return a hover event that shows a string of text when hovered over
|
||||
* @param text
|
||||
* @return
|
||||
*/
|
||||
public static HoverEvent get(String text)
|
||||
{
|
||||
return new HoverEvent(Action.SHOW_TEXT, Component.literal(text));
|
||||
return new HoverEvent(Action.SHOW_TEXT, new TextComponent(text));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a hover event that shows an item when hovered over
|
||||
* @param is
|
||||
* @return
|
||||
*/
|
||||
public static HoverEvent getItem(ItemStack is)
|
||||
{
|
||||
return new HoverEvent(Action.SHOW_ITEM, new HoverEvent.ItemStackInfo(is));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package dev.zontreck.libzontreck.vectors;
|
||||
|
||||
import com.mojang.authlib.yggdrasil.response.UserAttributesResponse.ProfanityFilterPreferences;
|
||||
|
||||
import dev.zontreck.libzontreck.LibZontreck;
|
||||
import dev.zontreck.libzontreck.exceptions.InvalidDeserialization;
|
||||
import dev.zontreck.libzontreck.exceptions.InvalidSideException;
|
||||
|
@ -11,8 +9,6 @@ import net.minecraft.nbt.NbtUtils;
|
|||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.server.network.FilteredText;
|
||||
import net.minecraft.util.datafix.fixes.FilteredSignsFix;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
||||
|
|
Reference in a new issue