Pools replace with Pooling / Removed all core reflection

This commit is contained in:
Anuken
2018-09-09 17:44:10 -04:00
parent 2cb6e454c8
commit 65f911909b
20 changed files with 29 additions and 37 deletions
@@ -129,7 +129,7 @@ public class RemoteWriteGenerator{
method.beginControlFlow("if(" + getCheckString(methodEntry.where) + ")");
//add statement to create packet from pool
method.addStatement("$1N packet = $2N.obtain($1N.class)", "io.anuke.mindustry.net.Packets.InvokePacket", "io.anuke.ucore.util.Pooling");
method.addStatement("$1N packet = $2N.obtain($1N.class, $1N::new)", "io.anuke.mindustry.net.Packets.InvokePacket", "io.anuke.ucore.util.Pooling");
//assign buffer
method.addStatement("packet.writeBuffer = TEMP_BUFFER");
//assign priority