feat(mining): implement complete custom mining system with SQLite persistence

This commit is contained in:
2026-08-18 22:16:42 +02:00
parent f178bc05c8
commit fde7f422ba
16 changed files with 1610 additions and 42 deletions
+37 -39
View File
@@ -1,54 +1,52 @@
@startuml mining_model
!theme plain
skinparam roundcorner 10
skinparam roundcorner 8
skinparam shadowing false
skinparam classAttributeIconSize 0
skinparam linetype ortho
title Système de Minage Personnalisé (GamingCore) - Modèle de Données & Architecture
title Système de Minage Personnalisé (GamingCore) - Modèle & Architecture
package "Database Schema (SQLite / MySQL)" <<Database>> {
entity "ores" as OresTable {
* id : VARCHAR(64) <<PK>>
package "Database Schema (SQLite / MySQL)" <<Rectangle>> {
class "ores" as OresTable << (T,#5DADE2) >> {
+ id : VARCHAR(64) [PK]
--
* block_material : VARCHAR(64)
* hardness : DOUBLE
* rarity : VARCHAR(32)
* stock : INTEGER
* respawnable : BOOLEAN
* respawn_time : INTEGER
* temp_block : VARCHAR(64)
created_at : TIMESTAMP
+ block_material : VARCHAR(64)
+ hardness : DOUBLE
+ rarity : VARCHAR(32)
+ stock : INTEGER
+ respawnable : BOOLEAN
+ respawn_time : INTEGER
+ temp_block : VARCHAR(64)
+ created_at : TIMESTAMP
}
entity "ore_drops" as OreDropsTable {
* id : INTEGER <<PK, AUTOINCREMENT>>
class "ore_drops" as OreDropsTable << (T,#5DADE2) >> {
+ id : INTEGER [PK AUTO]
--
* ore_id : VARCHAR(64) <<FK>>
* item_material : VARCHAR(64)
* default_amount : INTEGER
* default_chance : DOUBLE
* fortunable : BOOLEAN
* fortune_multiplier : DOUBLE
* smeltable : BOOLEAN
smelted_material : VARCHAR(64)
+ ore_id : VARCHAR(64) [FK]
+ item_material : VARCHAR(64)
+ default_amount : INTEGER
+ default_chance : DOUBLE
+ fortunable : BOOLEAN
+ fortune_multiplier : DOUBLE
+ smeltable : BOOLEAN
+ smelted_material : VARCHAR(64)
}
entity "placed_ores" as PlacedOresTable {
* id : INTEGER <<PK, AUTOINCREMENT>>
class "placed_ores" as PlacedOresTable << (T,#5DADE2) >> {
+ id : INTEGER [PK AUTO]
--
* ore_id : VARCHAR(64) <<FK>>
* world : VARCHAR(64)
* x : INTEGER
* y : INTEGER
* z : INTEGER
* current_stock : INTEGER
* is_depleted : BOOLEAN
* next_respawn_at : BIGINT
+ ore_id : VARCHAR(64) [FK]
+ world : VARCHAR(64)
+ x : INTEGER
+ y : INTEGER
+ z : INTEGER
+ current_stock : INTEGER
+ is_depleted : BOOLEAN
+ next_respawn_at : BIGINT
}
OresTable ||..o{ OreDropsTable : "1:N (Drops configurés)"
OresTable ||..o{ PlacedOresTable : "1:N (Blocs actifs dans le monde)"
OresTable "1" *-- "0..*" OreDropsTable : "drops configurés"
OresTable "1" *-- "0..*" PlacedOresTable : "blocs actifs"
}
package "fr.luc.gamingcore.mining.model" {
@@ -137,8 +135,8 @@ package "fr.luc.gamingcore.mining.listener" {
}
}
CustomOre "1" *-- "many" OreDrop
CustomOre "1" -- "many" PlacedOreBlock
CustomOre "1" *-- "0..*" OreDrop
CustomOre "1" -- "0..*" PlacedOreBlock
CustomOre --> OreRarity
OreManager o-- CustomOre