Extensive network refactor

This commit is contained in:
Anuken
2019-09-07 14:11:50 -04:00
parent 38fe99f10e
commit e90c8c4d3e
48 changed files with 781 additions and 887 deletions

View File

@@ -123,7 +123,7 @@ public class DesktopInput extends InputHandler{
@Override
public void update(){
if(Net.active() && Core.input.keyTap(Binding.player_list)){
if(net.active() && Core.input.keyTap(Binding.player_list)){
ui.listfrag.toggle();
}

View File

@@ -49,7 +49,7 @@ public abstract class InputHandler implements InputProcessor{
@Remote(targets = Loc.client, called = Loc.server)
public static void dropItem(Player player, float angle){
if(Net.server() && player.item().amount <= 0){
if(net.server() && player.item().amount <= 0){
throw new ValidateException(player, "Player cannot drop an item.");
}
@@ -60,7 +60,7 @@ public abstract class InputHandler implements InputProcessor{
@Remote(targets = Loc.both, forward = true, called = Loc.server)
public static void transferInventory(Player player, Tile tile){
if(!player.timer.get(Player.timerTransfer, 40)) return;
if(Net.server() && (player.item().amount <= 0 || player.isTransferring)){
if(net.server() && (player.item().amount <= 0 || player.isTransferring)){
throw new ValidateException(player, "Player cannot transfer an item.");
}