diff --git a/PALAMOD_CDC.md b/PALAMOD_CDC.md index 11d1832..e0fb806 100644 --- a/PALAMOD_CDC.md +++ b/PALAMOD_CDC.md @@ -654,6 +654,11 @@ avant M4 (TODO:crafts-machines). reutilise). ECART : puissance approximee h/8 + 1, annulee en claim d'autrui. Lecons : ExplosionInteraction.BREAK n'existe plus en 26.3 -> TNT ; fallDistance est double. VERIFIE : build SUCCESSFUL, boot Done, 0 erreur. UNVERIFIED en jeu. +- M-gadget-5 LIVRE 2026-10-19 ~05:45 : pierre stats (ID 5021, connectes) + epee couac + (ID 5035, stats paladium, son a chaque coup via AFTER_DAMAGE). Lecons : Entity. + getServer() n'existe plus en 26.3 -> sl.getServer() ; CHICKEN_AMBIENT remplace par + variants -> CHICKEN_EGG. VERIFIE : build SUCCESSFUL, boot Done, 0 erreur. + UNVERIFIED en jeu. - M-palaforge LIVRE 2026-10-19 ~03:55 : bloc + BE partagee (3e mode) + gate mineur 14 + table fonte wiki §3.2 (31 items, ratio floor usure) + fuels bois (+buche/planches/baton, lave exclue : seau non rendu) + craft (1 findium + 4 furnaces + 4 briques, positions diff --git a/mods/pala/src/main/java/fr/surviepote/pala/PalaItems.java b/mods/pala/src/main/java/fr/surviepote/pala/PalaItems.java index 74b5341..73096b4 100644 --- a/mods/pala/src/main/java/fr/surviepote/pala/PalaItems.java +++ b/mods/pala/src/main/java/fr/surviepote/pala/PalaItems.java @@ -113,6 +113,10 @@ public final class PalaItems { public static final Item PALADIUM_PICKAXE = register("paladium_pickaxe", id -> new Item(new Item.Properties().setId(id).pickaxe(PalaToolMaterials.PALADIUM_PICKAXE, 2.0F, -3.0F))); public static final Item PALADIUM_SHOVEL = register("paladium_shovel", id -> new Item(new Item.Properties().setId(id).shovel(PalaToolMaterials.PALADIUM_SHOVEL, 11.0F, -3.0F))); public static final Item PALADIUM_SWORD = register("paladium_sword", id -> new Item(new Item.Properties().setId(id).sword(PalaToolMaterials.PALADIUM_SWORD, 8.0F, -2.3F))); + // M-gadget-5 (wiki items lucky ID 5021/5035 VERIFIE) : pierre stats + epee couac + // (memes caracteristiques que l'epee paladium, bruit de poulet a chaque coup). + public static final Item STATS_STONE = register("stats_stone", id -> new Item(new Item.Properties().setId(id).stacksTo(1))); + public static final Item COUAC_SWORD = register("couac_sword", id -> new Item(new Item.Properties().setId(id).sword(PalaToolMaterials.PALADIUM_SWORD, 8.0F, -2.3F))); public static final Item PICKAXE_OF_THE_GOD = register("pickaxe_of_the_god", id -> new Item(new Item.Properties().setId(id).pickaxe(PalaToolMaterials.PICKAXE_OF_THE_GOD, 1.8F, -3.0F).component(DataComponents.UNBREAKABLE, Unit.INSTANCE))); public static final Item PICKAXE_OF_THE_GOD_LEVE6 = register("pickaxe_of_the_god_leve6", id -> new Item(new Item.Properties().setId(id).pickaxe(PalaToolMaterials.PICKAXE_OF_THE_GOD_LEVE6, 0.4F, -2.9F).component(DataComponents.UNBREAKABLE, Unit.INSTANCE))); public static final Item PICKAXE_OF_THE_GOD_LEVEL1 = register("pickaxe_of_the_god_level1", id -> new Item(new Item.Properties().setId(id).pickaxe(PalaToolMaterials.PICKAXE_OF_THE_GOD_LEVEL1, 0.0F, -3.0F).component(DataComponents.UNBREAKABLE, Unit.INSTANCE))); diff --git a/mods/pala/src/main/java/fr/surviepote/pala/PalaTabs.java b/mods/pala/src/main/java/fr/surviepote/pala/PalaTabs.java index 053e292..1368eb7 100644 --- a/mods/pala/src/main/java/fr/surviepote/pala/PalaTabs.java +++ b/mods/pala/src/main/java/fr/surviepote/pala/PalaTabs.java @@ -73,6 +73,8 @@ public final class PalaTabs { output.accept(PalaItems.GRAPPIN); output.accept(PalaItems.FISHBOWL); output.accept(PalaItems.WEIGHTED_BOOTS); + output.accept(PalaItems.STATS_STONE); + output.accept(PalaItems.COUAC_SWORD); output.accept(PalaItems.CANDY); output.accept(PalaItems.CANDY_BLUE); output.accept(PalaItems.CANDY_GREEN); diff --git a/mods/pala/src/main/java/fr/surviepote/pala/events/PalaItemUseEvents.java b/mods/pala/src/main/java/fr/surviepote/pala/events/PalaItemUseEvents.java index 71c5272..836542f 100644 --- a/mods/pala/src/main/java/fr/surviepote/pala/events/PalaItemUseEvents.java +++ b/mods/pala/src/main/java/fr/surviepote/pala/events/PalaItemUseEvents.java @@ -142,6 +142,14 @@ public final class PalaItemUseEvents { effect(sp, MobEffects.RESISTANCE, 1, 5); return InteractionResult.PASS; } + // M-gadget-5 (wiki ID 5021) : pierre de statistiques = joueurs connectes. + if (item == PalaItems.STATS_STONE) { + int n = sl.getServer().getPlayerCount(); + sp.sendSystemMessage(net.minecraft.network.chat.Component.literal( + "§6[Stats] §7" + n + " joueur" + (n > 1 ? "s" : "") + " connecte" + + (n > 1 ? "s" : "") + ".")); + return InteractionResult.SUCCESS; + } // M-gadget-2 (wiki items lucky) : grappin — clic droit air, raycast 32 blocs, // tirage instantane vers le point d'impact (ECART : pas de crochet visible). if (item == PalaItems.GRAPPIN) { diff --git a/mods/pala/src/main/java/fr/surviepote/pala/events/PalaJobEvents.java b/mods/pala/src/main/java/fr/surviepote/pala/events/PalaJobEvents.java index 98f8d65..ca9b097 100644 --- a/mods/pala/src/main/java/fr/surviepote/pala/events/PalaJobEvents.java +++ b/mods/pala/src/main/java/fr/surviepote/pala/events/PalaJobEvents.java @@ -34,6 +34,26 @@ public final class PalaJobEvents { public static void register() { ServerLivingEntityEvents.AFTER_DEATH.register(PalaJobEvents::afterDeath); + ServerLivingEntityEvents.AFTER_DAMAGE.register(PalaJobEvents::afterDamage); + } + + // M-gadget-5 (wiki ID 5035) : epee couac — bruit de poulet a chaque coup porte + // avec l'epee en main (tueur = source directe, item en main principale). + private static void afterDamage(LivingEntity entity, DamageSource source, float dealt, + float taken, boolean blocked) { + Entity killer = source.getEntity(); + if (!(killer instanceof ServerPlayer player)) { + return; + } + if (player.getMainHandItem().is(fr.surviepote.pala.PalaItems.COUAC_SWORD)) { + ServerLevel level = player.level(); + BlockPos pos = player.blockPosition(); + // ECART 26.3 : CHICKEN_AMBIENT remplace par variants (ChickenSoundVariants, + // non resolubles simplement cote serveur) -> CHICKEN_EGG (cot-cot). + level.playSound(null, pos.getX(), pos.getY(), pos.getZ(), + net.minecraft.sounds.SoundEvents.CHICKEN_EGG, + net.minecraft.sounds.SoundSource.PLAYERS, 1.0F, 1.0F); + } } private static void afterDeath(LivingEntity entity, DamageSource source) { diff --git a/mods/pala/src/main/resources/assets/pala/items/couac_sword.json b/mods/pala/src/main/resources/assets/pala/items/couac_sword.json new file mode 100644 index 0000000..9727182 --- /dev/null +++ b/mods/pala/src/main/resources/assets/pala/items/couac_sword.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "pala:item/couac_sword" + } +} \ No newline at end of file diff --git a/mods/pala/src/main/resources/assets/pala/items/stats_stone.json b/mods/pala/src/main/resources/assets/pala/items/stats_stone.json new file mode 100644 index 0000000..c47dcc3 --- /dev/null +++ b/mods/pala/src/main/resources/assets/pala/items/stats_stone.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "pala:item/stats_stone" + } +} \ No newline at end of file diff --git a/mods/pala/src/main/resources/assets/pala/lang/en_us.json b/mods/pala/src/main/resources/assets/pala/lang/en_us.json index 57c8275..2a8f95d 100644 --- a/mods/pala/src/main/resources/assets/pala/lang/en_us.json +++ b/mods/pala/src/main/resources/assets/pala/lang/en_us.json @@ -4,6 +4,8 @@ "item.pala.amethyst_mixed_coal": "Amethyst Mixed Coal", "item.pala.amethyst_stick": "Amethyst Stick", "item.pala.compressed_amethyst": "Compressed Amethyst", + "item.pala.stats_stone": "Pierre de statistiques", + "item.pala.couac_sword": "Epee couac", "item.pala.weighted_boots": "Boom Boots", "item.pala.fishbowl": "Bocal a poissons", "item.pala.grappin": "Grappin", diff --git a/mods/pala/src/main/resources/assets/pala/models/item/couac_sword.json b/mods/pala/src/main/resources/assets/pala/models/item/couac_sword.json new file mode 100644 index 0000000..6112b7e --- /dev/null +++ b/mods/pala/src/main/resources/assets/pala/models/item/couac_sword.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "pala:item/couac_sword" + } +} \ No newline at end of file diff --git a/mods/pala/src/main/resources/assets/pala/models/item/stats_stone.json b/mods/pala/src/main/resources/assets/pala/models/item/stats_stone.json new file mode 100644 index 0000000..c93301d --- /dev/null +++ b/mods/pala/src/main/resources/assets/pala/models/item/stats_stone.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "pala:item/stats_stone" + } +} \ No newline at end of file diff --git a/mods/pala/src/main/resources/assets/pala/textures/item/couac_sword.png b/mods/pala/src/main/resources/assets/pala/textures/item/couac_sword.png new file mode 100644 index 0000000..b0aaeb8 Binary files /dev/null and b/mods/pala/src/main/resources/assets/pala/textures/item/couac_sword.png differ diff --git a/mods/pala/src/main/resources/assets/pala/textures/item/stats_stone.png b/mods/pala/src/main/resources/assets/pala/textures/item/stats_stone.png new file mode 100644 index 0000000..9d528c9 Binary files /dev/null and b/mods/pala/src/main/resources/assets/pala/textures/item/stats_stone.png differ diff --git a/server/mods/pala-0.2.1.jar b/server/mods/pala-0.2.1.jar index 9ce9d16..9b0d985 100644 Binary files a/server/mods/pala-0.2.1.jar and b/server/mods/pala-0.2.1.jar differ