Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- public class BlockRedstoneDirectionalOverride extends World
- {
- public BlockRedstoneDirectionalOverride(ISaveHandler par1iSaveHandler, String par2Str, WorldProvider par3WorldProvider, WorldSettings par4WorldSettings, Profiler par5Profiler, ILogAgent par6iLogAgent)
- {
- super(par1iSaveHandler, par2Str, par3WorldProvider, par4WorldSettings,
- par5Profiler, par6iLogAgent);
- }
- @Override
- protected IChunkProvider createChunkProvider()
- {
- return null;
- }
- @Override
- public Entity getEntityByID(int var1)
- {
- return null;
- }
- /**
- * Checks if the block is a solid, normal cube. If the chunk does not exist, or is not loaded, it returns the
- * boolean parameter.
- */
- @Override
- public boolean isBlockNormalCubeDefault(int par1, int par2, int par3, boolean par4)
- {
- if (par1 >= -30000000 && par3 >= -30000000 && par1 < 30000000 && par3 < 30000000)
- {
- Chunk var5 = this.chunkProvider.provideChunk(par1 >> 4, par3 >> 4);
- if (var5 != null && !var5.isEmpty())
- {
- Block var6 = Block.blocksList[this.getBlockId(par1, par2, par3)];
- return (var6 instanceof BlockRedstoneDirectional || var6 instanceof BlockRedstoneDirectionalLogic) ? true : (var6 == null) ? false : (var6.blockMaterial.isOpaque() &&
- var6.renderAsNormalBlock());
- }
- else
- {
- return par4;
- }
- }
- else
- {
- return par4;
- }
- }
- /**
- * Performs check to see if the block is a normal, solid block, or if the metadata of the block indicates that its
- * facing puts its solid side upwards. (inverted stairs, for example)
- */
- @Override
- public boolean isBlockTopFacingSurfaceSolid(Block par1Block, int par2)
- {
- return par1Block == null ? false : (par1Block.blockMaterial.isOpaque() && par1Block.renderAsNormalBlock() ? true : (par1Block instanceof BlockStairs ? (par2 & 4) == 4 : (par1Block instanceof BlockHalfSlab ? (par2 & 8) == 8 : (par1Block instanceof BlockHopper ? true : (par1Block instanceof BlockSnow ? (par2 & 7) == 7 : (par1Block instanceof BlockRedstoneDirectional || par1Block instanceof BlockRedstoneDirectionalLogic) ? true : false)))));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement