mirror of
https://github.com/TeamMidnightDust/ThisRocks.git
synced 2025-12-17 03:15:09 +01:00
This Rocks 1.4.0 - 1.17 and QOL
- Update to 1.17-pre1 and Java 16 - Make starfish items contain variations - Fix bugs
This commit is contained in:
8
src/main/java/eu/midnightdust/motschen/rocks/block/Seashell.java
Normal file → Executable file
8
src/main/java/eu/midnightdust/motschen/rocks/block/Seashell.java
Normal file → Executable file
@@ -24,6 +24,8 @@ import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
import net.minecraft.world.WorldView;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class Seashell extends Block implements Waterloggable {
|
||||
|
||||
private static final VoxelShape SHAPE;
|
||||
@@ -43,7 +45,7 @@ public class Seashell extends Block implements Waterloggable {
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) {
|
||||
FluidState fluidState = itemPlacementContext.getWorld().getFluidState(itemPlacementContext.getBlockPos());
|
||||
return super.getPlacementState(itemPlacementContext)
|
||||
return Objects.requireNonNull(super.getPlacementState(itemPlacementContext))
|
||||
.with(SEASHELL_VARIATION, SeashellVariation.PINK).with(WATERLOGGED, fluidState.getFluid() == Fluids.WATER);
|
||||
}
|
||||
|
||||
@@ -72,9 +74,7 @@ public class Seashell extends Block implements Waterloggable {
|
||||
return SHAPE;
|
||||
}
|
||||
static {
|
||||
VoxelShape shape = createCuboidShape(0, 0, 0, 16, 3, 16);
|
||||
|
||||
SHAPE = shape;
|
||||
SHAPE = createCuboidShape(0, 0, 0, 16, 3, 16);
|
||||
}
|
||||
|
||||
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
|
||||
|
||||
Reference in New Issue
Block a user