src: update 6 files
This commit is contained in:
@@ -21,10 +21,11 @@ import com.hypixel.hytale.server.core.universe.world.World;
|
||||
import com.hypixel.hytale.server.core.universe.world.chunk.BlockChunk;
|
||||
import com.hypixel.hytale.server.core.universe.world.chunk.WorldChunk;
|
||||
import com.hypixel.hytale.server.core.universe.world.storage.ChunkStore;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.time.Instant;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ChunkBlockTickSystem {
|
||||
protected static final HytaleLogger LOGGER = BlockTickPlugin.get().getLogger();
|
||||
|
||||
@@ -41,13 +41,14 @@ import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
|
||||
import it.unimi.dsi.fastutil.ints.IntIterator;
|
||||
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.function.Function;
|
||||
import java.util.logging.Level;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class FluidSystems {
|
||||
@Nonnull
|
||||
@@ -264,7 +265,7 @@ public class FluidSystems {
|
||||
int change = iter.nextInt();
|
||||
int fluid = fluidSectionComponent.getFluidId(change);
|
||||
byte level = fluidSectionComponent.getFluidLevel(change);
|
||||
cmds[i++] = new SetFluidCmd((short)change, fluid, level);
|
||||
cmds[i++] = new SetFluidCmd((short) change, fluid, level);
|
||||
}
|
||||
|
||||
ServerSetFluids packet = new ServerSetFluids(
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.hypixel.hytale.server.core.event.events.ecs;
|
||||
import com.hypixel.hytale.component.system.CancellableEcsEvent;
|
||||
import com.hypixel.hytale.math.vector.Vector3i;
|
||||
import com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,10 +59,11 @@ import com.hypixel.hytale.server.core.util.FillerBlockUtil;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectList;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectLists;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class BlockHarvestUtils {
|
||||
public BlockHarvestUtils() {
|
||||
@@ -254,7 +255,7 @@ public class BlockHarvestUtils {
|
||||
boolean canApplyItemStackPenalties = entity != null && entity.canApplyItemStackPenalties(ref, entityStore);
|
||||
if (specPower != 0.0F && heldItem != null && heldItem.getTool() != null && itemStack.isBroken() && canApplyItemStackPenalties) {
|
||||
BrokenPenalties brokenPenalties = gameplayConfig.getItemDurabilityConfig().getBrokenPenalties();
|
||||
specPower *= 1.0F - (float)brokenPenalties.getTool(0.0);
|
||||
specPower *= 1.0F - (float) brokenPenalties.getTool(0.0);
|
||||
}
|
||||
|
||||
int dropQuantity = 1;
|
||||
|
||||
@@ -39,13 +39,14 @@ import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
|
||||
import it.unimi.dsi.fastutil.ints.IntIterator;
|
||||
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.logging.Level;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ChunkSystems {
|
||||
private static final HytaleLogger LOGGER = HytaleLogger.forEnclosingClass();
|
||||
@@ -356,7 +357,7 @@ public class ChunkSystems {
|
||||
int blockId = blockSection.get(change);
|
||||
int filler = blockSection.getFiller(change);
|
||||
int rotation = blockSection.getRotationIndex(change);
|
||||
ServerSetBlock packet = new ServerSetBlock(x, y, z, blockId, (short)filler, (byte)rotation);
|
||||
ServerSetBlock packet = new ServerSetBlock(x, y, z, blockId, (short) filler, (byte) rotation);
|
||||
|
||||
for (PlayerRef player : players) {
|
||||
Ref<EntityStore> ref = player.getReference();
|
||||
@@ -377,7 +378,7 @@ public class ChunkSystems {
|
||||
int blockId = blockSection.get(change);
|
||||
int filler = blockSection.getFiller(change);
|
||||
int rotation = blockSection.getRotationIndex(change);
|
||||
cmds[i++] = new SetBlockCmd((short)change, blockId, (short)filler, (byte)rotation);
|
||||
cmds[i++] = new SetBlockCmd((short) change, blockId, (short) filler, (byte) rotation);
|
||||
}
|
||||
|
||||
ServerSetBlocks packet = new ServerSetBlocks(section.getX(), section.getY(), section.getZ(), cmds);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.hypixel.hytale.server.core.universe.world.storage.provider;
|
||||
|
||||
import com.hypixel.fastutil.longs.Long2ObjectConcurrentHashMap;
|
||||
import com.hypixel.hytale.logger.HytaleLogger;
|
||||
import com.hypixel.hytale.codec.Codec;
|
||||
import com.hypixel.hytale.codec.KeyedCodec;
|
||||
import com.hypixel.hytale.codec.builder.BuilderCodec;
|
||||
@@ -11,6 +10,7 @@ import com.hypixel.hytale.component.ResourceType;
|
||||
import com.hypixel.hytale.component.Store;
|
||||
import com.hypixel.hytale.component.SystemGroup;
|
||||
import com.hypixel.hytale.component.system.StoreSystem;
|
||||
import com.hypixel.hytale.logger.HytaleLogger;
|
||||
import com.hypixel.hytale.math.util.ChunkUtil;
|
||||
import com.hypixel.hytale.metrics.MetricProvider;
|
||||
import com.hypixel.hytale.metrics.MetricResults;
|
||||
@@ -129,9 +129,13 @@ public class IndexedStorageChunkStorageProvider implements IChunkStorageProvider
|
||||
|
||||
private static final HytaleLogger LOGGER = HytaleLogger.forEnclosingClass();
|
||||
|
||||
/** How long a region file can be idle before being closed (in milliseconds) */
|
||||
/**
|
||||
* How long a region file can be idle before being closed (in milliseconds)
|
||||
*/
|
||||
private static final long IDLE_TIMEOUT_MS = TimeUnit.MINUTES.toMillis(5);
|
||||
/** How often to check for idle region files (in milliseconds) */
|
||||
/**
|
||||
* How often to check for idle region files (in milliseconds)
|
||||
*/
|
||||
private static final long CLEANUP_INTERVAL_MS = TimeUnit.MINUTES.toMillis(1);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user