Permalink
Browse files

a little multiworld-testme

plus some list parameter additions
  • Loading branch information...
1 parent 537cf9f commit 8a7abf6d0e27ecf0b6e97536d1d6b4e2cf87dc9b @damagefilter damagefilter committed Jun 8, 2012
Showing with 78 additions and 69 deletions.
  1. +15 −10 src/OMinecraftServer.java
  2. +4 −1 src/ONetServerHandler.java
  3. +57 −57 src/OWorld.java
  4. +2 −1 src/World.java
View
@@ -13,11 +13,13 @@
import java.util.logging.Level;
import java.util.logging.Logger;
-
+/*
+ * CANARYMOD OLD SERVER
+ */
public class OMinecraftServer implements Runnable, OICommandListener, OIServer {
public static Logger a = Logger.getLogger("Minecraft");
- public static HashMap b = new HashMap();
+ public static HashMap<String, Integer> b = new HashMap<String, Integer>();
private String y;
private int z;
public ONetworkListenThread c;
@@ -32,8 +34,8 @@
int j = 0;
public String k;
public int l;
- private List C = new ArrayList();
- private List D = Collections.synchronizedList(new ArrayList());
+ private List<OIUpdatePlayerListBox> C = new ArrayList<OIUpdatePlayerListBox>();
+ private List<OServerCommand> D = Collections.synchronizedList(new ArrayList<OServerCommand>());
// public OEntityTracker[] m = new OEntityTracker[3];
public boolean n;
public boolean o;
@@ -164,6 +166,9 @@ protected void loadWorld(String name, long seed, World.Type worldType) {
this.a(new OAnvilSaveConverter(new File(".")), name, seed, worldType.getNative());
}
+
+
+
private void a(OISaveFormat var1, String var2, long var3, OEnumWorldType var5) {
if (var1.a(var2)) {
a.info("Converting map!");
@@ -447,12 +452,12 @@ public void run() {
private void w() {
long var1 = System.nanoTime();
- ArrayList var3 = new ArrayList();
- Iterator var4 = b.keySet().iterator();
+ ArrayList<String> var3 = new ArrayList<String>();
+ Iterator<String> var4 = b.keySet().iterator();
while (var4.hasNext()) {
- String var5 = (String) var4.next();
- int var6 = ((Integer) b.get(var5)).intValue();
+ String var5 = var4.next();
+ int var6 = b.get(var5).intValue();
if (var6 > 0) {
b.put(var5, Integer.valueOf(var6 - 1));
@@ -518,7 +523,7 @@ private void w() {
}
for (var11 = 0; var11 < this.C.size(); ++var11) {
- ((OIUpdatePlayerListBox) this.C.get(var11)).a();
+ this.C.get(var11).a();
}
try {
@@ -544,7 +549,7 @@ public void a(String var1, OICommandListener var2) {
public void b() {
while (this.D.size() > 0) {
- OServerCommand var1 = (OServerCommand) this.D.remove(0);
+ OServerCommand var1 = this.D.remove(0);
this.A.a(var1);
}
@@ -266,7 +266,10 @@ public void a(OPacket10Flying var1) {
this.e.b(var7, var9, var11, var17, var18);
boolean var30 = var2.a(this.e, this.e.bw.b().e((double) var25, (double) var25, (double) var25)).size() == 0;
-
+ System.out.println("var26: "+var26);
+ System.out.println("var29: "+var29);
+ System.out.println("!var30: "+!var30);
+ System.out.println("is not sleeping: "+!this.e.Z());
if (var26 && (var29 || !var30) && !this.e.Z()) {
this.a(this.o, this.p, this.q, var17, var18);
return;
Oops, something went wrong.

0 comments on commit 8a7abf6

Please sign in to comment.