Refactored AEConfig (#2633)
Added a singleton getter instead the public field. Reduced all fields to private. Replaced field access with getters. Added setters where necessary (Dimension/Biome Registration) Added config options to disable more features. Splitted Enum name from the config key. Changed FacadeConfig and Networkhandler similar to AEConfig.init().
This commit is contained in:
@@ -313,7 +313,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
for( final Slot dr : this.drag_click )
|
||||
{
|
||||
final PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SET_DOWN : InventoryAction.PLACE_SINGLE, dr.slotNumber, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
NetworkHandler.instance().sendToServer( p );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -339,7 +339,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
|
||||
final PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
NetworkHandler.instance().sendToServer( p );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -353,7 +353,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( ( (SlotPatternTerm) slot ).getRequest( isShiftKeyDown() ) );
|
||||
NetworkHandler.instance().sendToServer( ( (SlotPatternTerm) slot ).getRequest( isShiftKeyDown() ) );
|
||||
}
|
||||
catch( final IOException e )
|
||||
{
|
||||
@@ -379,7 +379,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
|
||||
final PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
NetworkHandler.instance().sendToServer( p );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -403,7 +403,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
( (AEBaseContainer) this.inventorySlots ).setTargetStack( stack );
|
||||
final PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
NetworkHandler.instance().sendToServer( p );
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -437,7 +437,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
if( action != null )
|
||||
{
|
||||
final PacketInventoryAction p = new PacketInventoryAction( action, slot.getSlotIndex(), ( (SlotDisconnected) slot ).getSlot().getId() );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
NetworkHandler.instance().sendToServer( p );
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -490,7 +490,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
( (AEBaseContainer) this.inventorySlots ).setTargetStack( stack );
|
||||
final PacketInventoryAction p = new PacketInventoryAction( action, this.getInventorySlots().size(), 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
NetworkHandler.instance().sendToServer( p );
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -579,7 +579,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
if( s.getSlotIndex() == j && s.inventory == ( (AEBaseContainer) this.inventorySlots ).getPlayerInv() )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwapSlots( s.slotNumber, theSlot.slotNumber ) );
|
||||
NetworkHandler.instance().sendToServer( new PacketSwapSlots( s.slotNumber, theSlot.slotNumber ) );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -648,7 +648,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
for( int h = 0; h < times; h++ )
|
||||
{
|
||||
final PacketInventoryAction p = new PacketInventoryAction( direction, inventorySize, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
NetworkHandler.instance().sendToServer( p );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user