mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fixed AO shadows on hive blocks and clouds
This commit is contained in:
parent
73182d71fc
commit
511f5c0cd9
3 changed files with 16 additions and 1 deletions
|
@ -50,6 +50,11 @@ public class HiveWallBlock extends FallingBlock {
|
|||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasEmissiveLighting(BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||
builder.add(STATE).add(AXIS);
|
||||
|
|
|
@ -32,10 +32,15 @@ public class CloudBlock extends Block implements Gas {
|
|||
}
|
||||
|
||||
@Override
|
||||
public GasState getGasState(BlockState blockState) {
|
||||
public GasState getGasState(BlockState state) {
|
||||
return variant;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getAmbientOcclusionLightLevel(BlockState state, BlockView view, BlockPos pos) {
|
||||
return getGasState(state).isTranslucent() ? 0.9F : 0.5F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSuffocate(BlockState state, BlockView view, BlockPos pos) {
|
||||
return !getGasState(state).isTranslucent();
|
||||
|
|
|
@ -23,6 +23,11 @@ public class CloudSlabBlock extends SmartSlabBlock implements Gas {
|
|||
return ((Gas)modelState.getBlock()).getGasState(blockState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getAmbientOcclusionLightLevel(BlockState state, BlockView view, BlockPos pos) {
|
||||
return getGasState(state).isTranslucent() ? 1 : 0.9F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, EntityContext context) {
|
||||
if (getGasState(state).canPlace((CloudInteractionContext)context)) {
|
||||
|
|
Loading…
Reference in a new issue