mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 03:22:19 +01:00
Fix for entity spawning and some code cleanup
By: Tahg <tahgtahv@gmail.com>
This commit is contained in:
parent
a84f36b67f
commit
ae5c797119
2 changed files with 5 additions and 6 deletions
|
@ -7,7 +7,7 @@ import java.util.ArrayList;
|
|||
|
||||
import static org.bukkit.craftbukkit.util.Java15Compat.Arrays_copyOf;
|
||||
|
||||
public abstract class LongAbstractHashtable extends LongHash {
|
||||
public class LongBaseHashtable extends LongHash {
|
||||
|
||||
EntryBase[][][] values = new EntryBase[256][][];
|
||||
EntryBase cache = null;
|
|
@ -1,11 +1,10 @@
|
|||
package org.bukkit.craftbukkit.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import net.minecraft.server.Chunk;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
import static org.bukkit.craftbukkit.util.Java15Compat.Arrays_copyOf;
|
||||
|
||||
public class LongHashtable<V> extends LongAbstractHashtable {
|
||||
public class LongHashtable<V> extends LongBaseHashtable {
|
||||
|
||||
public void put(int msw, int lsw, V value) {
|
||||
put(toLong(msw, lsw), value);
|
||||
|
@ -20,7 +19,7 @@ public class LongHashtable<V> extends LongAbstractHashtable {
|
|||
}
|
||||
|
||||
public synchronized V get(long key) {
|
||||
Entry entry = ((Entry)getEntry(key));
|
||||
Entry entry = ((Entry) getEntry(key));
|
||||
return entry != null ? entry.value : null;
|
||||
}
|
||||
|
||||
|
@ -30,7 +29,7 @@ public class LongHashtable<V> extends LongAbstractHashtable {
|
|||
ArrayList<EntryBase> entries = entries();
|
||||
|
||||
for(EntryBase entry : entries) {
|
||||
ret.add(((Entry)entry).value);
|
||||
ret.add(((Entry) entry).value);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue