Posted August 15, 201411 yr I am getting the following error when i call world.getLoadedEntityList() java.lang.NoSuchMethodError: net.minecraft.world.World.func_72910_y()Ljava/util/List; at packets.packethandling.ProcessPacketServerSide.getEntityByID(ProcessPacketServerSide.java:104) ~[ProcessPacketServerSide.class:?] at packets.packethandling.ProcessPacketServerSide.processPacketOnServer(ProcessPacketServerSide.java:77) ~[ProcessPacketServerSide.class:?] at packets.packethandling.ServerPacketHandler.onServerPacket(ServerPacketHandler.java:36) ~[serverPacketHandler.class:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler_21_ServerPacketHandler_onServerPacket_ServerCustomPacketEvent.invoke(.dynamic) ~[?:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:51) ~[ASMEventHandler.class:?] at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:122) ~[EventBus.class:?] at cpw.mods.fml.common.network.FMLEventChannel.fireRead(FMLEventChannel.java:103) ~[FMLEventChannel.class:?] at cpw.mods.fml.common.network.NetworkEventFiringHandler.channelRead0(NetworkEventFiringHandler.java:30) ~[NetworkEventFiringHandler.class:?] at cpw.mods.fml.common.network.NetworkEventFiringHandler.channelRead0(NetworkEventFiringHandler.java:18) ~[NetworkEventFiringHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[simpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.func_148833_a(FMLProxyPacket.java:77) [FMLProxyPacket.class:?] at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212) [ej.class:?] at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:165) [nc.class:?] at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:659) [MinecraftServer.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:335) [lt.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [li.class:?] The piece of code that is calling this method is public static Entity getEntityByID(int entityID, World world) { for(Object o: world.getLoadedEntityList()) { if(((Entity)o).getEntityId() == entityID) { System.out.println("Found the entity"); return ((Entity)o); } } return null; } Does anyone know what could be causing this error?
August 15, 201411 yr Author Sorry I should have said what version of Forge I'm using for development. It's Forge 1.7.10-10.13.1207 but I have seen this in other builds of 1.7.10
August 16, 201411 yr This is not a bug or anything to do with Forge.. Learn to write your mod correctly and don't use client only code on the server. @SideOnly(Side.CLIENT) public List getLoadedEntityList() I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
August 16, 201411 yr Author I may have posted it in the wrong forum.. I was just asking for help not reporting a bug. Thanks for moving it.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.