Skip to content

Commit

Permalink
Fix anvil renaming (#1744)
Browse files Browse the repository at this point in the history
Turns out it *was* our fault. Oops.
  • Loading branch information
Camotoy committed Dec 27, 2020
1 parent 77de991 commit d1c571d
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 6 deletions.
2 changes: 1 addition & 1 deletion connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<dependency>
<groupId>com.github.CloudburstMC.Protocol</groupId>
<artifactId>bedrock-v422</artifactId>
<version>87d862d69d</version>
<version>d41b84e86c</version>
<scope>compile</scope>
<exclusions>
<exclusion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,6 @@ public boolean handle(EntityEventPacket packet) {
return defaultHandler(packet);
}

@Override
public boolean handle(EntityFallPacket packet) {
return defaultHandler(packet);
}

@Override
public boolean handle(EntityPickRequestPacket packet) {
return defaultHandler(packet);
Expand Down Expand Up @@ -826,4 +821,43 @@ public boolean handle(PositionTrackingDBClientRequestPacket packet) {
public boolean handle(PositionTrackingDBServerBroadcastPacket packet) {
return defaultHandler(packet);
}

// 1.16.100 new packets

@Override
public boolean handle(MotionPredictionHintsPacket packet) {
return defaultHandler(packet);
}

@Override
public boolean handle(AnimateEntityPacket packet) {
return defaultHandler(packet);
}

@Override
public boolean handle(CameraShakePacket packet) {
return defaultHandler(packet);
}

@Override
public boolean handle(PlayerFogPacket packet) {
return defaultHandler(packet);
}

@Override
public boolean handle(CorrectPlayerMovePredictionPacket packet) {
return defaultHandler(packet);
}

@Override
public boolean handle(ItemComponentPacket packet) {
return defaultHandler(packet);
}

// 1.16.200 new packet

@Override
public boolean handle(FilterTextPacket packet) {
return defaultHandler(packet);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*/

package org.geysermc.connector.network.translators.bedrock;

import com.nukkitx.protocol.bedrock.packet.FilterTextPacket;
import org.geysermc.connector.network.session.GeyserSession;
import org.geysermc.connector.network.translators.PacketTranslator;
import org.geysermc.connector.network.translators.Translator;

/**
* Used to send strings to the server and filter out unwanted words.
* Java doesn't care, so we don't care, and we approve all strings.
*/
@Translator(packet = FilterTextPacket.class)
public class BedrockFilterTextTranslator extends PacketTranslator<FilterTextPacket> {

@Override
public void translate(FilterTextPacket packet, GeyserSession session) {
packet.setFromServer(true);
session.sendUpstreamPacket(packet);
}
}

0 comments on commit d1c571d

Please sign in to comment.