Navigation

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    [ Probleme Modification KB] '' coter client''

    Sans suite
    1.9.4
    3
    4
    780
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      AYMANOUH last edited by

      Bonjour,Bonsoir,

      Voila je fait appelle a vous , car j’ai recemment commencer a essayer de comprendre le java …. mon niveau global en java ‘’ Debutant ‘’ , je n’ai pas encore assez d’experience dans le domaine , c est pour ca que je fait apelle a vous …

      Mon Problem : J ai cree un mod , qui importe les .class qui concerne le Kb coter client …
      et j ai copier coller ceci :

      Permier .Class = ExampleMod

      
      package ExampleMod;
      
      import net.minecraft.init.Blocks;
      import net.minecraftforge.fml.common.Mod;
      import net.minecraftforge.fml.common.Mod.EventHandler;
      import net.minecraftforge.fml.common.event.FMLInitializationEvent;
      import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
      import net.minecraft.network.play.client.*;
      import net.minecraft.entity.*;
      import net.minecraftforge.fml.client.*;
      import net.minecraftforge.event.entity.*;
      import net.minecraft.client.Minecraft;
      import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
      
      @Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION)
      public class ExampleMod
      {
      public static final String MODID = "JingoClient";
      public static final String VERSION = "0.1 Beta";
      private boolean isAirBorne;
      public double motionZ;
      public double motionY;
      public double motionX;
      public double posZ;
      public double posX;
      public double posY;
      
      public boolean velocityChanged;
      protected void setBeenAttacked()
      {
      this.velocityChanged = true;
      }
      
      @EventHandler
      public void addVelocity(double x, double y, double z)
      {
      this.motionX += x;
      this.motionY += y;
      this.motionZ += z;
      this.isAirBorne = true;
      }
      
      public static double Pmmmmlll = 1.8D;
      public static double vz1 = 1.8D;
      public static double vz2 = 1.8D;
      public void setVelocity(double x, double y, double z)
      {
      this.motionX = x / Pmmmmlll;
      this.motionY = y / vz1;
      this.motionZ = z /vz2;
      
      }
      public Minecraft mc = Minecraft.getMinecraft();
      
      }
      
      

      Deuxieme .Class = SPacketEntityVelocity

      
      package net.minecraft.minecraft;
      
      import java.io.IOException;
      import net.minecraft.entity.Entity;
      import net.minecraft.network.Packet;
      import net.minecraft.network.PacketBuffer;
      import net.minecraft.network.play.*;
      import net.minecraftforge.fml.common.Mod.EventHandler;
      import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
      import net.minecraft.client.multiplayer.*;
      import mcp.MethodsReturnNonnullByDefault;
      import javax.annotation.ParametersAreNonnullByDefault;
      
      public class SPacketEntityVelocity implements Packet <inethandlerplayclient>{
      private int entityID;
      private int motionX;
      private int motionY;
      private int motionZ;
      private net.minecraft.network.play.server.SPacketEntityVelocity packetIn;
      
      public SPacketEntityVelocity()
      {
      }
      
      public SPacketEntityVelocity(Entity entityIn)
      {
      this(entityIn.getEntityId(), entityIn.motionX, entityIn.motionY, entityIn.motionZ);
      }
      
      public SPacketEntityVelocity(int entityIdIn, double motionXIn, double motionYIn, double motionZIn)
      {
      this.entityID = entityIdIn;
      double d0 = 3.9D;
      
      if (motionXIn < -d0)
      {
      motionXIn = -d0;
      }
      
      if (motionYIn < -d0)
      {
      motionYIn = -d0;
      }
      
      if (motionZIn < -d0)
      {
      motionZIn = -d0;
      }
      
      if (motionXIn > d0)
      {
      motionXIn = d0;
      }
      
      if (motionYIn > d0)
      {
      motionYIn = d0;
      }
      
      if (motionZIn > d0)
      {
      motionZIn = d0;
      }
      
      this.motionX = (int)(motionXIn * 8000.0D);
      this.motionY = (int)(motionYIn * 8000.0D);
      this.motionZ = (int)(motionZIn * 8000.0D);
      }
      
      /**
      * Reads the raw packet data from the data stream.
      */
      public void readPacketData(PacketBuffer buf) throws IOException
      {
      this.entityID = buf.readVarIntFromBuffer();
      this.motionX = buf.readShort();
      this.motionY = buf.readShort();
      this.motionZ = buf.readShort();
      }
      
      /**
      * Writes the raw packet data to the data stream.
      */
      public void writePacketData(PacketBuffer buf) throws IOException
      {
      buf.writeVarIntToBuffer(this.entityID);
      buf.writeShort(this.motionX);
      buf.writeShort(this.motionY);
      buf.writeShort(this.motionZ);
      }
      
      /**
      * Passes this Packet on to the NetHandler for processing.
      */
      @EventHandler
      public void processPacket(INetHandlerPlayClient handler)
      {
      handler.handleEntityVelocity(packetIn);
      }
      
      public int getEntityID()
      {
      return this.entityID;
      }
      
      public int getMotionX()
      {
      return this.motionX;
      }
      
      public int getMotionY()
      {
      return this.motionY;
      }
      
      public int getMotionZ()
      {
      return this.motionZ;
      }
      }
      
      

      Croyez moi , je sais pas si c est bon , mais ca ma mis aucune erreur … j’ai fait pas mal de version modifier , pour comprendre le system de minecraft ( Importation , modification de Reach , KnockBack, ajout d’item modder ect …) mais je m’en rend comte que Forge et Version , c est pas la meme chose …

      Merci de bien vouloir m’aider ( un peu )…</inethandlerplayclient>

      1 Reply Last reply Reply Quote 0
      • Deleted
        Deleted last edited by

        C’est un troll ? Si la réponse est non, c’est encore + affligeant de nous faire croire que MFF t’aiderait à parfaire ton joli hack…

        1 Reply Last reply Reply Quote 0
        • Superloup10
          Superloup10 Modérateurs last edited by

          C’est quoi Version ?

          1 Reply Last reply Reply Quote 0
          • A
            AYMANOUH last edited by

            En quoi c est ‘’ Mechant ‘’ de faire un mod qui sers a reduire ou augmenter le kb ? a la base je voulais faire un mod ‘’ Troll Kb ‘’ , en gros je prend genre 15 block en Y et 20 block en X ……


            J’ai deja une version que j ai modifier et qui me permet de prendre 10 block en X et 5 en Y

            Mais moi je veux cette fois-ci le faire en MOD

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Design by Woryk
            Contact / Mentions Légales / Faire un don

            MINECRAFT FORGE FRANCE © 2018

            Powered by NodeBB