Add last few bits and pieces for the initial release #4
@ -1,8 +1,12 @@
|
||||
package net.banutama.utamacraft.block;
|
||||
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.TooltipFlag;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
@ -15,6 +19,9 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EtherealGlass extends GlassBlock {
|
||||
public EtherealGlass() {
|
||||
@ -38,6 +45,13 @@ public class EtherealGlass extends GlassBlock {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void appendHoverText(ItemStack stack, @Nullable BlockGetter getter, List<Component> components, TooltipFlag flag) {
|
||||
super.appendHoverText(stack, getter, components, flag);
|
||||
components.add(Component.translatable("tooltip.utamacraft.ethereal_glass").withStyle(ChatFormatting.GRAY));
|
||||
}
|
||||
|
||||
private static Boolean blockSpawning(BlockState state, BlockGetter reader, BlockPos pos, EntityType<?> entity) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user