forked from SteamWar/SteamWar
Normalize block entity IDs and handle bundled packets
- Normalize hidden block entity identifiers across versions - Add block break and tile entity handling for newer protocol versions - Preserve packet filtering through bundle packets and fix chunk section copying
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
package de.steamwar.techhider;
|
||||
|
||||
import de.steamwar.Reflection;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.function.BiFunction;
|
||||
@@ -27,6 +28,7 @@ public class ProtocolWrapper19 extends ProtocolWrapper18 {
|
||||
|
||||
@Override
|
||||
public BiFunction<Player, Object, Object> blockBreakHiderGenerator(Class<?> blockBreakPacket, TechHider techHider) {
|
||||
return null;
|
||||
Reflection.Field<?> blockBreakPosition = Reflection.getField(blockBreakPacket, TechHider.blockPosition, 0);
|
||||
return (p, packet) -> techHider.getLocationEvaluator().checkBlockPos(p, blockBreakPosition.get(packet)) == TechHider.State.SKIP ? packet : null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user