2 avr. 2015, 06:34

En 1.7.2 ce n’était pas possible :
http://www.minecraftforgefrance.fr/showthread.php?tid=817&highlight=poisson
Mais depuis Forge a mit un access transformer pour ces variables, elles sont maintenant public et non private.
Donc avec EntityFishHook.FISH.add(new WeightedRandomFishable(new ItemStack(tonItem, 1, metadata), 60));
(60 étant la chance)
dans la classe principale ça devrait fonctionner
Tu peux aussi utiliser EntityFishHook.TREASURE.add(… pour les trésors (livre, arc, selle, name tag, etc …) et EntityFishHook.JUNK.add(… pour les trucs inutiles (genre baton, os, viande de zombie, cuire, etc …)

Jette un coup d’œil à EntityFishHook.java (package net.minecraft.entity.projectile), les listes sont juste au début de la classe tu pourra facilement voir ce qu’elles contiennent déjà et les probabilités.