Translate more new level events

This commit is contained in:
Camotoy 2021-06-16 19:09:35 -04:00
parent 2c9cd7ed02
commit c4131428ea
No known key found for this signature in database
GPG key ID: 7EEFB66FE798081F
3 changed files with 8 additions and 2 deletions

View file

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

View file

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