Additional tuning

This commit is contained in:
Mike Primm 2021-12-07 00:24:05 -06:00
parent d42921beb5
commit 5e12090f95
4 changed files with 11 additions and 51 deletions

View File

@ -371,7 +371,7 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
* Unstep current position to previous position
*/
@Override
public BlockStep unstepPosition() {
public final BlockStep unstepPosition() {
BlockStep ls = laststep;
stepPosition(unstep[ls.ordinal()]);
return ls;
@ -381,7 +381,7 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
* Unstep current position in oppisite director of given step
*/
@Override
public void unstepPosition(BlockStep s) {
public final void unstepPosition(BlockStep s) {
stepPosition(unstep[s.ordinal()]);
}
@ -440,17 +440,17 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
}
@Override
public BlockStep getLastStep() {
public final BlockStep getLastStep() {
return laststep;
}
@Override
public int getWorldHeight() {
public final int getWorldHeight() {
return worldheight;
}
@Override
public long getBlockKey() {
public final long getBlockKey() {
return (((chunkindex * (worldheight - ymin)) + (y - ymin)) << 8) | (bx << 4) | bz;
}
@ -465,18 +465,18 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
}
@Override
public RenderPatchFactory getPatchFactory() {
public final RenderPatchFactory getPatchFactory() {
return HDBlockModels.getPatchDefinitionFactory();
}
@Override
public Object getBlockTileEntityField(String fieldId) {
public final Object getBlockTileEntityField(String fieldId) {
// TODO: handle tile entities here
return null;
}
@Override
public DynmapBlockState getBlockTypeAt(int xoff, int yoff, int zoff) {
public final DynmapBlockState getBlockTypeAt(int xoff, int yoff, int zoff) {
int xx = this.x + xoff;
int yy = this.y + yoff;
int zz = this.z + zoff;
@ -489,12 +489,12 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
}
@Override
public Object getBlockTileEntityFieldAt(String fieldId, int xoff, int yoff, int zoff) {
public final Object getBlockTileEntityFieldAt(String fieldId, int xoff, int yoff, int zoff) {
return null;
}
@Override
public long getInhabitedTicks() {
public final long getInhabitedTicks() {
try {
return snap.getInhabitedTicks();
} catch (Exception x) {
@ -503,7 +503,7 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
}
@Override
public DynmapBlockState getBlockType() {
public final DynmapBlockState getBlockType() {
if (blk == null) {
blk = snap.getBlockType(bx, y, bz);
}

View File

@ -5,23 +5,15 @@ import net.minecraft.server.world.ServerChunkManager;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.server.world.ThreadedAnvilChunkStorage;
import net.minecraft.util.math.ChunkPos;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.ChunkSerializer;
import net.minecraft.world.World;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.chunk.ChunkManager;
import net.minecraft.world.chunk.ChunkStatus;
import org.dynmap.DynmapChunk;
import org.dynmap.DynmapCore;
import org.dynmap.DynmapWorld;
import org.dynmap.Log;
import org.dynmap.common.BiomeMap;
import org.dynmap.common.chunk.GenericChunk;
import org.dynmap.common.chunk.GenericMapChunkCache;
import org.dynmap.hdmap.HDBlockModels;
import org.dynmap.utils.*;
import java.lang.reflect.Field;
import java.util.*;

View File

@ -2,7 +2,6 @@ package org.dynmap.forge_1_18;
import java.io.File;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.util.ArrayList;

View File

@ -1,48 +1,17 @@
package org.dynmap.forge_1_18;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.ListIterator;
import org.dynmap.DynmapChunk;
import org.dynmap.DynmapCore;
import org.dynmap.DynmapWorld;
import org.dynmap.Log;
import org.dynmap.common.BiomeMap;
import org.dynmap.common.chunk.GenericChunk;
import org.dynmap.common.chunk.GenericChunkCache;
import org.dynmap.common.chunk.GenericChunkSection;
import org.dynmap.common.chunk.GenericMapChunkCache;
import org.dynmap.hdmap.HDBlockModels;
import org.dynmap.renderer.DynmapBlockState;
import org.dynmap.renderer.RenderPatchFactory;
import org.dynmap.utils.DynIntHashMap;
import org.dynmap.utils.MapChunkCache;
import org.dynmap.utils.MapIterator;
import org.dynmap.utils.BlockStep;
import org.dynmap.utils.DataBitsPacked;
import org.dynmap.utils.VisibilityLimit;
import net.minecraft.util.BitStorage;
import net.minecraft.util.SimpleBitStorage;
import net.minecraft.nbt.ByteArrayTag;
import net.minecraft.nbt.ByteTag;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.DoubleTag;
import net.minecraft.nbt.FloatTag;
import net.minecraft.nbt.IntArrayTag;
import net.minecraft.nbt.IntTag;
import net.minecraft.nbt.ListTag;
import net.minecraft.nbt.LongTag;
import net.minecraft.nbt.ShortTag;
import net.minecraft.nbt.StringTag;
import net.minecraft.nbt.Tag;
import net.minecraft.server.level.ServerChunkCache;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.chunk.ChunkAccess;
import net.minecraft.world.level.chunk.ChunkStatus;
import net.minecraft.world.level.chunk.storage.ChunkSerializer;