3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-26 16:12:46 +01:00

[ci skip] Fixed if spacing (#1941)

Co-authored-by: yehudahrrs <47502993+yehudahrrs@users.noreply.github.com>
Dieser Commit ist enthalten in:
YHDiamond 2021-02-16 20:09:18 -05:00 committet von GitHub
Ursprung e0bd5a62a7
Commit 62cbdb8f5c
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
5 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -101,7 +101,7 @@ public class GeyserSpongePlugin implements GeyserBootstrap {
} }
} }
if (geyserConfig.getBedrock().isCloneRemotePort()){ if (geyserConfig.getBedrock().isCloneRemotePort()) {
geyserConfig.getBedrock().setPort(geyserConfig.getRemote().getPort()); geyserConfig.getBedrock().setPort(geyserConfig.getRemote().getPort());
} }

Datei anzeigen

@ -44,7 +44,7 @@ public class RabbitEntity extends AnimalEntity {
if (entityMetadata.getId() == 15) { if (entityMetadata.getId() == 15) {
metadata.put(EntityData.SCALE, .55f); metadata.put(EntityData.SCALE, .55f);
boolean isBaby = (boolean) entityMetadata.getValue(); boolean isBaby = (boolean) entityMetadata.getValue();
if(isBaby) { if (isBaby) {
metadata.put(EntityData.SCALE, .35f); metadata.put(EntityData.SCALE, .35f);
metadata.getFlags().setFlag(EntityFlag.BABY, true); metadata.getFlags().setFlag(EntityFlag.BABY, true);
} }

Datei anzeigen

@ -125,7 +125,7 @@ public class VillagerEntity extends AbstractMerchantEntity {
Pattern r = Pattern.compile("facing=([a-z]+)"); Pattern r = Pattern.compile("facing=([a-z]+)");
Matcher m = r.matcher(bedRotationZ); Matcher m = r.matcher(bedRotationZ);
if (m.find()) { if (m.find()) {
switch (m.group(0)){ switch (m.group(0)) {
case "facing=south": case "facing=south":
//bed is facing south //bed is facing south
z = 180; z = 180;

Datei anzeigen

@ -64,7 +64,7 @@ public class QueryPacketHandler {
* @param buffer The Query data * @param buffer The Query data
*/ */
public QueryPacketHandler(GeyserConnector connector, InetSocketAddress sender, ByteBuf buffer) { public QueryPacketHandler(GeyserConnector connector, InetSocketAddress sender, ByteBuf buffer) {
if(!isQueryPacket(buffer)) if (!isQueryPacket(buffer))
return; return;
this.connector = connector; this.connector = connector;
@ -225,7 +225,7 @@ public class QueryPacketHandler {
query.write(new byte[] { 0x00, 0x00 }); query.write(new byte[] { 0x00, 0x00 });
// Fill player names // Fill player names
if(pingInfo != null) { if (pingInfo != null) {
for (String username : pingInfo.getPlayerList()) { for (String username : pingInfo.getPlayerList()) {
query.write(username.getBytes()); query.write(username.getBytes());
query.write((byte) 0x00); query.write((byte) 0x00);

Datei anzeigen

@ -52,7 +52,7 @@ public class JavaPlaySoundTranslator extends PacketTranslator<ServerPlaySoundPac
SoundRegistry.SoundMapping soundMapping = SoundRegistry.fromJava(packetSound.replace("minecraft:", "")); SoundRegistry.SoundMapping soundMapping = SoundRegistry.fromJava(packetSound.replace("minecraft:", ""));
String playsound; String playsound;
if(soundMapping == null || soundMapping.getPlaysound() == null) { if (soundMapping == null || soundMapping.getPlaysound() == null) {
// no mapping // no mapping
session.getConnector().getLogger() session.getConnector().getLogger()
.debug("[PlaySound] Defaulting to sound server gave us for " + packet.toString()); .debug("[PlaySound] Defaulting to sound server gave us for " + packet.toString());