3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-20 15:00:11 +01:00

revert bad changes

Dieser Commit ist enthalten in:
onebeastchris 2024-08-20 23:45:06 +02:00
Ursprung 1867c6dc6a
Commit 139976a8e8
4 geänderte Dateien mit 8 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -168,7 +168,7 @@ public class BlockInventoryHolder extends InventoryHolder {
return;
}
} else {
GeyserImpl.getInstance().getLogger().warning("Tried to close a non-container inventory in a block inventory optionHolder! ");
GeyserImpl.getInstance().getLogger().warning("Tried to close a non-container inventory in a block inventory holder! ");
if (GeyserImpl.getInstance().getLogger().isDebug()) {
GeyserImpl.getInstance().getLogger().debug("Current inventory: " + inventory);
GeyserImpl.getInstance().getLogger().debug("Open inventory: " + session.getOpenInventory());

Datei anzeigen

@ -25,8 +25,6 @@
package org.geysermc.geyser.item.enchantment;
import java.util.List;
import java.util.function.Function;
import net.kyori.adventure.key.Key;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.cloudburstmc.nbt.NbtMap;
@ -35,11 +33,13 @@ import org.geysermc.geyser.item.Items;
import org.geysermc.geyser.registry.Registries;
import org.geysermc.geyser.session.cache.registry.RegistryEntryContext;
import org.geysermc.geyser.translator.text.MessageTranslator;
import org.geysermc.mcprotocollib.protocol.data.game.item.component.HolderSet;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.geysermc.mcprotocollib.protocol.data.game.item.component.HolderSet;
import java.util.function.Function;
/**
* @param description only populated if {@link #bedrockEnchantment()} is not null.
@ -85,7 +85,7 @@ public record Enchantment(String identifier,
return Set.copyOf(components); // Also ensures any empty sets are consolidated
}
// TODO optionHolder set util?
// TODO holder set util?
private static HolderSet readHolderSet(@Nullable Object holderSet, Function<Key, Integer> keyIdMapping) {
if (holderSet == null) {
return new HolderSet(new int[]{});

Datei anzeigen

@ -65,7 +65,7 @@ public abstract class AbstractBlockInventoryTranslator extends BaseInventoryTran
/**
* @param size the amount of slots that the inventory adds alongside the base inventory slots
* @param holder the custom block optionHolder
* @param holder the custom block holder
* @param updater updater
*/
public AbstractBlockInventoryTranslator(int size, InventoryHolder holder, InventoryUpdater updater) {

Datei anzeigen

@ -131,10 +131,9 @@ public class WebUtils {
throw new IllegalArgumentException(String.format("Invalid content length received from remote pack at URL: %s (size: %d)", url, size));
}
// This doesn't seem to be a requirement (anymore?). Logging to debug as it might be interesting though.
if (type == null || !type.equals("application/zip")) {
logger.warning(String.format("Application type received from remote pack at URL %s uses the content type: %s! This may result in packs not loading " +
"for Bedrock players.", url, type));
throw new IllegalArgumentException(String.format("Url %s tries to provide a resource pack using the %s content type, which is not supported by Bedrock edition! " +
"Bedrock Edition only supports the application/zip content type.", url, type));
}
Path packMetadata = REMOTE_PACK_CACHE.resolve(url.hashCode() + ".metadata");