Skip to content

Commit

Permalink
Renamed methods for better compability
Browse files Browse the repository at this point in the history
  • Loading branch information
Faboslav committed Oct 31, 2022
1 parent f6c3241 commit bbca73b
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,22 @@ private void friendsandfoes_customOnBlockAdded(
CallbackInfo ci
) {
if (oldState.isOf(state.getBlock()) == false) {
this.tryToSpawnCopperGolem(
this.friendsandfoes_tryToSpawnCopperGolem(
world,
pos
);
}
}

private void tryToSpawnCopperGolem(
private void friendsandfoes_tryToSpawnCopperGolem(
World world,
BlockPos pos
) {
if (FriendsAndFoes.getConfig().enableCopperGolem == false) {
return;
}

BlockPattern.Result patternSearchResult = this.getCopperGolemPattern().searchAround(world, pos);
BlockPattern.Result patternSearchResult = this.friendsandfoes_getCopperGolemPattern().searchAround(world, pos);

if (patternSearchResult == null) {
return;
Expand Down Expand Up @@ -127,7 +127,7 @@ private void tryToSpawnCopperGolem(
return;
}

for (int i = 0; i < this.getCopperGolemPattern().getHeight(); ++i) {
for (int i = 0; i < this.friendsandfoes_getCopperGolemPattern().getHeight(); ++i) {
CachedBlockPosition cachedBlockPosition = patternSearchResult.translate(0, i, 0);
world.setBlockState(
cachedBlockPosition.getBlockPos(),
Expand Down Expand Up @@ -157,8 +157,8 @@ private void tryToSpawnCopperGolem(
copperGolemEntity.setOxidationLevel(bodyOxidationLevel);

if (lightningRodOxidationLevel != Oxidizable.OxidationLevel.OXIDIZED) {
boolean isHeadBlockWaxed = this.isCopperBlockWaxed(headBlockState);
boolean isBodyBlockWaxed = this.isCopperBlockWaxed(bodyBlockState);
boolean isHeadBlockWaxed = this.friendsandfoes_isCopperBlockWaxed(headBlockState);
boolean isBodyBlockWaxed = this.friendsandfoes_isCopperBlockWaxed(bodyBlockState);
boolean isWaxed = isHeadBlockWaxed && isBodyBlockWaxed;
copperGolemEntity.setIsWaxed(isWaxed);
}
Expand All @@ -170,13 +170,13 @@ private void tryToSpawnCopperGolem(
Criteria.SUMMONED_ENTITY.trigger(serverPlayerEntity, copperGolemEntity);
}

for (int j = 0; j < this.getCopperGolemPattern().getHeight(); ++j) {
for (int j = 0; j < this.friendsandfoes_getCopperGolemPattern().getHeight(); ++j) {
CachedBlockPosition cachedBlockPosition2 = patternSearchResult.translate(0, j, 0);
world.updateNeighbors(cachedBlockPosition2.getBlockPos(), Blocks.AIR);
}
}

private BlockPattern getCopperGolemPattern() {
private BlockPattern friendsandfoes_getCopperGolemPattern() {
if (this.copperGolemPattern == null) {
this.copperGolemPattern = BlockPatternBuilder.start()
.aisle("|", "^", "#")
Expand All @@ -189,7 +189,7 @@ private BlockPattern getCopperGolemPattern() {
return this.copperGolemPattern;
}

private boolean isCopperBlockWaxed(
private boolean friendsandfoes_isCopperBlockWaxed(
BlockState blockState
) {
return blockState.isOf(Blocks.WAXED_COPPER_BLOCK)
Expand Down

0 comments on commit bbca73b

Please sign in to comment.