diff --git a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/block/BukkitCustomBlock.java b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/block/BukkitCustomBlock.java index c70387f2e..ae91184a2 100644 --- a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/block/BukkitCustomBlock.java +++ b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/block/BukkitCustomBlock.java @@ -76,10 +76,10 @@ public final class BukkitCustomBlock extends AbstractCustomBlock { try { for (ImmutableBlockState immutableBlockState : variantProvider().states()) { if (immutableBlockState.vanillaBlockState() == null) { - CraftEngine.instance().logger().warn("Could not find vanilla block immutableBlockState for " + immutableBlockState + ". This might cause errors!"); + CraftEngine.instance().logger().warn("Could not find vanilla visual block state for " + immutableBlockState + ". This might cause errors!"); continue; } else if (immutableBlockState.customBlockState() == null) { - CraftEngine.instance().logger().warn("Could not find custom block immutableBlockState for " + immutableBlockState + ". This might cause errors!"); + CraftEngine.instance().logger().warn("Could not find real block state for " + immutableBlockState + ". This might cause errors!"); continue; } DelegatingBlockState nmsState = (DelegatingBlockState) immutableBlockState.customBlockState().literalObject(); diff --git a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/plugin/user/BukkitServerPlayer.java b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/plugin/user/BukkitServerPlayer.java index f4a4ed340..c08d6af2d 100644 --- a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/plugin/user/BukkitServerPlayer.java +++ b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/plugin/user/BukkitServerPlayer.java @@ -13,7 +13,6 @@ import net.momirealms.craftengine.bukkit.nms.FastNMS; import net.momirealms.craftengine.bukkit.plugin.BukkitCraftEngine; import net.momirealms.craftengine.bukkit.plugin.gui.CraftEngineGUIHolder; import net.momirealms.craftengine.bukkit.plugin.network.payload.DiscardedPayload; -import net.momirealms.craftengine.bukkit.plugin.reflection.bukkit.CraftBukkitReflections; import net.momirealms.craftengine.bukkit.plugin.reflection.minecraft.CoreReflections; import net.momirealms.craftengine.bukkit.plugin.reflection.minecraft.MAttributeHolders; import net.momirealms.craftengine.bukkit.plugin.reflection.minecraft.MMobEffects; diff --git a/common-files/src/main/resources/additional-real-blocks.yml b/common-files/src/main/resources/additional-real-blocks.yml index 8de88617e..2c6f2c87d 100644 --- a/common-files/src/main/resources/additional-real-blocks.yml +++ b/common-files/src/main/resources/additional-real-blocks.yml @@ -82,4 +82,6 @@ minecraft:bamboo_fence_gate: 16 minecraft:crimson_fence_gate: 16 minecraft:warped_fence_gate: 16 minecraft:barrier: 128 -minecraft:white_bed: 1 \ No newline at end of file +minecraft:white_bed: 1 +minecraft:redstone_torch: 1 +minecraft:redstone_wall_torch: 4 \ No newline at end of file diff --git a/common-files/src/main/resources/resources/default/configuration/blocks/amethyst_torch.yml b/common-files/src/main/resources/resources/default/configuration/blocks/amethyst_torch.yml new file mode 100644 index 000000000..b99aeadfe --- /dev/null +++ b/common-files/src/main/resources/resources/default/configuration/blocks/amethyst_torch.yml @@ -0,0 +1,143 @@ +items: + default:amethyst_torch: + material: nether_brick + custom-model-data: 3019 + data: + item-name: + model: + type: minecraft:model + path: minecraft:item/custom/amethyst_torch + generation: + parent: minecraft:item/generated + textures: + layer0: minecraft:block/custom/amethyst_torch + behavior: + - type: block_item + block: default:amethyst_wall_torch + - type: block_item + block: default:amethyst_torch + default:amethyst_standing_torch: + material: nether_brick + custom-model-data: 3020 + data: + item-name: + model: + type: minecraft:model + path: minecraft:block/custom/amethyst_torch + generation: + parent: minecraft:block/template_torch + textures: + torch: minecraft:block/custom/amethyst_torch + default:amethyst_wall_torch: + material: nether_brick + custom-model-data: 3021 + data: + item-name: + model: + type: minecraft:model + path: minecraft:block/custom/amethyst_wall_torch + generation: + parent: minecraft:block/template_torch_wall + textures: + torch: minecraft:block/custom/amethyst_torch +blocks: + default:amethyst_torch: + loot: + template: default:loot_table/basic + arguments: + item: default:amethyst_torch + settings: + template: + - default:sound/wood + - default:hardness/none + overrides: + push-reaction: destroy + replaceable: false + map-color: 24 + luminance: 15 + item: default:amethyst_torch + state: + id: 0 + state: redstone_torch[lit=false] + entity-renderer: + item: default:amethyst_standing_torch + scale: 1.01 + behavior: + type: sturdy_base_block + direction: down + support-types: + - center + default:amethyst_wall_torch: + loot: + template: default:loot_table/basic + arguments: + item: default:amethyst_torch + settings: + template: + - default:sound/wood + - default:hardness/none + overrides: + push-reaction: destroy + replaceable: false + map-color: 24 + luminance: 15 + item: default:amethyst_torch + behavior: + type: directional_attached_block + states: + properties: + facing: + type: horizontal_direction + appearances: + north: + state: redstone_wall_torch[facing=north,lit=false] + entity-renderer: + item: default:amethyst_wall_torch + scale: 1.04 + yaw: 90 + translation: -0.02,0.01,0 + east: + state: redstone_wall_torch[facing=east,lit=false] + entity-renderer: + item: default:amethyst_wall_torch + scale: 1.04 + yaw: 180 + translation: -0.02,0.01,0 + west: + state: redstone_wall_torch[facing=west,lit=false] + entity-renderer: + item: default:amethyst_wall_torch + scale: 1.04 + translation: -0.02,0.01,0 + south: + state: redstone_wall_torch[facing=south,lit=false] + entity-renderer: + item: default:amethyst_wall_torch + scale: 1.04 + yaw: -90 + translation: -0.02,0.01,0 + variants: + facing=north: + appearance: north + id: 0 + facing=east: + appearance: east + id: 1 + facing=west: + appearance: west + id: 2 + facing=south: + appearance: south + id: 3 +recipes: + default:amethyst_torch: + type: shaped + pattern: + - 'A' + - 'B' + ingredients: + A: minecraft:amethyst_shard + B: minecraft:stick + result: + id: default:amethyst_torch + count: 1 \ No newline at end of file diff --git a/common-files/src/main/resources/resources/default/configuration/categories.yml b/common-files/src/main/resources/resources/default/configuration/categories.yml index 7514c7909..55610a412 100644 --- a/common-files/src/main/resources/resources/default/configuration/categories.yml +++ b/common-files/src/main/resources/resources/default/configuration/categories.yml @@ -77,4 +77,5 @@ categories: - default:table_lamp - default:bench - default:wooden_chair - - default:flower_basket \ No newline at end of file + - default:flower_basket + - default:amethyst_torch \ No newline at end of file diff --git a/common-files/src/main/resources/resources/default/configuration/i18n.yml b/common-files/src/main/resources/resources/default/configuration/i18n.yml index 465a6f86e..fa91ebbb0 100644 --- a/common-files/src/main/resources/resources/default/configuration/i18n.yml +++ b/common-files/src/main/resources/resources/default/configuration/i18n.yml @@ -48,6 +48,7 @@ i18n: item.chessboard_block: Chessboard Block item.safe_block: Safe Block item.sofa: Sofa + item.amethyst_torch: Amethyst Torch category.default.name: Default Assets category.default.lore: Contains the default configuration of CraftEngine category.palm_tree: Palm Tree @@ -105,6 +106,7 @@ i18n: item.chessboard_block: 棋盘方块 item.safe_block: 保险柜 item.sofa: 沙发 + item.amethyst_torch: 紫水晶火把 category.default.name: 默认资产 category.default.lore: 包含了CraftEngine的默认配置 category.palm_tree: 棕榈树 @@ -145,6 +147,8 @@ lang: block_name:default:safe_block: Safe Block block_name:default:sleeper_sofa: Sofa block_name:default:sofa: Sofa + block_name:default:amethyst_torch: Amethyst Torch + block_name:default:amethyst_wall_torch: Amethyst Torch zh_cn: block_name:default:chinese_lantern: 灯笼 block_name:default:netherite_anvil: 下界合金砧 @@ -172,4 +176,6 @@ lang: block_name:default:chessboard_block: 棋盘方块 block_name:default:safe_block: 保险柜 block_name:default:sleeper_sofa: 沙发 - block_name:default:sofa: 沙发 \ No newline at end of file + block_name:default:sofa: 沙发 + block_name:default:amethyst_torch: 紫水晶火把 + block_name:default:amethyst_wall_torch: 紫水晶火把 \ No newline at end of file diff --git a/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/textures/block/custom/amethyst_torch.png b/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/textures/block/custom/amethyst_torch.png new file mode 100644 index 000000000..a190ec9d5 Binary files /dev/null and b/common-files/src/main/resources/resources/default/resourcepack/assets/minecraft/textures/block/custom/amethyst_torch.png differ diff --git a/core/src/main/java/net/momirealms/craftengine/core/pack/AbstractPackManager.java b/core/src/main/java/net/momirealms/craftengine/core/pack/AbstractPackManager.java index 45ab193d4..ed5885a33 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/pack/AbstractPackManager.java +++ b/core/src/main/java/net/momirealms/craftengine/core/pack/AbstractPackManager.java @@ -430,6 +430,7 @@ public abstract class AbstractPackManager implements PackManager { plugin.saveResource("resources/default/configuration/blocks/table_lamp.yml"); plugin.saveResource("resources/default/configuration/blocks/topaz_ore.yml"); plugin.saveResource("resources/default/configuration/blocks/netherite_anvil.yml"); + plugin.saveResource("resources/default/configuration/blocks/amethyst_torch.yml"); // assets plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/font/image/emojis.png"); plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/block/custom/chinese_lantern.png"); @@ -506,6 +507,7 @@ public abstract class AbstractPackManager implements PackManager { plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/block/custom/fairy_flower_3.png"); plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/block/custom/fairy_flower_4.png"); plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/block/custom/reed.png"); + plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/block/custom/amethyst_torch.png"); plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/block/custom/flame_cane_1.png"); plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/block/custom/flame_cane_2.png"); plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/block/custom/ender_pearl_flower_stage_0.png");