Everything posted by ashjack
-
GUI not loading - Updated from 1.6 to 1.7
I added some system prints into the gui rendering file, and the functions are not executed at all.
-
GUI not loading - Updated from 1.6 to 1.7
Thank you! I updated the ticking functions(in the CommonTickHandler and ClientTickHandler), and part of the GUI shows up (HUD from the main mod file) however, the GUI buttons still do not show themselves. There's no error log for me to refer to, so I cannot work out why this is happening.
-
GUI not loading - Updated from 1.6 to 1.7
Sorry, I didn't mean to come across as rude, it's just demoralizing seeing my thread fall to the bottom of the page unanswered. The GUI should open as soon as a world is created. Ah, I've just realised, the GUI is opened with this code: public static void resetAndLoadNewWorld() { Side side = cpw.mods.fml.common.FMLCommonHandler.instance().getEffectiveSide(); log.info("RESETTING and loading world on "+side.toString()+" SIDE"); ModSimukraft.theBuildings.clear(); ModSimukraft.theCourierPoints.clear(); ModSimukraft.theCourierTasks.clear(); ModSimukraft.theMiningBoxes.clear(); ModSimukraft.theFarmingBoxes.clear(); ModSimukraft.theFolks.clear(); ModSimukraft.theRelationships.clear(); File f=new File(ModSimukraft.getSavesDataFolder() + "settings.sk2"); if (!f.exists()) { f=new File(ModSimukraft.getSavesDataFolder() + "settings.suk"); } if (f.exists()) { ModSimukraft.states.loadStates(); try { ModSimukraft.setGameModeFromNumber(ModSimukraft.states.gameModeNumber); } catch (Exception e) { ModSimukraft.setGameModeFromNumber(0); } } else { ModSimukraft.states = new GameStates(); ModSimukraft.states.saveStates(); } if (ModSimukraft.states == null) { new File(ModSimukraft.getSavesDataFolder() + "settings.sk2").delete(); ModSimukraft.states = new GameStates(); ModSimukraft.states.saveStates(); ModSimukraft.sendChat("Your Sim-U-Kraft settings file was corrupted, I had to make a new one"); } if (ModSimukraft.states.gameModeNumber == -1) { if (runModui == null) { GuiRunMod runModui = new GuiRunMod(); Minecraft.getMinecraft().displayGuiScreen(runModui); } return; } if (ModSimukraft.states.gameModeNumber >= 0) { ModSimukraft.proxy.ranStartup = true; } ModSimukraft.sendChat("Welcome to Sim-U-Kraft " + ModSimukraft.version); ModSimukraft.theFolks.clear(); Building.initialiseAllBuildings(); //load ALL buildings off disk and init them Building.loadAllBuildings(); //load buildings in this world CourierTask.loadCourierTasksAndPoints(); MiningBox.loadMiningBoxes(); FarmingBox.loadFarmingBoxes(); //PathBox.loadPathBoxes(); FolkData.loadAndSpawnFolks(); Relationship.loadRelationships(); ModSimukraft.updateCheck(); ModSimukraft.isDay = ModSimukraft.isDayTime(); Building.checkTennants(); ModSimukraft.proxy.ranStartup = true; } However, this function is only executed when a packet is successfully sent and received, telling the game to run it. I have absolutely no idea if my packet code works. So I guess I will post it all here: PacketHandler.java package info.satscape.simukraft.common; import info.satscape.simukraft.common.CommonProxy.V3; import info.satscape.simukraft.packets.SimukraftPacket; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; import net.minecraft.client.Minecraft; import net.minecraft.server.MinecraftServer; import net.minecraft.world.World; import cpw.mods.fml.common.network.ByteBufUtils; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; import cpw.mods.fml.relauncher.Side; public class PacketHandler implements IMessageHandler<SimukraftPacket, IMessage> { public PacketHandler() { } @Override public IMessage onMessage(SimukraftPacket message, MessageContext ctx) { try { String par1 = ""; String cmd = message.cmd; String val = ""; World world = null; Side side = cpw.mods.fml.common.FMLCommonHandler.instance().getEffectiveSide(); String sside = "none"; if (side == Side.SERVER) { sside = "Server"; // CLINET GUI > SERVER, a building is being built, so load it server side if(cmd.contentEquals("loadbuilding")) { Building.loadAllBuildings(); // Client side Windmill is requesting Colour meta value }/*else if (cmd.contentEquals("requestMeta")) { //world=MinecraftServer.getServer().worldServerForDimension(Integer.parseInt(val)); V3 v3=new V3(par1); TileEntityWindmill te=(TileEntityWindmill) world.getTileEntity(v3.x.intValue(),v3.y.intValue(),v3.z.intValue()); if (te !=null) { //te.sendMetaToClient(); } else { ModSimukraft.log.warning("TEwindmill was null at "+v3.toString()); } }*/ } else if (side == Side.CLIENT) { sside = "Client"; world = Minecraft.getMinecraft().theWorld; /// SERVER > CLIENT windmill announcing it's meta value for the colour of the sails. /*if (cmd.contentEquals("announceMeta")) { V3 v3=new V3(par1); TileEntityWindmill te=(TileEntityWindmill) world.getTileEntity(v3.x.intValue(),v3.y.intValue(),v3.z.intValue()); if (te !=null) { te.meta=Integer.parseInt(val); } else { ModSimukraft.log.warning("***TEwindmill was null at "+v3.toString()); } */ /// SERVER > CLIENT folks position update (every 10 or so seconds for each folk) } else if (cmd.contentEquals("updateFolkPosition")) { FolkData folk=FolkData.getFolkByName(par1); V3 newpos=new V3(val); if (folk !=null && newpos !=null) { folk.serverToClientLocationUpdate(newpos); } /// SERVER > CLIENT - player has changed worlds, so reset and load in new SUK data } else if (cmd.contentEquals("gamereset")) { ModSimukraft.resetAndLoadNewWorld(); // still bugs with this } ModSimukraft.log.info("PacketHandler: "+sside + "-side PACKET RECIEVED: " + cmd); } catch (Exception e) { e.printStackTrace(); return message; } return null; } /*@Override public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) { if (packet.channel.equals("SUKMain")) { DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(packet.data)); try { String par1 = ByteBufUtils.readUTF(); String cmd = ByteBufUtils.readUTF(); String val = ByteBufUtils.readUTF(); World world = null; Side side = cpw.mods.fml.common.FMLCommonHandler.instance().getEffectiveSide(); String sside = "none"; if (side == Side.SERVER) { sside = "Server"; // CLINET GUI > SERVER, a building is being built, so load it server side if(cmd.contentEquals("loadbuilding")) { Building.loadAllBuildings(); // Client side Windmill is requesting Colour meta value }else if (cmd.contentEquals("requestMeta")) { world=MinecraftServer.getServer().worldServerForDimension(Integer.parseInt(val)); V3 v3=new V3(par1); TileEntityWindmill te=(TileEntityWindmill) world.getTileEntity(v3.x.intValue(),v3.y.intValue(),v3.z.intValue()); if (te !=null) { te.sendMetaToClient(); } else { ModSimukraft.log.warning("TEwindmill was null at "+v3.toString()); } } } else if (side == Side.CLIENT) { sside = "Client"; world = Minecraft.getMinecraft().theWorld; /// SERVER > CLIENT windmill announcing it's meta value for the colour of the sails. if (cmd.contentEquals("announceMeta")) { V3 v3=new V3(par1); TileEntityWindmill te=(TileEntityWindmill) world.getTileEntity(v3.x.intValue(),v3.y.intValue(),v3.z.intValue()); if (te !=null) { te.meta=Integer.parseInt(val); } else { ModSimukraft.log.warning("***TEwindmill was null at "+v3.toString()); } /// SERVER > CLIENT folks position update (every 10 or so seconds for each folk) } else if (cmd.contentEquals("updateFolkPosition")) { FolkData folk=FolkData.getFolkByName(par1); V3 newpos=new V3(val); if (folk !=null && newpos !=null) { folk.serverToClientLocationUpdate(newpos); } /// SERVER > CLIENT - player has changed worlds, so reset and load in new SUK data } else if (cmd.contentEquals("gamereset")) { ModSimukraft.resetAndLoadNewWorld(); // still bugs with this } } ModSimukraft.log.info("PacketHandler: "+sside + "-side PACKET RECIEVED: " + par1 + " - " + cmd + " = " + val); } catch (Exception e) { e.printStackTrace(); return; } } } public static Packet250CustomPayload makePacket(String par1, String cmd, String val) { ByteArrayOutputStream bos = new ByteArrayOutputStream(; DataOutputStream outputStream = new DataOutputStream(bos); try { outputStream.writeUTF(par1); outputStream.writeUTF(cmd); outputStream.writeUTF(val); } catch (Exception ex) { ex.printStackTrace(); } Packet250CustomPayload packet = new Packet250CustomPayload(); packet.channel = "SUKMain"; packet.data = bos.toByteArray(); packet.length = bos.size(); ModSimukraft.log.info("PacketHandler: Packet sent: "+par1+" "+cmd+" "+val); return packet; }*/ } CommonTickHandler.java package info.satscape.simukraft.common; import info.satscape.simukraft.client.Gui.GuiRunMod; import info.satscape.simukraft.common.CommonProxy.V3; import info.satscape.simukraft.packets.SimukraftPacket; import io.netty.buffer.ByteBuf; import java.io.File; import java.util.ArrayList; import java.util.EnumSet; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.server.MinecraftServer; import net.minecraft.world.World; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.common.network.ByteBufUtils; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.server.FMLServerHandler; public class CommonTickHandler { private World serverWorld = null; Long lastSecondTickAt = 0l; Long lastMinuteTickAt = 0l; GuiRunMod runModui = null; String currentWorld = ""; Minecraft mc = Minecraft.getMinecraft(); long lastReset = 0; //public static final PacketPipeline packetPipeline = new PacketPipeline(); public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel("SUKMain"); public void onTickInGame() { if (mc.currentScreen != null) { if (mc.currentScreen.toString().toLowerCase().contains("guimainmenu")) { ModSimukraft.log.info("CommTH: in Gui Main menu"); } } if (ModSimukraft.states.gameModeNumber == 10) { ModSimukraft.proxy.ranStartup = true; return; } Long now = System.currentTimeMillis(); if (serverWorld != null) { //fire onUpdate() for each folkData FolkData.triggerAllUpdates(); //handle day-night-day transitions ModSimukraft.dayTransitionHandler(); //if a farm needs upgarding, incrementally upgrade it if (ModSimukraft.farmToUpgrade != null) { ModSimukraft.upgradeFarm(); } if (ModSimukraft.demolishBlocks.size() > 0) //and demolishing buildings { ModSimukraft.demolishBlocks(); } } // ***** ONCE A SECOND if (now - lastSecondTickAt > 1000) { if (serverWorld == null) { try { //this is a crazy way to delay running stuff until things have spawned! :-) //Also, this won't work in MC1.7+ as there's no ModLoader class in Forge any more...good luck with that! for (World w : MinecraftServer.getServer().worldServers) { if (w.loadedEntityList.size() > 0) { serverWorld = w; currentWorld = ModSimukraft.getSavesDataFolder(); ModSimukraft.log.info("CommTH: Startup - set serverWorld/currentWorld"); ModSimukraft.resetAndLoadNewWorld(); INSTANCE.registerMessage(PacketHandler.class, SimukraftPacket.class, 0, Side.SERVER); INSTANCE.sendToServer(new SimukraftPacket()); break; } } } catch (Exception e) { serverWorld = null; //will exception until first player has spawned! } } else //used to detect world change - Still a bug with this, not unloading world when player switches via main menu { if (!currentWorld.contentEquals(ModSimukraft.getSavesDataFolder())) { if (now - lastReset >30000) { ModSimukraft.log.info("currentWorld="+currentWorld+" getSaves="+ModSimukraft.getSavesDataFolder()); currentWorld = ModSimukraft.getSavesDataFolder(); ModSimukraft.proxy.ranStartup = false; ModSimukraft.resetAndLoadNewWorld(); //PacketPipeline.sendPacketToAllPlayers(packetPipeline.encode("", "gamereset", "") /*PacketHandler.makePacket("", "gamereset", "")*/); INSTANCE.registerMessage(PacketHandler.class, SimukraftPacket.class, 0, Side.SERVER); INSTANCE.sendToServer(new SimukraftPacket()); } } //STOP THE RAIN MOD - Implemented this when I had a world where it rained ALL THE TIME! if (serverWorld.isRaining() && serverWorld.getWorldInfo().getRainTime() > 1 && ModSimukraft.configStopRain == true) { serverWorld.getWorldInfo().setRainTime(2); //setting to 1 or 0 doesn't work every time. } } // ONCE A SECOND EVERY SECOND lastSecondTickAt = now; } // ***** ONCE A MINUTE if (serverWorld != null && System.currentTimeMillis() - lastMinuteTickAt > 60000) { if (lastMinuteTickAt > 0) { Long start = System.currentTimeMillis(); FolkData.generateNewFolk(serverWorld); ModSimukraft.states.saveStates(); Building.checkTennants(); Building.saveAllBuildings(); CourierTask.saveCourierTasksAndPoints(); MiningBox.saveMiningBoxes(); FarmingBox.saveFarmingBoxes(); Relationship.saveRelationships(); //PathBox.savePathBoxes(); ModSimukraft.log.info("CTH: Saved game data in " + (System.currentTimeMillis() - start) + " ms"); } lastMinuteTickAt = now; } } public void resetSimUKraft() { //this resets everything first, if the player has switched worlds, gets hit several times due to weird MC GUI switching, // so lastReset stops it from running more than once every 30 seconds. if (System.currentTimeMillis() - lastReset > 30000) { lastReset = System.currentTimeMillis(); Side side = cpw.mods.fml.common.FMLCommonHandler.instance().getEffectiveSide(); ModSimukraft.log.info(side.toString()+"-side CommTH: resetSimUKraft()"); } } /** runs when a world has loaded, so we can set everything up */ private void startingWorld() { if (!ModSimukraft.proxy.ranStartup) { // TODO: no longer used } } //////////////////////////////////////////////// public void tickStart(EnumSet<TickEvent.Type> type, Object... tickData) { } public void tickEnd(EnumSet<TickEvent.Type> type, Object... tickData) { if (type.equals(EnumSet.of(TickEvent.Type.SERVER))) { onTickInGame(); } if (type.equals(EnumSet.of(TickEvent.Type.WORLD))) { System.out.println("WorldLoad event tick"); } } public EnumSet<TickEvent.Type> ticks() { return EnumSet.of(TickEvent.Type.SERVER, TickEvent.Type.WORLD); //add more types? } public String getLabel() { return "CommonTickHandler"; } public CommonTickHandler() { } /*public static class Handler implements IMessageHandler<CommonTickHandler, IMessage> { /** * This gets called when the packet is read and received. */ /*@Override public IMessage onMessage(CommonTickHandler message, MessageContext ctx) { return null; } }*/ } SimukraftPacket.java package info.satscape.simukraft.packets; import io.netty.buffer.ByteBuf; import cpw.mods.fml.common.network.ByteBufUtils; import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; public class SimukraftPacket implements IMessage{ //enum Type{GameReset, }; public static String par1; public static String cmd = ""; public static String folkName = ""; @Override public void fromBytes(ByteBuf buf) { cmd = ByteBufUtils.readUTF8String(buf); } @Override public void toBytes(ByteBuf buf) { ByteBufUtils.writeUTF8String(buf, cmd); //ByteBufUtils.writeUTF8String(buf, folkName); } }
-
GUI not loading - Updated from 1.6 to 1.7
bump
-
GUI not loading - Updated from 1.6 to 1.7
So I have been updating the Sim-U-Kraft mod from 1.6.4 to 1.7.10, however, the GUI buttons that should load upon starting a new world don't load. I don't see anything wrong with the code, however, I am quite sure there is something that I'm missing. Here is my code: package info.satscape.simukraft.client.Gui; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import org.lwjgl.input.Mouse; import info.satscape.simukraft.common.ModSimukraft; public class GuiRunMod extends GuiScreen { public boolean running = true; private int mouseCount = 0; public boolean doesGuiPauseGame() { return true; } public GuiRunMod() { } public void initGui() { buttonList.add(new GuiButton(0, (width / 2 - 75) , 40, "Do NOT run Sim-U-Kraft")); buttonList.add(new GuiButton(1, (width / 2 - 75) , 90, "Normal Mode")); buttonList.add(new GuiButton(2, (width / 2 - 75) , 140, "Creative Mode")); buttonList.add(new GuiButton(3, (width / 2 - 75) , 190, "Hardcore Mode")); } public void drawScreen(int i, int j, float f) { try { if (mouseCount < 10) { mouseCount++; Mouse.setGrabbed(false); } drawDefaultBackground(); drawCenteredString(fontRendererObj, "Please choose the game mode for Sim-U-Kraft", width / 2, 20, 0xffffff); drawCenteredString(fontRendererObj, "This mode switches off Sim-U-kraft for this world", width / 2, 60, 0xffff00); drawCenteredString(fontRendererObj, "Ideal for beginners and experts. Not too challenging.", width / 2, 110, 0xffff00); drawCenteredString(fontRendererObj, "No money needed, everything free, no blocks required, be creative!", width / 2, 160, 0xffff00); drawCenteredString(fontRendererObj, "Builders require ALL blocks, harder gameplay", width / 2, 210, 0xffff00); } catch (Exception e) { } super.drawScreen(i, j, f); } protected void actionPerformed(GuiButton guibutton) { if (guibutton.id == 0) //do not run { // ModSimukraft.states.runMod = 0; ModSimukraft.states.gameModeNumber = 10; } else if (guibutton.id == 1) // normal { // ModSimukraft.states.runMod = 1; ModSimukraft.states.gameModeNumber = 0; ModSimukraft.proxy.getClientWorld().playSound(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, "satscapesimukraft:welcome", 1.0f, 1.0f, false); } else if (guibutton.id == 2) //creative { // ModSimukraft.states.runMod = 1; ModSimukraft.states.gameModeNumber = 1; ModSimukraft.proxy.getClientWorld().playSound(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, "satscapesimukraft:welcome", 1.0f, 1.0f, false); } else if (guibutton.id == 3) //hardcore { // ModSimukraft.states.runMod = 1; ModSimukraft.states.gameModeNumber = 2; ModSimukraft.proxy.getClientWorld().playSound(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, "satscapesimukraft:welcome", 1.0f, 1.0f, false); } ModSimukraft.states.saveStates(); this.running = false; mc.currentScreen = null; mc.setIngameFocus(); } }
-
[1.7.10]Mob particle effects?
all I have been able to find is this: spawnParticle("heart", d0 + d4, d1 + d3, d2, 0.0D, 0.0D, 0.0D);
-
[1.7.10]Mob particle effects?
I have an item, and when the player right clicks on a mob, it makes a particle effect come from the mob for a second (in this case a heart particle effect) How can I do this?
-
Galacticraft Addon Error
That file is not mine. It belongs to Galacticraft core. The only mod in my Eclipse is the Galacticraft api
- Galacticraft Addon Error
-
Galacticraft Addon Error
Thank you for both your replies. I fixed the config, and the registerProviderType. But I still experience a crash on testing my addon. I still get "cpw.mods.fml.common.LoaderException: java.lang.NoSuchFieldError: field_71946_M" There are still errors in my files, but they are just referencing to galacticraft itself. I have all 3 mods (MicdoodleCore, Galacticraft and Galacticraft Planets) in my mcp/jars/mods folder. If you want to see the code with the errors, I can, but I don't see how that would help, because as I mentioned before, they are just referencing to the mods that the user will have installed, but I can't put into eclipse(because I can't release any of the mods within my addon)
-
Galacticraft Addon Error
Actually, I think I know what it is. The problem could lie with either of these files: package ashjack.galacticraft.exo; import micdoodle8.mods.galacticraft.api.GalacticraftRegistry; import net.minecraftforge.common.Configuration; import net.minecraftforge.common.DimensionManager; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; @Mod(modid="ExoplanetaryExploration", name="Exoplanetary Exploration", version="0.0.1", dependencies="required-after:GalacticraftCore") @NetworkMod(clientSideRequired=true) public class ExoplanetaryExploration { @Instance(value = "ExoplanetaryExploration") public static ExoplanetaryExploration instance; @SidedProxy(clientSide="ashjack.galacticraft.exo.client.ClientProxy", serverSide="ashjack.galacticraft.exo.CommonProxy") public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); config.save(); GalacticraftRegistry.registerTeleportType(PlanetWorldProvider.class, new PlanetTeleporterType()); GalacticraftRegistry.registerCelestialBody(new PlanetKepler22b()); } @EventHandler public void load(FMLInitializationEvent event) { proxy.registerRenderers(); int dimID = config.get(Configuration.CATEGORY_GENERAL, "Kepler-22b", -30).getInt();//config cannot be resolved DimensionManager.registerProviderType(dimID, new PlanetWorldProvider(), false); //The method registerProviderType(int, Class<? extends WorldProvider>, boolean) in the type DimensionManager is not applicable for the arguments (int, PlanetWorldProvider, boolean) DimensionManager.registerDimension(dimID, dimID); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } } OR package ashjack.galacticraft.exo; import net.minecraft.world.WorldProvider; import net.minecraftforge.common.Configuration; import micdoodle8.mods.galacticraft.api.world.IGalaxy; import micdoodle8.mods.galacticraft.api.world.IMapObject; import micdoodle8.mods.galacticraft.api.world.IPlanet; public class PlanetKepler22b implements IPlanet { @Override public String getName() { return "Kepler-22b"; } @Override public boolean isReachable() { return true; } @Override public IMapObject getMapObject() { return new Kepler22bMapObject(); } @Override public boolean addToList() { return true; } @Override public boolean autoRegister() { return false; } @Override public Class<? extends WorldProvider> getWorldProvider() { return PlanetWorldProvider.class; } @Override public int getDimensionID() { return ExoplanetaryExploration.config.get(Configuration.CATEGORY_GENERAL, "Kepler-22b", -30).getInt();//config cannot be resolved or is not a field } @Override public IGalaxy getParentGalaxy() { return new GCCoreGalaxyKepler22(); } }
-
Galacticraft Addon Error
I am very sorry, but I am a beginner coder, and I don't know how to use that to find the source of the problem. Please could you point me in the right direction?
-
Galacticraft Addon Error
I am making an addon for Galacticraft using the api and a tutorial (http://forum.micdoodle8.com/index.php?threads/how-to-code-a-new-planet.1962/) I have followed it correctly, changing a few things along the way, such as floats for meteorites and things like that. However, when I test it, I crash. Here is the log(Sorry, the spoiler button is not working for some reason): Mar 15, 2014 10:54:32 AM net.minecraft.launchwrapper.LogWrapper log INFO: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker Mar 15, 2014 10:54:33 AM net.minecraft.launchwrapper.LogWrapper log INFO: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker Mar 15, 2014 10:54:33 AM net.minecraft.launchwrapper.LogWrapper log INFO: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker 2014-03-15 10:54:33 [iNFO] [ForgeModLoader] Forge Mod Loader version 6.4.45.953 for Minecraft 1.6.4 loading 2014-03-15 10:54:33 [iNFO] [ForgeModLoader] Java is Java HotSpot Client VM, version 1.7.0_51, running on Windows Vista:x86:6.0, installed at C:\Program Files\Java\jre7 2014-03-15 10:54:33 [iNFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation 2014-03-15 10:54:33 [WARNING] [ForgeModLoader] The coremod micdoodle8.mods.miccore.MicdoodlePlugin does not have a MCVersion annotation, it may cause issues with this version of Minecraft 2014-03-15 10:54:33 [iNFO] [ForgeModLoader] Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker 2014-03-15 10:54:33 [iNFO] [ForgeModLoader] Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker 2014-03-15 10:54:33 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker 2014-03-15 10:54:33 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker 2014-03-15 10:54:33 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper 2014-03-15 10:54:33 [iNFO] [sTDOUT] Loaded 40 rules from AccessTransformer config file fml_at.cfg 2014-03-15 10:54:33 [sEVERE] [ForgeModLoader] The binary patch set is missing. Either you are in a development environment, or things are not going to work! 2014-03-15 10:54:34 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper 2014-03-15 10:54:34 [iNFO] [sTDOUT] Loaded 110 rules from AccessTransformer config file forge_at.cfg 2014-03-15 10:54:34 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper 2014-03-15 10:54:34 [iNFO] [sTDOUT] Successfully Registered Transformer 2014-03-15 10:54:34 [iNFO] [sTDOUT] [Micdoodle8Core]: Patching game... 2014-03-15 10:54:34 [iNFO] [sTDOUT] [Micdoodle8Core]: Patching game... 2014-03-15 10:54:34 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker 2014-03-15 10:54:34 [iNFO] [ForgeModLoader] Launching wrapped minecraft {net.minecraft.client.main.Main} 2014-03-15 10:54:34 [iNFO] [sTDOUT] Galacticraft successfully injected bytecode into: net/minecraft/entity/EntityLivingBase (1 / 1) 2014-03-15 10:54:34 [iNFO] [sTDOUT] Galacticraft successfully injected bytecode into: net/minecraft/client/gui/GuiSleepMP (1 / 1) 2014-03-15 10:54:36 [iNFO] [Minecraft-Client] Setting user: Player986 2014-03-15 10:54:36 [iNFO] [sTDOUT] Galacticraft successfully injected bytecode into: net/minecraft/entity/item/EntityItem (2 / 2) 2014-03-15 10:54:37 [iNFO] [Minecraft-Client] LWJGL Version: 2.9.0 2014-03-15 10:54:37 [iNFO] [sTDOUT] Galacticraft successfully injected bytecode into: net/minecraftforge/client/ForgeHooksClient (1 / 1) 2014-03-15 10:54:38 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default 2014-03-15 10:54:40 [iNFO] [MinecraftForge] Attempting early MinecraftForge initialization 2014-03-15 10:54:40 [iNFO] [sTDOUT] MinecraftForge v9.11.1.953 Initialized 2014-03-15 10:54:40 [iNFO] [ForgeModLoader] MinecraftForge v9.11.1.953 Initialized 2014-03-15 10:54:40 [iNFO] [sTDOUT] Replaced 112 ore recipies 2014-03-15 10:54:40 [iNFO] [MinecraftForge] Completed early MinecraftForge initialization 2014-03-15 10:54:40 [iNFO] [ForgeModLoader] Reading custom logging properties from C:\Users\Ashley\Desktop\Galacticraft Plugin\forge\mcp\jars\config\logging.properties 2014-03-15 10:54:40 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL 2014-03-15 10:54:40 [iNFO] [ForgeModLoader] Searching C:\Users\Ashley\Desktop\Galacticraft Plugin\forge\mcp\jars\mods for mods 2014-03-15 10:54:44 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 6 mods to load 2014-03-15 10:54:44 [iNFO] [mcp] Activating mod mcp 2014-03-15 10:54:44 [iNFO] [FML] Activating mod FML 2014-03-15 10:54:44 [iNFO] [Forge] Activating mod Forge 2014-03-15 10:54:44 [iNFO] [Micdoodlecore] Activating mod Micdoodlecore 2014-03-15 10:54:44 [iNFO] [ExoplanetaryExploration] Activating mod ExoplanetaryExploration 2014-03-15 10:54:44 [iNFO] [GalacticraftCore] Activating mod GalacticraftCore 2014-03-15 10:54:44 [WARNING] [Forge Mod Loader] Mod Forge Mod Loader is missing a pack.mcmeta file, things may not work well 2014-03-15 10:54:44 [WARNING] [Minecraft Forge] Mod Minecraft Forge is missing a pack.mcmeta file, things may not work well 2014-03-15 10:54:44 [WARNING] [Exoplanetary Exploration] Mod Exoplanetary Exploration is missing a pack.mcmeta file, things may not work well 2014-03-15 10:54:44 [WARNING] [Galacticraft Core] Mod Galacticraft Core is missing a pack.mcmeta file, things may not work well 2014-03-15 10:54:44 [iNFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Exoplanetary Exploration, FMLFileResourcePack:Galacticraft Core 2014-03-15 10:54:44 [iNFO] [ForgeModLoader] Registering Forge Packet Handler 2014-03-15 10:54:44 [iNFO] [ForgeModLoader] Succeeded registering Forge Packet Handler 2014-03-15 10:54:44 [iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0 2014-03-15 10:54:44 [sEVERE] [ExoplanetaryExploration] Skipping event FMLPreInitializationEvent and marking errored mod ExoplanetaryExploration since required dependency GalacticraftCore has errored 2014-03-15 10:54:44 [sEVERE] [ForgeModLoader] Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue 2014-03-15 10:54:44 [sEVERE] [ForgeModLoader] mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized FML{6.4.45.953} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized Forge{9.11.1.953} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized Micdoodlecore{} [Micdoodle8 Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized GalacticraftCore{2.0.8} [Galacticraft Core] (GALACTICRAFT-1.6.4-2.0.8.908.jar) Unloaded->Constructed->Errored ExoplanetaryExploration{0.0.1} [Exoplanetary Exploration] (bin) Unloaded->Constructed->Errored 2014-03-15 10:54:44 [sEVERE] [ForgeModLoader] The following problems were captured during this phase 2014-03-15 10:54:44 [sEVERE] [ForgeModLoader] Caught exception from GalacticraftCore java.lang.NoSuchFieldError: field_71946_M at micdoodle8.mods.galacticraft.core.GCCoreConfigManager.setDefaultValues(GCCoreConfigManager.java:305) at micdoodle8.mods.galacticraft.core.GalacticraftCore.preInit(GalacticraftCore.java:208) 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:545) 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:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) 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:201) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181) 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:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) 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:112) at cpw.mods.fml.common.Loader.loadMods(Loader.java:522) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:183) at net.minecraft.client.Minecraft.startGame(Minecraft.java:473) at net.minecraft.client.Minecraft.run(Minecraft.java:808) at net.minecraft.client.main.Main.main(Main.java:93) 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:131) at net.minecraft.launchwrapper.Launch.main(Launch.java:27) 2014-03-15 10:54:44 [iNFO] [sTDOUT] ---- Minecraft Crash Report ---- 2014-03-15 10:54:44 [iNFO] [sTDOUT] // Oh - I know what I did wrong! 2014-03-15 10:54:44 [iNFO] [sTDOUT] 2014-03-15 10:54:44 [iNFO] [sTDOUT] Time: 15/03/14 10:54 2014-03-15 10:54:44 [iNFO] [sTDOUT] Description: There was a severe problem during mod loading that has caused the game to fail 2014-03-15 10:54:44 [iNFO] [sTDOUT] 2014-03-15 10:54:44 [iNFO] [sTDOUT] cpw.mods.fml.common.LoaderException: java.lang.NoSuchFieldError: field_71946_M 2014-03-15 10:54:44 [iNFO] [sTDOUT] at cpw.mods.fml.common.LoadController.transition(LoadController.java:156) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at cpw.mods.fml.common.Loader.loadMods(Loader.java:523) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:183) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.startGame(Minecraft.java:473) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.run(Minecraft.java:808) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at net.minecraft.client.main.Main.main(Main.java:93) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Unknown Source) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at net.minecraft.launchwrapper.Launch.launch(Launch.java:131) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at net.minecraft.launchwrapper.Launch.main(Launch.java:27) 2014-03-15 10:54:44 [iNFO] [sTDOUT] Caused by: java.lang.NoSuchFieldError: field_71946_M 2014-03-15 10:54:44 [iNFO] [sTDOUT] at micdoodle8.mods.galacticraft.core.GCCoreConfigManager.setDefaultValues(GCCoreConfigManager.java:305) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at micdoodle8.mods.galacticraft.core.GalacticraftCore.preInit(GalacticraftCore.java:208) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Unknown Source) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:545) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Unknown Source) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.post(EventBus.java:267) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Unknown Source) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at com.google.common.eventbus.EventBus.post(EventBus.java:267) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112) 2014-03-15 10:54:44 [iNFO] [sTDOUT] at cpw.mods.fml.common.Loader.loadMods(Loader.java:522) 2014-03-15 10:54:44 [iNFO] [sTDOUT] ... 10 more 2014-03-15 10:54:44 [iNFO] [sTDOUT] 2014-03-15 10:54:44 [iNFO] [sTDOUT] 2014-03-15 10:54:44 [iNFO] [sTDOUT] A detailed walkthrough of the error, its code path and all known details is as follows: 2014-03-15 10:54:44 [iNFO] [sTDOUT] --------------------------------------------------------------------------------------- 2014-03-15 10:54:44 [iNFO] [sTDOUT] 2014-03-15 10:54:44 [iNFO] [sTDOUT] -- System Details -- 2014-03-15 10:54:44 [iNFO] [sTDOUT] Details: 2014-03-15 10:54:44 [iNFO] [sTDOUT] Minecraft Version: 1.6.4 2014-03-15 10:54:44 [iNFO] [sTDOUT] Operating System: Windows Vista (x86) version 6.0 2014-03-15 10:54:44 [iNFO] [sTDOUT] Java Version: 1.7.0_51, Oracle Corporation 2014-03-15 10:54:44 [iNFO] [sTDOUT] Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation 2014-03-15 10:54:44 [iNFO] [sTDOUT] Memory: 919081376 bytes (876 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 MB) 2014-03-15 10:54:44 [iNFO] [sTDOUT] JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M 2014-03-15 10:54:44 [iNFO] [sTDOUT] AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used 2014-03-15 10:54:44 [iNFO] [sTDOUT] Suspicious classes: FML and Forge are installed 2014-03-15 10:54:44 [iNFO] [sTDOUT] IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 2014-03-15 10:54:44 [iNFO] [sTDOUT] FML: MCP v8.11 FML v6.4.45.953 Minecraft Forge 9.11.1.953 6 mods loaded, 6 mods active 2014-03-15 10:54:44 [iNFO] [sTDOUT] mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized 2014-03-15 10:54:44 [iNFO] [sTDOUT] FML{6.4.45.953} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized 2014-03-15 10:54:44 [iNFO] [sTDOUT] Forge{9.11.1.953} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized 2014-03-15 10:54:44 [iNFO] [sTDOUT] Micdoodlecore{} [Micdoodle8 Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized 2014-03-15 10:54:44 [iNFO] [sTDOUT] GalacticraftCore{2.0.8} [Galacticraft Core] (GALACTICRAFT-1.6.4-2.0.8.908.jar) Unloaded->Constructed->Errored 2014-03-15 10:54:44 [iNFO] [sTDOUT] ExoplanetaryExploration{0.0.1} [Exoplanetary Exploration] (bin) Unloaded->Constructed->Errored 2014-03-15 10:54:44 [iNFO] [sTDOUT] #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Ashley\Desktop\Galacticraft Plugin\forge\mcp\jars\.\crash-reports\crash-2014-03-15_10.54.44-client.txt If you would like me so show you a certain piece of code, I can, but there are a lot, so I didn't post them here in the first place
-
Checking Neighbour Block
Hi, I am trying to make a block that explodes when in contact with water (lithium). I have tried to make this code, but it only works if the neighbour block is a liquid, and THEN it is replaced. I want it to explode as soon as water is placed next to or flows to the block. (water_still and water_flow) Here is my current code (the spoiler button decided not to work, sorry): public MMCLithiumBlock(int par1, Material par2Material) { super(par1, par2Material); } public void onNeighborBlockChange(World world, int i, int j, int k, int l){ if(l > 0 && Block.blocksList[l].isBlockReplaceable(world, i, j, k) == true) { world.createExplosion((Entity)null, i, j, k, 1, true); } }
- ITextureProvider
-
ITextureProvider
I made a mod for Minecraft 1.2.5, and used ITextureProvider for the blocks only. So I updated my forge successfully, and ITextureProvider doesn't work anymore. I fixed the packages (changed net.minecraft.src.forge to net.minecraftforge). So what do I change it to without having to restart my code? Remember, I only want to change the blocks, because I didn't add ITextureProvider to the items.
IPS spam blocked by CleanTalk.