Ceiling generation
This commit is contained in:
parent
9b464bcc06
commit
82c0b12118
7 changed files with 59 additions and 45 deletions
|
@ -9,6 +9,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.MaterialColor;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.state.property.EnumProperty;
|
||||
|
@ -35,6 +36,13 @@ public class TripleTerrainBlock extends EndTerrainBlock {
|
|||
stateManager.add(SHAPE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext ctx) {
|
||||
Direction dir = ctx.getSide();
|
||||
TripleShape shape = dir == Direction.UP ? TripleShape.BOTTOM : dir == Direction.DOWN ? TripleShape.TOP : TripleShape.MIDDLE;
|
||||
return this.getDefaultState().with(SHAPE, shape);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModelPattern(String block) {
|
||||
System.out.println(block);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue