2020-07-26 23:05:59 +00:00
|
|
|
package com.thebrokenrail.energonrelics.block.misc;
|
2020-07-17 03:55:31 +00:00
|
|
|
|
|
|
|
import com.thebrokenrail.energonrelics.block.util.SimpleBlock;
|
|
|
|
import net.fabricmc.api.EnvType;
|
|
|
|
import net.fabricmc.api.Environment;
|
|
|
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|
|
|
import net.minecraft.block.BlockState;
|
|
|
|
import net.minecraft.block.Material;
|
2020-07-22 20:17:01 +00:00
|
|
|
import net.minecraft.block.MaterialColor;
|
2020-07-26 00:23:40 +00:00
|
|
|
import net.minecraft.block.ShapeContext;
|
2020-07-22 20:17:01 +00:00
|
|
|
import net.minecraft.sound.BlockSoundGroup;
|
2020-07-17 03:55:31 +00:00
|
|
|
import net.minecraft.util.math.BlockPos;
|
2020-07-26 00:23:40 +00:00
|
|
|
import net.minecraft.util.shape.VoxelShape;
|
|
|
|
import net.minecraft.util.shape.VoxelShapes;
|
2020-07-17 03:55:31 +00:00
|
|
|
import net.minecraft.world.BlockView;
|
|
|
|
|
2020-07-26 00:23:40 +00:00
|
|
|
@SuppressWarnings("deprecation")
|
2020-07-17 03:55:31 +00:00
|
|
|
public class ThermalGlassBlock extends SimpleBlock {
|
|
|
|
public ThermalGlassBlock() {
|
2020-07-26 00:23:40 +00:00
|
|
|
super(FabricBlockSettings.of(Material.STONE, MaterialColor.YELLOW_TERRACOTTA).sounds(BlockSoundGroup.GLASS).requiresTool().strength(1.5f, 6.0f).nonOpaque().allowsSpawning((state, world, pos, type) -> false).solidBlock((state, world, pos) -> false).suffocates((state, world, pos) -> false).blockVision((state, world, pos) -> false));
|
2020-07-17 03:55:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Environment(EnvType.CLIENT)
|
|
|
|
public float getAmbientOcclusionLightLevel(BlockState state, BlockView world, BlockPos pos) {
|
2020-07-22 22:57:51 +00:00
|
|
|
return 1f;
|
2020-07-17 03:55:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isTranslucent(BlockState state, BlockView world, BlockPos pos) {
|
|
|
|
return true;
|
|
|
|
}
|
2020-07-26 00:23:40 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public VoxelShape getVisualShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
|
|
|
|
return VoxelShapes.empty();
|
|
|
|
}
|
2020-07-17 03:55:31 +00:00
|
|
|
}
|