Skip to content

Commit

Permalink
chore: inspections.xml/Project_default.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
vini2003 committed Oct 15, 2023
1 parent ce77ac8 commit cdce1aa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Project_Default.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="DuplicatedCode" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="MultipleVariablesInDeclaration" enabled="true" level="WARNING" enabled_by_default="true" editorAttributes="WARNING_ATTRIBUTES" />
<inspection_tool class="RedundantExplicitVariableType" enabled="true" level="ERROR" enabled_by_default="true" editorAttributes="ERRORS_ATTRIBUTES" />
<inspection_tool class="UnnecessaryFinalOnLocalVariableOrParameter" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="UnqualifiedFieldAccess" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="VariableTypeCanBeExplicit" enabled="false" level="INFORMATION" enabled_by_default="false" />
</profile>
</component>
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ public void buildBridge() {
public Map<BlockPos, VoxelShape> getBridgeVoxelShapes() {
var facing = getCachedState().get(HORIZONTAL_FACING);

var component = HoloBridgesComponent.get(world);

var bridgePositions = getBridgePositions();
var bridgeVoxelShapes = new HashMap<BlockPos, VoxelShape>();

Expand All @@ -181,7 +183,7 @@ public Map<BlockPos, VoxelShape> getBridgeVoxelShapes() {
for (var x = bridgePos.x - 0.5F; x < bridgePos.x + 0.5F; x += 1.0F / 16.0F) {
var bridgeBlockPos = new BlockPos((int) Math.floor(x), (int) Math.floor(y), (int) Math.floor(z));

var shape = bridgeVoxelShapes.getOrDefault(bridgeBlockPos, VoxelShapes.empty());
var shape = bridgeVoxelShapes.getOrDefault(bridgeBlockPos, component.getShape(bridgeBlockPos));

var cX = x % (int) x;
var cY = bridgePos.y % (int) bridgePos.y;
Expand Down

0 comments on commit cdce1aa

Please sign in to comment.