Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-19 22:40:18 +01:00
Apply some suggestions from Camotoy
Dieser Commit ist enthalten in:
Ursprung
86c822631c
Commit
a577512dac
@ -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);
|
||||
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 |
@ -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
|
||||
|
Vorher Breite: | Höhe: | Größe: 113 KiB Nachher Breite: | Höhe: | Größe: 113 KiB |
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren