diff --git a/PALAMOD_CDC.md b/PALAMOD_CDC.md index d839e5a..9763433 100644 --- a/PALAMOD_CDC.md +++ b/PALAMOD_CDC.md @@ -642,6 +642,10 @@ avant M4 (TODO:crafts-machines). texture legacy, scan 16x16 top 10 + total, sans craft ECART). Lecon : patch chevauchant la fin d'une methode mange sa signature — verifier la queue du fichier. VERIFIE : build SUCCESSFUL, boot Done, 0 erreur. UNVERIFIED en jeu. +- M-gadget-2 LIVRE 2026-10-19 ~05:25 : grappin (ID 4979, dura 255, raycast 32, + teleport TeleportTransition, cooldown 20t, texture legacy, sans craft ECART). + Lecon : teleportTo 6-args n'existe plus en 26.3 -> pattern maison TeleportTransition. + 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 5468aff..619c176 100644 --- a/mods/pala/src/main/java/fr/surviepote/pala/PalaItems.java +++ b/mods/pala/src/main/java/fr/surviepote/pala/PalaItems.java @@ -64,6 +64,9 @@ public final class PalaItems { // M-gadget-1 (wiki items lucky) : analyseur de chunk, durabilite 5, sans craft // (obtention lucky/admin, ECART documente). public static final Item CHUNK_ANALYSER = register("chunk_analyser", id -> new Item(new Item.Properties().setId(id).stacksTo(1).durability(5))); + // M-gadget-2 (wiki items lucky) : grappin, durabilite 255, sans craft (ECART lucky). + // ECART : tirage instantane (pas de projectile/entite crochet visible cote serveur). + public static final Item GRAPPIN = register("grappin", id -> new Item(new Item.Properties().setId(id).stacksTo(1).durability(255))); // M-candy (wiki metiers, VERIFIE partiel) : bonbons 50 000 XP. Vert = fermier, // jaune = mineur, rainbow = tous (pages Evolution) ; bleu/rose = mapping non publie // (items seuls, TODO:mapping-bonbons) ; candy/job_candy = nature inconnue (items seuls). 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 f063e0a..cd0a19b 100644 --- a/mods/pala/src/main/java/fr/surviepote/pala/PalaTabs.java +++ b/mods/pala/src/main/java/fr/surviepote/pala/PalaTabs.java @@ -70,6 +70,7 @@ public final class PalaTabs { output.accept(PalaItems.TRIXIUM_GEM); output.accept(PalaItems.XP_BERRIES); output.accept(PalaItems.CHUNK_ANALYSER); + output.accept(PalaItems.GRAPPIN); 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 00b9d48..71c5272 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,41 @@ public final class PalaItemUseEvents { effect(sp, MobEffects.RESISTANCE, 1, 5); return InteractionResult.PASS; } + // 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) { + if (sp.getCooldowns().isOnCooldown(stack)) { + return InteractionResult.PASS; + } + net.minecraft.world.phys.Vec3 start = sp.getEyePosition(); + net.minecraft.world.phys.Vec3 look = sp.getLookAngle(); + net.minecraft.world.phys.Vec3 end = start.add(look.x * 32.0, look.y * 32.0, look.z * 32.0); + net.minecraft.world.level.ClipContext ctx = + new net.minecraft.world.level.ClipContext(start, end, + net.minecraft.world.level.ClipContext.Block.OUTLINE, + net.minecraft.world.level.ClipContext.Fluid.NONE, sp); + net.minecraft.world.phys.BlockHitResult hit = sl.clip(ctx); + if (hit.getType() + != net.minecraft.world.phys.HitResult.Type.BLOCK) { + return InteractionResult.PASS; + } + BlockPos target = hit.getBlockPos().relative(hit.getDirection()); + if (!sl.getBlockState(target).isAir() && !sl.getBlockState(target.above()).isAir()) { + sp.sendSystemMessage(net.minecraft.network.chat.Component.literal( + "§cPas de place pour s'accrocher.")); + return InteractionResult.PASS; + } + sp.getCooldowns().addCooldown(stack, 20); + stack.hurtAndBreak(1, sp, hand); + net.minecraft.world.phys.Vec3 dest = new net.minecraft.world.phys.Vec3( + target.getX() + 0.5, target.getY(), target.getZ() + 0.5); + sp.teleport(new net.minecraft.world.level.portal.TeleportTransition(sl, dest, + net.minecraft.world.phys.Vec3.ZERO, sp.getYRot(), sp.getXRot(), + net.minecraft.world.level.portal.TeleportTransition.DO_NOTHING)); + sl.playSound(null, target.getX(), target.getY(), target.getZ(), + SoundEvents.ENDER_DRAGON_AMBIENT, SoundSource.NEUTRAL, 1.0F, 1.0F); + return InteractionResult.SUCCESS; + } return InteractionResult.PASS; } diff --git a/mods/pala/src/main/resources/assets/pala/items/grappin.json b/mods/pala/src/main/resources/assets/pala/items/grappin.json new file mode 100644 index 0000000..d99f1ee --- /dev/null +++ b/mods/pala/src/main/resources/assets/pala/items/grappin.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "pala:item/grappin" + } +} \ 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 8f18bb1..faa3c3d 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,7 @@ "item.pala.amethyst_mixed_coal": "Amethyst Mixed Coal", "item.pala.amethyst_stick": "Amethyst Stick", "item.pala.compressed_amethyst": "Compressed Amethyst", + "item.pala.grappin": "Grappin", "item.pala.chunk_analyser": "Chunk Analyser", "item.pala.compressed_paladium": "Compressed Paladium", "item.pala.compressed_titane": "Compressed Titane", diff --git a/mods/pala/src/main/resources/assets/pala/models/item/grappin.json b/mods/pala/src/main/resources/assets/pala/models/item/grappin.json new file mode 100644 index 0000000..23d86da --- /dev/null +++ b/mods/pala/src/main/resources/assets/pala/models/item/grappin.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "pala:item/grappin" + } +} \ No newline at end of file diff --git a/mods/pala/src/main/resources/assets/pala/textures/item/grappin.png b/mods/pala/src/main/resources/assets/pala/textures/item/grappin.png new file mode 100644 index 0000000..f473b41 Binary files /dev/null and b/mods/pala/src/main/resources/assets/pala/textures/item/grappin.png differ diff --git a/server/mods/pala-0.2.1.jar b/server/mods/pala-0.2.1.jar index 9414193..fe5fede 100644 Binary files a/server/mods/pala-0.2.1.jar and b/server/mods/pala-0.2.1.jar differ