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:
Motschen
2021-05-30 13:07:44 +02:00
parent ba7dc4ea23
commit 2e8f562270
205 changed files with 561 additions and 281 deletions

View 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) {