Fix beacon beams now going through some blocks
This commit is contained in:
+5
@@ -49,6 +49,11 @@ public interface IBlockStateWrapper extends IDhApiBlockStateWrapper
|
||||
boolean isBeaconBlock();
|
||||
/** IE a glass block that can affect the beacon beam color */
|
||||
boolean isBeaconTintBlock();
|
||||
/**
|
||||
* Returns true for any blocks that allow beacon beams to go through.
|
||||
* IE: glass, stairs, bedrock, chests, end portal frames, carpet, cake
|
||||
*/
|
||||
boolean allowsBeaconBeamPassage();
|
||||
/**
|
||||
* The blocks used by a beacon's base
|
||||
* IE Iron, diamond, gold, etc.
|
||||
|
||||
+2
-1
@@ -381,8 +381,9 @@ public interface IChunkWrapper extends IBindable
|
||||
for (int y = beaconRelPos.getY() +1; y <= maxY; y++)
|
||||
{
|
||||
IBlockStateWrapper block = centerChunk.getBlockState(beaconRelPos.getX(), y, beaconRelPos.getZ());
|
||||
if (!block.isAir() && block.getOpacity() == LodUtil.BLOCK_FULLY_OPAQUE)
|
||||
if (!block.allowsBeaconBeamPassage())
|
||||
{
|
||||
// beam is blocked by this block
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user