3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-26 00:00:41 +01:00

Apply some suggestions from Camotoy

Dieser Commit ist enthalten in:
davchoo 2022-07-10 18:42:38 -04:00
Ursprung 86c822631c
Commit a577512dac
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A0168C8E45799B7D
8 geänderte Dateien mit 11 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -31,6 +31,6 @@ import org.geysermc.geyser.api.event.Event;
public abstract class GeyserDefineCustomBlocksEvent implements Event {
public abstract boolean registerCustomBlock(@NonNull CustomBlockData customBlockData);
public abstract void registerCustomBlock(@NonNull CustomBlockData customBlockData);
}

Datei anzeigen

@ -39,6 +39,8 @@ public final class Constants {
static final String SAVED_REFRESH_TOKEN_FILE = "saved-refresh-tokens.json";
public static final String GEYSER_NAMESPACE = "geyser:";
static {
URI wsUri = null;
try {

Datei anzeigen

@ -32,6 +32,7 @@ import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Value;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.geysermc.geyser.Constants;
import org.geysermc.geyser.api.block.custom.CustomBlockData;
import org.geysermc.geyser.api.block.custom.CustomBlockPermutation;
import org.geysermc.geyser.api.block.custom.CustomBlockState;
@ -46,8 +47,6 @@ import java.util.Map;
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public class GeyserCustomBlockData implements CustomBlockData {
public static final String GEYSER_NAMESPACE = "geyser:";
String name;
CustomBlockComponents components;
Map<String, CustomBlockProperty<?>> properties;
@ -60,7 +59,7 @@ public class GeyserCustomBlockData implements CustomBlockData {
@Override
public @NonNull String identifier() {
return GEYSER_NAMESPACE + name;
return Constants.GEYSER_NAMESPACE + name;
}
@Override

Datei anzeigen

@ -169,6 +169,11 @@ public class SkullResourcePackManager {
}
zipOS.closeEntry();
}
ZipEntry entry = new ZipEntry("skull_resource_pack/pack_icon.png");
zipOS.putNextEntry(entry);
zipOS.write(FileUtils.readAllBytes("icon.png"));
zipOS.closeEntry();
}
}

Datei anzeigen

@ -94,9 +94,8 @@ public class BlockRegistryPopulator {
List<CustomBlockData> customBlocks = new ArrayList<>();
GeyserImpl.getInstance().getEventBus().fire(new GeyserDefineCustomBlocksEvent() {
@Override
public boolean registerCustomBlock(@NonNull CustomBlockData customBlockData) {
public void registerCustomBlock(@NonNull CustomBlockData customBlockData) {
customBlocks.add(customBlockData);
return true;
}
});

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 35 KiB

Datei anzeigen

@ -8,5 +8,4 @@ skull_resource_pack/models/blocks/player_skull_floor_d.geo.json
skull_resource_pack/models/blocks/player_skull_hand.geo.json
skull_resource_pack/models/blocks/player_skull_wall.geo.json
skull_resource_pack/textures/terrain_texture.json
skull_resource_pack/pack_icon.png
skull_resource_pack/manifest.json

Datei anzeigen

Vorher

Breite:  |  Höhe:  |  Größe: 113 KiB

Nachher

Breite:  |  Höhe:  |  Größe: 113 KiB