mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Java 7 and 8 cleanup
Diamond operator <> Lambdas and method references
This commit is contained in:
1 parent
3db03edbc9
commit
b72d6efab3
234 files changed
+1614
-2253
No files matched your search
@@ -31,26 +31,23 @@ public class PacketTileEntity implements IMessageHandler<TileEntityMessage, IMes
|
||||
return null;
|
||||
}
|
||||
|
||||
PacketHandler.handlePacket(new Runnable() {
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
TileEntity tileEntity = message.coord4D.getTileEntity(player.world);
|
||||
|
||||
if(CapabilityUtils.hasCapability(tileEntity, Capabilities.TILE_NETWORK_CAPABILITY, null))
|
||||
{
|
||||
ITileNetwork network = CapabilityUtils.getCapability(tileEntity, Capabilities.TILE_NETWORK_CAPABILITY, null);
|
||||
|
||||
try {
|
||||
network.handlePacketData(message.storedBuffer);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
message.storedBuffer.release();
|
||||
}
|
||||
}
|
||||
}, player);
|
||||
PacketHandler.handlePacket(() ->
|
||||
{
|
||||
TileEntity tileEntity = message.coord4D.getTileEntity(player.world);
|
||||
|
||||
if(CapabilityUtils.hasCapability(tileEntity, Capabilities.TILE_NETWORK_CAPABILITY, null))
|
||||
{
|
||||
ITileNetwork network = CapabilityUtils.getCapability(tileEntity, Capabilities.TILE_NETWORK_CAPABILITY, null);
|
||||
|
||||
try {
|
||||
network.handlePacketData(message.storedBuffer);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
message.storedBuffer.release();
|
||||
}
|
||||
}, player);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user