Skocz do zawartości

[Problem] konwertowanie


Sziser True
 Udostępnij

Rekomendowane odpowiedzi

Witam niedawno zacząłem swoją przygodę z modowaniem i tak o to najpierw zrobiłem mod dodający do gry marmur ,potem przerobiłem id'ki w innym (nie moim)

niestety nie mogę skonwertować go na class

Nawet normalnego moda nie jestem w stanie spowrotem skonwertować

ani javac ani mcp

w obu przypadkach pełno error'ów

 

jeśliby to pomogło oto kod

 

                        ItemTonCraftSeeds.java


// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(5) braces fieldsfirst noctor nonlb space lnc 


public class ItemTonCraftSeeds extends gk {

           private int field_318_a;

           public ItemTonCraftSeeds(int i, int j) {
/*  12*/        super(i);
/*  13*/        field_318_a = j;
           }

           public boolean a(iw iw1, gq gq, fb fb1, int i, int j, int k, int l) {
/*  18*/        if (l != 1) {
/*  20*/            return false;
               }
/*  22*/        int i1 = fb1.a(i, j, k);
/*  23*/        if ((i1 == un.w.bn || i1 == un.v.bn) && fb1.d(i, j + 1, k)) {
/*  25*/            fb1.f(i, j + 1, k, field_318_a);
/*  26*/            iw1.a--;
/*  27*/            return true;
               } else {
/*  30*/            return false;
               }
           }
}

 

                            mod_TonCraftMorePlants.java


// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(5) braces fieldsfirst noctor nonlb space lnc 

import java.util.Random;

public class mod_TonCraftMorePlants extends BaseMod {

           public static int moonFlowerTexture;
           public static int jadeFlowerTexture;
           public static int shrubTexture;
           public static int bloodLillyTexture;
           public static int fireLillyTexture;
           public static final vt moonFlower;
           public static final vt jadeFlower;
           public static final vt shrub;
           public static final vt bloodLilly;
           public static final vt fireLilly;
           public static gk FireLillySeeds;
           public static gk BloodLillySeeds;
           public static gk ShrubSeeds;
           public static gk JadeFlowerSeeds;
           public static gk MoonFlowerSeeds;
           public static gk DandelionSeeds;
           public static gk RoseSeeds;

           public mod_TonCraftMorePlants() {
/*  35*/        ModLoader.RegisterBlock(moonFlower);
/*  36*/        ModLoader.RegisterBlock(jadeFlower);
/*  37*/        ModLoader.RegisterBlock(shrub);
/*  38*/        ModLoader.RegisterBlock(bloodLilly);
/*  39*/        ModLoader.RegisterBlock(fireLilly);
/*  41*/        ModLoader.AddName(moonFlower, "Moon Flower");
/*  42*/        ModLoader.AddName(jadeFlower, "Jade Flower");
/*  43*/        ModLoader.AddName(shrub, "Shrub");
/*  44*/        ModLoader.AddName(bloodLilly, "Blood Lillys");
/*  45*/        ModLoader.AddName(fireLilly, "Fire Lillys");
/*  47*/        ModLoader.AddName(FireLillySeeds, "Fire Lilly Seeds");
/*  48*/        ModLoader.AddName(BloodLillySeeds, "Blood Lilly Seeds");
/*  49*/        ModLoader.AddName(ShrubSeeds, "Shrub Seeds");
/*  50*/        ModLoader.AddName(JadeFlowerSeeds, "Jade Flower Seeds");
/*  51*/        ModLoader.AddName(MoonFlowerSeeds, "Moon Flower Seeds");
/*  52*/        ModLoader.AddName(DandelionSeeds, "Dandelion Seeds");
/*  53*/        ModLoader.AddName(RoseSeeds, "Rose Seeds");
/*  55*/        FireLillySeeds.bg = ModLoader.addOverride("/gui/items.png", "/TonCraft Resources/flseeds.png");
/*  56*/        BloodLillySeeds.bg = ModLoader.addOverride("/gui/items.png", "/TonCraft Resources/bseeds.png");
/*  57*/        ShrubSeeds.bg = ModLoader.addOverride("/gui/items.png", "/TonCraft Resources/sseeds.png");
/*  58*/        JadeFlowerSeeds.bg = ModLoader.addOverride("/gui/items.png", "/TonCraft Resources/jseeds.png");
/*  59*/        MoonFlowerSeeds.bg = ModLoader.addOverride("/gui/items.png", "/TonCraft Resources/mfseeds.png");
/*  60*/        DandelionSeeds.bg = ModLoader.addOverride("/gui/items.png", "/TonCraft Resources/dseeds.png");
/*  61*/        RoseSeeds.bg = ModLoader.addOverride("/gui/items.png", "/TonCraft Resources/rseeds.png");
/*  63*/        ModLoader.AddShapelessRecipe(new iw(gk.aU, 2, 13), new Object[] {
/*  63*/            moonFlower
               });
/*  66*/        ModLoader.AddShapelessRecipe(new iw(gk.aU, 2, 12), new Object[] {
/*  66*/            jadeFlower
               });
/*  69*/        ModLoader.AddShapelessRecipe(new iw(gk.aU, 2, 10), new Object[] {
/*  69*/            shrub
               });
/*  72*/        ModLoader.AddShapelessRecipe(new iw(gk.aU, 2, 1), new Object[] {
/*  72*/            bloodLilly
               });
/*  75*/        ModLoader.AddShapelessRecipe(new iw(gk.aU, 2, 14), new Object[] {
/*  75*/            fireLilly
               });
/*  79*/        ModLoader.AddShapelessRecipe(new iw(FireLillySeeds, 4), new Object[] {
/*  79*/            fireLilly, fireLilly
               });
/*  82*/        ModLoader.AddShapelessRecipe(new iw(BloodLillySeeds, 4), new Object[] {
/*  82*/            bloodLilly, bloodLilly
               });
/*  85*/        ModLoader.AddShapelessRecipe(new iw(MoonFlowerSeeds, 4), new Object[] {
/*  85*/            moonFlower, moonFlower
               });
/*  88*/        ModLoader.AddShapelessRecipe(new iw(JadeFlowerSeeds, 4), new Object[] {
/*  88*/            jadeFlower, jadeFlower
               });
/*  91*/        ModLoader.AddShapelessRecipe(new iw(ShrubSeeds, 4), new Object[] {
/*  91*/            shrub, shrub
               });
/*  94*/        ModLoader.AddShapelessRecipe(new iw(DandelionSeeds, 4), new Object[] {
/*  94*/            un.ae, un.ae
               });
/*  97*/        ModLoader.AddShapelessRecipe(new iw(RoseSeeds, 4), new Object[] {
/*  97*/            un.af, un.af
               });
           }

           public void GenerateSurface(fb fb, Random random, int i, int j) {
/* 106*/        int k = i + random.nextInt(16) + 8;
/* 107*/        int l = random.nextInt(128);
/* 108*/        int i1 = j + random.nextInt(16) + 8;
/* 109*/        (new bd(moonFlower.bn)).a(fb, random, k, l, i1);
/* 110*/        k = i + random.nextInt(16) + 8;
/* 111*/        l = random.nextInt(128);
/* 112*/        i1 = j + random.nextInt(16) + 8;
/* 113*/        (new bd(shrub.bn)).a(fb, random, k, l, i1);
/* 114*/        k = i + random.nextInt(16) + 8;
/* 115*/        l = random.nextInt(128);
/* 116*/        i1 = j + random.nextInt(16) + 8;
/* 117*/        (new bd(jadeFlower.bn)).a(fb, random, k, l, i1);
/* 118*/        k = i + random.nextInt(16) + 8;
/* 119*/        l = random.nextInt(128);
/* 120*/        i1 = j + random.nextInt(16) + 8;
/* 121*/        (new bd(bloodLilly.bn)).a(fb, random, k, l, i1);
/* 122*/        k = i + random.nextInt(16) + 8;
/* 123*/        l = random.nextInt(128);
/* 124*/        i1 = j + random.nextInt(16) + 8;
/* 125*/        (new bd(fireLilly.bn)).a(fb, random, k, l, i1);
           }

           public String Version() {
/* 132*/        return "1.5_01";
           }

           static  {
/*  11*/        moonFlowerTexture = ModLoader.addOverride("/terrain.png", "/TonCraft Resources/moonFlower.png");
/*  12*/        jadeFlowerTexture = ModLoader.addOverride("/terrain.png", "/TonCraft Resources/jadeFlower.png");
/*  13*/        shrubTexture = ModLoader.addOverride("/terrain.png", "/TonCraft Resources/shrub.png");
/*  14*/        bloodLillyTexture = ModLoader.addOverride("/terrain.png", "/TonCraft Resources/bloodlillys.png");
/*  15*/        fireLillyTexture = ModLoader.addOverride("/terrain.png", "/TonCraft Resources/firelillys.png");
/*  17*/        moonFlower = (vt)(new vt(900, moonFlowerTexture)).c(0.0F).a("moonFlower");
/*  18*/        jadeFlower = (vt)(new vt(901, jadeFlowerTexture)).c(0.0F).a("jadeFlower");
/*  19*/        shrub = (vt)(new vt(902, shrubTexture)).c(0.0F).a("shrub");
/*  20*/        bloodLilly = (vt)(new vt(903, bloodLillyTexture)).c(0.0F).a("bloodLilly");
/*  21*/        fireLilly = (vt)(new vt(904, fireLillyTexture)).c(0.0F).a("fireLilly");
/* 136*/        FireLillySeeds = (new ItemTonCraftSeeds(ModLoader.getUniqueEntityId(), fireLilly.bn)).a(9, 0).a("FireLillySeeds");
/* 137*/        BloodLillySeeds = (new ItemTonCraftSeeds(ModLoader.getUniqueEntityId(), bloodLilly.bn)).a(9, 0).a("BloodLillySeeds");
/* 138*/        ShrubSeeds = (new ItemTonCraftSeeds(ModLoader.getUniqueEntityId(), shrub.bn)).a(9, 0).a("ShrubSeeds");
/* 139*/        JadeFlowerSeeds = (new ItemTonCraftSeeds(ModLoader.getUniqueEntityId(), jadeFlower.bn)).a(9, 0).a("JadeFlowerSeeds");
/* 140*/        MoonFlowerSeeds = (new ItemTonCraftSeeds(ModLoader.getUniqueEntityId(), moonFlower.bn)).a(9, 0).a("MoonFlowerSeeds");
/* 141*/        DandelionSeeds = (new ItemTonCraftSeeds(ModLoader.getUniqueEntityId(), un.ae.bn)).a(9, 0).a("DendelionSeeds");
/* 142*/        RoseSeeds = (new ItemTonCraftSeeds(ModLoader.getUniqueEntityId(), un.af.bn)).a(9, 0).a("RoseSeeds");
           }
}

 

                              BlockMarmur.java


// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode 

package net.minecraft.src;

import java.util.Random;

// Referenced classes of package net.minecraft.src:
//            Block, Material, World, EntityPlayer

public class BlockMarmur extends Block
{

   public BlockMarmur(int i, int j)
   {
       super(i, j, Material.lava);
       setLightValue(0.625F).setHardness(2.0F).setResistance(3.5F).setStepSound(soundPowderFootstep).setBlockName("Marmur");
       setTickOnLoad(true);
   }

   public int quantityDropped(Random random)
   {
       return 1;
   }

   public int tickRate()
   {
       return 30;
   }

   public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
   {
       produceParticles(world, i, j, k);
       return super.blockActivated(world, i, j, k, entityplayer);
   }

   public void randomDisplayTick(World world, int i, int j, int k, Random random)
   {
       produceParticles(world, i, j, k);
   }

   private void produceParticles(World world, int i, int j, int k)
   {
       Random random = world.rand;
       double d = 0.0625D;
       for(int l = 0; l < 6; l++)
       {
           double d1 = (float)i + random.nextFloat();
           double d2 = (float)j + random.nextFloat();
           double d3 = (float)k + random.nextFloat();
           if(l == 0 && !world.isBlockOpaqueCube(i, j + 1, k))
           {
               d2 = (double)(j + 1) + d;
           }
           if(l == 1 && !world.isBlockOpaqueCube(i, j - 1, k))
           {
               d2 = (double)(j + 0) - d;
           }
           if(l == 2 && !world.isBlockOpaqueCube(i, j, k + 1))
           {
               d3 = (double)(k + 1) + d;
           }
           if(l == 3 && !world.isBlockOpaqueCube(i, j, k - 1))
           {
               d3 = (double)(k + 0) - d;
           }
           if(l == 4 && !world.isBlockOpaqueCube(i + 1, j, k))
           {
               d1 = (double)(i + 1) + d;
           }
           if(l == 5 && !world.isBlockOpaqueCube(i - 1, j, k))
           {
               d1 = (double)(i + 0) - d;
           }
           if(d1 < (double)i || d1 > (double)(i + 1) || d2 < 0.0D || d2 > (double)(j + 1) || d3 < (double)k || d3 > (double)(k + 1))
           {
               world.spawnParticle("reddust", d1, d2, d3, 0.0D, 0.0D, 0.0D);
           }
       }

   }
}

 

                          mod_Marmur.java



// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode 

package net.minecraft.src;

import java.util.Random;

// Referenced classes of package net.minecraft.src:
//            Block, Material, World, EntityPlayer

public class mod_Marmur extends BaseMod ;
{

   public String Version() 
   {
       return "r3 (for b1.6.4)";
   }

   private static String getAppdata()
   {
       return Minecraft.getMinecraftDir().getPath();
   }

   public mod_Marmur() ;
   {
       ModLoader.RegisterBlock(Marmur);
       ModLoader.AddName(Marmur, "Blok Marmuru");
       AddRecipes();
   }

   public static void prepareProps()
   {
       props.getInt("Blok Marmuru", 700);
   }

   public static String modDir;
   public static Props props;
   public static Block Marmur;

   static 
   {
       modDir = "/ST/Marmur/";
       props = new Props((new File((new StringBuilder()).append(getAppdata()).append('/').append("Marmur.props").toString())).getPath());
       prepareProps();
       CompressedRedstone = new BlockMarmur(props.getInt("blockMarmur"), ModLoader.addOverride("/terrain.png", (new StringBuilder()).append(modDir).append("blockMarmur.png").toString()));
       props.save();
   }
}

Edytowane przez Sziser True
Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Zaloguj się poniżej.

Zaloguj się
 Udostępnij

  • Ostatnio przeglądający forum [Problem] konwertowanie   0 użytkowników
    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...