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

Merge branch 'master' of https://github.com/GeyserMC/Geyser into feature/1.19-bedrock

Dieser Commit ist enthalten in:
Camotoy 2022-05-26 18:05:39 -04:00
Commit 83c309711e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F
3 geänderte Dateien mit 7 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -39,6 +39,7 @@ import org.geysermc.geyser.entity.type.living.MobEntity;
import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.session.GeyserSession;
import org.geysermc.geyser.util.DimensionUtils; import org.geysermc.geyser.util.DimensionUtils;
import java.util.Optional;
import java.util.Random; import java.util.Random;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.ThreadLocalRandom;
@ -262,6 +263,7 @@ public class EnderDragonEntity extends MobEntity implements Tickable {
spawnParticleEffectPacket.setDimensionId(DimensionUtils.javaToBedrock(session.getDimension())); spawnParticleEffectPacket.setDimensionId(DimensionUtils.javaToBedrock(session.getDimension()));
spawnParticleEffectPacket.setPosition(head.getPosition().add(random.nextGaussian() / 2f, random.nextGaussian() / 2f, random.nextGaussian() / 2f)); spawnParticleEffectPacket.setPosition(head.getPosition().add(random.nextGaussian() / 2f, random.nextGaussian() / 2f, random.nextGaussian() / 2f));
spawnParticleEffectPacket.setIdentifier("minecraft:dragon_breath_fire"); spawnParticleEffectPacket.setIdentifier("minecraft:dragon_breath_fire");
spawnParticleEffectPacket.setMolangVariablesJson(Optional.empty());
session.sendUpstreamPacket(spawnParticleEffectPacket); session.sendUpstreamPacket(spawnParticleEffectPacket);
} }
} }

Datei anzeigen

@ -36,6 +36,8 @@ import org.geysermc.geyser.translator.protocol.PacketTranslator;
import org.geysermc.geyser.translator.protocol.Translator; import org.geysermc.geyser.translator.protocol.Translator;
import org.geysermc.geyser.util.DimensionUtils; import org.geysermc.geyser.util.DimensionUtils;
import java.util.Optional;
@Translator(packet = ClientboundAnimatePacket.class) @Translator(packet = ClientboundAnimatePacket.class)
public class JavaAnimateTranslator extends PacketTranslator<ClientboundAnimatePacket> { public class JavaAnimateTranslator extends PacketTranslator<ClientboundAnimatePacket> {
@ -77,6 +79,7 @@ public class JavaAnimateTranslator extends PacketTranslator<ClientboundAnimatePa
stringPacket.setDimensionId(DimensionUtils.javaToBedrock(session.getDimension())); stringPacket.setDimensionId(DimensionUtils.javaToBedrock(session.getDimension()));
stringPacket.setPosition(Vector3f.ZERO); stringPacket.setPosition(Vector3f.ZERO);
stringPacket.setUniqueEntityId(entity.getGeyserId()); stringPacket.setUniqueEntityId(entity.getGeyserId());
stringPacket.setMolangVariablesJson(Optional.empty());
session.sendUpstreamPacket(stringPacket); session.sendUpstreamPacket(stringPacket);
break; break;
case LEAVE_BED: case LEAVE_BED:

Datei anzeigen

@ -42,6 +42,7 @@ import org.geysermc.geyser.registry.Registries;
import org.geysermc.geyser.registry.type.ParticleMapping; import org.geysermc.geyser.registry.type.ParticleMapping;
import org.geysermc.geyser.util.DimensionUtils; import org.geysermc.geyser.util.DimensionUtils;
import java.util.Optional;
import java.util.Random; import java.util.Random;
import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.ThreadLocalRandom;
import java.util.function.Function; import java.util.function.Function;
@ -150,6 +151,7 @@ public class JavaLevelParticlesTranslator extends PacketTranslator<ClientboundLe
stringPacket.setIdentifier(particleMapping.identifier()); stringPacket.setIdentifier(particleMapping.identifier());
stringPacket.setDimensionId(dimensionId); stringPacket.setDimensionId(dimensionId);
stringPacket.setPosition(position); stringPacket.setPosition(position);
stringPacket.setMolangVariablesJson(Optional.empty());
return stringPacket; return stringPacket;
}; };
} else { } else {