Don't draw power beams for derelict blocks
This commit is contained in:
@@ -144,7 +144,7 @@ public class ArcNetProvider implements NetProvider{
|
||||
|
||||
@Override
|
||||
public void received(Connection connection, Object object){
|
||||
if(!(connection.getArbitraryData() instanceof ArcConnection k) || !(object instanceof Packet pack)) return;
|
||||
if(!(connection.getArbitraryData() instanceof ArcConnection k)) return;
|
||||
|
||||
if(packetSpamLimit > 0 && !k.packetRate.allow(3000, packetSpamLimit)){
|
||||
Log.warn("Blacklisting IP '@' as potential DOS attack - packet spam.", k.address);
|
||||
@@ -153,6 +153,8 @@ public class ArcNetProvider implements NetProvider{
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(object instanceof Packet pack)) return;
|
||||
|
||||
Core.app.post(() -> {
|
||||
try{
|
||||
net.handleServerReceived(k, pack);
|
||||
|
||||
Reference in New Issue
Block a user