mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Apply some suggestions from Camotoy
This commit is contained in:
parent
86c822631c
commit
a577512dac
8 changed files with 11 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 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
|
||||
|
|
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 113 KiB |
Loading…
Reference in a new issue