Add missing entity translations and set floating artefact to use the name of its item

This commit is contained in:
Sollace 2024-05-16 22:38:19 +01:00
parent 2fdd5b2730
commit fffbee84e3
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
2 changed files with 9 additions and 1 deletions

View file

@ -13,6 +13,7 @@ import net.minecraft.entity.data.TrackedData;
import net.minecraft.entity.data.TrackedDataHandlerRegistry;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.text.Text;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
@ -48,6 +49,11 @@ public class FloatingArtefactEntity extends StationaryObjectEntity {
positionSeed = (float)(Math.random() * Math.PI * 2);
}
@Override
protected Text getDefaultName() {
return getStack().getName();
}
@Override
protected void initDataTracker() {
super.initDataTracker();

View file

@ -65,7 +65,6 @@
"item.unicopia.butterfly_spawn_egg": "Butterfly Spawn Egg",
"item.unicopia.butterfly": "Butterfly",
"item.unicopia.loot_bug_spawn_egg": "Loot Bug Spawn Egg",
"item.unicopia.loot_bug": "Loot bug",
"item.unicopia.green_apple": "Granny Smith Apple",
"item.unicopia.sweet_apple": "Sweet Apple Acres Apple",
@ -376,9 +375,11 @@
"block.unicopia.oats_crown": "Oats",
"entity.unicopia.butterfly": "Butterfly",
"entity.unicopia.loot_bug": "Loot bug",
"entity.unicopia.twittermite": "Twittermite",
"entity.unicopia.specter": "Specter",
"entity.unicopia.mimic": "Mimic",
"entity.unicopia.magic_beam": "Magic Beam",
"entity.unicopia.cast_spell": "Cast Spell",
"entity.unicopia.cast_spell.by": "a spell cast by %s",
"entity.unicopia.spellbook": "Spellbook",
@ -389,6 +390,7 @@
"entity.unicopia.crystal_shards": "Crystal Shards",
"entity.unicopia.ignominious_vine": "Ignominious Vine",
"entity.unicopia.ignominious_bulb": "Ignominious Bulb",
"entity.unicopia.thrown_item": "Thrown Item",
"player.reachDistance": "Reach Distance",
"player.miningSpeed": "Mining Speed",