Skip to content

Commit

Permalink
Merge pull request #13 from Nyphet/1.18.2/dev
Browse files Browse the repository at this point in the history
1.18.2/dev
  • Loading branch information
Crystal-Spider authored Jul 11, 2022
2 parents 4f9769f + 575fc14 commit 4b55836
Show file tree
Hide file tree
Showing 7 changed files with 619 additions and 315 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Forge Semantic Versioning](https://mcforge.readthed
- Fixed tinted glass light down propagation.
- Fixed a combining bug that would prevent vertical slabs facing north from creating certain angles when side by side with double vertical slabs.
- Fixed tint of grass vertical slabs particles.
- Improved double vertical slabs.

## [1.18.2-3.2.0.0-beta1] - 2022/06/04
- Added double vertical slabs.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package crystalspider.justverticalslabs;

import com.mojang.logging.LogUtils;

import org.slf4j.Logger;

import com.mojang.logging.LogUtils;

import crystalspider.justverticalslabs.blocks.CutoutVerticalSlabBlock;
import crystalspider.justverticalslabs.blocks.TranslucentVerticalSlabBlock;
import crystalspider.justverticalslabs.blocks.VerticalSlabBlock;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package crystalspider.justverticalslabs.blocks;

import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Material;

/**
Expand All @@ -10,9 +9,4 @@ public class CutoutVerticalSlabBlock extends VerticalSlabBlock {
public CutoutVerticalSlabBlock() {
super(Material.WOOD);
}

@Override
public boolean useShapeForLightOcclusion(BlockState state) {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ public VoxelShape getOcclusionShape(BlockState state, BlockGetter getter, BlockP

@Override
public boolean useShapeForLightOcclusion(BlockState state) {
return state.getValue(OCCLUSION);
return state.getValue(OCCLUSION) && super.useShapeForLightOcclusion(state);
}

@Override
public boolean propagatesSkylightDown(BlockState state, BlockGetter getter, BlockPos pos) {
BlockState referredBlockState = VerticalSlabUtils.getReferredBlockState(getter, pos);
if (referredBlockState != null) {
return getReferredProperty(referredBlockState::propagatesSkylightDown, () -> true, getter, pos);
return Behaviour.getReferredProperty(referredBlockState::propagatesSkylightDown, () -> true, getter, pos);
}
return true;
}
Expand All @@ -54,9 +54,9 @@ public float getShadeBrightness(BlockState state, BlockGetter getter, BlockPos p
if (referredSlabState != null) {
BlockState referredBlockState = VerticalSlabUtils.getReferredBlockState(referredSlabState);
if (referredBlockState != null) {
return getReferredProperty(referredBlockState::getShadeBrightness, () -> 1.0F, getter, pos);
return Behaviour.getReferredProperty(referredBlockState::getShadeBrightness, () -> 1.0F, getter, pos);
}
return getReferredProperty(referredSlabState::getShadeBrightness, () -> 1.0F, getter, pos);
return Behaviour.getReferredProperty(referredSlabState::getShadeBrightness, () -> 1.0F, getter, pos);
}
return 1.0F;
}
Expand All @@ -67,10 +67,10 @@ public int getLightBlock(BlockState state, BlockGetter getter, BlockPos pos) {
BlockState referredSlabState = VerticalSlabUtils.getReferredSlabState(getter, pos);
BlockState referredBlockState = VerticalSlabUtils.getReferredBlockState(referredSlabState);
if (referredBlockState != null) {
return getReferredProperty(referredBlockState::getLightBlock, () -> super.getLightBlock(state, getter, pos), getter, pos);
return Behaviour.getReferredProperty(referredBlockState::getLightBlock, () -> super.getLightBlock(state, getter, pos), getter, pos);
} else {
if (referredSlabState != null) {
return getReferredProperty(referredSlabState::getLightBlock, () -> super.getLightBlock(state, getter, pos), getter, pos);
return Behaviour.getReferredProperty(referredSlabState::getLightBlock, () -> super.getLightBlock(state, getter, pos), getter, pos);
}
}
return super.getLightBlock(state, getter, pos);
Expand Down
Loading

0 comments on commit 4b55836

Please sign in to comment.