mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 12:59:41 +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
@@ -20,19 +20,16 @@ public class PacketPortalFX implements IMessageHandler<PortalFXMessage, IMessage
|
||||
{
|
||||
EntityPlayer player = PacketHandler.getPlayer(context);
|
||||
|
||||
PacketHandler.handlePacket(new Runnable() {
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
Random random = new Random();
|
||||
|
||||
for(int i = 0; i < 50; i++)
|
||||
{
|
||||
player.world.spawnParticle(EnumParticleTypes.PORTAL, message.coord4D.x + random.nextFloat(), message.coord4D.y + random.nextFloat(), message.coord4D.z + random.nextFloat(), 0.0F, 0.0F, 0.0F);
|
||||
player.world.spawnParticle(EnumParticleTypes.PORTAL, message.coord4D.x + random.nextFloat(), message.coord4D.y + 1 + random.nextFloat(), message.coord4D.z + random.nextFloat(), 0.0F, 0.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
}, player);
|
||||
PacketHandler.handlePacket(() ->
|
||||
{
|
||||
Random random = new Random();
|
||||
|
||||
for(int i = 0; i < 50; i++)
|
||||
{
|
||||
player.world.spawnParticle(EnumParticleTypes.PORTAL, message.coord4D.x + random.nextFloat(), message.coord4D.y + random.nextFloat(), message.coord4D.z + random.nextFloat(), 0.0F, 0.0F, 0.0F);
|
||||
player.world.spawnParticle(EnumParticleTypes.PORTAL, message.coord4D.x + random.nextFloat(), message.coord4D.y + 1 + random.nextFloat(), message.coord4D.z + random.nextFloat(), 0.0F, 0.0F, 0.0F);
|
||||
}
|
||||
}, player);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user