Join our discord
In partnership with NodeCraft Logo NodeCraft


You are not logged in! Create an account or login to contribute! Log in here!

Difference between revisions of "Better Spawner/Spawn Info/Item"

From Pixelmon Wiki
(Created the page, complete)
 
(Added example)
 
Line 13: Line 13:
 
|-
 
|-
 
|style="text-align:center"|<code>"minQuantity"</code>
 
|style="text-align:center"|<code>"minQuantity"</code>
|style="text-align:center"|A positive integer.
+
|style="text-align:center"|A positive integer greater than zero.
 
|style="text-align:center"|The smallest amount of the item that might drop. This is overwritten by a specified <code>"quantity"</code> in the [[JsonItemStack|JSON item stack]].
 
|style="text-align:center"|The smallest amount of the item that might drop. This is overwritten by a specified <code>"quantity"</code> in the [[JsonItemStack|JSON item stack]].
 
|-
 
|-
 
|style="text-align:center"|<code>"maxQuantity"</code>
 
|style="text-align:center"|<code>"maxQuantity"</code>
|style="text-align:center"|A positive integer.
+
|style="text-align:center"|A positive integer greater than zero.
 
|style="text-align:center"|The largest amount of the item that might drop. This is overwritten by a specified <code>"quantity"</code> in the [[JsonItemStack|JSON item stack]].
 
|style="text-align:center"|The largest amount of the item that might drop. This is overwritten by a specified <code>"quantity"</code> in the [[JsonItemStack|JSON item stack]].
 
|}
 
|}
 +
 +
Example:
 +
<div onload="prettyPrint()">
 +
<pre class="prettyprint">
 +
{
 +
    "typeID": "item",
 +
    "stringLocationTypes": [
 +
"Super Rod Lava"
 +
    ],
 +
    "condition": {
 +
"times": [
 +
    "NIGHT"
 +
],
 +
"stringBiomes": [
 +
    "roofed_forest",
 +
    "mutated_roofed_forest"
 +
]
 +
    },
 +
    "item": {
 +
"itemID": "minecraft:enchanted_book",
 +
        "nbt": "{StoredEnchantments:[{id:70,lvl:1}]}"
 +
    },
 +
    "minQuantity": 1,
 +
    "maxQuantity": 3,
 +
    "rarity": 50
 +
}
 +
</pre>
 +
</div>

Latest revision as of 02:49, 5 June 2018

SpawnInfoItem are SpawnInfo specifically for spawning items. Normally this will simply spawn the item at the spawn location. However, in the case of fishing, the game will attempt to put the item directly into the player's inventory.

These are the properties available when a SpawnInfo has "typeID": "item":

Property label Type of value Description
"item" A JSON item stack. The information about the item itself.
"minQuantity" A positive integer greater than zero. The smallest amount of the item that might drop. This is overwritten by a specified "quantity" in the JSON item stack.
"maxQuantity" A positive integer greater than zero. The largest amount of the item that might drop. This is overwritten by a specified "quantity" in the JSON item stack.

Example:

{
    "typeID": "item",
    "stringLocationTypes": [
	"Super Rod Lava"
    ],
    "condition": {
	"times": [
	    "NIGHT"
	],
	"stringBiomes": [
	    "roofed_forest",
	    "mutated_roofed_forest"
	]
    },
    "item": {
	"itemID": "minecraft:enchanted_book",
        "nbt": "{StoredEnchantments:[{id:70,lvl:1}]}"
    },
    "minQuantity": 1,
    "maxQuantity": 3,
    "rarity": 50
}

© 2012 - 2025 Pixelmon Mod