diff --git a/README.md b/README.md
index fefff6da4..941fceae5 100644
--- a/README.md
+++ b/README.md
@@ -6,11 +6,14 @@
-
-
-
-
+
+
+
+
+
+
+
diff --git a/bukkit/build.gradle.kts b/bukkit/build.gradle.kts
index 607fff3b3..0b9d4ae93 100644
--- a/bukkit/build.gradle.kts
+++ b/bukkit/build.gradle.kts
@@ -1,5 +1,5 @@
plugins {
- id("com.gradleup.shadow") version "9.0.0-beta11"
+ id("com.gradleup.shadow") version "9.0.0-beta13"
id("maven-publish")
}
@@ -95,6 +95,8 @@ tasks {
relocate("org.yaml.snakeyaml", "net.momirealms.craftengine.libraries.snakeyaml")
relocate("org.ahocorasick", "net.momirealms.craftengine.libraries.ahocorasick")
relocate("com.ezylang.evalex", "net.momirealms.craftengine.libraries.evalex")
+ relocate("com.google.common.jimfs", "net.momirealms.craftengine.libraries.jimfs")
+ relocate("org.apache.commons.imaging", "net.momirealms.craftengine.libraries.imaging")
}
}
diff --git a/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/BukkitCompatibilityManager.java b/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/BukkitCompatibilityManager.java
index 4de975ecd..c4888be8c 100644
--- a/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/BukkitCompatibilityManager.java
+++ b/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/BukkitCompatibilityManager.java
@@ -192,6 +192,11 @@ public class BukkitCompatibilityManager implements CompatibilityManager {
return PlaceholderAPIUtils.parse((org.bukkit.entity.Player) player.platformPlayer(), text);
}
+ @Override
+ public String parse(Player player1, Player player2, String text) {
+ return PlaceholderAPIUtils.parse((org.bukkit.entity.Player) player1.platformPlayer(), (org.bukkit.entity.Player) player2.platformPlayer(), text);
+ }
+
@Override
public int getPlayerProtocolVersion(UUID uuid) {
return ViaVersionUtils.getPlayerProtocolVersion(uuid);
diff --git a/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/bettermodel/BetterModelModel.java b/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/bettermodel/BetterModelModel.java
index aeec3c863..5dfa9c816 100644
--- a/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/bettermodel/BetterModelModel.java
+++ b/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/bettermodel/BetterModelModel.java
@@ -1,6 +1,6 @@
package net.momirealms.craftengine.bukkit.compatibility.bettermodel;
-import net.momirealms.craftengine.core.entity.Entity;
+import net.momirealms.craftengine.core.entity.AbstractEntity;
import net.momirealms.craftengine.core.entity.furniture.AbstractExternalModel;
public class BetterModelModel extends AbstractExternalModel {
@@ -15,7 +15,7 @@ public class BetterModelModel extends AbstractExternalModel {
}
@Override
- public void bindModel(Entity entity) {
+ public void bindModel(AbstractEntity entity) {
org.bukkit.entity.Entity bukkitEntity = (org.bukkit.entity.Entity) entity.literalObject();
BetterModelUtils.bindModel(bukkitEntity, id());
}
diff --git a/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/modelengine/ModelEngineModel.java b/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/modelengine/ModelEngineModel.java
index cba3b00ce..8ce03f0d6 100644
--- a/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/modelengine/ModelEngineModel.java
+++ b/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/modelengine/ModelEngineModel.java
@@ -1,6 +1,6 @@
package net.momirealms.craftengine.bukkit.compatibility.modelengine;
-import net.momirealms.craftengine.core.entity.Entity;
+import net.momirealms.craftengine.core.entity.AbstractEntity;
import net.momirealms.craftengine.core.entity.furniture.AbstractExternalModel;
public class ModelEngineModel extends AbstractExternalModel {
@@ -15,7 +15,7 @@ public class ModelEngineModel extends AbstractExternalModel {
}
@Override
- public void bindModel(Entity entity) {
+ public void bindModel(AbstractEntity entity) {
org.bukkit.entity.Entity bukkitEntity = (org.bukkit.entity.Entity) entity.literalObject();
ModelEngineUtils.bindModel(bukkitEntity, id());
}
diff --git a/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/papi/PlaceholderAPIUtils.java b/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/papi/PlaceholderAPIUtils.java
index 824236dda..e96cb46dc 100644
--- a/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/papi/PlaceholderAPIUtils.java
+++ b/bukkit/compatibility/src/main/java/net/momirealms/craftengine/bukkit/compatibility/papi/PlaceholderAPIUtils.java
@@ -3,6 +3,7 @@ package net.momirealms.craftengine.bukkit.compatibility.papi;
import me.clip.placeholderapi.PlaceholderAPI;
import net.momirealms.craftengine.core.plugin.CraftEngine;
import org.bukkit.OfflinePlayer;
+import org.bukkit.entity.Player;
public class PlaceholderAPIUtils {
@@ -12,6 +13,10 @@ public class PlaceholderAPIUtils {
return PlaceholderAPI.setPlaceholders(player, text);
}
+ public static String parse(Player player1, Player player2, String text) {
+ return PlaceholderAPI.setRelationalPlaceholders(player1, player2, text);
+ }
+
public static void registerExpansions(CraftEngine plugin) {
new ImageExpansion(plugin).register();
new ShiftExpansion(plugin).register();
diff --git a/bukkit/legacy/build.gradle.kts b/bukkit/legacy/build.gradle.kts
index ae80f6f46..da89d9df8 100644
--- a/bukkit/legacy/build.gradle.kts
+++ b/bukkit/legacy/build.gradle.kts
@@ -1,5 +1,5 @@
plugins {
- id("com.gradleup.shadow") version "9.0.0-beta11"
+ id("com.gradleup.shadow") version "9.0.0-beta13"
}
repositories {
diff --git a/bukkit/loader/build.gradle.kts b/bukkit/loader/build.gradle.kts
index dae694cd2..5085f47dc 100644
--- a/bukkit/loader/build.gradle.kts
+++ b/bukkit/loader/build.gradle.kts
@@ -1,6 +1,6 @@
plugins {
- id("com.gradleup.shadow") version "9.0.0-beta11"
- id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
+ id("com.gradleup.shadow") version "9.0.0-beta13"
+ id("de.eldoria.plugin-yml.bukkit") version "0.7.1"
}
repositories {
@@ -60,7 +60,7 @@ artifacts {
tasks {
shadowJar {
- archiveFileName = "${rootProject.name}-plugin-${rootProject.properties["project_version"]}.jar"
+ archiveFileName = "${rootProject.name}-bukkit-plugin-${rootProject.properties["project_version"]}.jar"
destinationDirectory.set(file("$rootDir/target"))
relocate("net.kyori", "net.momirealms.craftengine.libraries")
relocate("net.momirealms.sparrow.nbt", "net.momirealms.craftengine.libraries.nbt")
@@ -78,5 +78,7 @@ tasks {
relocate("net.jpountz", "net.momirealms.craftengine.libraries.jpountz")
relocate("software.amazon.awssdk", "net.momirealms.craftengine.libraries.awssdk")
relocate("software.amazon.eventstream", "net.momirealms.craftengine.libraries.eventstream")
+ relocate("com.google.common.jimfs", "net.momirealms.craftengine.libraries.jimfs")
+ relocate("org.apache.commons.imaging", "net.momirealms.craftengine.libraries.imaging")
}
}
diff --git a/bukkit/loader/src/main/resources/config.yml b/bukkit/loader/src/main/resources/config.yml
index 297be7fe4..e42bbb4be 100644
--- a/bukkit/loader/src/main/resources/config.yml
+++ b/bukkit/loader/src/main/resources/config.yml
@@ -65,6 +65,8 @@ resource-pack:
- CustomNameplates/ResourcePack
- BetterModel/build
- BetterHud/build
+ merge-external-zip-files:
+ - CraftEngine/external_packs/example.zip
delivery:
# Send the resource pack on joining the server
send-on-join: true
diff --git a/bukkit/loader/src/main/resources/craft-engine.properties b/bukkit/loader/src/main/resources/craft-engine.properties
index c94d83fa0..9e875e126 100644
--- a/bukkit/loader/src/main/resources/craft-engine.properties
+++ b/bukkit/loader/src/main/resources/craft-engine.properties
@@ -20,6 +20,7 @@ caffeine=${caffeine_version}
slf4j-api=${slf4j_version}
zstd-jni=${zstd_version}
commons-io=${commons_io_version}
+commons-imaging=${commons_imaging_version}
byte-buddy=${byte_buddy_version}
snake-yaml=${snake_yaml_version}
adventure-text-minimessage=${adventure_bundle_version}
@@ -33,4 +34,5 @@ netty-codec-http2=${netty_version}
reactive-streams=${reactive_streams_version}
amazon-sdk-s3=${amazon_awssdk_version}
amazon-sdk-eventstream=${amazon_awssdk_eventstream_version}
-evalex=${evalex_version}
\ No newline at end of file
+evalex=${evalex_version}
+jimfs=${jimfs_version}
\ No newline at end of file
diff --git a/bukkit/loader/src/main/resources/resources/default/configuration/categories.yml b/bukkit/loader/src/main/resources/resources/default/configuration/categories.yml
index 3c8d218d6..fd442e990 100644
--- a/bukkit/loader/src/main/resources/resources/default/configuration/categories.yml
+++ b/bukkit/loader/src/main/resources/resources/default/configuration/categories.yml
@@ -38,6 +38,7 @@ categories:
- default:topaz_bow
- default:topaz_crossbow
- default:topaz_rod
+ - default:topaz_trident
- default:topaz_helmet
- default:topaz_chestplate
- default:topaz_leggings
@@ -62,4 +63,6 @@ categories:
- default:flame_cane
- default:gunpowder_block
- default:solid_gunpowder_block
- - default:ender_pearl_flower_seeds
\ No newline at end of file
+ - default:ender_pearl_flower_seeds
+ - default:gui_head_size_1
+ - default:gui_head_size_4
\ No newline at end of file
diff --git a/bukkit/loader/src/main/resources/resources/default/configuration/fix_client_visual.yml b/bukkit/loader/src/main/resources/resources/default/configuration/fix_client_visual.yml
index 795eae21a..9e18aabaf 100644
--- a/bukkit/loader/src/main/resources/resources/default/configuration/fix_client_visual.yml
+++ b/bukkit/loader/src/main/resources/resources/default/configuration/fix_client_visual.yml
@@ -1,5 +1,5 @@
-# client-bound-data requires CraftEngine mod to apply
items:
+ # client-bound-data requires CraftEngine mod to apply
minecraft:string:
client-bound-data:
components:
@@ -17,4 +17,11 @@ items:
minecraft:block_state:
instrument: "harp"
powered: "false"
- note: "0"
\ No newline at end of file
+ note: "0"
+
+blocks:
+ minecraft:note_block:
+ settings:
+ client-bound-tags:
+ - minecraft:beacon_base_blocks
+ - minecraft:mineable/axe
\ No newline at end of file
diff --git a/bukkit/loader/src/main/resources/resources/default/configuration/furniture.yml b/bukkit/loader/src/main/resources/resources/default/configuration/furniture.yml
index 05578bdbc..2816c5458 100644
--- a/bukkit/loader/src/main/resources/resources/default/configuration/furniture.yml
+++ b/bukkit/loader/src/main/resources/resources/default/configuration/furniture.yml
@@ -17,6 +17,7 @@ items:
place: minecraft:block.bamboo_wood.place
placement:
ground:
+ loot-spawn-offset: 0.5,0.5,0
rules:
# ANY / FOUR / EIGHT / SIXTEEN / NORTH / EAST / WEST / SOUTH
rotation: FOUR
@@ -40,7 +41,7 @@ items:
- 0,0,-0.1 0
- 1,0,-0.1 0
loot:
- template: "default:loot_table/basic"
+ template: "default:loot_table/furniture"
arguments:
item: default:bench
default:table_lamp:
@@ -61,6 +62,7 @@ items:
place: minecraft:block.lantern.place
placement:
ground:
+ loot-spawn-offset: 0,0.2,0
rules:
rotation: ANY
alignment: QUARTER
@@ -90,7 +92,7 @@ items:
height: 0.4
interactive: true
loot:
- template: "default:loot_table/basic"
+ template: "default:loot_table/furniture"
arguments:
item: default:table_lamp
default:wooden_chair:
@@ -111,6 +113,7 @@ items:
place: minecraft:block.bamboo_wood.place
placement:
ground:
+ loot-spawn-offset: 0,0.4,0
rules:
rotation: ANY
alignment: ANY
@@ -129,6 +132,6 @@ items:
seats:
- 0,0,-0.1 0
loot:
- template: "default:loot_table/basic"
+ template: "default:loot_table/furniture"
arguments:
item: default:wooden_chair
\ No newline at end of file
diff --git a/bukkit/loader/src/main/resources/resources/default/configuration/i18n.yml b/bukkit/loader/src/main/resources/resources/default/configuration/i18n.yml
index fe6db7c36..99e6d9705 100644
--- a/bukkit/loader/src/main/resources/resources/default/configuration/i18n.yml
+++ b/bukkit/loader/src/main/resources/resources/default/configuration/i18n.yml
@@ -20,6 +20,7 @@ i18n:
item.topaz_chestplate: "Topaz Chestplate"
item.topaz_leggings: "Topaz Leggings"
item.topaz_boots: "Topaz Boots"
+ item.topaz_trident: "Topaz Trident"
item.topaz_ore: "Topaz Ore"
item.deepslate_topaz_ore: "Deepslate Topaz Ore"
item.topaz: "Topaz"
@@ -63,6 +64,7 @@ i18n:
item.topaz_chestplate: "黄玉胸甲"
item.topaz_leggings: "黄玉护腿"
item.topaz_boots: "黄玉靴子"
+ item.topaz_trident: "黄玉三叉戟"
item.topaz_ore: "黄玉矿石"
item.deepslate_topaz_ore: "深层黄玉矿石"
item.topaz: "黄玉"
diff --git a/bukkit/loader/src/main/resources/resources/default/configuration/items.yml b/bukkit/loader/src/main/resources/resources/default/configuration/items.yml
index 02fa220c0..923daec69 100644
--- a/bukkit/loader/src/main/resources/resources/default/configuration/items.yml
+++ b/bukkit/loader/src/main/resources/resources/default/configuration/items.yml
@@ -1,4 +1,37 @@
-items:
+items#gui_head:
+ default:gui_head_size_1:
+ material: player_head
+ custom-model-data: 1000
+ model:
+ type: minecraft:special
+ path: minecraft:item/custom/gui_head_size_1
+ generation:
+ parent: minecraft:item/template_skull
+ gui-light: front
+ display:
+ gui:
+ translation: 0,8,0
+ scale: 2,2,2
+ model:
+ type: minecraft:head
+ kind: player
+ default:gui_head_size_4:
+ material: player_head
+ custom-model-data: 1001
+ model:
+ type: minecraft:special
+ path: minecraft:item/custom/gui_head_size_4
+ generation:
+ parent: minecraft:item/template_skull
+ gui-light: front
+ display:
+ gui:
+ translation: 9,7,0
+ scale: 4,4,4
+ model:
+ type: minecraft:head
+ kind: player
+items#topaz_gears:
default:topaz_rod:
material: fishing_rod
custom-model-data: 1000
@@ -142,7 +175,42 @@ items:
arguments:
part: boots
slot: feet
-
+ default:topaz_trident:
+ material: trident
+ custom-model-data: 1000
+ settings:
+ projectile:
+ item: default:topaz_trident
+ translation: 0,0,0
+ rotation: 1,1,1,1
+ display-transform: NONE
+ scale: 0.5
+ tags:
+ - "default:topaz_tools"
+ data:
+ item-name: "<#FF8C00>"
+ tooltip-style: minecraft:topaz
+ model:
+ type: minecraft:select
+ property: minecraft:display_context
+ cases:
+ - when: ["gui", "ground", "fixed"]
+ model:
+ type: minecraft:model
+ path: minecraft:item/custom/topaz_trident
+ generation:
+ parent: minecraft:item/generated
+ textures:
+ layer0: minecraft:item/custom/topaz_trident
+ fallback:
+ type: minecraft:condition
+ property: minecraft:using_item
+ on-true:
+ type: minecraft:model
+ path: minecraft:item/custom/topaz_trident_throwing
+ on-false:
+ type: minecraft:model
+ path: minecraft:item/custom/topaz_trident_in_hand
templates:
default:armor/topaz:
material: "chainmail_{part}"
@@ -395,4 +463,12 @@ recipes#11:
template-type: default:topaz
result:
id: default:topaz_rod
+ count: 1
+ default:topaz_trident:
+ type: smithing_transform
+ base: minecraft:trident
+ addition: default:topaz
+ template-type: default:topaz
+ result:
+ id: default:topaz_trident
count: 1
\ No newline at end of file
diff --git a/bukkit/loader/src/main/resources/resources/default/configuration/templates.yml b/bukkit/loader/src/main/resources/resources/default/configuration/templates.yml
index b2f321624..a281f7e41 100644
--- a/bukkit/loader/src/main/resources/resources/default/configuration/templates.yml
+++ b/bukkit/loader/src/main/resources/resources/default/configuration/templates.yml
@@ -968,6 +968,18 @@ templates#loot_tables:
- type: item
item: "{item}"
+ # drop the original furniture item or a fallback item
+
+ # template: default:loot_table/furniture
+ # arguments:
+ # item: the fallback item
+ default:loot_table/furniture:
+ pools:
+ - rolls: 1
+ entries:
+ - type: furniture_item
+ item: "{item}"
+
# drop with silk touch
# template: default:loot_table/silk_touch
diff --git a/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/ender_pearl_flower_stage_3.json b/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/ender_pearl_flower_stage_3.json
deleted file mode 100644
index c65bc426f..000000000
--- a/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/models/block/custom/ender_pearl_flower_stage_3.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "ambientocclusion": false,
- "textures": {
- "1": "item/ender_pearl",
- "particle": "block/custom/ender_pearl_flower_stage_3",
- "cross": "block/custom/ender_pearl_flower_stage_3"
- },
- "elements": [
- {
- "from": [0.8, 0, 8],
- "to": [15.2, 16, 8],
- "shade": false,
- "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8], "rescale": true},
- "faces": {
- "north": {"uv": [0, 0, 16, 16], "texture": "#cross"},
- "south": {"uv": [0, 0, 16, 16], "texture": "#cross"}
- }
- },
- {
- "from": [8, 0, 0.8],
- "to": [8, 16, 15.2],
- "shade": false,
- "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8], "rescale": true},
- "faces": {
- "east": {"uv": [0, 0, 16, 16], "texture": "#cross"},
- "west": {"uv": [0, 0, 16, 16], "texture": "#cross"}
- }
- },
- {
- "from": [8, 5, -1],
- "to": [8, 21, 15],
- "rotation": {"angle": 0, "axis": "y", "origin": [7, 5, 7]},
- "faces": {
- "north": {"uv": [0, 0, 0, 16], "texture": "#1"},
- "east": {"uv": [0, 0, 16, 16], "texture": "#1"},
- "south": {"uv": [0, 0, 0, 16], "texture": "#1"},
- "west": {"uv": [0, 0, 16, 16], "texture": "#1"},
- "up": {"uv": [0, 0, 0, 16], "texture": "#1"},
- "down": {"uv": [0, 0, 0, 16], "texture": "#1"}
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/models/item/custom/topaz_trident_in_hand.json b/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/models/item/custom/topaz_trident_in_hand.json
new file mode 100644
index 000000000..a56ed9681
--- /dev/null
+++ b/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/models/item/custom/topaz_trident_in_hand.json
@@ -0,0 +1,108 @@
+{
+ "credit": "Made with Blockbench",
+ "textures": {
+ "0": "item/custom/topaz_trident_3d",
+ "particle": "item/custom/topaz_trident_3d"
+ },
+ "elements": [
+ {
+ "from": [7.75, -5.5, 7.75],
+ "to": [8.25, 10, 8.25],
+ "rotation": {"angle": 0, "axis": "y", "origin": [4, -5.5, 4]},
+ "faces": {
+ "north": {"uv": [10.5, 0.5, 11, 16], "texture": "#0"},
+ "east": {"uv": [10.5, 0.5, 11, 16], "texture": "#0"},
+ "south": {"uv": [10.5, 0.5, 11, 16], "texture": "#0"},
+ "west": {"uv": [10.5, 0.5, 11, 16], "texture": "#0"},
+ "up": {"uv": [3, 0, 3.5, 0.5], "texture": "#0"},
+ "down": {"uv": [0.5, 15.5, 1, 16], "texture": "#0"}
+ }
+ },
+ {
+ "from": [7.25, 7, 7.75],
+ "to": [7.75, 8, 8.25],
+ "rotation": {"angle": 0, "axis": "y", "origin": [4, -5.5, 4]},
+ "faces": {
+ "north": {"uv": [11, 2.5, 11.5, 3.5], "texture": "#0"},
+ "east": {"uv": [11, 2.5, 11.5, 3.5], "texture": "#0"},
+ "south": {"uv": [11, 2.5, 11.5, 3.5], "texture": "#0"},
+ "west": {"uv": [11, 2.5, 11.5, 3.5], "texture": "#0"},
+ "up": {"uv": [11, 2.5, 11.5, 3], "texture": "#0"},
+ "down": {"uv": [11, 3, 11.5, 3.5], "texture": "#0"}
+ }
+ },
+ {
+ "from": [6.75, 7.5, 7.75],
+ "to": [7.25, 9.5, 8.25],
+ "rotation": {"angle": 0, "axis": "y", "origin": [4, -5.5, 4]},
+ "faces": {
+ "north": {"uv": [11.5, 1, 12, 3], "texture": "#0"},
+ "east": {"uv": [11.5, 1, 12, 3], "texture": "#0"},
+ "south": {"uv": [11.5, 1, 12, 3], "texture": "#0"},
+ "west": {"uv": [11.5, 1, 12, 3], "texture": "#0"},
+ "up": {"uv": [11.5, 1, 12, 1.5], "texture": "#0"},
+ "down": {"uv": [11.5, 2.5, 12, 3], "texture": "#0"}
+ }
+ },
+ {
+ "from": [8.75, 7.5, 7.75],
+ "to": [9.25, 9.5, 8.25],
+ "rotation": {"angle": 0, "axis": "y", "origin": [4, -5.5, 4]},
+ "faces": {
+ "north": {"uv": [11.5, 1, 12, 3], "texture": "#0"},
+ "east": {"uv": [11.5, 1, 12, 3], "texture": "#0"},
+ "south": {"uv": [11.5, 1, 12, 3], "texture": "#0"},
+ "west": {"uv": [11.5, 1, 12, 3], "texture": "#0"},
+ "up": {"uv": [11.5, 1, 12, 1.5], "texture": "#0"},
+ "down": {"uv": [11.5, 2.5, 12, 3], "texture": "#0"}
+ }
+ },
+ {
+ "from": [8.25, 7, 7.75],
+ "to": [8.75, 8, 8.25],
+ "rotation": {"angle": 0, "axis": "y", "origin": [4, -5.5, 4]},
+ "faces": {
+ "north": {"uv": [11, 2.5, 11.5, 3.5], "texture": "#0"},
+ "east": {"uv": [11, 2.5, 11.5, 3.5], "texture": "#0"},
+ "south": {"uv": [11, 2.5, 11.5, 3.5], "texture": "#0"},
+ "west": {"uv": [11, 2.5, 11.5, 3.5], "texture": "#0"},
+ "up": {"uv": [11, 2.5, 11.5, 3], "texture": "#0"},
+ "down": {"uv": [11, 3, 11.5, 3.5], "texture": "#0"}
+ }
+ }
+ ],
+ "gui_light": "front",
+ "display": {
+ "thirdperson_righthand": {
+ "rotation": [0, 60, 0],
+ "translation": [0.25, 9, 1.5],
+ "scale": [2, 2, 2]
+ },
+ "thirdperson_lefthand": {
+ "rotation": [0, 60, 0],
+ "translation": [0.25, 9, 1.5],
+ "scale": [2, 2, 2]
+ },
+ "firstperson_righthand": {
+ "rotation": [0, -90, 25],
+ "translation": [-2.5, 7.5, 4.75]
+ },
+ "firstperson_lefthand": {
+ "rotation": [0, 90, -25],
+ "translation": [-2.5, 7.5, 4.75]
+ },
+ "ground": {
+ "rotation": [0, 0, 45],
+ "translation": [-2, 2, 0],
+ "scale": [0.5, 0.5, 0.5]
+ },
+ "gui": {
+ "rotation": [0, 0, -45],
+ "translation": [5, 5, 0],
+ "scale": [1.25, 1.25, 1.25]
+ },
+ "fixed": {
+ "translation": [0, 6, 0]
+ }
+ }
+}
\ No newline at end of file
diff --git a/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/models/item/custom/topaz_trident_throwing.json b/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/models/item/custom/topaz_trident_throwing.json
new file mode 100644
index 000000000..90b814746
--- /dev/null
+++ b/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/models/item/custom/topaz_trident_throwing.json
@@ -0,0 +1,110 @@
+{
+ "credit": "Made with Blockbench",
+ "textures": {
+ "0": "item/custom/topaz_trident_3d",
+ "particle": "item/custom/topaz_trident_3d"
+ },
+ "elements": [
+ {
+ "from": [7.75, -5.5, 7.75],
+ "to": [8.25, 10, 8.25],
+ "rotation": {"angle": 0, "axis": "y", "origin": [4, -5.5, 4]},
+ "faces": {
+ "north": {"uv": [10.5, 0.5, 11, 16], "texture": "#0"},
+ "east": {"uv": [10.5, 0.5, 11, 16], "texture": "#0"},
+ "south": {"uv": [10.5, 0.5, 11, 16], "texture": "#0"},
+ "west": {"uv": [10.5, 0.5, 11, 16], "texture": "#0"},
+ "up": {"uv": [3, 0, 3.5, 0.5], "texture": "#0"},
+ "down": {"uv": [0.5, 15.5, 1, 16], "texture": "#0"}
+ }
+ },
+ {
+ "from": [7.25, 7, 7.75],
+ "to": [7.75, 8, 8.25],
+ "rotation": {"angle": 0, "axis": "y", "origin": [4, -5.5, 4]},
+ "faces": {
+ "north": {"uv": [11, 2.5, 11.5, 3.5], "texture": "#0"},
+ "east": {"uv": [11, 2.5, 11.5, 3.5], "texture": "#0"},
+ "south": {"uv": [11, 2.5, 11.5, 3.5], "texture": "#0"},
+ "west": {"uv": [11, 2.5, 11.5, 3.5], "texture": "#0"},
+ "up": {"uv": [11, 2.5, 11.5, 3], "texture": "#0"},
+ "down": {"uv": [11, 3, 11.5, 3.5], "texture": "#0"}
+ }
+ },
+ {
+ "from": [6.75, 7.5, 7.75],
+ "to": [7.25, 9.5, 8.25],
+ "rotation": {"angle": 0, "axis": "y", "origin": [4, -5.5, 4]},
+ "faces": {
+ "north": {"uv": [11.5, 1, 12, 3], "texture": "#0"},
+ "east": {"uv": [11.5, 1, 12, 3], "texture": "#0"},
+ "south": {"uv": [11.5, 1, 12, 3], "texture": "#0"},
+ "west": {"uv": [11.5, 1, 12, 3], "texture": "#0"},
+ "up": {"uv": [11.5, 1, 12, 1.5], "texture": "#0"},
+ "down": {"uv": [11.5, 2.5, 12, 3], "texture": "#0"}
+ }
+ },
+ {
+ "from": [8.75, 7.5, 7.75],
+ "to": [9.25, 9.5, 8.25],
+ "rotation": {"angle": 0, "axis": "y", "origin": [4, -5.5, 4]},
+ "faces": {
+ "north": {"uv": [11.5, 1, 12, 3], "texture": "#0"},
+ "east": {"uv": [11.5, 1, 12, 3], "texture": "#0"},
+ "south": {"uv": [11.5, 1, 12, 3], "texture": "#0"},
+ "west": {"uv": [11.5, 1, 12, 3], "texture": "#0"},
+ "up": {"uv": [11.5, 1, 12, 1.5], "texture": "#0"},
+ "down": {"uv": [11.5, 2.5, 12, 3], "texture": "#0"}
+ }
+ },
+ {
+ "from": [8.25, 7, 7.75],
+ "to": [8.75, 8, 8.25],
+ "rotation": {"angle": 0, "axis": "y", "origin": [4, -5.5, 4]},
+ "faces": {
+ "north": {"uv": [11, 2.5, 11.5, 3.5], "texture": "#0"},
+ "east": {"uv": [11, 2.5, 11.5, 3.5], "texture": "#0"},
+ "south": {"uv": [11, 2.5, 11.5, 3.5], "texture": "#0"},
+ "west": {"uv": [11, 2.5, 11.5, 3.5], "texture": "#0"},
+ "up": {"uv": [11, 2.5, 11.5, 3], "texture": "#0"},
+ "down": {"uv": [11, 3, 11.5, 3.5], "texture": "#0"}
+ }
+ }
+ ],
+ "gui_light": "front",
+ "display": {
+ "thirdperson_righthand": {
+ "rotation": [0, 90, 180],
+ "translation": [0.25, -9, 1.5],
+ "scale": [2, 2, 2]
+ },
+ "thirdperson_lefthand": {
+ "rotation": [0, 90, 180],
+ "translation": [0.25, -9, 1.5],
+ "scale": [2, 2, 2]
+ },
+ "firstperson_righthand": {
+ "rotation": [0, -90, 25],
+ "translation": [0.75, -5, -0.75],
+ "scale": [0.5, 0.5, 0.5]
+ },
+ "firstperson_lefthand": {
+ "rotation": [0, 90, -25],
+ "translation": [0.75, -5, -0.75],
+ "scale": [0.5, 0.5, 0.5]
+ },
+ "ground": {
+ "rotation": [0, 0, 45],
+ "translation": [-2, 2, 0],
+ "scale": [0.5, 0.5, 0.5]
+ },
+ "gui": {
+ "rotation": [0, 0, -45],
+ "translation": [5, 5, 0],
+ "scale": [1.25, 1.25, 1.25]
+ },
+ "fixed": {
+ "translation": [0, 6, 0]
+ }
+ }
+}
\ No newline at end of file
diff --git a/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/textures/block/custom/ender_pearl_flower_stage_3.png b/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/textures/block/custom/ender_pearl_flower_stage_3.png
deleted file mode 100644
index 358b7874c..000000000
Binary files a/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/textures/block/custom/ender_pearl_flower_stage_3.png and /dev/null differ
diff --git a/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_trident.png b/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_trident.png
new file mode 100644
index 000000000..a4b1ec38c
Binary files /dev/null and b/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_trident.png differ
diff --git a/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_trident_3d.png b/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_trident_3d.png
new file mode 100644
index 000000000..692a34f0f
Binary files /dev/null and b/bukkit/loader/src/main/resources/resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_trident_3d.png differ
diff --git a/bukkit/loader/src/main/resources/translations/en.yml b/bukkit/loader/src/main/resources/translations/en.yml
index ff18b0826..2a6d99bac 100644
--- a/bukkit/loader/src/main/resources/translations/en.yml
+++ b/bukkit/loader/src/main/resources/translations/en.yml
@@ -90,6 +90,10 @@ warning.config.condition.match_block_property.missing_properties: "Issue
warning.config.condition.match_item.missing_id: "Issue found in file - The config '' is missing the required 'id' argument for 'match_item' condition."
warning.config.condition.table_bonus.missing_enchantment: "Issue found in file - The config '' is missing the required 'enchantment' argument for 'table_bonus' condition."
warning.config.condition.table_bonus.missing_chances: "Issue found in file - The config '' is missing the required 'chances' argument for 'table_bonus' condition."
+warning.config.condition.permission.missing_permission: "Issue found in file - The config '' is missing the required 'permission' argument for 'permission' condition."
+warning.config.condition.equals.missing_value1: "Issue found in file - The config '' is missing the required 'value1' argument for 'equals' condition."
+warning.config.condition.equals.missing_value2: "Issue found in file - The config '' is missing the required 'value2' argument for 'equals' condition."
+warning.config.condition.expression.missing_expression: "Issue found in file - The config '' is missing the required 'expression' argument for 'expression' condition."
warning.config.structure.not_section: "Issue found in file - The config '' is expected to be a config section while it's actually a(n) ''."
warning.config.image.duplicate: "Issue found in file - Duplicated image ''. Please check if there is the same configuration in other files."
warning.config.image.missing_height: "Issue found in file - The image '' is missing the required 'height' argument."
@@ -179,6 +183,8 @@ warning.config.item.model.select.case.missing_model: "Issue found in fil
warning.config.item.model.select.block_state.missing_property: "Issue found in file - The item '' is missing the required 'block-state-property' argument for property 'minecraft:block_state'."
warning.config.item.model.select.local_time.missing_pattern: "Issue found in file - The item '' is missing the required 'pattern' argument for property 'minecraft:local_time'."
warning.config.item.model.special.missing_type: "Issue found in file - The item '' is missing the required 'type' argument for model 'minecraft:special'."
+warning.config.item.model.special.missing_path: "Issue found in file - The item '' is missing the required 'path' argument for model 'minecraft:special'."
+warning.config.item.model.special.invalid_path: "Issue found in file - The item '' has an invalid 'path' argument '' for model 'minecraft:special' which contains illegal characters. Please read https://minecraft.wiki/w/Resource_location#Legal_characters."
warning.config.item.model.special.invalid_type: "Issue found in file - The item '' is using an invalid type '' for model 'minecraft:special'."
warning.config.item.model.special.banner.missing_color: "Issue found in file - The item '' is missing the required 'color' argument for special model 'minecraft:banner'."
warning.config.item.model.special.bed.missing_texture: "Issue found in file - The item '' is missing the required 'texture' argument for special model 'minecraft:bed'."
@@ -189,7 +195,6 @@ warning.config.item.model.special.chest.invalid_openness: "Issue found i
warning.config.item.model.special.shulker_box.missing_texture: "Issue found in file - The item '' is missing the required 'texture' argument for special model 'minecraft:shulker_box'."
warning.config.item.model.special.shulker_box.invalid_openness: "Issue found in file - The item '' is using an invalid 'openness' value '' for special model 'minecraft:shulker_box'. Valid range '0~1.'"
warning.config.item.model.special.head.missing_kind: "Issue found in file - The item '' is missing the required 'kind' argument for special model 'minecraft:head'."
-warning.config.item.model.special.head.missing_texture: "Issue found in file - The item '' is missing the required 'texture' argument for special model 'minecraft:head'."
warning.config.block.duplicate: "Issue found in file - Duplicated block ''. Please check if there is the same configuration in other files."
warning.config.block.missing_state: "Issue found in file - The block '' is missing the required 'state' argument."
warning.config.block.state.property.missing_type: "Issue found in file - The block '' is missing the required 'type' argument for property ''."
@@ -223,9 +228,9 @@ warning.config.block.behavior.leaves.missing_distance: "Issue found in f
warning.config.block.behavior.sapling.missing_stage: "Issue found in file - The block '' is missing the required 'stage' property for 'sapling_block' behavior."
warning.config.block.behavior.sapling.missing_feature: "Issue found in file - The block '' is missing the required 'feature' argument for 'sapling_block' behavior."
warning.config.block.behavior.strippable.missing_stripped: "Issue found in file - The block '' is missing the required 'stripped' argument for 'strippable_block' behavior."
-warning.config.block.event.condition.missing_type: "Issue found in file - The block '' is missing the required 'type' argument for event condition."
-warning.config.block.event.condition.invalid_type: "Issue found in file - The block '' is using an invalid 'type' argument '' for event condition."
warning.config.model.generation.missing_parent: "Issue found in file - The config '' is missing the required 'parent' argument in 'generation' section."
+warning.config.model.generation.invalid_display_position: "Issue found in file - The config '' is using an invalid display position '' in 'generation.display' section. Allowed display positions: []"
+warning.config.model.generation.invalid_gui_light: "Issue found in file - The config '' is using an invalid gui-light option '' in 'generation' section. Allowed gui light options: []"
warning.config.model.generation.conflict: "Issue found in file - Failed to generate model for '' as two or more configurations attempt to generate different json models with the same path: ''."
warning.config.model.generation.texture.invalid: "Issue found in file - The config '' has a texture '' with path '' that contains illegal characters. Please read https://minecraft.wiki/w/Resource_location#Legal_characters."
warning.config.model.generation.parent.invalid: "Issue found in file - The config '' has a parent argument '' that contains illegal characters. Please read https://minecraft.wiki/w/Resource_location#Legal_characters."
@@ -294,4 +299,18 @@ warning.config.conflict_matcher.all_of.missing_terms: "Issue found in co
warning.config.conflict_matcher.any_of.missing_terms: "Issue found in config.yml at 'resource-pack.duplicated-files-handler' - Missing required 'terms' argument for 'any_of' matcher."
warning.config.conflict_resolution.missing_type: "Issue found in config.yml at 'resource-pack.duplicated-files-handler' - Missing required 'type' argument for one of the resolutions."
warning.config.conflict_resolution.invalid_type: "Issue found in config.yml at 'resource-pack.duplicated-files-handler' - One of the resolutions is using the invalid type ''."
-warning.config.function.command.missing_command: "Issue found in file - The config '' is missing the required 'command' argument for 'command' function."
\ No newline at end of file
+warning.config.event.missing_trigger: "Issue found in file - The config '' is missing the required 'on' argument for event triggers."
+warning.config.event.invalid_trigger: "Issue found in file - The config '' is using an invalid event trigger ''."
+warning.config.event.condition.missing_type: "Issue found in file - The config '' is missing the required 'type' argument for event condition."
+warning.config.event.condition.invalid_type: "Issue found in file - The config '' is using an invalid 'type' argument '' for event condition."
+warning.config.function.missing_type: "Issue found in file - The config '' is missing the required 'type' argument for function."
+warning.config.function.invalid_type: "Issue found in file - The config '' is using an invalid function type ''."
+warning.config.function.command.missing_command: "Issue found in file - The config '' is missing the required 'command' argument for 'command' function."
+warning.config.function.actionbar.missing_actionbar: "Issue found in file - The config '' is missing the required 'actionbar' argument for 'actionbar' function."
+warning.config.function.message.missing_message: "Issue found in file - The config '' is missing the required 'message' argument for 'message' function."
+warning.config.selector.missing_type: "Issue found in file - The config '' is missing the required 'type' argument for selector."
+warning.config.selector.invalid_type: "Issue found in file - The config '' is using an invalid selector type ''."
+warning.config.selector.invalid_target: "Issue found in file - The config '' is using an invalid selector target ''."
+warning.config.resource_pack.item_model.conflict.vanilla: "Failed to generate item model for '' because this item model has been occupied by a vanilla item."
+warning.config.resource_pack.item_model.already_exist: "Failed to generate item model for '' because the file '' already exists."
+warning.config.resource_pack.model.generation.already_exist: "Failed to generate model because the model file '' already exists."
\ No newline at end of file
diff --git a/bukkit/loader/src/main/resources/translations/tr.yml b/bukkit/loader/src/main/resources/translations/tr.yml
index def783519..7c1c475b5 100644
--- a/bukkit/loader/src/main/resources/translations/tr.yml
+++ b/bukkit/loader/src/main/resources/translations/tr.yml
@@ -167,7 +167,6 @@ warning.config.item.model.special.chest.invalid_openness: " dosya
warning.config.item.model.special.shulker_box.missing_texture: " dosyasında sorun bulundu - '' eşyası, 'minecraft:shulker_box' özel modeli için gerekli 'texture' argümanı eksik."
warning.config.item.model.special.shulker_box.invalid_openness: " dosyasında sorun bulundu - '' eşyası, 'minecraft:shulker_box' özel modeli için geçersiz bir 'openness' değeri '' kullanıyor. Geçerli aralık '0~1.'"
warning.config.item.model.special.head.missing_kind: " dosyasında sorun bulundu - '' eşyası, 'minecraft:head' özel modeli için gerekli 'kind' argümanı eksik."
-warning.config.item.model.special.head.missing_texture: " dosyasında sorun bulundu - '' eşyası, 'minecraft:head' özel modeli için gerekli 'texture' argümanı eksik."
warning.config.block.duplicate: " dosyasında sorun bulundu - Yinelenen blok ''. Diğer dosyalarda aynı yapılandırmanın olup olmadığını kontrol edin."
warning.config.block.missing_state: " dosyasında sorun bulundu - '' bloğu gerekli 'state' argümanı eksik."
warning.config.block.state.property.missing_type: " dosyasında sorun bulundu - '' bloğu, '' özelliği için gerekli 'type' argümanı eksik."
diff --git a/bukkit/loader/src/main/resources/translations/zh_cn.yml b/bukkit/loader/src/main/resources/translations/zh_cn.yml
index d2e6ed5f9..f0f71519f 100644
--- a/bukkit/loader/src/main/resources/translations/zh_cn.yml
+++ b/bukkit/loader/src/main/resources/translations/zh_cn.yml
@@ -90,6 +90,8 @@ warning.config.condition.match_block_property.missing_properties: "在
warning.config.condition.match_item.missing_id: "在文件 发现问题 - 配置项 '' 缺少 'match_item' 条件所需的 'id' 参数"
warning.config.condition.table_bonus.missing_enchantment: "在文件 发现问题 - 配置项 '' 缺少 'table_bonus' 条件所需的 'enchantment' 参数"
warning.config.condition.table_bonus.missing_chances: "在文件 发现问题 - 配置项 '' 缺少 'table_bonus' 条件所需的 'chances' 参数"
+
+
warning.config.structure.not_section: "在文件 发现问题 - 配置项 '' 应为配置段落 但实际类型为 ''"
warning.config.image.duplicate: "在文件 发现问题 - 重复的图片配置 '' 请检查其他文件中是否存在相同配置"
warning.config.image.missing_height: "在文件 发现问题 - 图片 '' 缺少必需的 'height' 参数"
@@ -179,6 +181,8 @@ warning.config.item.model.select.case.missing_model: "在文件
warning.config.item.model.select.block_state.missing_property: "在文件 发现问题 - 物品 '' 的 'minecraft:block_state' 属性缺少必需的 'block-state-property' 参数"
warning.config.item.model.select.local_time.missing_pattern: "在文件 发现问题 - 物品 '' 的 'minecraft:local_time' 属性缺少必需的 'pattern' 参数"
warning.config.item.model.special.missing_type: "在文件 发现问题 - 物品 '' 的 'minecraft:special' 模型缺少必需的 'type' 参数"
+warning.config.item.model.special.missing_path: "在文件 发现问题 - 物品 '' 的 'minecraft:special' 模型缺少必需的模型 'path' 参数"
+warning.config.item.model.special.invalid_path: "在文件 发现问题 - 物品 '' 的 'minecraft:special' 模型路径 '' 包含非法字符 请参考 https://zh.minecraft.wiki/w/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4ID#%E5%90%88%E6%B3%95%E5%AD%97%E7%AC%A6"
warning.config.item.model.special.invalid_type: "在文件 发现问题 - 物品 '' 的 'minecraft:special' 模型使用了无效类型 ''"
warning.config.item.model.special.banner.missing_color: "在文件 发现问题 - 物品 '' 的 'minecraft:banner' 特殊模型缺少必需的 'color' 参数"
warning.config.item.model.special.bed.missing_texture: "在文件 发现问题 - 物品 '' 的 'minecraft:bed' 特殊模型缺少必需的 'texture' 参数"
@@ -189,7 +193,6 @@ warning.config.item.model.special.chest.invalid_openness: "在文件 在文件 发现问题 - 物品 '' 的 'minecraft:shulker_box' 特殊模型缺少必需的 'texture' 参数"
warning.config.item.model.special.shulker_box.invalid_openness: "在文件 发现问题 - 物品 '' 的 'minecraft:shulker_box' 特殊模型使用了无效的 'openness' 值 '' 有效范围应为 0~1"
warning.config.item.model.special.head.missing_kind: "在文件 发现问题 - 物品 '' 的 'minecraft:head' 特殊模型缺少必需的 'kind' 参数"
-warning.config.item.model.special.head.missing_texture: "在文件 发现问题 - 物品 '' 的 'minecraft:head' 特殊模型缺少必需的 'texture' 参数"
warning.config.block.duplicate: "在文件 发现问题 - 重复的方块 '' 请检查其他文件中是否存在相同配置"
warning.config.block.missing_state: "在文件 发现问题 - 方块 '' 缺少必需的 'state' 参数"
warning.config.block.state.property.missing_type: "在文件 发现问题 - 方块 '' 的属性 '' 缺少必需的 'type' 参数"
@@ -223,10 +226,10 @@ warning.config.block.behavior.leaves.missing_distance: "在文件 在文件 发现问题 - 方块 '' 的 'sapling_block' 行为缺少必需的 'stage' 属性"
warning.config.block.behavior.sapling.missing_feature: "在文件 发现问题 - 方块 '' 的 'sapling_block' 行为缺少必需的 'feature' 参数"
warning.config.block.behavior.strippable.missing_stripped: "在文件 发现问题 - 方块 '' 的 'strippable_block' 行为缺少必需的 'stripped' 参数"
-warning.config.block.event.condition.missing_type: "在文件 - 方块 '' 的事件条件缺少 'type' 参数"
-warning.config.block.event.condition.invalid_type: "在文件 - 方块 '' 使用了无效的事件条件类型 ''"
warning.config.model.generation.missing_parent: "在文件 发现问题 - 配置项 '' 的 'generation' 段落缺少必需的 'parent' 参数"
warning.config.model.generation.conflict: "在文件 发现问题 - 无法为 '' 生成模型 存在多个配置尝试使用相同路径 '' 生成不同的 JSON 模型"
+warning.config.model.generation.invalid_display_position: "在文件 发现问题 - 配置项 '' 在 'generation.display' 区域使用了无效的 display 位置类型 ''. 可用展示类型: []"
+warning.config.model.generation.invalid_gui_light: "在文件 发现问题 - 配置项 '' 在 'generation' 区域使用了无效的GUI光照 ''. 可用GUI光照: []"
warning.config.model.generation.texture.invalid: "在文件 发现问题 - 配置项 '' 的纹理 '' 路径 '' 包含非法字符 请参考 https://zh.minecraft.wiki/w/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4ID#%E5%90%88%E6%B3%95%E5%AD%97%E7%AC%A6"
warning.config.model.generation.parent.invalid: "在文件 发现问题 - 配置项 '' 的父级参数 '' 包含非法字符 请参考 https://zh.minecraft.wiki/w/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%97%B4ID#%E5%90%88%E6%B3%95%E5%AD%97%E7%AC%A6"
warning.config.emoji.missing_keywords: "在文件 发现问题 - 表情 '' 缺少必需的 'keywords' 参数"
@@ -293,4 +296,11 @@ warning.config.conflict_matcher.inverted.missing_term: "在 config.yml
warning.config.conflict_matcher.all_of.missing_terms: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 全匹配器缺少必需的 'terms' 参数"
warning.config.conflict_matcher.any_of.missing_terms: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 任一匹配器缺少必需的 'terms' 参数"
warning.config.conflict_resolution.missing_type: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 文件冲突处理器的某个解决方案缺少必需的 'type' 参数"
-warning.config.conflict_resolution.invalid_type: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 文件冲突处理器的某个解决方案使用了无效类型 ''"
\ No newline at end of file
+warning.config.conflict_resolution.invalid_type: "在 config.yml 的 'resource-pack.duplicated-files-handler' 处发现问题 - 文件冲突处理器的某个解决方案使用了无效类型 ''"
+warning.config.event.missing_trigger: "Issue found in file - The config '' is missing the required 'on' argument for event triggers."
+warning.config.event.invalid_trigger: "Issue found in file - The config '' is using an invalid event trigger ''."
+warning.config.event.condition.missing_type: "在文件 - 配置项 '' 的事件条件缺少 'type' 参数"
+warning.config.event.condition.invalid_type: "在文件 - 配置项 '' 使用了无效的事件条件类型 ''"
+warning.config.function.missing_type: "Issue found in file - The config '' is missing the required 'type' argument for function."
+warning.config.function.invalid_type: "Issue found in file - The config '' is using an invalid function type ''."
+warning.config.function.command.missing_command: "Issue found in file - The config '' is missing the required 'command' argument for 'command' function."
\ No newline at end of file
diff --git a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/advancement/BukkitAdvancementManager.java b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/advancement/BukkitAdvancementManager.java
index 74e2a5916..8df8c971d 100644
--- a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/advancement/BukkitAdvancementManager.java
+++ b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/advancement/BukkitAdvancementManager.java
@@ -6,7 +6,7 @@ import net.momirealms.craftengine.bukkit.plugin.BukkitCraftEngine;
import net.momirealms.craftengine.core.advancement.AbstractAdvancementManager;
import net.momirealms.craftengine.core.pack.LoadingSequence;
import net.momirealms.craftengine.core.pack.Pack;
-import net.momirealms.craftengine.core.plugin.config.ConfigSectionParser;
+import net.momirealms.craftengine.core.plugin.config.ConfigParser;
import net.momirealms.craftengine.core.plugin.locale.LocalizedResourceConfigException;
import net.momirealms.craftengine.core.util.GsonHelper;
import net.momirealms.craftengine.core.util.Key;
@@ -31,11 +31,11 @@ public class BukkitAdvancementManager extends AbstractAdvancementManager {
}
@Override
- public ConfigSectionParser parser() {
+ public ConfigParser parser() {
return this.advancementParser;
}
- public class AdvancementParser implements ConfigSectionParser {
+ public class AdvancementParser implements ConfigParser {
public static final String[] CONFIG_SECTION_NAME = new String[] {"advancements", "advancement"};
@Override
diff --git a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/api/CraftEngineBlocks.java b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/api/CraftEngineBlocks.java
index 17a8d21b4..aac68bb9e 100644
--- a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/api/CraftEngineBlocks.java
+++ b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/api/CraftEngineBlocks.java
@@ -12,11 +12,11 @@ import net.momirealms.craftengine.core.block.ImmutableBlockState;
import net.momirealms.craftengine.core.block.UpdateOption;
import net.momirealms.craftengine.core.item.Item;
import net.momirealms.craftengine.core.plugin.context.ContextHolder;
-import net.momirealms.craftengine.core.plugin.context.parameter.CommonParameters;
+import net.momirealms.craftengine.core.plugin.context.parameter.DirectContextParameters;
import net.momirealms.craftengine.core.util.Key;
-import net.momirealms.craftengine.core.world.Vec3d;
import net.momirealms.craftengine.core.world.World;
import net.momirealms.craftengine.core.world.WorldEvents;
+import net.momirealms.craftengine.core.world.WorldPosition;
import net.momirealms.sparrow.nbt.CompoundTag;
import org.bukkit.Location;
import org.bukkit.Material;
@@ -169,20 +169,20 @@ public final class CraftEngineBlocks {
if (state == null || state.isEmpty()) return false;
World world = new BukkitWorld(block.getWorld());
Location location = block.getLocation();
- Vec3d vec3d = new Vec3d(location.getBlockX() + 0.5, location.getBlockY() + 0.5, location.getBlockZ() + 0.5);
+ WorldPosition position = new WorldPosition(world, location.getBlockX() + 0.5, location.getBlockY() + 0.5, location.getBlockZ() + 0.5);
if (dropLoot) {
- ContextHolder.Builder builder = new ContextHolder.Builder().withParameter(CommonParameters.WORLD, world).withParameter(CommonParameters.LOCATION, vec3d);
+ ContextHolder.Builder builder = new ContextHolder.Builder()
+ .withParameter(DirectContextParameters.POSITION, position);
BukkitServerPlayer serverPlayer = BukkitCraftEngine.instance().adapt(player);
if (player != null) {
- builder.withParameter(CommonParameters.PLAYER, serverPlayer);
- //mark item builder.withOptionalParameter(CommonParameters.MAIN_HAND_ITEM, serverPlayer.getItemInHand(InteractionHand.MAIN_HAND));
+ builder.withParameter(DirectContextParameters.PLAYER, serverPlayer);
}
for (Item> item : state.getDrops(builder, world, serverPlayer)) {
- world.dropItemNaturally(vec3d, item);
+ world.dropItemNaturally(position, item);
}
}
if (playSound) {
- world.playBlockSound(vec3d, state.sounds().breakSound());
+ world.playBlockSound(position, state.sounds().breakSound());
}
if (sendParticles) {
FastNMS.INSTANCE.method$Level$levelEvent(world.serverWorld(), WorldEvents.BLOCK_BREAK_EFFECT, LocationUtils.toBlockPos(location.getBlockX(), location.getBlockY(), location.getBlockZ()), state.customBlockState().registryId());
diff --git a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/api/CraftEngineFurniture.java b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/api/CraftEngineFurniture.java
index 134fda9a6..aa9616867 100644
--- a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/api/CraftEngineFurniture.java
+++ b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/api/CraftEngineFurniture.java
@@ -5,17 +5,17 @@ import net.momirealms.craftengine.bukkit.entity.furniture.LoadedFurniture;
import net.momirealms.craftengine.bukkit.nms.CollisionEntity;
import net.momirealms.craftengine.bukkit.nms.FastNMS;
import net.momirealms.craftengine.bukkit.plugin.BukkitCraftEngine;
-import net.momirealms.craftengine.bukkit.util.LocationUtils;
import net.momirealms.craftengine.bukkit.world.BukkitWorld;
import net.momirealms.craftengine.core.entity.furniture.AnchorType;
import net.momirealms.craftengine.core.entity.furniture.CustomFurniture;
+import net.momirealms.craftengine.core.entity.furniture.FurnitureExtraData;
import net.momirealms.craftengine.core.item.Item;
import net.momirealms.craftengine.core.loot.LootTable;
import net.momirealms.craftengine.core.plugin.context.ContextHolder;
-import net.momirealms.craftengine.core.plugin.context.parameter.CommonParameters;
+import net.momirealms.craftengine.core.plugin.context.parameter.DirectContextParameters;
import net.momirealms.craftengine.core.util.Key;
-import net.momirealms.craftengine.core.world.Vec3d;
import net.momirealms.craftengine.core.world.World;
+import net.momirealms.craftengine.core.world.WorldPosition;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
@@ -41,7 +41,7 @@ public final class CraftEngineFurniture {
}
/**
- * Places furniture at the certain location
+ * Places furniture at certain location
*
* @param location location
* @param furnitureId furniture to place
@@ -55,7 +55,7 @@ public final class CraftEngineFurniture {
}
/**
- * Places furniture at the certain location
+ * Places furniture at certain location
*
* @param location location
* @param furnitureId furniture to place
@@ -66,11 +66,11 @@ public final class CraftEngineFurniture {
public static LoadedFurniture place(Location location, Key furnitureId, AnchorType anchorType) {
CustomFurniture furniture = byId(furnitureId);
if (furniture == null) return null;
- return BukkitFurnitureManager.instance().place(furniture, location, anchorType, true);
+ return BukkitFurnitureManager.instance().place(location, furniture, FurnitureExtraData.builder().anchorType(anchorType).build(), true);
}
/**
- * Places furniture at the certain location
+ * Places furniture at certain location
*
* @param location location
* @param furniture furniture to place
@@ -79,11 +79,11 @@ public final class CraftEngineFurniture {
*/
@NotNull
public static LoadedFurniture place(Location location, CustomFurniture furniture, AnchorType anchorType) {
- return BukkitFurnitureManager.instance().place(furniture, location, anchorType, true);
+ return BukkitFurnitureManager.instance().place(location, furniture, FurnitureExtraData.builder().anchorType(anchorType).build(), true);
}
/**
- * Places furniture at the certain location
+ * Places furniture at certain location
*
* @param location location
* @param furnitureId furniture to place
@@ -95,11 +95,11 @@ public final class CraftEngineFurniture {
public static LoadedFurniture place(Location location, Key furnitureId, AnchorType anchorType, boolean playSound) {
CustomFurniture furniture = byId(furnitureId);
if (furniture == null) return null;
- return BukkitFurnitureManager.instance().place(furniture, location, anchorType, playSound);
+ return BukkitFurnitureManager.instance().place(location, furniture, FurnitureExtraData.builder().anchorType(anchorType).build(), playSound);
}
/**
- * Places furniture at the certain location
+ * Places furniture at certain location
*
* @param location location
* @param furniture furniture to place
@@ -109,7 +109,7 @@ public final class CraftEngineFurniture {
*/
@NotNull
public static LoadedFurniture place(Location location, CustomFurniture furniture, AnchorType anchorType, boolean playSound) {
- return BukkitFurnitureManager.instance().place(furniture, location, anchorType, playSound);
+ return BukkitFurnitureManager.instance().place(location, furniture, FurnitureExtraData.builder().anchorType(anchorType).build(), playSound);
}
/**
@@ -222,7 +222,7 @@ public final class CraftEngineFurniture {
}
/**
- * Removes furniture by providing a plugin furniture instance
+ * Removes furniture by providing furniture instance
*
* @param loadedFurniture loaded furniture
* @param dropLoot whether to drop loots
@@ -235,7 +235,7 @@ public final class CraftEngineFurniture {
}
/**
- * Removes furniture by providing a plugin furniture instance
+ * Removes furniture by providing furniture instance
*
* @param loadedFurniture loaded furniture
* @param player the player who removes the furniture
@@ -251,7 +251,7 @@ public final class CraftEngineFurniture {
}
/**
- * Removes furniture by providing a plugin furniture instance
+ * Removes furniture by providing furniture instance
*
* @param loadedFurniture loaded furniture
* @param player the player who removes the furniture
@@ -263,26 +263,26 @@ public final class CraftEngineFurniture {
@Nullable net.momirealms.craftengine.core.entity.player.Player player,
boolean dropLoot,
boolean playSound) {
- Location location = loadedFurniture.location();
+ Location location = loadedFurniture.dropLocation();
loadedFurniture.destroy();
LootTable lootTable = (LootTable) loadedFurniture.config().lootTable();
- Vec3d vec3d = LocationUtils.toVec3d(location);
World world = new BukkitWorld(location.getWorld());
+ WorldPosition position = new WorldPosition(world, location.getX(), location.getY(), location.getZ());
if (dropLoot && lootTable != null) {
- ContextHolder.Builder builder = ContextHolder.builder();
- builder.withParameter(CommonParameters.LOCATION, vec3d);
- builder.withParameter(CommonParameters.WORLD, world);
+ ContextHolder.Builder builder = ContextHolder.builder()
+ .withParameter(DirectContextParameters.POSITION, position)
+ .withParameter(DirectContextParameters.FURNITURE, loadedFurniture)
+ .withOptionalParameter(DirectContextParameters.FURNITURE_ITEM, loadedFurniture.extraData().item().orElse(null));
if (player != null) {
- builder.withParameter(CommonParameters.PLAYER, player);
- //mark item builder.withOptionalParameter(CommonParameters.MAIN_HAND_ITEM, player.getItemInHand(InteractionHand.MAIN_HAND));
+ builder.withParameter(DirectContextParameters.PLAYER, player);
}
List- > items = lootTable.getRandomItems(builder.build(), world, player);
for (Item item : items) {
- world.dropItemNaturally(vec3d, item);
+ world.dropItemNaturally(position, item);
}
}
if (playSound) {
- world.playBlockSound(vec3d, loadedFurniture.config().settings().sounds().breakSound());
+ world.playBlockSound(position, loadedFurniture.config().settings().sounds().breakSound());
}
}
}
diff --git a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/block/BlockEventListener.java b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/block/BlockEventListener.java
index a31e0023a..31b16f093 100644
--- a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/block/BlockEventListener.java
+++ b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/block/BlockEventListener.java
@@ -6,22 +6,27 @@ import net.momirealms.craftengine.bukkit.nms.FastNMS;
import net.momirealms.craftengine.bukkit.plugin.BukkitCraftEngine;
import net.momirealms.craftengine.bukkit.plugin.user.BukkitServerPlayer;
import net.momirealms.craftengine.bukkit.util.*;
+import net.momirealms.craftengine.bukkit.world.BukkitBlockInWorld;
import net.momirealms.craftengine.bukkit.world.BukkitWorld;
import net.momirealms.craftengine.core.block.ImmutableBlockState;
import net.momirealms.craftengine.core.block.properties.Property;
import net.momirealms.craftengine.core.entity.player.InteractionHand;
+import net.momirealms.craftengine.core.item.CustomItem;
import net.momirealms.craftengine.core.item.Item;
import net.momirealms.craftengine.core.loot.LootTable;
import net.momirealms.craftengine.core.plugin.config.Config;
import net.momirealms.craftengine.core.plugin.context.ContextHolder;
-import net.momirealms.craftengine.core.plugin.context.parameter.CommonParameters;
+import net.momirealms.craftengine.core.plugin.context.PlayerOptionalContext;
+import net.momirealms.craftengine.core.plugin.context.parameter.DirectContextParameters;
+import net.momirealms.craftengine.core.plugin.event.EventTrigger;
+import net.momirealms.craftengine.core.util.Cancellable;
import net.momirealms.craftengine.core.util.VersionHelper;
import net.momirealms.craftengine.core.world.BlockPos;
import net.momirealms.craftengine.core.world.Vec3d;
+import net.momirealms.craftengine.core.world.WorldPosition;
import org.bukkit.*;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
-import org.bukkit.block.data.BlockData;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@@ -33,10 +38,12 @@ import org.bukkit.event.block.BlockPhysicsEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
+import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.world.GenericGameEvent;
import org.bukkit.inventory.ItemStack;
import java.util.List;
+import java.util.Optional;
public class BlockEventListener implements Listener {
private final BukkitCraftEngine plugin;
@@ -49,6 +56,14 @@ public class BlockEventListener implements Listener {
this.enableNoteBlockCheck = enableNoteBlockCheck;
}
+ @EventHandler
+ public void onPlayerJoin(PlayerJoinEvent event) {
+ Object packet = this.manager.cachedUpdateTagsPacket;
+ if (packet != null) {
+ this.plugin.networkManager().sendPacket(event.getPlayer(), packet);
+ }
+ }
+
@EventHandler(ignoreCancelled = true)
public void onPlayerAttack(EntityDamageByEntityEvent event) {
if (!VersionHelper.isOrAbove1_20_5()) {
@@ -108,17 +123,40 @@ public class BlockEventListener implements Listener {
Object blockState = BlockStateUtils.blockDataToBlockState(block.getBlockData());
int stateId = BlockStateUtils.blockStateToId(blockState);
Player player = event.getPlayer();
+ Location location = block.getLocation();
+ BukkitServerPlayer serverPlayer = this.plugin.adapt(player);
+ net.momirealms.craftengine.core.world.World world = new BukkitWorld(player.getWorld());
+ WorldPosition position = new WorldPosition(world, location.getBlockX() + 0.5, location.getBlockY() + 0.5, location.getBlockZ() + 0.5);
+ Item itemInHand = serverPlayer.getItemInHand(InteractionHand.MAIN_HAND);
+
+ if (itemInHand != null) {
+ Optional> optionalCustomItem = itemInHand.getCustomItem();
+ if (optionalCustomItem.isPresent()) {
+ Cancellable cancellable = Cancellable.of(event::isCancelled, event::setCancelled);
+ optionalCustomItem.get().execute(
+ PlayerOptionalContext.of(serverPlayer, ContextHolder.builder()
+ .withParameter(DirectContextParameters.BLOCK, new BukkitBlockInWorld(block))
+ .withParameter(DirectContextParameters.POSITION, position)
+ .withParameter(DirectContextParameters.PLAYER, serverPlayer)
+ .withParameter(DirectContextParameters.EVENT, cancellable)
+ .withOptionalParameter(DirectContextParameters.ITEM_IN_HAND, itemInHand)
+ ), EventTrigger.BREAK
+ );
+ if (cancellable.isCancelled()) {
+ return;
+ }
+ }
+ }
+
if (!BlockStateUtils.isVanillaBlock(stateId)) {
ImmutableBlockState state = manager.getImmutableBlockStateUnsafe(stateId);
if (!state.isEmpty()) {
- Location location = block.getLocation();
- BukkitServerPlayer serverPlayer = this.plugin.adapt(player);
// double check adventure mode to prevent dupe
if (!FastNMS.INSTANCE.mayBuild(serverPlayer.serverPlayer()) && !serverPlayer.canBreak(LocationUtils.toBlockPos(location), null)) {
return;
}
- // trigger event
+ // trigger api event
CustomBlockBreakEvent customBreakEvent = new CustomBlockBreakEvent(serverPlayer, location, block, state);
boolean isCancelled = EventUtils.fireAndCheckCancel(customBreakEvent);
if (isCancelled) {
@@ -126,7 +164,20 @@ public class BlockEventListener implements Listener {
return;
}
- net.momirealms.craftengine.core.world.World world = new BukkitWorld(location.getWorld());
+ // execute functions
+ Cancellable cancellable = Cancellable.of(event::isCancelled, event::setCancelled);
+ PlayerOptionalContext context = PlayerOptionalContext.of(serverPlayer, ContextHolder.builder()
+ .withParameter(DirectContextParameters.BLOCK, new BukkitBlockInWorld(block))
+ .withParameter(DirectContextParameters.BLOCK_STATE, state)
+ .withParameter(DirectContextParameters.EVENT, cancellable)
+ .withParameter(DirectContextParameters.POSITION, position)
+ .withOptionalParameter(DirectContextParameters.ITEM_IN_HAND, itemInHand)
+ );
+ state.owner().value().execute(context, EventTrigger.BREAK);
+ if (cancellable.isCancelled()) {
+ return;
+ }
+
// handle waterlogged blocks
@SuppressWarnings("unchecked")
Property waterloggedProperty = (Property) state.owner().value().getProperty("waterlogged");
@@ -136,27 +187,26 @@ public class BlockEventListener implements Listener {
location.getWorld().setBlockData(location, Material.WATER.createBlockData());
}
}
+
// play sound
- Vec3d vec3d = new Vec3d(location.getBlockX() + 0.5, location.getBlockY() + 0.5, location.getBlockZ() + 0.5);
- world.playBlockSound(vec3d, state.sounds().breakSound());
+ world.playBlockSound(position, state.sounds().breakSound());
if (player.getGameMode() == GameMode.CREATIVE || !customBreakEvent.dropItems()) {
return;
}
- Item itemInHand = serverPlayer.getItemInHand(InteractionHand.MAIN_HAND);
// do not drop if it's not the correct tool
if (!BlockStateUtils.isCorrectTool(state, itemInHand)) {
return;
}
// drop items
- ContextHolder.Builder builder = ContextHolder.builder()
- .withParameter(CommonParameters.WORLD, world)
- .withParameter(CommonParameters.LOCATION, vec3d)
- .withParameter(CommonParameters.PLAYER, serverPlayer);
- //mark item .withOptionalParameter(CommonParameters.MAIN_HAND_ITEM, itemInHand);
- for (Item