Skip to content

Commit

Permalink
Update BlockGetterMixin.java
Browse files Browse the repository at this point in the history
  • Loading branch information
AViewFromTheTop committed Dec 2, 2023
1 parent a7eeef4 commit 946f700
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ public interface BlockGetterMixin {
@Inject(method = "clip", at = @At("HEAD"))
default void wilderWild$setClipInMesoglea(ClipContext context, CallbackInfoReturnable<BlockHitResult> info) {
if (context.collisionContext instanceof EntityCollisionContext entityCollisionContext && entityCollisionContext.getEntity() != null) {
BlockState headState = getBlockState(BlockPos.containing(entityCollisionContext.getEntity().getEyePosition()));
BlockState eyeState = getBlockState(BlockPos.containing(entityCollisionContext.getEntity().getEyePosition()));
((InMesogleaInterface)entityCollisionContext.getEntity()).wilderWild$setClipInMesoglea(
headState.is(WilderBlockTags.MESOGLEA)
&& headState.hasProperty(BlockStateProperties.WATERLOGGED)
&& headState.getValue(BlockStateProperties.WATERLOGGED)
eyeState.is(WilderBlockTags.MESOGLEA)
&& eyeState.hasProperty(BlockStateProperties.WATERLOGGED)
&& eyeState.getValue(BlockStateProperties.WATERLOGGED)
);
}
}
Expand Down

0 comments on commit 946f700

Please sign in to comment.