Jump to content

sep87x

Members
  • Posts

    68
  • Joined

  • Last visited

Posts posted by sep87x

  1. Hey guys,

     

    back with another question. It's not really a problem, but it might be of your interest too. I'm currently working on something kinda crazy and I need to change the size of the text in Minecraft. I've set up a GUI and want to draw a text with a bigger size. Now I already know that I can use GL11.glScalef for that, but is there another (maybe better) way to do this? Is there something like a built-in possibility to resize text?

     

    Greets from Germany

    ~sep87x

  2. G'morning.

     

    Try using an update flag when setting fire block to air:

    worldObj.setBlock(x, y, z, 0, 0, 0x02);

    0x02 automatically sends update to the server, thus you won't have to mess with packets.

     

    I already tried that out. That was my very first thought, but "Flag 2 will send the change to clients" (description). So I thought to set up a tick handler on server side and make him do the setBlock stuff, but didn't work out. I guess I need to do something with packets.

     

    €dit: My main issue is that it MUST be possible without sending packets (see client code). I'll be searching for some more useful code until I get back here.

  3. Actually, the Packet14BlockDig worked in some way. You were able to see this "destroying progress" in the fire (you know, these cracks). Regarding the BlockBreakPacket, you were right. I think I'm thinking too difficult. I know I need to send the fitting packet to the server to make the server recognize that there's no fire anymore, but I won't be able to make this with a custom packet, or am I? I'm a bit confused right now.

  4. I don't think I need to send a custom packet. I found some interesting methods in the sendQueue of the EntityClientPlayerMP (mc.thePlayer).

     

    mc.thePlayer.sendQueue.addToSendQueue(new Packet55BlockDestroy(mc.thePlayer.entityId, x, y, z, 15));
    mc.thePlayer.sendQueue.handleBlockDig(new Packet14BlockDig(2, x, y, z, 1));
    

     

    They both don't work, or am I missing something?

  5. That makes so much sense :/ Why didn't I think of that? *facepalms* of course it's client side, you are working with the clients microphone for crying out loud! xD So yes, that seems to be the case doesn't it. I am looking into it now. Expand on unexpected please? I am pushing the limits of my awakens right now.

     

    Yeah, I thought of that while I was taking a nap :D Regarding the "unexpected": this screen pops up.

     

    M8saKmS.png

     

    Most likely the server found out that this might be something suspicious, like cheating, so I must find a way to tell the server that this is not a cheat.

     

    €dit:

     

    I found a more appropriate method, but it doesn't really do what I want. Nevertheless, it doesn't raise the "unexpected screen".

     

    mc.thePlayer.sendQueue.handleBlockDestroy(new Packet55BlockDestroy(mc.thePlayer.entityId, x, y, z, i));

  6. I've looked into the code, but found the same code as I tried below. I think I found the source of the error. The change has been submitted to the client, but not for the server, so for the server, the fire still exists. That means I need to send a Packet55BlockDestroy to server, but it needs to come expected. I tried it out but it always came unexpected. Any suggestions?

     

    PacketDispatcher.sendPacketToServer(new Packet55BlockDestroy(player.entityId, x, y, z, 15));

    ^ Code until now

  7. This is the code which extinguishes the fire. All commented lines are things that I tried and never worked.

     

    if (sysTime - f.startTime >= 500 + 500 * d) {
    //Block.fire.onBlockClicked(world, x, y, z, player);
    //Block.fire.breakBlock(world, x, y, z, 0, 0);
    //Block.fire.onBlockDestroyedByPlayer(world, x, y, z, 0);
    //world.setBlockToAir(x, y, z);
    //world.setBlock(x, y, z, 0);
    //MinecraftForge.EVENT_BUS.post(new PlayerInteractEvent(player, Action.LEFT_CLICK_BLOCK, x, y, z, 1));
    
    /**for (int i = 0; i <= 5; i++) {
    	world.extinguishFire(player, x, y, z, i);
    }**/
    }
    

     

    The variable f is an object called "FireState". It contains the coordinate of a fire and the start time of the system, when the fire was located. (x, y, z - Fire coordinates) The variable d calculates the distance in blocks from the player to the fire. (0 to 4)

  8. /push

     

    Does no one have an idea? I'm a bit in trouble now because the hype about this mod just started and I NEED to get rid of this bug. I have tried some more methods like posting the PlayerInteractEvent to the event bus, use world.setBlockToAir() (also used by the BlockFire class) but none of these worked.

     

    I found some further information about this bug. When I try to replace the block with air, the fire still exists, but it is invisible, so players and mobs can still get caught on fire. I don't even need a piece of code to fix this, just tell me your suggestions.

     

    ~sep87x

  9. Hey lads and gents,

     

    I've released a mod yesterday which went pretty well on the Minecraft Forums and Planet Minecraft last night (see here). This mod is about extinguishing fire by blowing into your microphone. Anyway, today I recognized an annoying bug. When I try to extinguish the fire (simply setting block ID to 0), it kinda still exists and creates new fires around the fire which has been "extinguished" ... sometimes at very unusual places like 4 blocks away from the source.

     

    I found the extinguishFire() method in the World.java and I tried it, but I found out that it does pretty much the same. It simply sets a new air block instead of the fire block, but I know that this doesn't really work out. Ridiculously, this case only appears when the fire is at the bottom of a block or on the side of a block. Not when the fire is on top of the block. Can anyone help me out? This starts to get really annoying. I'll provide you with code if needed, but I think I explained pretty much all you need :D

     

    Greetings from Germany

    ~sep87x

  10. Wow, it's done crashing and it doesn't seem to works just fine. It seems like the replacement method returns null, but this shouldn't be happening.

     

    java.lang.NoClassDefFoundError: net/minecraft/world/biome/BiomeGenDesert
    at net.minecraft.world.biome.BiomeGenBase.<clinit>(BiomeGenBase.java:43)
    at net.minecraft.world.WorldType.<clinit>(WorldType.java:23)
    at net.minecraft.world.storage.WorldInfo.<init>(WorldInfo.java:88)
    at net.minecraft.world.storage.SaveFormatOld.func_75803_c(SourceFile:59)
    at net.minecraft.world.chunk.storage.AnvilSaveConverter.func_75799_b(SourceFile:57)
    at net.minecraft.client.gui.GuiSelectWorld.func_74073_h(SourceFile:75)
    at net.minecraft.client.gui.GuiSelectWorld.func_73866_w_(SourceFile:54)
    at net.minecraft.client.gui.GuiScreen.func_73872_a(SourceFile:94)
    at net.minecraft.client.Minecraft.func_71373_a(Minecraft.java:720)
    at net.minecraft.client.gui.GuiMainMenu.func_73875_a(GuiMainMenu.java:297)
    at net.minecraft.client.gui.GuiScreen.func_73864_a(SourceFile:69)
    at net.minecraft.client.gui.GuiMainMenu.func_73864_a(GuiMainMenu.java:619)
    at net.minecraft.client.gui.GuiScreen.func_73867_d(SourceFile:128)
    at net.minecraft.client.gui.GuiScreen.func_73862_m(SourceFile:107)
    at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1554)
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:898)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)
    at net.minecraft.client.main.Main.main(SourceFile:101)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
    Caused by: java.lang.ClassNotFoundException: net.minecraft.world.biome.BiomeGenDesert
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:179)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 24 more
    Caused by: java.lang.NullPointerException
    at net.sep87x.desertwells.DesertGenClassTransformer.patch(DesertGenClassTransformer.java:80)
    at net.sep87x.desertwells.DesertGenClassTransformer.transform(DesertGenClassTransformer.java:23)
    at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:267)
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:165)
    ... 26 more

     

    Again, I have no idea what could be the error. The method exists and is NOT null. Could it be caused by the super-call? http://gw.minecraftforge.net/9j8v http://gw.minecraftforge.net/SQLk

    (Done in an obfuscated environment)

     

    Edit: The error has been created because there wasn't a replacement method. It exists though. What could be the source of the error?

     

    Edit 2: Oh man, I forgot that the method name inside the ASMMethods class is also obfuscated. Changed it. Works. Thanks to anyonw who has helped :)

  11. I would never had thought that the fault lies in the return of the transform method. Shut up and take all my Thank-you's :)

     

    One last question before beta testing. This works absolutely sweet in a deobfuscated environment, but I am a bit worried about the functionality in an obfuscated environment.

     

    return patch("a", arg2, "(Lue;)V", "/net/sep87x/desertwells/ASMMethods.class", "decorate");

     

    What does the description "(Lue;)V" stand for? I know what the V means, but what does Lue; mean? Is that the obfuscated name of the RenderPlayer class? And if so, how do I need to make it fit the unobfuscated description "(Lnet/minecraft/world/World;Ljava/util/Random;II)V". Does it stay the same?

  12. Yes, I know, but I wanted to know what the newimport method looks like. I have the call setup in my class now:

     

    		if (arg0.equals("acv")) {
    		System.out.println("******** INSIDE OBFUSCATED BIOMEGENDESERT TRANSFORMER ABOUT TO PATCH: " + arg0);
    		newimport("", arg2);

     

    But there must be somewhere the code for the newimport method, you know, the

     

    	private void newimport(String string, byte[] arg2) {
    
    }

     

    thing, or am I literally unable to spot it?

  13. So, last question: the Methods.class in your patch method ... does it contain a method it should be replaced with?

     

    P.S. While skimming the transformer class I found the error in the code ... well ... nobody was born perfect.

×
×
  • Create New...

Important Information

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