Jump to content

Zillex_

Members
  • Posts

    47
  • Joined

  • Last visited

Everything posted by Zillex_

  1. Really? I find that hard to believe with the existence of channelRead0? Is there nothing whatsoever available?
  2. Mostly for testing purposes. I'd like to intercept each incoming packet, get what type of packet it is and I'd like to manipulate them. For example (Not what im trying but I've heard of this being done) : If you want a hacked client flight to bypass the vanilla fly kick you'd catch all incoming keep alive packets and cancel them. Edit: there is a functon in NetworkManager that can easily achieve this but it's not visible and I'm not familiar with reflection or whether or not there is a better alternative but the function is: channelread0(ChannelHandlerContext ctx, Packet packet) throws Exception { //Channel read code }
  3. oh, i apologize. I mean detecting incoming vanilla packets clientside.
  4. Hello, just wondering if there is a way to intercept packets with an event or something of the sort? eg: @SubscribeEvent public void onPacketReceive(PacketReceiveEvent event) { }
  5. I was wondering if there was any way to monitor all incoming and outgoing packets clientside only, thanks!
  6. oh... what should i use? lol edit nevermind 1.0 is default, THANKS
  7. Hey its me, the annoying sound guy so I've finally fixed all server issues with sounds playing etc. but now when it plays in eclipse the sound is perfect but when it plays on a minecraft client it becomes longer and WAY deeper. here is code: package cerni; import java.util.UUID; import *****.proxy.CommonProxy; import ibxm.Player; import net.minecraft.client.Minecraft; import net.minecraft.client.audio.SoundCategory; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent.Chat; import net.minecraftforge.client.event.sound.SoundEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.ServerChatEvent; import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @Mod(modid = Main.MOD_ID, name = Main.NAME, version = Main.VERSION) public class Main { public static final String MOD_ID = "zillexcm"; public static final String NAME = "*****"; public static final String VERSION = "0.1"; public String msg; @Instance public static Main instance; @Mod.EventHandler public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register((Object)this); } @SubscribeEvent public void onDeath(final ClientChatReceivedEvent event) { this.msg = event.message.getUnformattedText(); if(this.msg.contains("Nostos")) { Minecraft.getMinecraft().thePlayer.playSound("zillexcm:sounds.jigglypuff", 3.5F, 0.2F); } } } Thanks!
  8. Who would win, A well constructed forum or one bumpy boi
  9. Didn't really help, thanks for the suggestion though.
  10. oh it is 1.8.9 lol I just say 1.8 assuming everyone thinks 1.8.9
  11. oh rip, I can't update because Im making this mod for someone
  12. okay, I'm starting to feel bad for asking all these noob questions but when I register the sound event like this: ResourceLocation location = new ResourceLocation("zillexcm", "jigglypuff"); SoundEvent soundevent = new SoundEvent(location); it gives this error: The constructor SoundEvent(ResourceLocation) is undefined again, sorry for all the noob questions
  13. Oh, thanks lol, just need two more things 1 I'm getting an error still: The method playSound(double, double, double, String, float, float, boolean) in the type World is not applicable for the arguments (null, BlockPos, String, String, float, float) 2: still having that uuid issue my thought was to do this? UUID playerID = EntityPlayer.getOfflineUUID("Nostos"); if(event.entity.getUniqueID().equals(uid)){ // sound code here } Thanks
  14. Hi, thanks for the example it worked perfectly except I'm not sure where you got playerIn from I tried this: Entity playerIn = event.entity; but then I got this error:The method playSound(double, double, double, String, float, float, boolean) in the type World is not applicable for the arguments (null, World, String, String, float, float) Thanks for all your help
  15. but, I've seen mods that work on servers but use playSound? Edit: also thanks for not getting mad at my noob questions lol Edit 2: I'd like to note that the mod actually did work on one server
  16. so, how do I play a sound while on a server? is there a separate method?
  17. I KNEW IT! continues to wonder what the serverside one is, and the uuid problem Edit: I tried this but didn't work event.entity.playSound("zillexcm:sounds.jigglypuff", 5.0F, 1.0F);
  18. testing it by exporting/running in eclipse also can you please tell me where I'm doing the reaching across logical sides error, this is my first mod and I'm more familiar with the bukkit api than the forge one, thanks edit: no I'm not logged in in my dev environment
  19. okay thanks, but about the uuid thing?
  20. Sound plays in singleplayer but not on servers, code: package *****; import java.util.UUID; import *****.proxy.CommonProxy; import ibxm.Player; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent.Chat; import net.minecraftforge.client.event.sound.SoundEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.ServerChatEvent; import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @Mod(modid = Main.MOD_ID, name = Main.NAME, version = Main.VERSION) public class Main { public static final String MOD_ID = "zillexcm"; public static final String NAME = "*****"; public static final String VERSION = "0.1"; public String msg; @Instance public static Main instance; @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS) public static CommonProxy proxy; @Mod.EventHandler public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(this); } @SubscribeEvent public void onDeath(LivingDeathEvent event) { if(event.entity instanceof EntityPlayer) { if(!event.entity.isEntityAlive()) { //UUID uid = UUID.fromString("74a1dcea-1946-45a9-a373-5f1b211f4d07"); //if(!event.entity.getUniqueID().equals(uid)) { Minecraft.getMinecraft().thePlayer.playSound("zillexcm:sounds.jigglypuff", 5.0F, 1.0F); //} // MY's UUID: 74a1dcea-1946-45a9-a373-5f1b211f4d07 } } } } note: Please help with the UUID as well the mod for some reason only works when it doesn't use it, which is why it is commented out. Also: ***** is hidden for a specific person, its their name.
  21. UUID uid = UUID.fromString("74a1dcea-1946-45a9-a373-5f1b211f4d07"); if(event.entity.getUniqueID().equals(uid)) { not even going to ask you for help even if its incorrect
  22. did you even read this: "but I thought, hey lets go on the forums for help instead of taking a couple hours to figure it out on my own"
×
×
  • Create New...

Important Information

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