Jump to content

DealerJoe

Members
  • Posts

    11
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • URL
    http://dealerjoe.square7.ch
  • Location
    Germany
  • Personal Text
    DealerJoes Mods

DealerJoe's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Yeah, this was my first Idea too, but when I then try to play the sound, I hear nothing. registering the sound : event.manager.soundPoolSounds.addSound("sound/chopper.wav", mod_farmersfriends.class.getResource("/farmer/sound/chopper.wav")); Trying to play it : par1World.playSoundEffect(par2, par3, par4, "sound.chopper", 1F, 1F); Thank you anyway. DealerJoe
  2. Hi, its DealerJoe again! Okay, my problem are sounds this time. So, if I want to register a sound, I have to put the register-Method into the @PreInit-Method : @PreInit public void loadConfiguration(FMLPreInitializationEvent evt) { /** LOAD SOUNDS **/ MinecraftForge.EVENT_BUS.register(new SoundEvent()); } just like this. But now my Question, I have to put a @SideOnly annotation somewhere, otherwise the server crashes : 2012-10-21 14:29:43 [iNFO] [ForgeModLoader] Forge Mod Loader version 3.1.35.394 for Minecraft client:1.3.2, server:1.3.2 loading 2012-10-21 14:29:44 [iNFO] [sTDOUT] 195 recipes 2012-10-21 14:29:44 [iNFO] [sTDOUT] 27 achievements 2012-10-21 14:29:45 [iNFO] [sTDERR] 2012-10-21 14:29:45 [iNFO] Starting minecraft server version 1.3.2 2012-10-21 14:29:45 [iNFO] [ForgeModLoader] Attempting early MinecraftForge initialization 2012-10-21 14:29:45 [iNFO] [sTDOUT] MinecraftForge v4.2.5.303 Initialized 2012-10-21 14:29:45 [iNFO] [ForgeModLoader] MinecraftForge v4.2.5.303 Initialized 2012-10-21 14:29:45 [iNFO] [ForgeModLoader] Completed early MinecraftForge initialization 2012-10-21 14:29:45 [iNFO] [ForgeModLoader] Searching C:\Users\Toshiba\Desktop\Forge Modding\FarmersFriends\jars\mods for mods 2012-10-21 14:29:46 [iNFO] [ForgeModLoader] Attempting to reparse the mod container bin 2012-10-21 14:29:47 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 3 mods to load 2012-10-21 14:29:47 [iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0 2012-10-21 14:29:47 [iNFO] [sTDERR] 2012-10-21 14:29:47 [iNFO] Loading properties 2012-10-21 14:29:47 [iNFO] [sTDERR] 2012-10-21 14:29:47 [iNFO] Default game type: SURVIVAL 2012-10-21 14:29:47 [iNFO] [sTDERR] 2012-10-21 14:29:47 [iNFO] Generating keypair 2012-10-21 14:29:48 [iNFO] [sTDERR] 2012-10-21 14:29:48 [iNFO] Starting Minecraft server on *:25565 2012-10-21 14:29:48 [iNFO] [sTDERR] 2012-10-21 14:29:48 [WARNING] **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE! 2012-10-21 14:29:48 [iNFO] [sTDERR] 2012-10-21 14:29:48 [WARNING] The server will make no attempt to authenticate usernames. Beware. 2012-10-21 14:29:48 [iNFO] [sTDERR] 2012-10-21 14:29:48 [WARNING] While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose. 2012-10-21 14:29:48 [iNFO] [sTDERR] 2012-10-21 14:29:48 [WARNING] To change this, set "online-mode" to "true" in the server.properties file. 2012-10-21 14:29:48 [iNFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 3 mods 2012-10-21 14:29:48 [iNFO] [sTDERR] 2012-10-21 14:29:48 [iNFO] Preparing level "mcpworld" 2012-10-21 14:29:48 [iNFO] [ForgeModLoader] This world was saved with mod FarmersFriends version 1.0 and it is now at version 1.1, things may not work well 2012-10-21 14:29:48 [iNFO] [ForgeModLoader] Loading dimension 0 (mcpworld) (net.minecraft.src.DedicatedServer@4f2948c6) 2012-10-21 14:29:48 [iNFO] [ForgeModLoader] Loading dimension 1 (mcpworld) (net.minecraft.src.DedicatedServer@4f2948c6) 2012-10-21 14:29:48 [iNFO] [ForgeModLoader] Loading dimension -1 (mcpworld) (net.minecraft.src.DedicatedServer@4f2948c6) 2012-10-21 14:29:48 [iNFO] [sTDERR] 2012-10-21 14:29:48 [iNFO] Preparing start region for level 0 2012-10-21 14:29:49 [iNFO] [sTDERR] 2012-10-21 14:29:49 [iNFO] Preparing spawn area: 52% 2012-10-21 14:29:50 [iNFO] [sTDERR] 2012-10-21 14:29:50 [iNFO] Done (2,137s)! For help, type "help" or "?" 2012-10-21 14:30:28 [iNFO] [sTDERR] 2012-10-21 14:30:28 [iNFO] Stopping the server 2012-10-21 14:30:28 [iNFO] [sTDERR] 2012-10-21 14:30:28 [iNFO] Stopping server 2012-10-21 14:30:28 [iNFO] [sTDERR] 2012-10-21 14:30:28 [iNFO] Saving players 2012-10-21 14:30:28 [iNFO] [sTDERR] at java.net.DualStackPlainSocketImpl.accept0(Native Method) 2012-10-21 14:30:28 [iNFO] [sTDERR] at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source) 2012-10-21 14:30:28 [iNFO] [sTDERR] at java.net.AbstractPlainSocketImpl.accept(Unknown Source) 2012-10-21 14:30:28 [iNFO] [sTDERR] at java.net.PlainSocketImpl.accept(Unknown Source) 2012-10-21 14:30:28 [iNFO] [sTDERR] at java.net.ServerSocket.implAccept(Unknown Source) 2012-10-21 14:30:28 [iNFO] [sTDERR] at java.net.ServerSocket.accept(Unknown Source) 2012-10-21 14:30:28 [iNFO] [sTDERR] at net.minecraft.src.ServerListenThread.run(ServerListenThread.java:75) 2012-10-21 14:30:28 [iNFO] [sTDOUT] Closing listening thread 2012-10-21 14:30:28 [iNFO] [sTDERR] 2012-10-21 14:30:28 [iNFO] Saving worlds 2012-10-21 14:30:28 [iNFO] [sTDERR] 2012-10-21 14:30:28 [iNFO] Saving chunks for level 'mcpworld'/Overworld 2012-10-21 14:30:28 [iNFO] [sTDERR] 2012-10-21 14:30:28 [iNFO] Saving chunks for level 'mcpworld'/Nether 2012-10-21 14:30:28 [iNFO] [sTDERR] 2012-10-21 14:30:28 [iNFO] Saving chunks for level 'mcpworld'/The End 2012-10-21 14:30:29 [iNFO] [ForgeModLoader] Unloading dimension 0 2012-10-21 14:30:29 [iNFO] [ForgeModLoader] Unloading dimension -1 2012-10-21 14:30:29 [iNFO] [ForgeModLoader] Unloading dimension 1 But where do I have to put it ? Hope you can help me DealerJoe
  3. Oh Shit, you´re right. Sorry for waisting your time :'(, but I just didn´t see that issue. I should have had looked into the code much better. But there is one more question, why is it stupid to add a static-modifier when initializing the blocks or items ? But thank you anyway. DealerJoe
  4. My mod Class package farmersfriends.common; import java.io.File; import net.minecraft.src.Block; import net.minecraft.src.Item; import net.minecraft.src.ItemStack; import net.minecraftforge.common.Configuration; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.PreInit; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid="FarmersFriends", name="FarmersFriends", version="1.0") @NetworkMod(clientSideRequired=true, serverSideRequired=false) public class mod_farmersfriends { /** IDS **/ public static int blockChopperID; public static int blockToasterID; public static int chopperID; public static int sawmealID; public static int scytheID; public static int scytheBloodyID; public static int toasterID; /** BLOCKS AND ITEMS **/ public static final Block blockChopper = (new BlockChopper(blockChopperID, TileEntityChopper.class)).setHardness(0.5F).setBlockName("chopperBlock"); public static final Block blockToaster = (new BlockToaster(blockToasterID, TileEntityToaster.class)).setHardness(0.5F).setBlockName("toasterBlock"); public static final Item chopper = (new ItemChopper(chopperID, blockChopper).setItemName("chopper").setIconIndex(0)); public static final Item sawmeal = (new ItemSawmeal(sawmealID).setItemName("sawmeal").setIconIndex(1)); public static final Item farmersScythe = (new ItemScythe(scytheID).setItemName("farmersScythe").setIconIndex(2)); public static final Item farmersScytheBloody = (new ItemScythe(scytheBloodyID).setItemName("farmersScytheBloody").setIconIndex(3)); public static final Item toaster = (new ItemToaster(toasterID, blockToaster).setItemName("toaster").setIconIndex(4)); @SidedProxy(clientSide = "farmersfriends.client.ClientProxyFm", serverSide = "farmersfriends.common.CommonProxyFm") public static CommonProxyFm proxy; @PreInit public void loadConfiguration(FMLPreInitializationEvent evt) { Configuration config = new Configuration(new File(evt.getModConfigurationDirectory(), "FarmersFriends.cfg")); config.load(); blockChopperID = config.getOrCreateIntProperty("blockChopperID", Configuration.CATEGORY_BLOCK, 250).getInt(); blockToasterID = config.getOrCreateIntProperty("blockToasterID", Configuration.CATEGORY_BLOCK, 251).getInt(); chopperID = config.getOrCreateIntProperty("itemChopperID", Configuration.CATEGORY_ITEM, 5000).getInt(); sawmealID = config.getOrCreateIntProperty("sawmealID", Configuration.CATEGORY_ITEM, 5001).getInt(); scytheID = config.getOrCreateIntProperty("scytheID", Configuration.CATEGORY_ITEM, 5002).getInt(); scytheBloodyID = config.getOrCreateIntProperty("bloodyScytheID", Configuration.CATEGORY_ITEM, 5003).getInt(); toasterID = config.getOrCreateIntProperty("itemToasterID", Configuration.CATEGORY_ITEM, 5004).getInt(); config.save(); } @Init public void load(FMLInitializationEvent e){ GameRegistry.registerFuelHandler(new FuelHandler()); LanguageRegistry.addName(chopper, "Chopper"); LanguageRegistry.addName(sawmeal, "Sawmeal"); LanguageRegistry.addName(farmersScythe, "Farmers Scythe"); LanguageRegistry.addName(farmersScytheBloody, "Farmers Bloody Scythe"); LanguageRegistry.addName(toaster, "Toaster"); GameRegistry.addRecipe(new ItemStack(chopper, 1), new Object[]{ " S","IIW","ILR", 'S', Item.stick, 'I', Item.ingotIron, 'W', Block.wood, 'R', Item.redstone, 'L', Item.leather }); proxy.registerRenderThings(); } } Log / Exception: 2012-10-20 13:52:35 [iNFO] [ForgeModLoader] Forge Mod Loader version 3.1.35.394 for Minecraft client:1.3.2, server:1.3.2 loading 2012-10-20 13:52:37 [iNFO] [sTDOUT] 27 achievements 2012-10-20 13:52:37 [iNFO] [sTDOUT] 195 recipes 2012-10-20 13:52:37 [iNFO] [sTDOUT] Setting user: Player405, - 2012-10-20 13:52:37 [iNFO] [sTDERR] Client asked for parameter: server 2012-10-20 13:52:37 [iNFO] [sTDOUT] LWJGL Version: 2.4.2 2012-10-20 13:52:38 [iNFO] [ForgeModLoader] Attempting early MinecraftForge initialization 2012-10-20 13:52:38 [iNFO] [sTDOUT] MinecraftForge v4.2.5.303 Initialized 2012-10-20 13:52:38 [iNFO] [ForgeModLoader] MinecraftForge v4.2.5.303 Initialized 2012-10-20 13:52:38 [iNFO] [ForgeModLoader] Completed early MinecraftForge initialization 2012-10-20 13:52:38 [iNFO] [ForgeModLoader] Searching C:\Users\Toshiba\Desktop\Forge Modding\FarmersFriends\jars\mods for mods 2012-10-20 13:52:39 [iNFO] [ForgeModLoader] Attempting to reparse the mod container bin 2012-10-20 13:52:41 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 3 mods to load 2012-10-20 13:52:41 [iNFO] [sTDERR] Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError 2012-10-20 13:52:41 [iNFO] [sTDERR] at java.lang.Class.forName0(Native Method) 2012-10-20 13:52:41 [iNFO] [sTDERR] at java.lang.Class.forName(Unknown Source) 2012-10-20 13:52:41 [iNFO] [sTDERR] at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:407) 2012-10-20 13:52:41 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2012-10-20 13:52:41 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2012-10-20 13:52:41 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2012-10-20 13:52:41 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2012-10-20 13:52:41 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69) 2012-10-20 13:52:41 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) 2012-10-20 13:52:41 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317) 2012-10-20 13:52:41 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300) 2012-10-20 13:52:41 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268) 2012-10-20 13:52:41 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:124) 2012-10-20 13:52:41 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2012-10-20 13:52:41 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2012-10-20 13:52:41 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2012-10-20 13:52:41 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2012-10-20 13:52:41 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69) 2012-10-20 13:52:41 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) 2012-10-20 13:52:41 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317) 2012-10-20 13:52:41 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300) 2012-10-20 13:52:41 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268) 2012-10-20 13:52:41 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:81) 2012-10-20 13:52:41 [iNFO] [sTDERR] at cpw.mods.fml.common.Loader.loadMods(Loader.java:466) 2012-10-20 13:52:41 [iNFO] [sTDERR] at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:146) 2012-10-20 13:52:41 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:416) 2012-10-20 13:52:41 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:748) 2012-10-20 13:52:41 [iNFO] [sTDERR] at java.lang.Thread.run(Unknown Source) 2012-10-20 13:52:41 [iNFO] [sTDERR] Caused by: java.lang.IllegalArgumentException: Slot 0 is already occupied by farmersfriends.common.BlockChopper@4b261b80 when adding farmersfriends.common.BlockToaster@32d7970b 2012-10-20 13:52:41 [iNFO] [sTDERR] at net.minecraft.src.Block.<init>(Block.java:280) 2012-10-20 13:52:41 [iNFO] [sTDERR] at net.minecraft.src.BlockContainer.<init>(BlockContainer.java:7) 2012-10-20 13:52:41 [iNFO] [sTDERR] at farmersfriends.common.BlockToaster.<init>(BlockToaster.java:15) 2012-10-20 13:52:41 [iNFO] [sTDERR] at farmersfriends.common.mod_farmersfriends.<clinit>(mod_farmersfriends.java:38) 2012-10-20 13:52:41 [iNFO] [sTDERR] ... 28 more 2012-10-20 13:52:43 [iNFO] [sTDERR] Someone is closing me! Thanks for your help !
  5. Okay, I did so. When I set the breakpoint to the beginning of the loadConfiguration-Method, I noticed, that it´s not even called. Do you know why or how I can fix it ? DealerJoe
  6. I cant do that because Minecraft.getMinecraftDir() doesn´t work on servers and this is an SMP mod, so thats not working. And what do you mean with This is the only method I´m using this Flag. Any other Idea ?
  7. Hi, it´s DealerJoe again! Okay guys, got a new problem. I´ve been looking around in other mod´s source for about 2 hours now, but I couldn´t figure out what I´m doing wrong. Now my Problem : I want to generate a config file, so I created a method called loadConfiguration, put @PreInit above and added the event. Then I created the variables for the id´s of items and blocks. Here my Source : @PreInit public void loadConfiguration(FMLPreInitializationEvent evt) { Configuration config = new Configuration(new File(evt.getModConfigurationDirectory(), "FarmersFriends.cfg")); config.load(); blockChopperID = config.getOrCreateIntProperty("blockChopperID", Configuration.CATEGORY_BLOCK, 250).getInt(); blockToasterID = config.getOrCreateIntProperty("blockToasterID", Configuration.CATEGORY_BLOCK, 251).getInt(); chopperID = config.getOrCreateIntProperty("itemChopperID", Configuration.CATEGORY_ITEM, 5000).getInt(); sawmealID = config.getOrCreateIntProperty("sawmealID", Configuration.CATEGORY_ITEM, 5001).getInt(); scytheID = config.getOrCreateIntProperty("scytheID", Configuration.CATEGORY_ITEM, 5002).getInt(); scytheBloodyID = config.getOrCreateIntProperty("bloodyScytheID", Configuration.CATEGORY_ITEM, 5003).getInt(); toasterID = config.getOrCreateIntProperty("itemToasterID", Configuration.CATEGORY_ITEM, 5004).getInt(); config.save(); } I don´t now whats wrong with it. If you guys miss some parts of the src, I´m gonna post it. Hope you can help me. DealerJoe
  8. okay guys ! I figured out how to do it. I had to add an @SideOnly(Side.CLIENT); at the top of the RenderChopper class, which I had to move to the src package. The RenderChopper render = new RenderChopper(); is not needed anymore. Now it works fine.
  9. I moved it, still the same error. If you want to, I´ll give you the sourcefiles for download. Ideas left ?
  10. You´re right, but I still get the same error. Any other Ideas ?
  11. Hi Guys, I´m DealerJoe and I´m new on this forum so please correct me if I do anything wrong. Yesterday, I tried to change over from ModLoader to Forge. Now my Problem: I´ve got a mod which creates a new Block with a custom rendered BlockModel. Everything works in Singleplayer, but when I try to start the server with my mod, I get the following exception : Description: Exception in server tick loop java.lang.NoClassDefFoundError: net/minecraft/src/TileEntitySpecialRenderer at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:407) 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:69) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300) at com.google.common.eventbus.EventBus.post(EventBus.java:268) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:124) 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:69) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300) at com.google.common.eventbus.EventBus.post(EventBus.java:268) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:81) at cpw.mods.fml.common.Loader.loadMods(Loader.java:466) at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:80) at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:340) at net.minecraft.src.DedicatedServer.startServer(DedicatedServer.java:49) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:433) at net.minecraft.src.ThreadServerApplication.run(ThreadServerApplication.java:18) Caused by: java.lang.ClassNotFoundException: net.minecraft.src.TileEntitySpecialRenderer at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:125) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 29 more Caused by: java.lang.NullPointerException at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:119) ... 31 more So, I already looked at the sourcecode of a few other mods which also add custom block models but I couldn´t figure out where I did the mistake. So, these are the Files I have (If I forgot something, please tell me, I´ll show you) I would be glad if anybody could help me with that problem. Thanks DealerJoe
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.