mirror of
https://github.com/FabricMC/fabric.git
synced 2025-09-06 19:36:26 +00:00
24w09a (#3623)
* In game * More fixes * Small fixes + changes * Rename * Fix test
This commit is contained in:
@@ -22,6 +22,7 @@ import org.slf4j.LoggerFactory;
|
||||
import net.minecraft.block.AbstractBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.component.DataComponentTypes;
|
||||
import net.minecraft.entity.damage.DamageTypes;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
@@ -225,7 +226,7 @@ public final class EntityEventTests implements ModInitializer {
|
||||
|
||||
private static ItemStack createNamedItem(Item item, String name) {
|
||||
ItemStack stack = new ItemStack(item);
|
||||
stack.setCustomName(Text.literal(name));
|
||||
stack.set(DataComponentTypes.CUSTOM_NAME, Text.literal(name));
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user