Add block break sounds for blocks with 0 hardness, and refactor some things

The refactors in this commit go a bit beyond the scope of what the sound/effects branch was meant to accomplish, however most of these changes are necessary so chunk caching could be reintroduced for the standalone version. The chunk caching here allows for us to get the block ID before the block was broken, and in the future allow us to implement newer features. Chunk caching is optional (and disabled by default) as on non-Bukkit versions, it can eat up a lot of RAM with many players online.
This commit is contained in:
RednedEpic 2020-04-29 15:01:53 -05:00
parent efcf739973
commit 31be608038
74 changed files with 873 additions and 598 deletions

View file

@ -30,7 +30,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import org.geysermc.common.IGeyserConfiguration;
import org.geysermc.connector.GeyserConfiguration;
import java.nio.file.Path;
import java.nio.file.Paths;
@ -38,7 +38,7 @@ import java.util.Map;
@JsonIgnoreProperties(ignoreUnknown = true)
@Getter
public class GeyserVelocityConfiguration implements IGeyserConfiguration {
public class GeyserVelocityConfiguration implements GeyserConfiguration {
private BedrockConfiguration bedrock;
private RemoteConfiguration remote;
@ -66,6 +66,9 @@ public class GeyserVelocityConfiguration implements IGeyserConfiguration {
@JsonProperty("default-locale")
private String defaultLocale;
@JsonProperty("cache-chunks")
private boolean cacheChunks;
private MetricsInfo metrics;
@Override

View file

@ -27,11 +27,11 @@ package org.geysermc.platform.velocity;
import lombok.AllArgsConstructor;
import org.geysermc.common.logger.IGeyserLogger;
import org.geysermc.connector.GeyserLogger;
import org.slf4j.Logger;
@AllArgsConstructor
public class GeyserVelocityLogger implements IGeyserLogger {
public class GeyserVelocityLogger implements GeyserLogger {
private Logger logger;
private boolean debugMode;

View file

@ -34,8 +34,8 @@ import com.velocitypowered.api.event.proxy.ProxyShutdownEvent;
import com.velocitypowered.api.plugin.Plugin;
import org.geysermc.common.PlatformType;
import org.geysermc.common.bootstrap.IGeyserBootstrap;
import org.geysermc.connector.GeyserConnector;
import org.geysermc.connector.bootstrap.GeyserBootstrap;
import org.geysermc.connector.utils.FileUtils;
import org.geysermc.platform.velocity.command.GeyserVelocityCommandExecutor;
import org.geysermc.platform.velocity.command.GeyserVelocityCommandManager;
@ -46,7 +46,7 @@ import java.io.IOException;
import java.util.UUID;
@Plugin(id = "geyser", name = GeyserConnector.NAME + "-Velocity", version = GeyserConnector.VERSION, url = "https://geysermc.org", authors = "GeyserMC")
public class GeyserVelocityPlugin implements IGeyserBootstrap {
public class GeyserVelocityPlugin implements GeyserBootstrap {
@Inject
private Logger logger;