3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-03 14:50:19 +01:00

Translate more new level events

Dieser Commit ist enthalten in:
Camotoy 2021-06-16 19:09:35 -04:00
Ursprung 2c9cd7ed02
Commit c4131428ea
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F
3 geänderte Dateien mit 8 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -154,7 +154,7 @@
<dependency>
<groupId>com.github.GeyserMC</groupId>
<artifactId>MCProtocolLib</artifactId>
<version>dd606b4</version>
<version>7248769</version>
<scope>compile</scope>
<exclusions>
<exclusion>

Datei anzeigen

@ -49,6 +49,7 @@ public class JavaPlayEffectTranslator extends PacketTranslator<ServerPlayEffectP
@Override
public void translate(ServerPlayEffectPacket packet, GeyserSession session) {
System.out.println(packet.toString());
// Separate case since each RecordEffectData in Java is an individual track in Bedrock
if (packet.getEffect() == SoundEffect.RECORD) {
RecordEffectData recordEffectData = (RecordEffectData) packet.getData();
@ -228,6 +229,7 @@ public class JavaPlayEffectTranslator extends PacketTranslator<ServerPlayEffectP
effectPacket.setType(LevelEventType.PARTICLE_MOB_BLOCK_SPAWN); // TODO: Check, but I don't think I really verified this ever went into effect on Java
break;
}
case BONEMEAL_GROW_WITH_SOUND: // Note that there is no particle without sound in Bedrock. If you wanted to implement the sound, send a PlaySoundPacket with "item.bone_meal.use" and volume and pitch at 1.0F
case BONEMEAL_GROW: {
effectPacket.setType(LevelEventType.PARTICLE_CROP_GROWTH);
@ -274,6 +276,10 @@ public class JavaPlayEffectTranslator extends PacketTranslator<ServerPlayEffectP
session.sendUpstreamPacket(soundEventPacket);
break;
}
case DRIPSTONE_DRIP: {
effectPacket.setType(LevelEventType.PARTICLE_DRIPSTONE_DRIP);
break;
}
case ELECTRIC_SPARK: {
// Matches with a Bedrock server but doesn't seem to match up with Java
effectPacket.setType(LevelEventType.PARTICLE_ELECTRIC_SPARK);

@ -1 +1 @@
Subproject commit e7c1e32117b8d5011ebe0ba86559285b6d8dfecf
Subproject commit 1c39b875c58efe4ca37f6ff7d3ebe05781347642