Un code qui permettrait a une nouvelle pioche de casser la bedrock.
-
XD, je te remercie, et s’est au particule que je voulais en venir, j’avais juste pas le mot en tête ^^'.
C’est si compliquer que sa ? O_o -
Bah, je m’y suis pas intéressé, mais je sais que c’est assez dur a faire.
Mais je pense que tu peut le faire, t’inquiète pas. -
Ok ! Si tu le dit ^^, mais bon je préfère trouvai un bon tuto la dessus, car les chose difficile je préfère que l’on m’explique XD.
PS: j’ai vue pour faire style un mélange de cane a sucre et de cactus, sa a étai dure pour moi x). -
Cela dépend de ce que tu veux utiliser au niveau des particules… (Custom ou celles du jeux ?)
-
A et bien celle du jeu ^^, je voudrais faire un peu comme avec la bonne meal quand on clic droit sur du crop et autre ^^.
-
essaie ça:
[code_java]package tutoriel.common;import net.minecraft.block.Block;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;public class ItemTutoPickaxe extends ItemPickaxe
{
public ItemTutoPickaxe(int id, EnumToolMaterial enumToolMaterial)
{
super(id, enumToolMaterial);
}public boolean onItemUse(ItemStack stack, EntityPlayer player, World world,
int x, int y, int z, int side, float hitX, float hitY, float hitZ)
{
if (!world.isRemote)
{
if (world.getBlockId(x, y, z) == Block.bedrock.blockID)
{
world.setBlockToAir(x, y, z);
EntityItem entityitem = new EntityItem(world, x, y, z, new ItemStack(Block.bedrock, 1, 0));
entityitem.delayBeforeCanPickup = 10;
world.spawnEntityInWorld(entityitem);
stack.damageItem(1, player);
Side side2 = FMLCommonHandler.instance().getEffectiveSide();
if (side2 == Side.CLIENT)
{
for (int j1 = 0; j1 < side; ++j1)
{
double d0 = itemRand.nextGaussian() * 0.02D;
double d1 = itemRand.nextGaussian() * 0.02D;
double d2 = itemRand.nextGaussian() * 0.02D;
world.spawnParticle(“happyVillager”, (double) ((float) x + itemRand.nextFloat()),
(double) y + (double) itemRand.nextFloat(), (double) ((float) z + itemRand.nextFloat()), d0, d1, d2);
}
}
return true;
}
else
{
return false;
}
}
return false;
}
}[/code_java] -
Ok, Merci beaucoup :).
-
N’oublie pas de demander si tu ne comprends pas quelque chose dans le code !
Tu apprendras très vite grâce a ça.
-
En fait j’ai fait ce code directement sur le forum dans le message, donc je ne l’ai pas testé et je viens de remarquer qu’il y a des erreurs, je te corrige ça demain.
-
Ok je vous remercie x).
Oui effectivement éclipse me signale des erreur …
-
J’ai édité le code dans l’autre message.
-
Ok, je regarde sa tout de suite :).
Merci.
La je reste sens mots,
Pour commençai, je suit obligé d’importer (FMLCommonHandler) manuellement, et en jeux, les particule n’aparesse pas … une idée d’où viendrait le problème ?
Je n’est pas d’erreur dans les log … donc je ne vois vraiment pas. -
Oui j’ai oublier de mettre l’importation dans le message, pour les particules, quand j’ai testé la première fois ça a fonctionné mais là plus rien, je cherche une solution.
-
Merci pour l’aide que tu apporte :).
Si je trouve d’où sa viens je te tien au courant. -
N’hésite pas a donner les logs, les erreures etc… que tu trouve, nous essaierons de t’aider.
-
Pas de problème :), Je vous donnerez les dernier log sens doute se soir, vue que je ne vais pas être la ^^’
PS: Je ne sais plus ou on trouve les logs ^^', mais je peu vous donnez la console par contre.
Voila, dsl pour le retard:
:::2013-07-18 14:06:42 [Infos] [ForgeModLoader] Forge Mod Loader version 5.2.23.738 for Minecraft 1.5.2 loading 2013-07-18 14:06:42 [Infos] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0-ea, running on Windows Vista:amd64:6.0, installed at C:\Program Files\Java\jre8 2013-07-18 14:06:42 [Infos] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation 2013-07-18 14:06:53 [Infos] [STDOUT] 229 recipes 2013-07-18 14:06:53 [Infos] [STDOUT] 27 achievements 2013-07-18 14:06:54 [Infos] [Minecraft-Client] Setting user: Player283 2013-07-18 14:06:54 [Infos] [STDOUT] (Session ID is -) 2013-07-18 14:06:54 [Infos] [STDERR] Client asked for parameter: server 2013-07-18 14:06:54 [Infos] [Minecraft-Client] LWJGL Version: 2.4.2 2013-07-18 14:06:56 [Infos] [MinecraftForge] Attempting early MinecraftForge initialization 2013-07-18 14:06:56 [Infos] [STDOUT] MinecraftForge v7.8.1.738 Initialized 2013-07-18 14:06:56 [Infos] [ForgeModLoader] MinecraftForge v7.8.1.738 Initialized 2013-07-18 14:06:56 [Infos] [STDOUT] Replaced 85 ore recipies 2013-07-18 14:06:56 [Infos] [MinecraftForge] Completed early MinecraftForge initialization 2013-07-18 14:06:57 [Infos] [ForgeModLoader] Reading custom logging properties from C:\Users\sevenno07\Desktop\Moding Minecraft 1.5.2\[moding]\forge\mcp\jars\config\logging.properties 2013-07-18 14:06:57 [Désactivé] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL 2013-07-18 14:06:57 [Infos] [ForgeModLoader] Searching C:\Users\sevenno07\Desktop\Moding Minecraft 1.5.2\[moding]\forge\mcp\jars\mods for mods 2013-07-18 14:07:10 [Infos] [ForgeModLoader] Forge Mod Loader has identified 4 mods to load 2013-07-18 14:07:10 [Infos] [mcp] Activating mod mcp 2013-07-18 14:07:10 [Infos] [FML] Activating mod FML 2013-07-18 14:07:10 [Infos] [Forge] Activating mod Forge 2013-07-18 14:07:10 [Infos] [GeneticalModifier] Activating mod GeneticalModifier 2013-07-18 14:07:10 [Infos] [ForgeModLoader] Registering Forge Packet Handler 2013-07-18 14:07:10 [Infos] [ForgeModLoader] Succeeded registering Forge Packet Handler 2013-07-18 14:07:10 [Infos] [ForgeModLoader] Configured a dormant chunk cache size of 0 2013-07-18 14:07:11 [Infos] [STDOUT] 2013-07-18 14:07:11 [Infos] [STDOUT] Starting up SoundSystem… 2013-07-18 14:07:11 [Infos] [STDOUT] Initializing LWJGL OpenAL 2013-07-18 14:07:11 [Infos] [STDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) 2013-07-18 14:07:12 [Infos] [STDOUT] OpenAL initialized. 2013-07-18 14:07:12 [Infos] [STDOUT] 2013-07-18 14:07:13 [Infos] [ForgeModLoader] Forge Mod Loader has detected an older LWJGL version, new advanced texture animation features are disabled 2013-07-18 14:07:13 [Infos] [ForgeModLoader] Not using advanced OpenGL 4.3 advanced capability for animations : OpenGL 4.3 is not available 2013-07-18 14:07:13 [Infos] [Minecraft-Client] Found animation info for: textures/blocks/lava_flow.txt 2013-07-18 14:07:13 [Infos] [Minecraft-Client] Found animation info for: textures/blocks/water_flow.txt 2013-07-18 14:07:13 [Infos] [Minecraft-Client] Found animation info for: mods/GeneticalModifier/textures/blocks/spReedBooster.txt 2013-07-18 14:07:13 [Infos] [Minecraft-Client] Found animation info for: textures/blocks/fire_0.txt 2013-07-18 14:07:13 [Infos] [Minecraft-Client] Found animation info for: textures/blocks/fire_1.txt 2013-07-18 14:07:13 [Infos] [Minecraft-Client] Found animation info for: textures/blocks/lava.txt 2013-07-18 14:07:13 [Infos] [Minecraft-Client] Found animation info for: textures/blocks/portal.txt 2013-07-18 14:07:13 [Infos] [Minecraft-Client] Found animation info for: textures/blocks/water.txt 2013-07-18 14:07:14 [Infos] [Minecraft-Client] Found animation info for: textures/items/clock.txt 2013-07-18 14:07:14 [Infos] [Minecraft-Client] Found animation info for: textures/items/compass.txt 2013-07-18 14:07:14 [Infos] [ForgeModLoader] Forge Mod Loader has successfully loaded 4 mods 2013-07-18 14:07:15 [Infos] [Minecraft-Client] Found animation info for: textures/blocks/lava_flow.txt 2013-07-18 14:07:15 [Infos] [Minecraft-Client] Found animation info for: textures/blocks/water_flow.txt 2013-07-18 14:07:15 [Infos] [Minecraft-Client] Found animation info for: mods/GeneticalModifier/textures/blocks/spReedBooster.txt 2013-07-18 14:07:15 [Infos] [Minecraft-Client] Found animation info for: textures/blocks/fire_0.txt 2013-07-18 14:07:15 [Infos] [Minecraft-Client] Found animation info for: textures/blocks/fire_1.txt 2013-07-18 14:07:15 [Infos] [Minecraft-Client] Found animation info for: textures/blocks/lava.txt 2013-07-18 14:07:15 [Infos] [Minecraft-Client] Found animation info for: textures/blocks/portal.txt 2013-07-18 14:07:15 [Infos] [Minecraft-Client] Found animation info for: textures/blocks/water.txt 2013-07-18 14:07:15 [Infos] [Minecraft-Client] Found animation info for: textures/items/clock.txt 2013-07-18 14:07:15 [Infos] [Minecraft-Client] Found animation info for: textures/items/compass.txt 2013-07-18 14:07:21 [Infos] [Minecraft-Server] Starting integrated minecraft server version 1.5.2 2013-07-18 14:07:21 [Infos] [Minecraft-Server] Generating keypair 2013-07-18 14:07:22 [Infos] [ForgeModLoader] Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@6b3d9a22) 2013-07-18 14:07:22 [Infos] [ForgeModLoader] Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@6b3d9a22) 2013-07-18 14:07:22 [Infos] [ForgeModLoader] Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@6b3d9a22) 2013-07-18 14:07:22 [Infos] [Minecraft-Server] Preparing start region for level 0 2013-07-18 14:07:23 [Infos] [Minecraft-Server] Preparing spawn area: 32% 2013-07-18 14:07:24 [Infos] [STDOUT] loading single player 2013-07-18 14:07:24 [Infos] [Minecraft-Server] Player283[/127.0.0.1:0] logged in with entity id 45 at (-1419.0072589906881, 4.0, 1279.158086727719) 2013-07-18 14:07:25 [Infos] [Minecraft-Server] Saving and pausing game… 2013-07-18 14:07:26 [Infos] [Minecraft-Server] Saving chunks for level 'New World'/Overworld 2013-07-18 14:07:26 [Infos] [Minecraft-Server] Saving chunks for level 'New World'/Nether 2013-07-18 14:07:26 [Infos] [Minecraft-Server] Saving chunks for level 'New World'/The End 2013-07-18 14:07:40 [Infos] [Minecraft-Server] Saving and pausing game… 2013-07-18 14:07:40 [Infos] [Minecraft-Server] Saving chunks for level 'New World'/Overworld 2013-07-18 14:07:40 [Infos] [Minecraft-Server] Saving chunks for level 'New World'/Nether 2013-07-18 14:07:40 [Infos] [Minecraft-Server] Saving chunks for level 'New World'/The End 2013-07-18 14:07:41 [Infos] [Minecraft-Server] Stopping server 2013-07-18 14:07:41 [Infos] [Minecraft-Server] Saving players 2013-07-18 14:07:41 [Infos] [Minecraft-Server] Saving worlds 2013-07-18 14:07:41 [Infos] [Minecraft-Server] Saving chunks for level 'New World'/Overworld 2013-07-18 14:07:41 [Infos] [Minecraft-Server] Saving chunks for level 'New World'/Nether 2013-07-18 14:07:41 [Infos] [Minecraft-Server] Saving chunks for level 'New World'/The End 2013-07-18 14:07:41 [Infos] [ForgeModLoader] Unloading dimension 0 2013-07-18 14:07:41 [Infos] [ForgeModLoader] Unloading dimension -1 2013-07-18 14:07:41 [Infos] [ForgeModLoader] Unloading dimension 1 2013-07-18 14:07:42 [Infos] [Minecraft-Client] Stopping! 2013-07-18 14:07:42 [Infos] [STDOUT] 2013-07-18 14:07:42 [Infos] [STDOUT] SoundSystem shutting down… 2013-07-18 14:07:42 [Infos] [STDOUT] Author: Paul Lamb, www.paulscode.com 2013-07-18 14:07:42 [Infos] [STDOUT] Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release:::
