English
PetiteInventory – TaCZ Magazine Compatibility Patch
Original mod: Petite Inventory by MerrySnow
This is an unofficial compatibility build based on PetiteInventory 1.0.8.
PetiteInventory allows items to occupy different amounts of space inside an inventory, creating a grid-based system similar to Resident Evil, Escape from Tarkov or DayZ.
However, several TaCZ objects share the same base item ID and are distinguished only through their NBT data. Because of this, the original configuration could not assign different sizes to individual magazines, weapons or attachments.
This compatibility patch modifies PetiteInventory’s internal item-matching system so it can recognize the following NBT identifiers:
This allows each magazine family, weapon and attachment to have its own inventory size.
Example: magazine family
{
"match": [
"taczmagazines:magazine{MagazineFamily:\"9mm_17\"}"
],
"result": "1*2"
}
Example: weapon
{
"match": [
"tacz:modern_kinetic_gun{GunId:\"tacz:glock_17\"}"
],
"result": "2*2"
}
Example: attachment
{
"match": [
"tacz:attachment{AttachmentId:\"tacz:scope_vudu\"}"
],
"result": "3*1"
}
Only the stable identifier needs to be written. Values such as ammunition count, damage, UUID, loaded magazine and item rotation do not need to be included.
This means that an empty magazine and a loaded magazine from the same family will always occupy the same amount of space.
Why was this modification necessary?
This functionality could not be implemented through a datapack or through ordinary PetiteInventory configuration rules alone.
Datapacks cannot modify the Java logic PetiteInventory uses to identify items. The internal item-matching code had to be extended so it could read the TaCZ identifiers stored inside NBT.
An independent code-level addon or mixin could also provide this functionality, but this release modifies PetiteInventory directly.
Installation
-
Remove the original PetiteInventory 1.0.8 .jar from the mods folder.
-
Place this compatibility build in the mods folder.
-
Make sure only one PetiteInventory .jar is installed.
-
Add the desired rules to the PetiteInventory size configuration.
-
Restart Minecraft.
Do not install this file together with the original PetiteInventory file, because both use the same internal mod ID.
Requirements
-
Minecraft 1.20.1
-
Forge 47 or newer
-
TaCZ
-
TaCZ Magazines for MagazineFamily support
-
PetiteInventory configuration files
-
Compatible TaCZ content packs when using their weapon or attachment IDs
This patch was originally created for the Dead Night Modpack by VIVI2, but it can also be used independently with the required mods.
Credits
-
Original PetiteInventory mod: MerrySnow
-
TaCZ: its original development team and contributors
-
TaCZ Magazines and content packs: their respective creators
-
Compatibility modifications: VIVI2
This is an unofficial compatibility build. It is not affiliated with or endorsed by the original creators of PetiteInventory or TaCZ.
All original code, assets, names and trademarks belong to their respective creators.
Español
PetiteInventory – Parche de compatibilidad con TaCZ Magazines
Mod original: Petite Inventory de MerrySnow
Esta es una versión no oficial de compatibilidad basada en PetiteInventory 1.0.8.
PetiteInventory permite que los objetos ocupen diferentes cantidades de espacio dentro del inventario, creando un sistema de cuadrícula similar al de Resident Evil, Escape from Tarkov o DayZ.
Sin embargo, varios objetos de TaCZ comparten el mismo ID principal y solamente se diferencian mediante sus datos NBT. Por esta razón, la configuración original no podía asignar tamaños diferentes a cada cargador, arma o accesorio.
Este parche modifica el sistema interno de reconocimiento de objetos de PetiteInventory para que pueda leer los siguientes identificadores NBT:
-
MagazineFamily para los cargadores de TaCZ.
-
GunId para las armas de TaCZ.
-
AttachmentId para los accesorios de TaCZ y sus paquetes de contenido compatibles.
Esto permite que cada familia de cargadores, arma o accesorio tenga su propio tamaño dentro del inventario.
Ejemplo: familia de cargadores
{
"match": [
"taczmagazines:magazine{MagazineFamily:\"9mm_17\"}"
],
"result": "1*2"
}
Ejemplo: arma
{
"match": [
"tacz:modern_kinetic_gun{GunId:\"tacz:glock_17\"}"
],
"result": "2*2"
}
Ejemplo: accesorio
{
"match": [
"tacz:attachment{AttachmentId:\"tacz:scope_vudu\"}"
],
"result": "3*1"
}
Solo es necesario escribir el identificador estable. No hace falta incluir la cantidad de munición, el daño, el UUID, el cargador colocado ni la rotación del objeto.
De esta manera, un cargador vacío y otro cargado pertenecientes a la misma familia siempre ocuparán el mismo espacio.
¿Por qué fue necesaria esta modificación?
Esta función no podía implementarse mediante un datapack ni solamente con las reglas normales de configuración de PetiteInventory.
Los datapacks no pueden modificar la lógica Java que PetiteInventory utiliza para identificar los objetos. Fue necesario ampliar internamente el sistema de reconocimiento para que pudiera leer los identificadores de TaCZ almacenados dentro del NBT.
También sería posible desarrollar un addon independiente o un mixin que realizara esta función, pero esta versión modifica directamente PetiteInventory.
Instalación
-
Elimina de la carpeta mods el archivo original de PetiteInventory 1.0.8.
-
Coloca esta versión de compatibilidad dentro de la carpeta mods.
-
Asegúrate de que haya un solo archivo .jar de PetiteInventory.
-
Añade las reglas deseadas a la configuración de tamaños.
-
Reinicia Minecraft.
No instales este archivo junto con el PetiteInventory original, porque ambos utilizan el mismo ID interno de mod.
Requisitos
-
Minecraft 1.20.1
-
Forge 47 o superior
-
TaCZ
-
TaCZ Magazines para utilizar MagazineFamily
-
Archivos de configuración de PetiteInventory
-
Paquetes de contenido compatibles con TaCZ cuando se utilicen sus armas o accesorios
Este parche fue creado originalmente para el Modpack Dead Night de VIVI2, pero también puede utilizarse de manera independiente junto con los mods requeridos.
Créditos
-
Mod original PetiteInventory: MerrySnow
-
TaCZ: su equipo de desarrollo y colaboradores
-
TaCZ Magazines y paquetes de contenido: sus respectivos creadores
-
Modificaciones de compatibilidad: VIVI2
Esta es una versión de compatibilidad no oficial. No está afiliada ni respaldada por los creadores originales de PetiteInventory o TaCZ.
Todo el código, recursos, nombres y marcas originales pertenecen a sus respectivos creadores.