Cobbleloots ALPHA-2.0.8
REMEMBER: Alpha versions may contain bugs and unfinished features. Use them at your own risk. If you find any issues, please report them on the Discord server.
Fixes
- Fixed a bug where the game would crash when trying to spawn a Loot Ball in a chunk with an invalid section index (like the void or above the world height limit).
Cobbleloots ALPHA-2.0.7
IMPORTANT: This update breaks compatibility with previous versions of the mod. You will need to update your data packs and configurations to match the new Loot Ball Data format.
REMEMBER: Alpha versions may contain bugs and unfinished features. Use them at your own risk. If you find any issues, please report them on the Discord server.
Changes
Loot Ball Changes
- Added the
Rainbow Loot Ball
:- It has a cobbleloots exclusive rainbow texture.
- It gives
5
XP when opened. - Loot table:
- 1 x Rainbow Creeper Banner (Weight: 8)
- 16 x Rainbow Fireworks (Weight: 8)
- 1 x Totem of Undying (Weight: 1)
- 1 x Exp. Candy XS (Weight: 1)
- 1 x Exp. Candy S (Weight: 1)
- 1 x Exp. Candy M (Weight: 1)
- Obtaining:
- Generation:
- Weight: 10
- Biomes: Can generate in mushroom fields, flower forests, meadows, sunflower plains, cherry groves, and warm ocean biomes.
- Spawning:
- Weight: 20
- Sky Light: 7-15
- Biomes: Same as generation.
- Generation:
- You can now place Loot Balls directly where you are looking at instead of placing them on a fixed position centered on the block you are looking at.
- Added the ability for Loot Balls to drop as decorative items in survival mode.
- When a loot ball has no remaining uses, you can destroy them in survival and the loot ball will drop as a decorative item.
- This change is currently work in progress, so expect some bugs.
- You can disable this behaviour in the config file.
- Changed
Variant
NBT Tag type for Loot Balls toString
instead ofInteger
. It now represents a variant id instead of the position in the variants lists inside the Loot Ball definition JSON. - Added
PlayerTimer
Loot Ball NBT Tag of typeLong
.- It represents a value in
ticks
that the player must wait to reopen the Loot Ball. - A value of
0
disables this behaviour. - A small value (like
1
) indicates that the player can reopen the Loot Ball indefinitely.
- It represents a value in
- Added
XP
Loot Ball NBT Tag of typeInteger
.- It represents the amount of XP that the Loot Ball will give to the player when opened.
- The default values for Loot Balls are now configurable via the new
loot_ball.defaults
config section. Some default values may still be hardcoded, but most of them can now be changed in the config file. - Loot balls will now try to spawn on a solid block instead of midair, but they will still spawn midair if no solid block is found after a certain amount of attempts.
- Some default loot balls now have colours applied to their names to make them more distinguishable in the inventory.
- Updated Loot Ball definitions to use the new Loot Ball Data format, and some of the definitions have been changed to reflect the new data structure:
- Poké (and variants): Now gives
1
XP when opened.- The definition serves as a example for data pack creators to create their own Loot Ball definitions. The values you see in the Poké Loot Ball definition are mostly the default values for all Loot Balls (some of exceptions are the
xp
orweight
values).
- The definition serves as a example for data pack creators to create their own Loot Ball definitions. The values you see in the Poké Loot Ball definition are mostly the default values for all Loot Balls (some of exceptions are the
- Great: Now gives
3
XP when opened. - Ultra: Now gives
10
XP when opened. - Master:
- Now gives
50
XP when opened. - Now it can spawn in all biomes with a weight of
1
.
- Now gives
- Safari: Now gives
1
XP when opened. - Luxury: Now gives
25
XP when opened. - Dive:
- Now gives
5
XP when opened. - Generation and Spawning:
- Now it only generates/spawn inside water
- Removed the below y-level 62 generation condition.
- It still generates/spawn in the Dive Loot Ball allowed biomes.
- Now gives
- Heal:
- Now gives
10
XP when opened. - Generation and Spawning:
- Now it can generate and spawn in all overworld biomes.
- Reduced the weight to
10
for all sources to make it rarer.
- Now gives
- Lure: Removed the
Lure
Loot Ball definition, as it was not used in the mod yet (until the fishing update).
- Poké (and variants): Now gives
- Opening a Loot Ball with a despawn timer will now extend the despawn timer during the time the player is opening it. This change is to prevent Loot Balls from despawning while the player is opening them, which could lead to losing the Loot Ball and its contents.
- Creative players can now middle-click Loot Balls to copy their data, allowing for easier use of Loot Balls in creative mode.
Loot Ball Data Rework
-
Reworked the Loot Ball Data format to be more flexible and easier to use.
-
The Loot Ball definition structure (
data/namespace/loot_ball/{name}.json
) now contains:- (required)
name
[Component
]: The name of the Loot Ball, displayed in the inventory. It can be a simple string or a component with formatting. - (optional)
loot_table
[ResourceLocation
]: The loot table to use when opening the Loot Ball. - (optional)
texture
[ResourceLocation
]: The texture to use for the Loot Ball item. If not specified, the default texture will be used. - (optional)
sources
[Map<String, List<SourceFilter>>
]: A map of sources with filters to use for the Loot Ball.- (optional)
generation
[List<SourceFilter>
]: A list of filters for the Loot Ball to generate in the world. - (optional)
spawning
[List<SourceFilter>
]: A list of filters for the Loot Ball to spawn in the world.
- (optional)
- (optional)
variants
[Map<String, VariantData>
]: A map of variants for the Loot Ball. Each variant can have its ownname
,texture
, andloot_table
. Each variant is identified by a uniqueid
.- (optional)
{variant_id}
[VariantData
]: The data for the variant, where{variant_id}
is a unique identifier for the variant.
- (optional)
- (required)
-
The Loot Ball definition structure now uses a new
SourceFilter
format, which allows for more flexible filtering of sources:- (optional)
weight
[Integer
]: The weight of the filter, used for random selection. Defaults to1
. - (optional)
structure
[Tag<Structure>
]: A tag of structures that the filter applies to. If not specified, the filter passes for all structures. - (optional)
biome
[Tag<Biome>
]: A tag of biomes that the filter applies to. If not specified, the filter passes for all biomes. - (optional)
dimension
[List<ResourceLocation>
]: A list of dimensions that the filter applies to. If not specified, the filter passes for all dimensions. - (optional)
block
[Map<String, Tag<Block>>
]:- (optional)
spawn
[Tag<Block>
]: A tag of blocks that the filter applies to when checking the block the Loot Ball is spawned on. If not specified, the filter passes for all blocks. - (optional)
base
[Tag<Block>
]: A tag of blocks that the filter applies to when checking the base block of the Loot Ball. If not specified, the filter passes for all blocks.
- (optional)
- (optional)
fluid
[Tag<Fluid>
]: A tag of fluids that the filter applies to when checking the fluid the Loot Ball is spawned on. If not specified, the filter passes for all fluids. - (optional)
position
[Map<String, MinMaxFilter>
]:- (optional)
x
[MinMaxFilter
]: A filter for the x position of the Loot Ball. If not specified, the filter passes for all x positions. - (optional)
y
[MinMaxFilter
]: A filter for the y position of the Loot Ball. If not specified, the filter passes for all y positions. - (optional)
z
[MinMaxFilter
]: A filter for the z position of the Loot Ball. If not specified, the filter passes for all z positions.
- (optional)
- (optional) (exclusive to spawning filters)
light
[Map<String, MinMaxFilter>
]:- (optional)
block
[MinMaxFilter
]: A filter for the block light level of the Loot Ball. If not specified, the filter passes for all block light levels. - (optional)
sky
[MinMaxFilter
]: A filter for the sky light level of the Loot Ball. If not specified, the filter passes for all sky light levels.
- (optional)
- (optional)
time
[Map<String, MinMaxFilter>
]:- (optional)
value
[MinMaxFilter
]: A filter for the time of day in ticks when the Loot Ball can spawn. If not specified, the filter passes for all times. - (optional)
period
[Integer
]: The period of the time filter in ticks, which defines the modulus for the time value. If not specified, the filter does not apply a period.
- (optional)
- (optional)
weather
[Map<String, Boolean>
]:- (optional)
clear
[Boolean
]: Whether the filter passes when the weather is clear. Defaults totrue
. - (optional)
rain
[Boolean
]: Whether the filter passes when it is raining. Defaults totrue
. - (optional)
thunder
[Boolean
]: Whether the filter passes when it is thundering. Defaults totrue
.
- (optional)
- (optional)
-
The Loot Ball definition structure now uses a new
MinMaxFilter
format, which allows for more flexible filtering of positions:- (optional)
min
[Integer
]: The minimum value for the filter. If not specified, the filter passes for all values. - (optional)
max
[Integer
]: The maximum value for the filter. If not specified, the filter passes for all values.
- (optional)
-
The Loot Ball definition structure now uses a new
VariantData
format, which allows for more flexible variant data:- (optional)
name
[Component
]: The name of the variant, displayed in the inventory. If not specified, the parent name will be used. - (optional)
texture
[ResourceLocation
]: The texture to use for the variant item. If not specified, the parent texture will be used. - (optional)
loot_table
[ResourceLocation
]: The loot table to use when opening the variant Loot Ball. If not specified, the parent loot table will be used.
- (optional)
Creative Tab Changes
- Replaced all items in the Cobbleloots Creative Tab with:
Loot Ball
default item, without any specific data attached.Textured Loot Ball
items, which are the same as the default item but with a specific texture applied. All the cobblemon textures are now available as textured loot balls.
Config Changes
- Added new configs:
loot_ball.defaults.uses
: Default amount of uses a Loot Ball has. Defaults to1
.loot_ball.defaults.multiplier
: Default loot multiplier for Loot Balls. Defaults to1.0
.loot_ball.defaults.xp
: Default XP amount for Loot Balls. Defaults to0
.loot_ball.defaults.player_timer
: Default player timer in ticks. Defaults to0
.loot_ball.defaults.despawn_tick
: Default despawn tick timer. Defaults to0
.loot_ball.survival.drop.enabled
: Enable Loot Balls to drop as decorative items in survival mode. Defaults totrue
.loot_ball.survival.drop.automatic
: Enable Loot Balls to drop automatically when they have no remaining uses. Defaults totrue
.loot_ball.survival.destroy_looted
: Enable Loot Balls to be destroyed in survival mode when looted. Defaults tofalse
.loot_ball.disabled.dimensions.generation
: A list of dimensions where Loot Balls will not generate in the world. Defaults to an empty list.loot_ball.disabled.dimensions.spawning
: A list of dimensions where Loot Balls will not spawn in the world. Defaults to an empty list.loot_ball.disabled.dimensions.fishing
: A list of dimensions where Loot Balls will not spawn when fishing. Defaults to an empty list.loot_ball.disabled.dimensions.archaeology
: A list of dimensions where Loot Balls will not spawn when digging in archaeology sites. Defaults to an empty list.
- Removed configs:
loot_ball.xp.amount
: This config was replaced by the newloot_ball.defaults.xp
config.
Fixes
- Fixed a bug where wardens could target and attack loot balls; now wardens ignore loot balls as intended.
- Fixed loot balls not despawning when falling into the world void.
- Fixed loot balls not being killed using the
/kill
command. - Fixed a bug where, when a player in creative assigned an item to a loot ball, looting the loot ball caused the item to disappear from its inventory and prevented other players from claiming the loot.
Technical
- All codecs were reworked for the new loot ball data format.
- Optimized some internal game detections for loot ball entity targetting and damage.
- Add a limit to random chunk search to optimize loot ball generation.
- Removed internal block check for valid position when spawning a loot ball. This is replaced now by loot ball definition filters.
- Major rewrite of the loot ball code.
- Updated lang files.
- Updated some methods to better differentiate between client and server code.
- Added support for yaml lists in loot ball configs.
Cobbleloots ALPHA-2.0.6
IMPORTANT: Alpha versions of the mod may contain bugs and unfinished features. Use them at your own risk. If you find any issues, please report them on the Discord server.
Changes
- Added new configurations:
loot_ball.xp.enabled
: Whether to enable loot ball XP when a player opens a loot ball. Default:true
.loot_ball.xp.amount
: The amount of XP to give when a player opens a loot ball. Default:5
.
- Changed configuration keys:
loot_ball.despawn.*
configurations are now underloot_ball.spawning.despawn.*
.
- Now, the boolean NBT tags for loot balls are always saved regardless of the value. This affects the
Invisible
andSparks
tags. - Reduced the default configuration value for loot ball generation chance from
0.0625
to0.0513
.- This means that the chance for a chunk to generate a loot ball or more (with 2 attempts per chunk) is now
~10%
instead of~12%
.
- This means that the chance for a chunk to generate a loot ball or more (with 2 attempts per chunk) is now
- Updated loot balls weights:
- Heal:
25
->20
- Great:
25
->20
- Dive:
25
->30
- Heal:
Fixes
- Fixed a bug where the loot ball despawn enabling/disabling configuration didn't work properly. The game would always use the default value of
true
regardless of the configuration. - Fixed a bug where the game would crash if the configurations were of the wrong type. Now the game will log an error message and use the default value instead.
- Fixed a bug where loot ball invisibility didn't work properly and were losing their tag on world reloads and generations.
- Fixed a bug where setting the loot ball uses to negative values (infinite uses) would not work properly, removing its contents and making it unusable. Now, negative values effectively make the loot ball infinite.
- Fixed a bug where loot balls would show a name tag when the language keys were different from default values. Now, it will only render its tag if a custom name is set with NBT.
Cobbleloots ALPHA-2.0.5
IMPORTANT: Alpha versions of the mod may contain bugs and unfinished features. Use them at your own risk. If you find any issues, please report them on the GitHub repository.
Changes
- Replaced the external library for configuration with a custom one.
- This should improve performance and reduce the number of dependencies (preventing mod conflicts).
- No changes to the configuration format. It's still a YAML file in the same location as before.
- This change is experimental and may cause issues. Please report any problems you encounter.
Fixes
- Fixed a bug where the mod would crash when other mods were importing the same YAML library. Now it uses a custom library that should not conflict with other mods.
Known Issues
- Bonus loot balls invisibility is not working as intended.
Cobbleloots ALPHA-2.0.4
IMPORTANT: Alpha versions of the mod may contain bugs and unfinished features. Use them at your own risk. If you find any issues, please report them on the GitHub repository.
Changes
- Updated the creative loot ball item.
- Now, they have a custom model and texture depending on the loot ball data they hold.
- Updated its tooltip to show the loot ball data attached to it.
CustomData
item component is now used to store the loot ball data that will be added to the loot ball placed with this item.- Added some default loot balls to the cobbleloots tab in the creative inventory.
Fixes
- Fixed a bug where the mod would export config libraries without masking the namespace, causing conflicts with other mods.
- Fixed a bug where the game would crash because of an inconsistent float parsing in the mod configuration.
Known Issues
- Bonus loot balls invisibility is not working as intended.
Cobbleloots ALPHA-2.0.3
IMPORTANT: Alpha versions of the mod may contain bugs and unfinished features. Use them at your own risk. If you find any issues, please report them on the GitHub repository.
Changes
- Added a configuration file to customize the mod's features.
- A new configuration file is generated in the
config/cobbleloots
folder when the mod is loaded for the first time. - At the moment, the configuration file is missing a lot of features, but it will be expanded in future versions.
- A new configuration file is generated in the
- Added a chunk cap to loot ball generation which can be configured in the configuration file.
Configurations
NOTE: The configuration file is in YAML format, so keys are referenced using a dot notation.
Loot Ball Bonus
loot_ball.bonus.enabled
: Enables/disables the bonus feature for loot balls (default: true)loot_ball.bonus.chance
: Chance for a loot ball to provide a bonus (0-1, default: 0.1)loot_ball.bonus.multiplier
: Multiplier applied to loot when bonus is active (default: 2.0)loot_ball.bonus.invisible
: Whether bonus loot balls are invisible (default: true)
Loot Ball Generation
loot_ball.generation.enabled
: Enables/disables loot ball generation in chunks (default: true)loot_ball.generation.chance
: Chance for loot ball generation on each attempt (0-1, default: 0.0625)loot_ball.generation.attempts
: Number of attempts to generate loot balls per chunk (min: 1, default: 2)loot_ball.generation.chunk_cap
: Maximum number of loot balls that can be generated per chunk (min: 1, default: 4)
Loot Ball Spawning
loot_ball.spawning.enabled
: Enables/disables periodic loot ball spawning near players (default: true)loot_ball.spawning.chance
: Chance for a loot ball to spawn near a random player (0-1, default: 0.25)loot_ball.spawning.cooldown.min
: Minimum ticks between loot ball spawn attempts (min: 0, default: 6000)loot_ball.spawning.cooldown.max
: Maximum ticks between loot ball spawn attempts (min: 0, default: 36000)
Loot Ball Despawn
loot_ball.despawn.enabled
: Enables/disables loot ball despawning (default: true)loot_ball.despawn.time
: Time in ticks before a loot ball despawns (min: 0, default: 24000)
Fixes
- Fixed a bug where the server would crash when a loot ball spawn attempt happened without players connected.
- Fixed an error in the calculation of nearby chunks for loot ball spawning.
- Fixed a visual bug where loot balls would always render with poké ball texture instead of the correct loot ball texture from custom data.
Known Issues
- Bonus loot balls invisibility is not working as intended.
Cobbleloots ALPHA-2.0.2
IMPORTANT: Alpha versions of the mod may contain bugs and unfinished features. Use them at your own risk. If you find any issues, please report them on the GitHub repository.
Changes
- Added an offset for loot ball spawns and generations, so they don't spawn on block borders.
Fixes
- Fixed a bug where the mod would crash when trying to open a loot ball with mods that need access to loot ball items like the Jade mod.
Cobbleloots ALPHA-2.0.1
IMPORTANT: Alpha versions of the mod may contain bugs and unfinished features. Use them at your own risk. If you find any issues, please report them on the GitHub repository.
Changes
Loot Ball Generation and Spawning
- Loot balls can now be generated with new chunks in the world. The generation is based on biome tags filters and height filters.
- The generation can be configured in data packs and enabled or disabled for individual loot balls. By setting the
type
entry togenerated
in a source definition, the loot ball will be generated in the world. - The generator will try to spawn a loot ball in a section of a chunk. By default, 3 attempts are made to spawn a loot ball in a chunk.
- Reduced the performance impact of loot ball generation compared to the previous mod, by checking smaller sections of the world.
- The generation can be configured in data packs and enabled or disabled for individual loot balls. By setting the
- Loot balls can now spawn nearby a random player. The spawning uses the same biome tags filters and height filters as generation, but they can be configured separately in data packs.
- Every certain amount of time, the mod will try to spawn a loot ball near a random player. By default, the mod will try to spawn a loot ball every 5-30 minutes.
Loot Ball
- Reverted changes to item obtaining in survival. Now, the item will be directly added to the player's inventory instead of dropping it on the ground. If the player's inventory is full, the item will be dropped on the ground.
- In the future, I will add a config option to choose between these two behaviors.
Loot Ball NBT
- Added new nbt tag
DespawnTick
. This tag is used to store the tick when the loot ball will despawn. This tag is used to prevent spawned loot balls from staying in the world indefinitely. Generated loot balls doesn't have this tag, so they will not despawn.
Tags
- Added new internal biome and block tags for loot ball generation and spawning.
Loot Ball Data
- Changed
biome
entry data type insources
definitions fromResourceLocation
toTagKey<Biome>
for better performance. From now on, biome filters should point to biome tags instead of biome IDs. If no biome filter is specified, the loot ball will be available in all biomes. - Added an experimental boolean
announce
entry. If set totrue
, when the loot ball is spawned, a message will be sent to all players on the server.
Cobbleloots ALPHA-2.0.0
IMPORTANT: Alpha versions of the mod may contain bugs and unfinished features. Use them at your own risk. If you find any issues, please report them on the GitHub repository.
Note: This mod replaces my previous mod
Cobblemon: Loot Balls
, but it is not compatible with the old loot balls from the other mod, so I suggest backing up items from previous worlds.
Changes from previous mod
- The Loot Balls code was completely redone from scratch. From now on, the mod will be called Cobbleloots, to avoid confusion with the old incompatible versions.
- Loot Balls are now entities instead of blocks.
- Loot Ball generation and survival sources aren't implemented yet. They will be added in future alpha versions.
- Loot Balls now doesn't disappear after being opened. They will stay in the world until they are destroyed by the players. This change was made to allow players to use the loot balls as decorations in future versions.
- Loot Balls doesn't drop themselves when destroyed. This will be added in future versions.
- Loot Balls items now drop into the world instead of being directly added to the player's inventory.
New Features
- Loot Balls now have new sounds and animations.
- The opening sound was updated to be more in line with the original Pokémon games.
- The opening animation was updated to be more fluid and visually appealing.
- Various sounds were added/updated for different actions on the loot balls.
Mapmaking
- The mod now has a documentation to help mapmakers use the mod objects and features in their custom maps. This will be updated as new features are added.
- At the moment of this release, the documentation is still a work in progress. If you have any questions, feel free to ask on my discord server. I will update the documentation as soon as possible.
- Added a new
Loot Ball Data
system to help mapmakers create custom loot balls with different properties.- You can now create custom loot balls trough datapacks! Check the documentation for more information.
- The system is still a work in progress, and it may change in future versions.
- The system is not yet implemented in survival sources nor generation. It will be added in future alpha versions.
- You can customize the loot table, texture, sources, rarity, biomes and more. Some of these features are not yet implemented, but you can write the data for future use.
- Reworked the
Openers
tag to allow more flexibility for mapmakers.- The system is still a work in progress, and it may change in future versions.
- It now stores the
UUID
and theTimestamp
of the player that opened the loot ball. This will be used in future versions to add more features to the mod, like cooldowns and re-usable loot balls.
Changes
- Crítical: Modified
Openers
NBT save/loading. It works as a list of strings now, to avoid issues with larger UUIDs strings.
NOTE: The old code was left in place to deserialize this NBT key for compatibility reasons. It is recommended to load the chunks containing loot balls already generated to be updated to the new system. This may be removed in the future.
- Removed
perPlayerLootBalls
config. It was redundant and now loot balls can only be opened 1 time per player by default.
NOTE: In single player worlds, loot balls have 1 use by default, and loot balls will be destroyed when used. In multiplayer worlds, the new
ignoreLootBallUses
setting must be changed totrue
so that everyone can claim the loot (see below) or adjust thenaturalLootBallUses
setting to allow more than 1 use in natural loot balls.
- Replaced
ignorePerPlayerLootBallUses
config withignoreLootBallUses
config. Whentrue
, the remaining uses of a loot ball will be ignored (infinite uses), but will still be limited to 1 loot per player. Defaults tofalse
. - Added
randomizeAfterUse
config. Whentrue
, loot balls with an assigned loot table (like the natural ones) will grant random loot to each player. Iffalse
, all players will get the same loot. Defaults totrue
. - Updated the docs.
Fixes
- Fix:
Infinite
NBT tag in loot balls ignoresOpeners
NBT.
Changes
- Generated Loot Balls are now a bit rarer.
- Added 2 new configs:
minLootBallsPerChunk
: You can now set the minimum amount of lootballs generated per chunk. (Defaults to0
)generationChance
: You can now set the chance for a lootball generation attempt to be successful. (Defaults to0.08
)