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

This commit is contained in:
Camotoy 2022-05-26 18:05:39 -04:00
commit 83c309711e
No known key found for this signature in database
GPG key ID: 7EEFB66FE798081F
3 changed files with 7 additions and 0 deletions

View file

@ -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);
} }
} }

View file

@ -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:

View file

@ -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 {