mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-28 03:19:14 +00:00
feat(network): 适配客户端模组的变动
This commit is contained in:
@@ -324,6 +324,7 @@ public abstract class AbstractBlockManager extends AbstractModelGenerator implem
|
||||
// 结合variants
|
||||
JsonElement combinedVariant = GsonHelper.combine(variants);
|
||||
Map<String, JsonElement> overrideMap = AbstractBlockManager.this.blockStateOverrides.computeIfAbsent(blockId, k -> new HashMap<>());
|
||||
AbstractBlockManager.this.tempVanillaBlockStateModels.put(registryId, combinedVariant);
|
||||
JsonElement previous = overrideMap.get(propertyNBT);
|
||||
if (previous != null && !previous.equals(combinedVariant)) {
|
||||
throw new LocalizedResourceConfigException("warning.config.block.state.model.conflict", GsonHelper.get().toJson(combinedVariant), blockState, GsonHelper.get().toJson(previous));
|
||||
|
||||
@@ -4,6 +4,7 @@ import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelHandler;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.momirealms.craftengine.core.plugin.Plugin;
|
||||
import net.momirealms.craftengine.core.util.IntIdentityList;
|
||||
import net.momirealms.craftengine.core.util.Key;
|
||||
import net.momirealms.craftengine.core.world.ChunkPos;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@@ -83,4 +84,8 @@ public interface NetWorkUser {
|
||||
void setChunkTrackStatus(ChunkPos chunkPos, boolean tracked);
|
||||
|
||||
void clearTrackedChunks();
|
||||
|
||||
void setClientBlockList(IntIdentityList blockList);
|
||||
|
||||
IntIdentityList clientBlockList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user