Jump to content

theoriginalbit

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by theoriginalbit

  1. alrighty, thank you both
  2. Hi, As it currently stands the code is being processed on the server, therefore I wish to send it out to the clients. I assume that the standard World#playSoundEffect(double, double, double, String, float, float) performs a lookup with the supplied name to find a Minecraft.getMinecraft().getSoundHandler().playSound(ISound)? — BIT
  3. Hello all, In my mod I have a block which plays some sound effects. The sounds/actions are triggered server-side and sent to the clients. I am currently going through a refactor which is trying to reduce the amount of packets that is sent between the server and client, however I noticed a problem. I am able to successfully send particle messages from the server to the client and have them spawn by invoking World#spawnParticle(String, double, double, double, double, double, double) on the world object, however for some reason invoking World#playSoundEffect(double, double, double, String, float, float) does not play the sound effect, instead I've found that it requires me to actually invoke that method server-side or it won't be heard on the client at all... I'm not too sure what I'm doing wrong here, so any suggestions would be greatly appreciated! Code IMessage: https://github.com/theoriginalbit/MoarPeripherals/blob/master/src/main/java/com/theoriginalbit/moarperipherals/common/network/message/MessageSoundEffect.java IMessageHandler: https://github.com/theoriginalbit/MoarPeripherals/blob/master/src/main/java/com/theoriginalbit/moarperipherals/common/network/message/handler/MessageHandlerSoundEffect.java — BIT
  4. Okay I just discovered my problem and it was the Side.SERVER, it is being sent from the server so it should be Side.CLIENT. though I swear I was getting a crash I'm no longer getting when I used Side.CLIENT. Thank you all for your help! Yeah in the realm of Generics they're definitely the same, MessageIronNote extends MessageGeneric which implements IMessage, so that would be valid. But you do give a good point that I should make things look a little more consistent, thanks. Yeah I was suggested this change on IRC, while not actually a problem having them together, it might be worth splitting them for me, since I have developed MessageGeneric to be able to handle any packet I ever want to send.
  5. I'm currently in the process of porting my mod from 1.6x to 1.7.10, and one of my bug testers is reporting the following error(s) Error #1 java.lang.NoSuchMethodError: net.minecraft.network.play.server.S35PacketUpdateTileEntity.func_148857_g()Lnet/minecraft/nbt/NBTTagCompound; at com.theoriginalbit.moarperipherals.common.tile.TileKeyboard.func_145844_m(TileKeyboard.java:70) at net.minecraft.entity.player.EntityPlayerMP.func_147097_b(EntityPlayerMP.java:540) at net.minecraft.entity.player.EntityPlayerMP.func_70071_h_(EntityPlayerMP.java:276) at net.minecraft.world.World.func_72866_a(World.java:2068) at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:648) at net.minecraft.world.World.func_72870_g(World.java:2032) at net.minecraft.world.World.func_72939_s(World.java:1885) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:636) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:334) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) Error #2 java.lang.NoSuchMethodError: net.minecraft.network.play.server.S35PacketUpdateTileEntity.func_148857_g()Lnet/minecraft/nbt/NBTTagCompound; at com.theoriginalbit.moarperipherals.common.tile.TileKeyboard.func_145844_m(TileKeyboard.java:70) at net.minecraft.server.management.PlayerManager$PlayerInstance.func_151252_a(PlayerManager.java:591) at net.minecraft.server.management.PlayerManager$PlayerInstance.func_73254_a(PlayerManager.java:533) at net.minecraft.server.management.PlayerManager.func_72693_b(PlayerManager.java:67) at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:185) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:625) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:334) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) This problem only seems to occur in SMP, with no problems in SSP, and I can't quite figure out what is going on at all. Here is a link to the code: https://github.com/theoriginalbit/MoarPeripherals/blob/master/src/main/java/com/theoriginalbit/moarperipherals/common/tile/TileKeyboard.java#L70 Any suggestions and/or help with this would be very appreciated
  6. What do you mean by not registering the handler? Is that not what this line is?
  7. I changed to use the ByteBufUtils, but since the NBT code is actually never called — the offending packet only uses int data — the stream should never be opened for the NBT read/write, meaning it isn't the cause of the leak.
  8. thank you, while that is an excellent catch that I missed (and will definitely keep in), I'm still getting the exact same issue, every 5 seconds it states the memory leak.
  9. I am getting a potential memory leak detected when I was porting to my mod to the latest version. I cannot for the life of me figure out why. Log output: http://pastebin.com/UHudKSSP Networking code: https://github.com/theoriginalbit/MoarPeripherals/tree/master/src/main/java/com/theoriginalbit/moarperipherals/common/network Sending the message: https://github.com/theoriginalbit/MoarPeripherals/blob/master/src/main/java/com/theoriginalbit/moarperipherals/common/tile/TileIronNote.java#L45
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.