eggolib
Required on the client and the server!
eggolib is a Fabric mod library that extends the functionality of Apoli for funsies. This mod library adds new power, condition and action types to be used for developing Origins/Apoli datapacks.
See here for the documentation for eggolib.
Q: Are the versions for 1.18.x going to be updated? A: Probably not, since it'd be quite a task for me to maintain versions for different Minecraft versions.
Q: Can you back-port this to X? A: The same answer from above still applies, but if you can or want to, feel free!
Using as a dependency
You can use eggolib as a dependency by modifying the gradle.properties and build.gradle files of your project, like so:
(You can remove the include part if you don't want to include eggolib in your project)
build.gradle
repositories {
maven {
url "https://jitpack.io"
}
}
dependencies {
modImplementation "com.github.eggohito:eggolib:${project.eggolib_version}"
include "com.github.eggohito:eggolib:${project.eggolib_version}"
}
gradle.properties
eggolib_version=[INSERT VERSION HERE] All Versions
+ Add Version| Name | Game version | Platforms | Published | Downloads | Actions |
|---|---|---|---|---|---|
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 | ||||
| last yr. | 1 |
- Migrated to using a data tracker (from a CCA component) for syncing command tags.
## Fixes
- Fixed
leashbi-entity action type dropping leash item when detached. - Fixed eggolib using a wrong version of Modmenu as a dependency.
- Migrated to using a data tracker (from a CCA component) for syncing command tags.
## Fixes
- Fixed
leashbi-entity action type dropping leash item when detached.
- (#50) Fixed mod dependency resolution (should now work with newer versions of Fabric API/Loader.)
- Temporarily fixed lag issue with Apoli setting the holder of an item stack.
- (#50) Fixed mod dependency resolution (should now work with newer versions of Fabric API/Loader.)
- The **NBT operation/operator** data types are still re-using vanilla's NBT operation/operator classes.
- The
modify_riding_positionandmodify_passenger_positionpower types are currently not re-implemented due to its dependence on a method that only existed in Minecraft versions 1.20.2 and above for its implementation.
- Fixed
eggolib:miscCCA component breaking pre-set command tags.
- Fixed issue with message filters/consumers
- Updated to Minecraft 1.20.2
- Removed some power/condition/action types that are now available in Apoli.
- The end bound for the linear-interpolated FOV multiplier is no longer affected by the
affected_by_fov_effect_scalefield of themodify_fovpower type. - Changed the object at which the **NBT operation/operator** data types operate on.
- Improved object-based packet implementation.
- Added
should_resolveboolean field tomodify_label_renderpower type, with a default value oftrue(set this to false if you don't plan on using [text components which require resolution.](https://minecraft.wiki/w/Raw_JSON_text_format#Component_resolution))
## Fixes
- Fixed
open_inventoryentity action type not opening the inventory of the entity that invoked the action if nopoweris specified (for real this time.)
## Additions
- New power type:
pose, which sets the pose of the entity that has the power (may not work for certain poses for certain entities). It supports aposefield, which then supports these values:standing,fall_flying,sleeping,swimming,spin_attack,crouching,long_jumping,dying,croaking,using_tongue,sitting,roaring,sniffing,emerging,digging. - New entity condition type:
in_pose, which checks the entity's current pose. It supports aposefield. - New data type: **message filter**, used for executing an entity action if a message matches the specified filter. It supports these fields:
filter; the string used as the filter for matching the message. Supports regular expressions.entity_action; an optional entity action field, which will be executed upon the message matching the filter.- New data type: **message consumer**, used for executing entity actions if a message matches the specified filter. It supports these fields:
filter; the string used as the filter for matching the message. Supports regular expressions.before_action/after_action; an optional entity action field. When this entity action is invoked will depend on the power type.- New data type: **message replacer**, used for replacing a message and executing entity actions if the message matches the specified filter. It supports these fields:
filter; the string used as the filter for matching the message. Supports regular expressions.before_action; an optional entity action field, which will be executed *before* the message is replaced.after_action; an optional entity action field, which will be executed *after* the message has been replaced successfully (e.g: the message is no longer as it was.)- New power type:
action_on_sending_message, which executes an action upon sending a message. It supports these fields: message_type; determines whether the actions should be executed if the message is of this type. [See here for a list of vanilla message types](https://minecraft.wiki/w/Chat_type)filter/filters; optional **message consumer(s)** fields. Invokesbefore_actionbefore the message is prevented from being sent.priority; determines the execution priority of the power. Higher values means the power will be executed earlier.- New power type:
prevent_sending_message, which prevents a message from being sent. It supports these fields: message_type; determines whether the actions should be executed if the message is of this type. [See here for a list of vanilla message types](https://minecraft.wiki/w/Chat_type)filter/filters; optional **message filter(s)** fields.priority; determines the execution priority of the power. Higher values means the power will be executed earlier.- New power type:
modify_sent_message, which modifies the message sent by the player before it's broadcasted to the server. It supports these fields: filter/filters; optional **message filter(s)** fields.priority; determines the execution priority of the power. Higher values means the power will be executed earlier.- New item action type:
modify_item_cooldown, which modifies the item's cooldown. It supports these fields: modifier/modifiers; these modifiers will be applied to the item's previous cooldown.- New item condition type:
item_cooldown, which compares the cooldown progress (ranging from 0.0 to 1.0) of the item to a specific value. It supports these fields: comparison; determines how the cooldown progress value of the item is compared to the specified value.compare_to; the value to compare the cooldown progress value of the item to.- New power types,
modify_riding_positionandmodify_passenger_position, which modifies the mounting position of the entity that has the power, and the passenger(s) of the entity that has the power respectively. It supports these fields: bientity_condition; an optional bi-entity condition field, which if present, checks whether either or both the actor (the passenger(s)) and the target (the entity being ridden) fulfills this bi-entity condition.x_modifier; an optional modifier field, which will be applied to the passenger's X mounting position.y_modifier; an optional modifier field, which will be applied to the passenger's Y mounting position.z_modifier; an optional modifier field, which will be applied to the passenger's Z mounting position.- New damage condition type:
attacker; similar to Apoli'sattackerdamage condition type, except it has abientity_conditionfield.
### Full changelog: [
v1.9.1-1.20...v1.10.0-1.20.2](https://github.com/eggohito/eggolib/compare/v1.9.1-1.20...v1.10.0-1.20.2)## Changes
- The current screen and perspective is now only synced after a certain amount of ticks (controlled by the
syncTickRatefield in the client config.) - Simplified the attack distance scaling factor implementation of the
eggolib:invisibilitypower type. - Optimized implementation of syncing command tags.
## Fixes
- Fixed performance issue with setting the item stack's holder.
- Fixed
open_inventoryentity action type not opening the entity's inventory if nopoweris specified.
- Updated to 1.20.x
- Added
tooltippower type - Similar to Apoli's
tooltippower type, except it can resolve JSON text component on the server-side - Added these new entity action types:
grant_advancementrevoke_advancement- Both are similar to Apoli's
*_advancemententity action types, except it's more functionally similar to the/advancementcommand - Added these new item action types:
execute_commandcopy_to_storage- Added
typedamage condition type
- Added
tooltippower type - Similar to Apoli's
tooltippower type, except it can resolve JSON text component on the server-side - Added these new entity action types:
grant_advancementrevoke_advancement- Both are similar to Apoli's
*_advancemententity action types, except it's more functionally similar to the/advancementcommand - Added these new item action types:
execute_commandcopy_to_storage- Added
typedamage condition type
- Updated to 1.19.4
- Updated testdata
- Added these new power types:
prevent_key_usestat- Updated the
invisibilitypower type: - It now affects the attack distance scaling factor of mobs
- Added these new entity condition types:
in_snowin_thunderstormhas_spawnpoint- Added these new bi-entity condition types:
collidingowner- Similar to Apoli's
ownerbi-entity condition type, except it works for other ownable entities - Added
commandblock condition type - Added
modifyitem action type - Similar to Apoli's
modifyitem action type, except with more loot context - Added
fuelitem condition type
- Added the
modify_fovpower type - Updated the
modify_label_renderpower type - Now parses the specified JSON text component in the
textfield - Now has a
before_parse_actionandafter_parse_actionentity action fields - Now has a
tick_ratepositive integer field - Added the
exposed_to_weatherentity condition type - Updated the
scoreboardentity condition type - Now accepts a score holder in its
namefield - Updated the
inventoryentity condition type - Now has a
comparisonandcompare_tofields
- Updated testdata
- Tweaked the
eggolib:loopmeta action type - The action specified in the
before_actionfield is now executed before getting the score from the specified scoreboard - Updated the
eggolib:invisibilitypower type - Now has the new fields from the
apoli:invisibilitypower type - Removed the
eggolib:prevent_item_usepower type - Removed the
eggolib:clear_key_cacheentity action type - Added an
eggolib:equalbi-entity condition type - Tweaked the
eggolib:game_event_listenerpower type - Now has a
show_particleboolean field, which determines whether it should spawn the vibration particle - Now can listen to the game events emitted by the power holder
- Added an
eggolib:selector_actionentity action type - Made the
SCOREBOARDdata type accept score holders - e.g:
scoreHolderNameand@e[tag = test, limit = 1]are valid inputs - Added an
eggolib:leashbi-entity action type - Added an
eggolib:moon_phaseentity condition type - Optimized the
eggolib:in_screenentity condition type - Now it shouldn't lag the server exponentially if many players are invoking it
- Added an
eggolib:crawlingpower type - Added an
eggolib:crawlingentity condition type
- Updated testdata
- Fixed client-server desync with the
action_on_block_placepower type - Changed how the vibration listener is set in the
game_event_listenerpower type
- Made compatible with Minecraft 1.19.x
- Added
modify_key_sequenceentity action type *(to generalize and replace theclear_key_sequenceentity action type)* - Added
starting_equipmentpower type; like Apoli'sstarting_equipmentpower type, except it's generalized for entities
- Added a
block_collisionentity condition type; similar to Origins/Apoli'sblock_collisionentity condition type but with ablock_conditionfield - Added a
chancemeta condition type - Added a
damageentity/bi-entity action types; similar to Origins/Apoli'sdamageentity/bi-entity action types but with amodifierfield - Added a
has_matching_tagbi-entity condition type - Added a
has_tagentity condition type - Added an
inventoryentity condition type - Added a
merge_nbtboolean field to thereplace_inventoryentity action type - Added a
model_flippower type - Added a
modify_healthentity action type - Added a
prevent_item_usepower type; similar to Origins/Apoli'sprevent_item_usepower type but withentity_action,held_item_action,result_item_action,result_stack,handsandpriorityfields - Added a
priorityinteger field to the*_block_placepower types - Added an
amountinteger field to thedrop_inventoryentity action type - Added an
invisibilitypower type; similar to Origins/Apoli'sinvisibilitypower type but with abientity_conditionfield - Fixed untranslated
disconnect.eggolib.missingtext