mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2026-01-03 06:12:24 +00:00
新的全球化标准
This commit is contained in:
@@ -241,7 +241,7 @@ public abstract class AbstractFurnitureManager implements FurnitureManager {
|
||||
elements.toArray(new FurnitureElementConfig[0]),
|
||||
hitboxes.toArray(new FurnitureHitBoxConfig[0]),
|
||||
externalModel,
|
||||
optionalLootSpawnOffset
|
||||
optionalLootSpawnOffset.orElse(new Vector3f(0, 0.5f,0))
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ public record FurnitureVariant(String name,
|
||||
FurnitureElementConfig<?>[] elementConfigs,
|
||||
FurnitureHitBoxConfig<?>[] hitBoxConfigs,
|
||||
Optional<ExternalModel> externalModel,
|
||||
Optional<Vector3f> dropOffset) {
|
||||
Vector3f dropOffset) {
|
||||
}
|
||||
@@ -503,6 +503,7 @@ public abstract class AbstractPackManager implements PackManager {
|
||||
plugin.saveResource("resources/default/configuration/furniture/bench.yml");
|
||||
plugin.saveResource("resources/default/configuration/furniture/wooden_chair.yml");
|
||||
plugin.saveResource("resources/default/configuration/furniture/flower_basket.yml");
|
||||
plugin.saveResource("resources/default/configuration/furniture/globe.yml");
|
||||
plugin.saveResource("resources/default/configuration/blocks/chessboard_block.yml");
|
||||
plugin.saveResource("resources/default/configuration/blocks/chinese_lantern.yml");
|
||||
plugin.saveResource("resources/default/configuration/blocks/copper_coil.yml");
|
||||
@@ -625,6 +626,9 @@ public abstract class AbstractPackManager implements PackManager {
|
||||
plugin.saveResource("resources/default/resourcepack/assets/minecraft/models/item/custom/flower_basket_ceiling.json");
|
||||
plugin.saveResource("resources/default/resourcepack/assets/minecraft/models/item/custom/flower_basket_ground.json");
|
||||
plugin.saveResource("resources/default/resourcepack/assets/minecraft/models/item/custom/flower_basket_wall.json");
|
||||
plugin.saveResource("resources/default/resourcepack/assets/minecraft/models/item/custom/globe.json");
|
||||
plugin.saveResource("resources/default/resourcepack/assets/minecraft/models/item/custom/globe_base.json");
|
||||
plugin.saveResource("resources/default/resourcepack/assets/minecraft/models/item/custom/globe_earth.json");
|
||||
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/flower_basket.png");
|
||||
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/flower_basket_2d.png");
|
||||
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/gui/sprites/tooltip/topaz_background.png");
|
||||
@@ -636,6 +640,7 @@ public abstract class AbstractPackManager implements PackManager {
|
||||
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/block/custom/hami_melon_top.png");
|
||||
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/hami_melon_slice.png");
|
||||
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/hami_melon_seeds.png");
|
||||
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/globe.png");
|
||||
plugin.saveResource("resources/default/resourcepack/assets/minecraft/models/block/custom/fence_side.json");
|
||||
plugin.saveResource("resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_0.json");
|
||||
plugin.saveResource("resources/default/resourcepack/assets/minecraft/models/block/custom/magma_plant_stage_1.json");
|
||||
@@ -663,7 +668,9 @@ public abstract class AbstractPackManager implements PackManager {
|
||||
AbstractPackManager.this.cachedConfigFiles.put(path, cachedFile);
|
||||
} else {
|
||||
try (InputStreamReader inputStream = new InputStreamReader(Files.newInputStream(path), StandardCharsets.UTF_8)) {
|
||||
Yaml yaml = new Yaml(new StringKeyConstructor(path, new LoaderOptions()));
|
||||
LoaderOptions loaderOptions = new LoaderOptions();
|
||||
loaderOptions.setNestingDepthLimit(256);
|
||||
Yaml yaml = new Yaml(new StringKeyConstructor(path, loaderOptions));
|
||||
Map<String, Object> data = yaml.load(inputStream);
|
||||
if (data == null) return FileVisitResult.CONTINUE;
|
||||
cachedFile = new CachedConfigFile(data, pack, lastModifiedTime, size);
|
||||
|
||||
@@ -75,8 +75,6 @@ public final class BuiltInRegistries {
|
||||
public static final Registry<ItemProcessorType<? extends ItemProcessor>> ITEM_PROCESSOR_TYPE = createConstantBoundRegistry(Registries.ITEM_PROCESSOR_TYPE, 64);
|
||||
public static final Registry<ItemBehaviorType<? extends ItemBehavior>> ITEM_BEHAVIOR_TYPE = createConstantBoundRegistry(Registries.ITEM_BEHAVIOR_TYPE, 64);
|
||||
public static final Registry<PropertyType<? extends Comparable<?>>> PROPERTY_TYPE = createConstantBoundRegistry(Registries.PROPERTY_TYPE, 16);
|
||||
public static final Registry<LootFunctionType<?>> LOOT_FUNCTION_TYPE = createConstantBoundRegistry(Registries.LOOT_FUNCTION_TYPE, 32);
|
||||
public static final Registry<LootEntryContainerType<?>> LOOT_ENTRY_CONTAINER_TYPE = createConstantBoundRegistry(Registries.LOOT_ENTRY_CONTAINER_TYPE, 16);
|
||||
public static final Registry<NumberProviderType<? extends NumberProvider>> NUMBER_PROVIDER_TYPE = createConstantBoundRegistry(Registries.NUMBER_PROVIDER_TYPE, 16);
|
||||
public static final Registry<TemplateArgumentType<? extends TemplateArgument>> TEMPLATE_ARGUMENT_TYPE = createConstantBoundRegistry(Registries.TEMPLATE_ARGUMENT_TYPE, 16);
|
||||
public static final Registry<ItemModelType<? extends ItemModel>> ITEM_MODEL_TYPE = createConstantBoundRegistry(Registries.ITEM_MODEL_TYPE, 16);
|
||||
@@ -93,7 +91,6 @@ public final class BuiltInRegistries {
|
||||
public static final Registry<ResourcePackHostType<? extends ResourcePackHost>> RESOURCE_PACK_HOST_TYPE = createConstantBoundRegistry(Registries.RESOURCE_PACK_HOST_TYPE, 16);
|
||||
public static final Registry<CommonFunctionType<? extends Function<Context>>> COMMON_FUNCTION_TYPE = createConstantBoundRegistry(Registries.COMMON_FUNCTION_TYPE, 128);
|
||||
public static final Registry<CommonConditionType<? extends Condition<Context>>> COMMON_CONDITION_TYPE = createConstantBoundRegistry(Registries.COMMON_CONDITION_TYPE, 128);
|
||||
public static final Registry<PlayerSelectorType<? extends Context>> PLAYER_SELECTOR_TYPE = createConstantBoundRegistry(Registries.PLAYER_SELECTOR_TYPE, 16);
|
||||
public static final Registry<EquipmentType<? extends Equipment>> EQUIPMENT_TYPE = createConstantBoundRegistry(Registries.EQUIPMENT_TYPE, 8);
|
||||
public static final Registry<SlotDisplay.Type<?>> SLOT_DISPLAY_TYPE = createConstantBoundRegistry(Registries.SLOT_DISPLAY_TYPE, 16);
|
||||
public static final Registry<RecipeDisplay.Type<?>> RECIPE_DISPLAY_TYPE = createConstantBoundRegistry(Registries.RECIPE_DISPLAY_TYPE, 16);
|
||||
@@ -107,6 +104,10 @@ public final class BuiltInRegistries {
|
||||
public static final Registry<FurnitureElementConfigType<? extends FurnitureElement>> FURNITURE_ELEMENT_TYPE = createConstantBoundRegistry(Registries.FURNITURE_ELEMENT_TYPE, 16);
|
||||
public static final Registry<FurnitureHitboxConfigType<? extends FurnitureHitBox>> FURNITURE_HITBOX_TYPE = createConstantBoundRegistry(Registries.FURNITURE_HITBOX_TYPE, 16);
|
||||
public static final Registry<FurnitureBehaviorType<? extends FurnitureBehavior>> FURNITURE_BEHAVIOR_TYPE = createConstantBoundRegistry(Registries.FURNITURE_BEHAVIOR_TYPE, 32);
|
||||
// todo 修改
|
||||
public static final Registry<PlayerSelectorType<? extends Context>> PLAYER_SELECTOR_TYPE = createConstantBoundRegistry(Registries.PLAYER_SELECTOR_TYPE, 16);
|
||||
public static final Registry<LootFunctionType<?>> LOOT_FUNCTION_TYPE = createConstantBoundRegistry(Registries.LOOT_FUNCTION_TYPE, 32);
|
||||
public static final Registry<LootEntryContainerType<?>> LOOT_ENTRY_CONTAINER_TYPE = createConstantBoundRegistry(Registries.LOOT_ENTRY_CONTAINER_TYPE, 16);
|
||||
|
||||
private BuiltInRegistries() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user