Add last few bits and pieces for the initial release #4

Merged
BlakeRain merged 8 commits from BlakeRain/utamacraft:main into main 2023-11-26 14:07:49 +00:00
Showing only changes of commit 4247678d04 - Show all commits

View File

@ -1,8 +1,12 @@
package net.banutama.utamacraft.block; package net.banutama.utamacraft.block;
import net.minecraft.ChatFormatting;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.player.Player; 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.BlockGetter;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks; 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.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
public class EtherealGlass extends GlassBlock { public class EtherealGlass extends GlassBlock {
public EtherealGlass() { 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) { private static Boolean blockSpawning(BlockState state, BlockGetter reader, BlockPos pos, EntityType<?> entity) {
return false; return false;
} }