Add library ruins
- Adds two variants of library ruins: surface (generates in forested biomes) and underground (generates everywhere) - Adds loot table support to bookshelves - Adds antique atlas markers for library ruins - Adds bookshelves and lecterns to the wood type template processor - Makes bookshelves and lecterns rotate correctly in structure templates - Generalises most of the methods in WorldGenSurfaceStructure to a new superclass WorldGenWizardryStructure
This commit is contained in:
@@ -84,6 +84,18 @@ public class BlockBookshelf extends BlockHorizontal implements ITileEntityProvid
|
||||
return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite());
|
||||
}
|
||||
|
||||
// Why on earth are these two not in BlockHorizontal?
|
||||
|
||||
@Override
|
||||
public IBlockState withRotation(IBlockState state, Rotation rotation){
|
||||
return state.withProperty(FACING, rotation.rotate(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState withMirror(IBlockState state, Mirror mirror){
|
||||
return state.withRotation(mirror.toRotation(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state){
|
||||
super.onBlockAdded(worldIn, pos, state);
|
||||
|
||||
@@ -18,6 +18,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.Mirror;
|
||||
import net.minecraft.util.Rotation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
@@ -103,6 +105,16 @@ public class BlockLectern extends BlockHorizontal implements ITileEntityProvider
|
||||
return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState withRotation(IBlockState state, Rotation rotation){
|
||||
return state.withProperty(FACING, rotation.rotate(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState withMirror(IBlockState state, Mirror mirror){
|
||||
return state.withRotation(mirror.toRotation(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta){
|
||||
|
||||
Reference in New Issue
Block a user