Posted February 25, 201411 yr Hey, in eclipse all works fine.. When I try to run Minecraft 1.7 (not eclipse) it'll crash with this error: ---- Minecraft Crash Report ---- // Uh... Did I do that? Time: 25.02.14 16:30 Description: There was a severe problem during mod loading that has caused the game to fail cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: MyMod/blocks/MyModBlockPortal at cpw.mods.fml.common.LoadController.transition(LoadController.java:163) at cpw.mods.fml.common.Loader.loadMods(Loader.java:497) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:201) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:498) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:853) at net.minecraft.client.main.Main.main(SourceFile:103) 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:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.NoClassDefFoundError: MyMod/blocks/MyModBlockPortal at MyMod.blocks.MyModBlocks.<init>(MyModBlocks.java:41) at MyMod.MyMod.preInit(MyMod.java:103) 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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:536) 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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) 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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at cpw.mods.fml.common.Loader.loadMods(Loader.java:495) ... 10 more Caused by: java.lang.ClassNotFoundException: MyMod.blocks.MyModBlockPortal at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:188) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 39 more Caused by: java.lang.StackOverflowError at java.util.HashMap.getEntry(Unknown Source) at java.util.HashMap.get(Unknown Source) at com.google.common.collect.AbstractMapBasedMultimap.get(AbstractMapBasedMultimap.java:304) at com.google.common.collect.AbstractListMultimap.get(AbstractListMultimap.java:66) at com.google.common.collect.ArrayListMultimap.get(ArrayListMultimap.java:66) at cpw.mods.fml.common.patcher.ClassPatchManager.applyPatch(ClassPatchManager.java:72) at cpw.mods.fml.common.patcher.ClassPatchManager.getPatchedResource(ClassPatchManager.java:60) at cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper.findAndMergeSuperMaps(FMLDeobfuscatingRemapper.java:368) at cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper.mergeSuperMaps(FMLDeobfuscatingRemapper.java:401) at cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper.findAndMergeSuperMaps(FMLDeobfuscatingRemapper.java:375) at cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper.mergeSuperMaps(FMLDeobfuscatingRemapper.java:401) at cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper.findAndMergeSuperMaps(FMLDeobfuscatingRemapper.java:375) at cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper.mergeSuperMaps(FMLDeobfuscatingRemapper.java:401) at cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper.findAndMergeSuperMaps(FMLDeobfuscatingRemapper.java:375) at cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper.mergeSuperMaps(FMLDeobfuscatingRemapper.java:401) AND MUCH MORE OF THIS A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 7 (x86) version 6.1 Java Version: 1.7.0_51, Oracle Corporation Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation Memory: 24965200 bytes (23 MB) / 153858048 bytes (146 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx512M -Xmx1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.01-pre FML v7.2.125.1034 Minecraft Forge 10.12.0.1034 4 mods loaded, 4 mods active mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized FML{7.2.125.1034} [Forge Mod Loader] (forge-1.7.2-10.12.0.1034.jar) Unloaded->Constructed->Pre-initialized Forge{10.12.0.1034} [Minecraft Forge] (forge-1.7.2-10.12.0.1034.jar) Unloaded->Constructed->Pre-initialized MyMod{3.1} [MyMod] (MyMod-3.1.jar) Unloaded->Constructed->Errored MyModBlocks: Registry of my blocks.. public static Block Obsidian; public static Block Portal; Obsidian = new MyModBlockObsidian().setBlockName("Obsidian"); Portal = new MyModBlockPortal().setBlockName("Portal").setHardness(-1.0F).setLightLevel(0.75F); GameRegistry.registerBlock(Obsidian, "Smaragdobsidian"); GameRegistry.registerBlock(Portal, "Portal"); MyModBlockObsidian: Same as BlockObsidian. MyModBlockPortal: Same as BlockPortal (but with my blocks) MyMod: Line 103: new MyModBlocks(); Thanks for help!
February 25, 201411 yr Author It just can be in my MyModBlockPortal class. The only func that I found is this: public boolean func_150000_e(World p_150000_1_, int p_150000_2_, int p_150000_3_, int p_150000_4_) { MyModBlockPortal.Size size = new MyModBlockPortal.Size(p_150000_1_, p_150000_2_, p_150000_3_, p_150000_4_, 1); MyModBlockPortal.Size size1 = new MyModBlockPortal.Size(p_150000_1_, p_150000_2_, p_150000_3_, p_150000_4_, 2); if (size.func_150860_b() && size.field_150864_e == 0) { size.func_150859_c(); return true; } else if (size1.func_150860_b() && size1.field_150864_e == 0) { size1.func_150859_c(); return true; } else { return false; } } But there are many more in the part at the bottom IN this class: public static class Size { private final World field_150867_a; private final int field_150865_b; private final int field_150866_c; private final int field_150863_d; private int field_150864_e = 0; private ChunkCoordinates field_150861_f; private int field_150862_g; private int field_150868_h; private static final String __OBFID = "CL_00000285"; public Size(World p_i45415_1_, int p_i45415_2_, int p_i45415_3_, int p_i45415_4_, int p_i45415_5_) { this.field_150867_a = p_i45415_1_; this.field_150865_b = p_i45415_5_; this.field_150863_d = MyModBlockPortal.field_150001_a[p_i45415_5_][0]; this.field_150866_c = MyModBlockPortal.field_150001_a[p_i45415_5_][1]; for (int i1 = p_i45415_3_; p_i45415_3_ > i1 - 21 && p_i45415_3_ > 0 && this.func_150857_a(p_i45415_1_.getBlock(p_i45415_2_, p_i45415_3_ - 1, p_i45415_4_)); --p_i45415_3_) { ; } int j1 = this.func_150853_a(p_i45415_2_, p_i45415_3_, p_i45415_4_, this.field_150863_d) - 1; if (j1 >= 0) { this.field_150861_f = new ChunkCoordinates(p_i45415_2_ + j1 * Direction.offsetX[this.field_150863_d], p_i45415_3_, p_i45415_4_ + j1 * Direction.offsetZ[this.field_150863_d]); this.field_150868_h = this.func_150853_a(this.field_150861_f.posX, this.field_150861_f.posY, this.field_150861_f.posZ, this.field_150866_c); if (this.field_150868_h < 2 || this.field_150868_h > 21) { this.field_150861_f = null; this.field_150868_h = 0; } } if (this.field_150861_f != null) { this.field_150862_g = this.func_150858_a(); } } protected int func_150853_a(int p_150853_1_, int p_150853_2_, int p_150853_3_, int p_150853_4_) { int j1 = Direction.offsetX[p_150853_4_]; int k1 = Direction.offsetZ[p_150853_4_]; int i1; Block block; for (i1 = 0; i1 < 22; ++i1) { block = this.field_150867_a.getBlock(p_150853_1_ + j1 * i1, p_150853_2_, p_150853_3_ + k1 * i1); if (!this.func_150857_a(block)) { break; } Block block1 = this.field_150867_a.getBlock(p_150853_1_ + j1 * i1, p_150853_2_ - 1, p_150853_3_ + k1 * i1); if (block1 != MyModBlocks.Obsidian) { break; } } block = this.field_150867_a.getBlock(p_150853_1_ + j1 * i1, p_150853_2_, p_150853_3_ + k1 * i1); return block == MyModBlocks.Obsidian ? i1 : 0; } protected int func_150858_a() { int i; int j; int k; int l; label56: for (this.field_150862_g = 0; this.field_150862_g < 21; ++this.field_150862_g) { i = this.field_150861_f.posY + this.field_150862_g; for (j = 0; j < this.field_150868_h; ++j) { k = this.field_150861_f.posX + j * Direction.offsetX[MyModBlockPortal.field_150001_a[this.field_150865_b][1]]; l = this.field_150861_f.posZ + j * Direction.offsetZ[MyModBlockPortal.field_150001_a[this.field_150865_b][1]]; Block block = this.field_150867_a.getBlock(k, i, l); if (!this.func_150857_a(block)) { break label56; } if (block == MyModBlocks.Portal) { ++this.field_150864_e; } if (j == 0) { block = this.field_150867_a.getBlock(k + Direction.offsetX[MyModBlockPortal.field_150001_a[this.field_150865_b][0]], i, l + Direction.offsetZ[MyModBlockPortal.field_150001_a[this.field_150865_b][0]]); if (block != MyModBlocks.Obsidian) { break label56; } } else if (j == this.field_150868_h - 1) { block = this.field_150867_a.getBlock(k + Direction.offsetX[MyModBlockPortal.field_150001_a[this.field_150865_b][1]], i, l + Direction.offsetZ[MyModBlockPortal.field_150001_a[this.field_150865_b][1]]); if (block != MyModBlocks.Obsidian) { break label56; } } } } for (i = 0; i < this.field_150868_h; ++i) { j = this.field_150861_f.posX + i * Direction.offsetX[MyModBlockPortal.field_150001_a[this.field_150865_b][1]]; k = this.field_150861_f.posY + this.field_150862_g; l = this.field_150861_f.posZ + i * Direction.offsetZ[MyModBlockPortal.field_150001_a[this.field_150865_b][1]]; if (this.field_150867_a.getBlock(j, k, l) != MyModBlocks.Obsidian) { this.field_150862_g = 0; break; } } if (this.field_150862_g <= 21 && this.field_150862_g >= 3) { return this.field_150862_g; } else { this.field_150861_f = null; this.field_150868_h = 0; this.field_150862_g = 0; return 0; } } protected boolean func_150857_a(Block p_150857_1_) { return p_150857_1_.getMaterial() == Material.air || p_150857_1_ == MyModBlocks.Fire || p_150857_1_ == MyModBlocks.Portal; } public boolean func_150860_b() { return this.field_150861_f != null && this.field_150868_h >= 2 && this.field_150868_h <= 21 && this.field_150862_g >= 3 && this.field_150862_g <= 21; } public void func_150859_c() { for (int i = 0; i < this.field_150868_h; ++i) { int j = this.field_150861_f.posX + Direction.offsetX[this.field_150866_c] * i; int k = this.field_150861_f.posZ + Direction.offsetZ[this.field_150866_c] * i; for (int l = 0; l < this.field_150862_g; ++l) { int i1 = this.field_150861_f.posY + l; this.field_150867_a.setBlock(j, i1, k, MyModBlocks.Portal, this.field_150865_b, 2); } } } } Should I edit the field at the top of the whole class? public static final int[][] field_150001_a = new int[][] {new int[0], {3, 1}, {2, 0}};
February 25, 201411 yr Author So.. What should I do now? If I rename the variable, it happens the same
February 25, 201411 yr Author The class in the MyModBlockPortal class? public static class Size { private final World world; private final int int1; private final int int2; private final int int3; private int int4 = 0; private ChunkCoordinates coords; private int int5; private int int6; public Size(World world, int par2, int par3, int par4, int par5) { this.world = world; this.int1 = par5; this.int3 = MyModBlockPortal.aField[par5][0]; this.int2 = MyModBlockPortal.aField[par5][1]; for (int i1 = par3; par3 > i1 - 21 && par3 > 0 && this.func_150857_a(world.getBlock(par2, par3 - 1, par4)); --par3) { ; } int j1 = this.func_150853_a(par2, par3, par4, this.int3) - 1; if (j1 >= 0) { this.coords = new ChunkCoordinates(par2 + j1 * Direction.offsetX[this.int3], par3, par4 + j1 * Direction.offsetZ[this.int3]); this.int6 = this.func_150853_a(this.coords.posX, this.coords.posY, this.coords.posZ, this.int2); if (this.int6 < 2 || this.int6 > 21) { this.coords = null; this.int6 = 0; } } if (this.coords != null) { this.int5 = this.func_150858_a(); } } protected int func_150853_a(int par1, int par2, int par3, int par4) { int j1 = Direction.offsetX[par4]; int k1 = Direction.offsetZ[par4]; int i1; Block block; for (i1 = 0; i1 < 22; ++i1) { block = this.world.getBlock(par1 + j1 * i1, par2, par3 + k1 * i1); if (!this.func_150857_a(block)) { break; } Block block1 = this.world.getBlock(par1 + j1 * i1, par2 - 1, par3 + k1 * i1); if (block1 != MyModBlocks.Obsidian) { break; } } block = this.world.getBlock(par1 + j1 * i1, par2, par3 + k1 * i1); return block == MyModBlocks.Obsidian ? i1 : 0; } protected int func_150858_a() { int i; int j; int k; int l; label56: for (this.int5 = 0; this.int5 < 21; ++this.int5) { i = this.coords.posY + this.int5; for (j = 0; j < this.int6; ++j) { k = this.coords.posX + j * Direction.offsetX[MyModBlockPortal.aField[this.int1][1]]; l = this.coords.posZ + j * Direction.offsetZ[MyModBlockPortal.aField[this.int1][1]]; Block block = this.world.getBlock(k, i, l); if (!this.func_150857_a(block)) { break label56; } if (block == MyModBlocks.Portal) { ++this.int4; } if (j == 0) { block = this.world.getBlock(k + Direction.offsetX[MyModBlockPortal.aField[this.int1][0]], i, l + Direction.offsetZ[MyModBlockPortal.aField[this.int1][0]]); if (block != MyModBlocks.Obsidian) { break label56; } } else if (j == this.int6 - 1) { block = this.world.getBlock(k + Direction.offsetX[MyModBlockPortal.aField[this.int1][1]], i, l + Direction.offsetZ[MyModBlockPortal.aField[this.int1][1]]); if (block != MyModBlocks.Obsidian) { break label56; } } } } for (i = 0; i < this.int6; ++i) { j = this.coords.posX + i * Direction.offsetX[MyModBlockPortal.aField[this.int1][1]]; k = this.coords.posY + this.int5; l = this.coords.posZ + i * Direction.offsetZ[MyModBlockPortal.aField[this.int1][1]]; if (this.world.getBlock(j, k, l) != MyModBlocks.Obsidian) { this.int5 = 0; break; } } if (this.int5 <= 21 && this.int5 >= 3) { return this.int5; } else { this.coords = null; this.int6 = 0; this.int5 = 0; return 0; } } protected boolean func_150857_a(Block block) { return block.getMaterial() == Material.air || block == MyModBlocks.Fire || block == MyModBlocks.Portal; } public boolean func_150860_b() { return this.coords != null && this.int6 >= 2 && this.int6 <= 21 && this.int5 >= 3 && this.int5 <= 21; } public void func_150859_c() { for (int i = 0; i < this.int6; ++i) { int j = this.coords.posX + Direction.offsetX[this.int2] * i; int k = this.coords.posZ + Direction.offsetZ[this.int2] * i; for (int l = 0; l < this.int5; ++l) { int i1 = this.coords.posY + l; this.world.setBlock(j, i1, k, MyModBlocks.Portal, this.int1, 2); } } } }
February 25, 201411 yr Author But I can't delete some func_*, which are used anywhere.. Or should I add a BlockPortal. in front of the func_* calls?
February 26, 201411 yr Author Sorry . But could you say to me which these 6 func_* methods do? public boolean func_150000_e(World world, int x, int y, int z) { MyModBlockPortal.Size size = new MyModBlockPortal.Size(world, x, y, z, 1); MyModBlockPortal.Size size1 = new MyModBlockPortal.Size(world, x, y, z, 2); if (size.func_150860_b() && size.int4 == 0) { size.func_150859_c(); return true; } else if (size1.func_150860_b() && size1.int4 == 0) { size1.func_150859_c(); return true; } else { return false; } } public static class Size { private final World world; private final int int1; private final int int2; private final int int3; private int int4 = 0; private ChunkCoordinates coords; private int int5; private int int6; public Size(World world, int par2, int par3, int par4, int par5) { this.world = world; this.int1 = par5; this.int3 = MyModBlockPortal.aField[par5][0]; this.int2 = MyModBlockPortal.aField[par5][1]; for (int i1 = par3; par3 > i1 - 21 && par3 > 0 && this.func_150857_a(world.getBlock(par2, par3 - 1, par4)); --par3) { ; } int j1 = this.func_150853_a(par2, par3, par4, this.int3) - 1; if (j1 >= 0) { this.coords = new ChunkCoordinates(par2 + j1 * Direction.offsetX[this.int3], par3, par4 + j1 * Direction.offsetZ[this.int3]); this.int6 = this.func_150853_a(this.coords.posX, this.coords.posY, this.coords.posZ, this.int2); if (this.int6 < 2 || this.int6 > 21) { this.coords = null; this.int6 = 0; } } if (this.coords != null) { this.int5 = this.func_150858_a(); } } protected int func_150853_a(int par1, int par2, int par3, int par4) { int j1 = Direction.offsetX[par4]; int k1 = Direction.offsetZ[par4]; int i1; Block block; for (i1 = 0; i1 < 22; ++i1) { block = this.world.getBlock(par1 + j1 * i1, par2, par3 + k1 * i1); if (!this.func_150857_a(block)) { break; } Block block1 = this.world.getBlock(par1 + j1 * i1, par2 - 1, par3 + k1 * i1); if (block1 != MyModBlocks.Obsidian) { break; } } block = this.world.getBlock(par1 + j1 * i1, par2, par3 + k1 * i1); return block == MyModBlocks.Obsidian ? i1 : 0; } protected int func_150858_a() { int i; int j; int k; int l; label56: for (this.int5 = 0; this.int5 < 21; ++this.int5) { i = this.coords.posY + this.int5; for (j = 0; j < this.int6; ++j) { k = this.coords.posX + j * Direction.offsetX[MyModBlockPortal.aField[this.int1][1]]; l = this.coords.posZ + j * Direction.offsetZ[MyModBlockPortal.aField[this.int1][1]]; Block block = this.world.getBlock(k, i, l); if (!this.func_150857_a(block)) { break label56; } if (block == MyModBlocks.Portal) { ++this.int4; } if (j == 0) { block = this.world.getBlock(k + Direction.offsetX[MyModBlockPortal.aField[this.int1][0]], i, l + Direction.offsetZ[MyModBlockPortal.aField[this.int1][0]]); if (block != MyModBlocks.Obsidian) { break label56; } } else if (j == this.int6 - 1) { block = this.world.getBlock(k + Direction.offsetX[MyModBlockPortal.aField[this.int1][1]], i, l + Direction.offsetZ[MyModBlockPortal.aField[this.int1][1]]); if (block != MyModBlocks.Obsidian) { break label56; } } } } for (i = 0; i < this.int6; ++i) { j = this.coords.posX + i * Direction.offsetX[MyModBlockPortal.aField[this.int1][1]]; k = this.coords.posY + this.int5; l = this.coords.posZ + i * Direction.offsetZ[MyModBlockPortal.aField[this.int1][1]]; if (this.world.getBlock(j, k, l) != MyModBlocks.Obsidian) { this.int5 = 0; break; } } if (this.int5 <= 21 && this.int5 >= 3) { return this.int5; } else { this.coords = null; this.int6 = 0; this.int5 = 0; return 0; } } protected boolean func_150857_a(Block block) { return block.getMaterial() == Material.air || block == MyModBlocks.Fire || block == MyModBlocks.Portal; } public boolean func_150860_b() { return this.coords != null && this.int6 >= 2 && this.int6 <= 21 && this.int5 >= 3 && this.int5 <= 21; } public void func_150859_c() { for (int i = 0; i < this.int6; ++i) { int j = this.coords.posX + Direction.offsetX[this.int2] * i; int k = this.coords.posZ + Direction.offsetZ[this.int2] * i; for (int l = 0; l < this.int5; ++l) { int i1 = this.coords.posY + l; this.world.setBlock(j, i1, k, MyModBlocks.Portal, this.int1, 2); } } } } Thanks.
February 26, 201411 yr Author But when I give it some names like 'crap' they don't override the vanilla methods!
February 26, 201411 yr Author I renamed all func_* methods to 'something<number>'. Doesn't work. Sorry for my madness but I think it has NOT to do with my methods
February 26, 201411 yr Your Size class does not extend or implement anything. How on earth could any of the methods in there override anything? This is basic java! And for the other class: Use your IDE. In Intellij IDEA you can see it an overridden method by the small symbol on the left: Eclipse doesn't have that, but if you hold Ctrl down and hover over the method name you can see this: if the method is overridden. Actually, eclipse has a icon like that. When you have a green arrow pointing up in that sidebar, you can see what that method does, in my case Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
February 26, 201411 yr Author public boolean tryToCreatePortal(World world, int x, int y, int z) <---Is used in Fireclass! { MyModBlockPortal.Size size = new MyModBlockPortal.Size(world, x, y, z, 1); MyModBlockPortal.Size size1 = new MyModBlockPortal.Size(world, x, y, z, 2); if (size.something3() && size.int4 == 0) { size.something5(); return true; } else if (size1.something3() && size1.int4 == 0) { size1.something5(); return true; } else { return false; } } public static class Size { private final World world; private final int int1; private final int int2; private final int int3; private int int4 = 0; private ChunkCoordinates coords; private int int5; private int int6; public Size(World world, int par2, int par3, int par4, int par5) { super(); this.world = world; this.int1 = par5; this.int3 = MyModBlockPortal.aField[par5][0]; this.int2 = MyModBlockPortal.aField[par5][1]; for (int i1 = par3; par3 > i1 - 21 && par3 > 0 && this.something4(world.getBlock(par2, par3 - 1, par4)); --par3) { ; } int j1 = this.something1(par2, par3, par4, this.int3) - 1; if (j1 >= 0) { this.coords = new ChunkCoordinates(par2 + j1 * Direction.offsetX[this.int3], par3, par4 + j1 * Direction.offsetZ[this.int3]); this.int6 = this.something1(this.coords.posX, this.coords.posY, this.coords.posZ, this.int2); if (this.int6 < 2 || this.int6 > 21) { this.coords = null; this.int6 = 0; } } if (this.coords != null) { this.int5 = this.something2(); } } protected int something1(int par1, int par2, int par3, int par4) { int j1 = Direction.offsetX[par4]; int k1 = Direction.offsetZ[par4]; int i1; Block block; for (i1 = 0; i1 < 22; ++i1) { block = this.world.getBlock(par1 + j1 * i1, par2, par3 + k1 * i1); if (!this.something4(block)) { break; } Block block1 = this.world.getBlock(par1 + j1 * i1, par2 - 1, par3 + k1 * i1); if (block1 != MyModBlocks.Obsidian) { break; } } block = this.world.getBlock(par1 + j1 * i1, par2, par3 + k1 * i1); return block == MyModBlocks.Obsidian ? i1 : 0; } protected int something2() { int i; int j; int k; int l; label56: for (this.int5 = 0; this.int5 < 21; ++this.int5) { i = this.coords.posY + this.int5; for (j = 0; j < this.int6; ++j) { k = this.coords.posX + j * Direction.offsetX[MyModBlockPortal.aField[this.int1][1]]; l = this.coords.posZ + j * Direction.offsetZ[MyModBlockPortal.aField[this.int1][1]]; Block block = this.world.getBlock(k, i, l); if (!this.something4(block)) { break label56; } if (block == MyModBlocks.Portal) { ++this.int4; } if (j == 0) { block = this.world.getBlock(k + Direction.offsetX[MyModBlockPortal.aField[this.int1][0]], i, l + Direction.offsetZ[MyModBlockPortal.aField[this.int1][0]]); if (block != MyModBlocks.Obsidian) { break label56; } } else if (j == this.int6 - 1) { block = this.world.getBlock(k + Direction.offsetX[MyModBlockPortal.aField[this.int1][1]], i, l + Direction.offsetZ[MyModBlockPortal.aField[this.int1][1]]); if (block != MyModBlocks.Obsidian) { break label56; } } } } for (i = 0; i < this.int6; ++i) { j = this.coords.posX + i * Direction.offsetX[MyModBlockPortal.aField[this.int1][1]]; k = this.coords.posY + this.int5; l = this.coords.posZ + i * Direction.offsetZ[MyModBlockPortal.aField[this.int1][1]]; if (this.world.getBlock(j, k, l) != MyModBlocks.Obsidian) { this.int5 = 0; break; } } if (this.int5 <= 21 && this.int5 >= 3) { return this.int5; } else { this.coords = null; this.int6 = 0; this.int5 = 0; return 0; } } public boolean something3() { return this.coords != null && this.int6 >= 2 && this.int6 <= 21 && this.int5 >= 3 && this.int5 <= 21; } protected boolean something4(Block block) { return block.getMaterial() == Material.air || block == MyModBlocks.Fire || block == MyModBlocks.Portal; } public void something5() { for (int i = 0; i < this.int6; ++i) { int j = this.coords.posX + Direction.offsetX[this.int2] * i; int k = this.coords.posZ + Direction.offsetZ[this.int2] * i; for (int l = 0; l < this.int5; ++l) { int i1 = this.coords.posY + l; this.world.setBlock(j, i1, k, MyModBlocks.Portal, this.int1, 2); } } } } }
February 26, 201411 yr Author There's my Portal class. In there is another class called 'Size'. 1 func_* was in my Portal class and was in 1.6.4 named 'tryToCreatePortal' (It named it to this). In the Size class (in my Portal class) are 5 more func_* methods, which I renamed to 'something1,2,3,4 or 5'.
February 26, 201411 yr Please don't publish it Honestly? [redacted] -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.