Pokeball JSONs
Different aspects of the Pixelmon mod can be tweaked through different types of JSON files for datapacks. This page covers the pokeballs files, which define many different settings for different types of pokeballs and allow custom creation of Pokeballs using existing logic. Pokeball JSON files are located at /data/pixelmon/pokeballs
. These files are found in the Pixelmon mod JAR file opened with a program such as WinRAR of 7zip. For a further explanation and assistance on how to create a Datapack, see Datapack Creation.
This page aims to explain the Pokeball JSONs and how each part functions. For an example and guide for creating a Custom Pokeball, see this page.
Contents
pokeball.json
This JSON file contains data about pokeballs and which pokeballs JSON files to read. If a new pokeball JSON file is created, the ball must be added to this file in order for it to be registered by Pixelmon.
setup
This is how a basic pokeball is setup on name, model, textures, sprites, logic, bases, captureMethod, catchBonus, breakChance, velocityModifier, gravityModifier, and particles.
"name": "poke_ball", "model": "pixelmon:models/pokeballs/base.pqc", "texture": "pixelmon:textures/pokeballs/poke_ball.png", "flashingTexture": "pixelmon:textures/pokeballs/poke_ball_flashing.png", "ballSprite": "pixelmon:items/pokeballs/poke_ball", "lidSprite": "pixelmon:items/pokeballs/poke_ball_lid", "guiSprite": "pixelmon:textures/gui/overlay/poke_ball.png", "logic": "", "bases": [ "aluminum", "iron" ], "captureMethod": "gen8", "catchBonus": 1, "breakChance": 0.25, "velocityModifier": 1, "gravityModifier": 1, "particles": false
pqc
A pqc is what the json uses to locate the model and animations the ball will use, set up like this:
$body base.bmd $anim bounceOpen bounceopen.bmd $anim bounceClose bounceclose.bmd $anim shakeLeft shakeleft.bmd $anim shakeRight shakeright.bmd $anim idle idle.bmd $anim break break.bmd
NOTE: ONLY APPLIES TO CUSTOM MODELS, IF DOING JUST CUSTOM TEXTURES LEAVE AS IS
gui sprite
The gui sprite is how the ball will look on the overlay where you would see your party normally.
bases
The bases are the bottom of the pokeball which can consist of iron, aluminum, silver, or platinum
logic
The logic is what the ball uses to follow specific conditions, such as the net ball being more effective on water and bug type pokemon.
capture method
The capture method is the catch formula used in the official game of that generation and two extra being 100% and 50%.
velocity modifier
This determines how fast the ball is thrown as a projectile outside of battle
gravity modifier
This determines how heavy the ball is when thrown as a projectile outside of battle.
catch bonus
The catch bonus is the balls base catch rate.
crafting
Recipes are also needed for all craftable balls which JSONs are found in three folders, but will only focus on two which can be found in
<Minecraft directory>/data/pixelmon/recipes/pokeball/lid
and <Minecraft directory>/data/pixelmon/recipes/pokeball/ball
lids
this is the standard lid recipe for a pokeball
{ "type": "minecraft:crafting_shaped", "pattern": [ "###" ], "key": { "#": { "item": "pixelmon:cooked_red_apricorn" } }, "result": { "item": "pixelmon:poke_ball_lid", "count": 5, "nbt": { "PokeBallID": "poke_ball" }
ball
This is the standard recipe for a pokeball
"type": "minecraft:crafting_shapeless", "ingredients": [ { "type": "forge:nbt", "item": "pixelmon:poke_ball_lid", "nbt": { "PokeBallID": "poke_ball" } }, { "item": "minecraft:stone_button" }, { "tag": "pixelmon:pokeball_bases" } ], "result": { "item": "pixelmon:poke_ball", "count": 1, "nbt": { "PokeBallID": "poke_ball" }