Skip to content

Commit

Permalink
fixed stack overflow error
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Sep 16, 2023
1 parent 15ed5b8 commit a4d9712
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions common/src/main/java/muramasa/antimatter/util/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.tags.BlockTags;
Expand Down Expand Up @@ -572,11 +574,11 @@ public static InventoryChangeTrigger.TriggerInstance hasItem(ItemPredicate... pr
// }

public static MutableComponent translatable(String key, Object... objects){
return Utils.translatable(key, objects);
return new TranslatableComponent(key, objects);
}

public static MutableComponent literal(String text){
return Utils.literal(text);
return new TextComponent(text);
}

/**
Expand Down

0 comments on commit a4d9712

Please sign in to comment.