mirror of
https://github.com/TeamMidnightDust/ThisRocks.git
synced 2025-12-17 19:35:10 +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/Stick.java
Normal file → Executable file
8
src/main/java/eu/midnightdust/motschen/rocks/block/Stick.java
Normal file → Executable file
@@ -20,6 +20,8 @@ import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
import net.minecraft.world.WorldView;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class Stick extends Block {
|
||||
|
||||
private static final VoxelShape SHAPE;
|
||||
@@ -32,7 +34,7 @@ public class Stick extends Block {
|
||||
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) {
|
||||
return super.getPlacementState(itemPlacementContext)
|
||||
return Objects.requireNonNull(super.getPlacementState(itemPlacementContext))
|
||||
.with(STICK_VARIATION, StickVariation.SMALL);
|
||||
}
|
||||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
|
||||
@@ -60,9 +62,7 @@ public class Stick extends Block {
|
||||
return SHAPE;
|
||||
}
|
||||
static {
|
||||
VoxelShape shape = createCuboidShape(0, 0, 0, 16, 1, 16);
|
||||
|
||||
SHAPE = shape;
|
||||
SHAPE = createCuboidShape(0, 0, 0, 16, 1, 16);
|
||||
}
|
||||
|
||||
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
|
||||
|
||||
Reference in New Issue
Block a user