Skip to content

Commit

Permalink
Remove bad logging from CarpetClient and fix isFluidSource
Browse files Browse the repository at this point in the history
  • Loading branch information
senseiwells committed Jan 15, 2024
1 parent 5748518 commit 5393da5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ private Object mirrorLeftRight(Arguments arguments) {
)
private Object isFluid(Arguments arguments) {
ScriptBlockState blockState = arguments.nextPrimitive(this);
return blockState.state.contains(FluidBlock.LEVEL);
return !blockState.state.getFluidState().isEmpty();
}

@FunctionDoc(
Expand All @@ -419,11 +419,7 @@ private Object isFluid(Arguments arguments) {
)
private Object isFluidSource(Arguments arguments) {
ScriptBlockState blockState = arguments.nextPrimitive(this);
Block block = blockState.asBlock();
if ((block instanceof FluidBlock && blockState.state.get(FluidBlock.LEVEL) == 0) || block instanceof BubbleColumnBlock) {
return true;
}
return block instanceof Waterloggable && blockState.state.get(Properties.WATERLOGGED);
return blockState.state.getFluidState().isStill();
}

@FunctionDoc(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ private CarpetClientRule<?> jsonToClientRule(JsonElement jsonElement) {
if (carpetRule != null) {
return this.parseRuleToClientRule(carpetRule, carpetRule.getSettingsManagerId());
}
EssentialClient.LOGGER.error("Failed to load Carpet Rule '{}'", name, e);
// EssentialClient.LOGGER.error("Failed to load Carpet Rule '{}'", name, e);
return null;
}
}
Expand Down

0 comments on commit 5393da5

Please sign in to comment.