Skip to content

Commit

Permalink
Translate new world events
Browse files Browse the repository at this point in the history
The copper-related ones do not show if the Bedrock player performs them. This will be fixed later.
  • Loading branch information
Camotoy committed Jun 9, 2021
1 parent 13f8b54 commit cc2d26d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
<dependency>
<groupId>com.github.GeyserMC</groupId>
<artifactId>MCProtocolLib</artifactId>
<version>5b5334c</version>
<version>dd606b4</version>
<scope>compile</scope>
<exclusions>
<exclusion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
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;
Expand Down Expand Up @@ -275,6 +274,23 @@ public void translate(ServerPlayEffectPacket packet, GeyserSession session) {
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;
Expand Down

0 comments on commit cc2d26d

Please sign in to comment.