Skip to content

Commit

Permalink
Rename SkullBlockEntityTranslator functions to match code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Camotoy committed May 29, 2020
1 parent fe355f3 commit 9099009
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void translate(ServerUpdateTileEntityPacket packet, GeyserSession session
CompoundTag owner = packet.getNbt().get("Owner");
if (owner.contains("Properties")) {
BlockState blockState = ChunkUtils.CACHED_BLOCK_ENTITIES.get(packet.getPosition());
SkullBlockEntityTranslator.SpawnPlayer(session, packet.getNbt(), blockState);
SkullBlockEntityTranslator.spawnPlayer(session, packet.getNbt(), blockState);
}
}
BlockEntityUtils.updateBlockEntity(session, translator.getBlockEntityTag(id, packet.getNbt(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public static SerializedSkin getSkin(com.github.steveice10.opennbt.tag.builtin.C
return null;
}

public static void SpawnPlayer(GeyserSession session, com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, BlockState blockState) {
public static void spawnPlayer(GeyserSession session, com.github.steveice10.opennbt.tag.builtin.CompoundTag tag, BlockState blockState) {
SerializedSkin skin = getSkin(tag);
float x = (int) tag.get("x").getValue() + .5f;
float y = (int) tag.get("y").getValue() - .01f;
Expand Down Expand Up @@ -200,7 +200,7 @@ public static void SpawnPlayer(GeyserSession session, com.github.steveice10.open
}, 500, TimeUnit.MILLISECONDS); //Delay 5 seconds to give the model time to load in
}

public static boolean ContainsCustomSkull(Position position) {
public static boolean containsCustomSkull(Position position) {
return CACHED_SKULLS.containsKey(position);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public static ChunkData translateToBedrock(Column column, GeyserSession session)
if (tag.contains("Owner") && SkullBlockEntityTranslator.allowCustomSkulls) {
CompoundTag Owner = tag.get("Owner");
if (Owner.contains("Properties")) {
SkullBlockEntityTranslator.SpawnPlayer(session, tag, blockState);
SkullBlockEntityTranslator.spawnPlayer(session, tag, blockState);
}
}

Expand Down Expand Up @@ -202,7 +202,7 @@ public static void updateBlock(GeyserSession session, BlockState blockState, Vec
}
}

if (SkullBlockEntityTranslator.ContainsCustomSkull(new Position(position.getX(), position.getY(), position.getZ())) && blockState.equals(AIR)) {
if (SkullBlockEntityTranslator.containsCustomSkull(new Position(position.getX(), position.getY(), position.getZ())) && blockState.equals(AIR)) {
Position skullPosition = new Position(position.getX(), position.getY(), position.getZ());
RemoveEntityPacket removeEntityPacket = new RemoveEntityPacket();
removeEntityPacket.setUniqueEntityId(SkullBlockEntityTranslator.CACHED_SKULLS.get(skullPosition).getGeyserId());
Expand Down

0 comments on commit 9099009

Please sign in to comment.