mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-30 20:29:19 +00:00
Translate more new level events
This commit is contained in:
@@ -154,7 +154,7 @@
|
||||
<dependency>
|
||||
<groupId>com.github.GeyserMC</groupId>
|
||||
<artifactId>MCProtocolLib</artifactId>
|
||||
<version>dd606b4</version>
|
||||
<version>7248769</version>
|
||||
<scope>compile</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user