Résolu Crash report serveur
-
Bonjour,
J’ai un crash report du coter serveur en solo marche super bien
–-- Minecraft Crash Report ---- // This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~] Time: 6/20/16 1:26 PM Description: Exception in server tick loop java.lang.NoSuchMethodError: net.minecraft.block.Block.removedByPlayer(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/EntityPlayer;IIIZ)Z at fr.darkvince.ultra.hammer.HandlerTool.removeBlockWithDrops(HandlerTool.java:62) at fr.darkvince.ultra.hammer.HandlerTool.removeBlockWithDrops(HandlerTool.java:37) at fr.darkvince.ultra.hammer.HandlerTool.removeBlocksInIteration(HandlerTool.java:29) at fr.darkvince.ultra.hammer.UltraHammer.breakOtherBlock(UltraHammer.java:61) at fr.darkvince.ultra.hammer.Hammer.onBlockStartBreak(Hammer.java:28) at net.minecraft.server.management.ItemInWorldManager.func_73084_b(ItemInWorldManager.java:320) at net.minecraft.server.management.ItemInWorldManager.func_73082_a(ItemInWorldManager.java:274) at net.minecraft.network.NetHandlerPlayServer.func_147345_a(NetHandlerPlayServer.java:764) at net.minecraft.network.play.client.C07PacketPlayerDigging.func_148833_a(SourceFile:53) at net.minecraft.network.play.client.C07PacketPlayerDigging.func_148833_a(SourceFile:8) at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:206) at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:173) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:953) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:432) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:783) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:646) at java.lang.Thread.run(Thread.java:745) A detailed walkthrough of the error, its code path and all known details is as follows: –------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.7.2 Operating System: Linux (amd64) version 3.5.0-47-generic Java Version: 1.8.0_60, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 1193361184 bytes (1138 MB) / 1614888960 bytes (1540 MB) up to 10416029696 bytes (9933 MB) JVM Flags: 23 total; -Xmx10000M -Xms256M -XX:MaxPermSize=256m -XX:PermSize=128m -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+UseNUMA -XX:+CMSParallelRemarkEnabled -XX:MaxGCPauseMillis=50 -XX:+UseAdaptiveGCBoundary -XX:-UseGCOverheadLimit -XX:+UseBiasedLocking -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=15 -XX:UseSSE=3 -XX:+UseLargePages -XX:+UseFastAccessorMethods -XX:+UseStringCache -XX:+UseCompressedOops -XX:+OptimizeStringConcat -XX:+AggressiveOpts AABB Pool Size: 926 (51856 bytes; 0 MB) allocated, 458 (25648 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94 FML: MCP v9.03 FML v7.2.217.1147 Minecraft Forge 10.12.2.1147 12 mods loaded, 12 mods active mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.2.217.1147} [Forge Mod Loader] (cauldron-1.7.2-1.1147.04.98-server.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.12.2.1147} [Minecraft Forge] (cauldron-1.7.2-1.1147.04.98-server.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FLabsBF{4.1.1} [Better Furnaces] ([1.7.2]Better_Furnaces_V4.1.1.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available IronChest{6.0.36.725} [Iron Chest] (_Iron-Chests-Mod-1.7.2.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available starmod{1.0} [StarMod] (decoracraft-1.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available dualhotbar{1.6} [Dual Hotbar] (dualhotbar-1.7.10-1.6.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available eplus{1.7.2-2.0.4} [Enchanting Plus] (EnchantingPlus-1.7.2-2.0.4.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available TLSpecialArmor{1.7.2} [TeeLuk's SpecialArmor] (TLSpecialArmor-1.7.2.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available ultra{1.0} [ultra] (ultra-1.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available ultradeco{1.0} [UltraDeco] (ultradeco-1.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available ultradeco2{1.0} [ultradeco2] (ultradeco2-1.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Profiler Position: N/A (disabled) Vec3 Pool Size: 91 (5096 bytes; 0 MB) allocated, 23 (1288 bytes; 0 MB) used Player Count: 2 / 80; [EntityPlayerMP['Gaming44'/121491, l='world', x=849.47, y=5.00, z=154.31](Gaming44 at 849.4717394854603,5.0,154.31225141696632), EntityPlayerMP['darkvince_'/167706, l='world', x=849.40, y=6.00, z=160.30](darkvince_ at 849.4029859222995,6.0,160.30000001192093)] Is Modded: Definitely; Server brand changed to 'cauldron,craftbukkit,mcpc,fml,forge' Type: Dedicated Server (map_server.txt)
-
Montre ta classe HandlerTool, apparemment tu utilises la fonction removedByPlayer qui n’est que client, il va donc falloir la remplacer par un équivalent.
-
package fr.darkvince.ultra.hammer; import java.util.Arrays; import fr.darkvince.ultra.Main; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityXPOrb; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; public class HandlerTool { public static Block[] minerals = { Main.blockMineraiCinabre, Blocks.coal_ore, Blocks.redstone_ore, Blocks.diamond_ore, Blocks.emerald_ore, Blocks.quartz_ore, Blocks.iron_ore, Blocks.lapis_ore, Main.blockMineraiIridium, Main.blockMineraiNether, Main.blockMineraiWulfenite, Blocks.gold_ore, Blocks.lit_redstone_ore }; public static void removeBlocksInIteration(EntityPlayer player, ItemStack stack, World world, int x, int y, int z, int xs, int ys, int zs, int xe, int ye, int ze, Block block, Material[] materialsListing, boolean smelt, int fortune, boolean dispose) { float blockHardness = block == null ? 1.0F : block.getBlockHardness(world, x, y, z); for (int x1 = xs; x1 < xe; x1++) { for (int y1 = ys; y1 < ye; y1++) { for (int z1 = zs; z1 < ze; z1++) { removeBlockWithDrops(player, stack, world, x1 + x, y1 + y, z1 + z, x, y, z, block, materialsListing, smelt, fortune, blockHardness, dispose); } } } } public static void removeBlockWithDrops(EntityPlayer player, ItemStack stack, World world, int x, int y, int z, int bx, int by, int bz, Block block, Material[] materialsListing, boolean smelt, int fortune, float blockHardness, boolean dispose) { removeBlockWithDrops(player, stack, world, x, y, z, bx, by, bz, block, materialsListing, smelt, fortune, blockHardness, dispose, true); } public static void removeBlockWithDrops(EntityPlayer player, ItemStack stack, World world, int x, int y, int z, int bx, int by, int bz, Block block, Material[] materialsListing, boolean smelt, int fortune, float blockHardness, boolean dispose, boolean particles) { if (!world.blockExists(x, y, z)) { return; } Block blk = world.getBlock(x, y, z); int meta = world.getBlockMetadata(x, y, z); if ((block != null) && (blk != block)) { return; } Material mat = world.getBlock(x, y, z).getMaterial(); boolean flag = false; if ((!world.isRemote) && (blk != null) && (!blk.isAir(world, x, y, z)) && (blk.getPlayerRelativeBlockHardness(player, world, x, y, z) > 0.0F)) { if ((!blk.canHarvestBlock(player, meta)) || (!isRightMaterial(blk, materialsListing)) || (blk == Blocks.obsidian)) { return; } if (!player.capabilities.isCreativeMode) { int localMeta = world.getBlockMetadata(x, y, z); blk.onBlockHarvested(world, x, y, z, localMeta, player); if (blk.removedByPlayer(world, player, x, y, z, true)) { blk.onBlockDestroyedByPlayer(world, x, y, z, localMeta); } if (smelt) { float count = 1.0F; if (Arrays.asList(minerals).contains(blk)) { count = (float)(count + (fortune * 0.7D - world.rand.nextInt(fortune))); } if (count <= 0.0F) { count = 1.0F; } ItemStack result = FurnaceRecipes.smelting().getSmeltingResult((ItemStack)blk.getDrops(world, x, y, z, blk.getDamageValue(world, x, y, z), fortune).get(0)); if (result != null) { if (result.stackSize < 1) { result.stackSize = ((int)count); } PlayerH.spawnItemAtPlayer(player, result); flag = true; } else { blk.dropBlockAsItem(world, x, y, z, localMeta, fortune); } } else { blk.dropBlockAsItem(world, x, y, z, localMeta, fortune); } int xpDrop = blk.getExpDrop(world, blk.getDamageValue(world, x, y, z), fortune); EntityXPOrb xp = new EntityXPOrb(world, x, y, z, xpDrop); if (xpDrop > 0) { world.spawnEntityInWorld(xp); } } else { world.setBlockToAir(x, y, z); } world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(blk) + (meta << 12)); } if (flag) { world.spawnParticle("flame", x + 0.5D + 0.5D * world.rand.nextDouble(), y - 0.1D, z + 0.5D * world.rand .nextDouble(), 0.0D, 0.0D, 0.0D); world.spawnParticle("flame", x + 0.5D + 0.5D * world.rand.nextDouble(), y - 0.1D, z + 0.5D * world.rand .nextDouble(), 0.0D, 0.0D, 0.0D); world.spawnParticle("smoke", x + 0.5D + 0.5D * world.rand.nextDouble(), y - 0.1D, z + 0.5D * world.rand .nextDouble(), 0.0D, 0.0D, 0.0D); } } public static boolean isRightMaterial(Block block, Material[] materialsListing) { Material material = block.getMaterial(); for (Material mat : materialsListing) { if (material == mat) { return true; } } return false; } public static boolean isRightBlock(Block block, Block[] list) { for (Block blk : list) { if (block == blk) { return false; } } return true; } public static MovingObjectPosition raytraceFromEntity(World world, Entity player, boolean par3, double range) { float f = 1.0F; float f1 = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * f; float f2 = player.prevRotationYaw + (player.rotationYaw - player.prevRotationYaw) * f; double d0 = player.prevPosX + (player.posX - player.prevPosX) * f; double d1 = player.prevPosY + (player.posY - player.prevPosY) * f; if ((!world.isRemote) && ((player instanceof EntityPlayer))) { d1 += ((EntityPlayer)player).eyeHeight; } double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * f; Vec3 vec3 = Vec3.createVectorHelper(d0, d1, d2); float f3 = MathHelper.cos(-f2 * 0.017453292F - 3.1415927F); float f4 = MathHelper.sin(-f2 * 0.017453292F - 3.1415927F); float f5 = -MathHelper.cos(-f1 * 0.017453292F); float f6 = MathHelper.sin(-f1 * 0.017453292F); float f7 = f4 * f5; float f8 = f3 * f5; double d3 = range; Vec3 vec31 = vec3.addVector(f7 * d3, f6 * d3, f8 * d3); return world.rayTraceBlocks(vec3, vec31, par3); } }
Voilà
-
Cette fonction (removedByPlayer) n’est pas Client Only (du moins en 1.8), donc peut-être que la version de Forge de ton serveur n’est pas la même que celle que tu utilises pour coder, vérifies bien.
PS : 1.7.2 ? Sérieux c’est vraiment ancien comme version, pourquoi ne passes-tu pas au moins en 1.7.10 ?
-
Quel est le but de ton code ?
-
a mon avis (hammer de 3x3 qui cuit auto ou un truc du genre) a la tinker construct non ? =p
-
@‘AymericRed’:
Cette fonction (removedByPlayer) n’est pas Client Only (du moins en 1.8), donc peut-être que la version de Forge de ton serveur n’est pas la même que celle que tu utilises pour coder, vérifies bien.
PS : 1.7.2 ? Sérieux c’est vraiment ancien comme version, pourquoi ne passes-tu pas au moins en 1.7.10 ?
Je code en 1.7.10 mais mon serveur va passez en 1.7.10 la mais j’aurai penser que sa aurai était compatible quand meme
@‘SCAREX’:Quel est le but de ton code ?
Un hammer
@‘moscaphone421’:a mon avis (hammer de 3x3 qui cuit auto ou un truc du genre) a la tinker construct non ? =p
Oui c’est sa
-
Tu devrais déjà créer une partie du code pour le serveur et le reste pour le client avec if (!world.isRemote)
-
En effet la fonction removedByPlayer n’existait pas en 1.7.2 ce qui explique le problème.
-
@‘robin4002’:
En effet la fonction removedByPlayer n’existait pas en 1.7.2 ce qui explique le problème.
elle est arrivé en quelle version ?
-
1.7.10 puisque tu l’as en 1.7.10.
-
@‘AymericRed’:
1.7.10 puisque tu l’as en 1.7.10.
Ok comme je vais passez mon serveur en 1.7.10 sa devrai plus poser probleme