HerobrineXia 6 سال پیش
والد
کامیت
ab13d6b2c6
2فایلهای تغییر یافته به همراه32 افزوده شده و 1 حذف شده
  1. 1 1
      data/item/functions/comment/give_book.mcfunction
  2. 31 0
      data/item/loot_tables/comment/writable_book.json

+ 1 - 1
data/item/functions/comment/give_book.mcfunction

@@ -1 +1 @@
-give @s writable_book{display:{Name:'[{"selector":"@s"}]'}}
+loot give @s loot item:comment/writable_book

+ 31 - 0
data/item/loot_tables/comment/writable_book.json

@@ -0,0 +1,31 @@
+{
+	"type":"minecraft:generic",
+	"pools":[
+		{
+		"rolls":1,
+		"entries":[
+				{	
+					"type":"item",
+					"name":"minecraft:writable_book",
+					"functions":[
+                        {
+						    "function":"set_name",
+						    "name":{
+                                "selector": "@s"
+                            },
+                            "entity": "this"
+                        },
+                        {
+                            "function": "minecraft:set_lore",
+                            "lore":[
+                                {
+                                    "text"
+                                }
+                            ]
+                        }
+                    ]
+				}
+			]
+		}
+	]
+}