Posted November 10, 2015 I'm trying to edit the Tiles.class file and keep getting an error on this part of the code and have no clue how to fix it.Anyone know what to change here? This is the error I get: The constructor Tiles.Flag(String, int) is undefined private enum Flag { USESNEWDATA("USESNEWDATA", 0), ALIGNED("ALIGNED", 1), TREE("TREE", 2), BUSH("BUSH", 3), NORMAL("NORMAL", 4), MYCELIUM("MYCELIUM", 5), ENCHANTED("ENCHANTED", 6), GRASS("GRASS", 7), ROAD("ROAD", 8), CAVE("CAVE", 9), CAVEDOOR("CAVEDOOR", 10), VISIBLE_CAVEDOOR("VISIBLE_CAVEDOOR", 11), SOLIDCAVE("SOLIDCAVE", 12), REINFORCEDCAVE("REINFORCEDCAVE", 13), ORECAVE("ORECAVE", 14), NW("NW", 15), NE("NE", 16), SW("SW", 17), SE("SE", 18), BOTANIZE("BOTANIZE", 19), FORAGE("FORAGE", 20), BIRCH("BIRCH", 21), PINE("PINE", 22), OAK("OAK", 23), CEDAR("CEDAR", 24), WILLOW("WILLOW", 25), MAPLE("MAPLE", 26), APPLE("APPLE", 27), LEMON("LEMON", 28), OLIVE("OLIVE", 29), CHERRY("CHERRY", 30), CHESTNUT("CHESTNUT", 31), WALNUT("WALNUT", 32), FIR("FIR", 33), LINDEN("LINDEN", 34), LAVENDER("LAVENDER", 35), ROSE("ROSE", 36), THORN("THORN", 37), GRAPE("GRAPE", 38), CAMELLIA("CAMELLIA", 39), OLEANDER("OLEANDER", 40); }Thanks, Share this post Link to post Share on other sites
Posted November 11, 2015 The enum needs a constructorprotected Flag(String name, int number) { this.name = name; this.number = number;}And probably also some methods to actually access those values Share this post Link to post Share on other sites
Posted November 11, 2015 Tried this and still having problems. Doesn't help that I have like no experience in coding I might try again later Share this post Link to post Share on other sites
Posted November 12, 2015 I would need to see more of what you are doing to help. Share this post Link to post Share on other sites
Posted November 12, 2015 (edited) I would need to see more of what you are doing to help. Ok, so I'm trying to make changes to the Tiles.class file in common.jar.This forum won't let me post the code because its to long :/ I have decompiled the code with procyon and then copied it all into intellij. It won't even let me compile it without making a single change because of the error that is there. So I need to fix it somehow to even be able to do anything Edited November 12, 2015 by AbsolutelyNobody Share this post Link to post Share on other sites
Posted November 12, 2015 AbsolutelyNobody, You could put the code on a http://pastebin.com/ and put the link here. 1 Share this post Link to post Share on other sites
Posted November 13, 2015 ok, here it is: http://pastebin.com/9unDwSCW Share this post Link to post Share on other sites
Posted November 14, 2015 (edited) hm. JD creates a simple enum for this type/* */ private static enum Flag/* */ {/* 342 */ USESNEWDATA, ALIGNED, TREE, BUSH, NORMAL, MYCELIUM, ENCHANTED, GRASS, ROAD, CAVE, CAVEDOOR, VISIBLE_CAVEDOOR, SOLIDCAVE, REINFORCEDCAVE, ORECAVE, NW, NE, SW, SE, BOTANIZE, FORAGE, BIRCH, PINE, OAK, CEDAR, WILLOW, MAPLE, APPLE, LEMON, OLIVE, CHERRY, CHESTNUT, WALNUT, FIR, LINDEN, LAVENDER, ROSE, THORN, GRAPE, CAMELLIA, OLEANDER;/* */ }you could manually fix the all the enums or add this constructor to the enum private enum Flag{USESNEWDATA("USESNEWDATA", 0),...OLEANDER("OLEANDER", 40);Flag(String name, int id) {};}This essentially ignores the extra stuffon the enum since those are the default values anyway.Which decompiler created that code? Edited November 14, 2015 by ago Share this post Link to post Share on other sites
Posted November 15, 2015 I'll give that a try tomorrow,decompiler is procyon Share this post Link to post Share on other sites