This Rocks 1.3.0

Fixes #5, #7, #9, #11, #13
Make rotations random
Starfish is now a json model!
This commit is contained in:
Motschen
2021-02-08 14:06:01 +01:00
parent b1b8962ec0
commit 5616e19b21
37 changed files with 1489 additions and 306 deletions

View File

@@ -17,6 +17,7 @@ import net.minecraft.util.math.Direction;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import net.minecraft.world.WorldAccess;
import net.minecraft.world.WorldView;
public class Stick extends Block {
@@ -67,4 +68,7 @@ public class Stick extends Block {
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
return world.getBlockState(pos.down()).isSideSolidFullSquare(world,pos,Direction.UP);
}
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom) {
return !state.canPlaceAt(world, pos) ? Blocks.AIR.getDefaultState() : super.getStateForNeighborUpdate(state, direction, newState, world, pos, posFrom);
}
}