Translate new world events

The copper-related ones do not show if the Bedrock player performs them. This will be fixed later.
This commit is contained in:
Camotoy 2021-06-09 19:48:38 -04:00
parent 13f8b54d77
commit cc2d26dda8
No known key found for this signature in database
GPG key ID: 7EEFB66FE798081F
2 changed files with 18 additions and 2 deletions

View file

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

View file

@ -39,7 +39,6 @@ import org.geysermc.connector.network.translators.PacketTranslator;
import org.geysermc.connector.network.translators.Translator;
import org.geysermc.connector.network.translators.effect.Effect;
import org.geysermc.connector.network.translators.effect.EffectRegistry;
import org.geysermc.connector.network.translators.world.block.BlockTranslator;
import org.geysermc.connector.utils.LocaleUtils;
import java.util.Collections;
@ -275,6 +274,23 @@ public class JavaPlayEffectTranslator extends PacketTranslator<ServerPlayEffectP
session.sendUpstreamPacket(soundEventPacket);
break;
}
case ELECTRIC_SPARK: {
// Matches with a Bedrock server but doesn't seem to match up with Java
effectPacket.setType(LevelEventType.PARTICLE_ELECTRIC_SPARK);
break;
}
case WAX_ON: {
effectPacket.setType(LevelEventType.PARTICLE_WAX_ON);
break;
}
case WAX_OFF: {
effectPacket.setType(LevelEventType.PARTICLE_WAX_OFF);
break;
}
case SCRAPE: {
effectPacket.setType(LevelEventType.PARTICLE_SCRAPE);
break;
}
default: {
GeyserConnector.getInstance().getLogger().debug("Unhandled particle effect: " + particleEffect.name());
return;