Jump to content

Zio

Members
  • Posts

    41
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Zio's Achievements

Tree Puncher

Tree Puncher (2/8)

-2

Reputation

  1. Hello everyone! I found a very simple solution to this problem that has bothered me too. In the class "ItemRender.java" in method "updateEquippedItem()" is an assignment to a variable named flag flag = this.equippedItemSlot == entityclientplayermp.inventory.currentItem && itemstack == this.itemToRender; To solve this problem, just replace that line with this boolean flag; if(itemstack == null) { flag = this.equippedItemSlot == entityclientplayermp.inventory.currentItem && itemstack == this.itemToRender; } else { flag = this.equippedItemSlot == entityclientplayermp.inventory.currentItem && itemstack.itemID == this.itemToRender.itemID; } It worked, I'm using version 1.5.2.
  2. Hi all, I have created a mod with a 3D model that I created in Techne. Then I added this 3D model to my mod, with this code: MinecraftForgeClient.registerItemRenderer(Gun.itemID, new ItemRenderP90()); This code works when I launch the client, but when I launch the server, I get this error: cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient at cpw.mods.fml.common.LoadController.transition(LoadController.java:147) at cpw.mods.fml.common.Loader.loadMods(Loader.java:515) at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:85) at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:347) at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:69) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:431) at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16) Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient at net.minecraftforge.client.MinecraftForgeClient.getStencilBits(MinecraftForgeClient.java:64) at net.minecraftforge.client.MinecraftForgeClient.<clinit>(MinecraftForgeClient.java:68) at mods.Gunscraft.mod_Gunscraft.preinit(mod_Gunscraft.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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494) 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: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:192) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:172) 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: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:103) at cpw.mods.fml.common.Loader.loadMods(Loader.java:514) ... 5 more Caused by: java.lang.ClassNotFoundException: net.minecraft.client.multiplayer.WorldClient at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:238) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 35 more Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/multiplayer/WorldClient for invalid side SERVER at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50) at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:352) at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:225) ... 37 more If I delete "MinecraftForgeClient.registerItemRender" code, the server works. Thanks!
  3. Hello, I want to create a mod with some automatic guns with ammo, I created a 3D model for the mod, but now I don't know how I can do the code for the ammo/gun. Thanks!
  4. How I add a new parameter (as username, password, version, assetIndex, assetsDir...) in the client?
  5. I need it because I have a custom client with a server and if that login system doesn't exist, all the player can enter in the server with any account.
  6. The real problem is: I have a custom launcher modified by me with a custom login database made by me. The launcher start a custom client that is made for enter in a server. The launcher is open source and if a player modify the source and toggle the password option can enter in any account. So I thinked: this launcher create a txt file with the password and when the player enters the server the client take the password and execute the "/login pass". I do this because so much people don't know how tu use "/register pass pass" and "/login pass" commands. There are other solutions? :\
  7. If I use "Minecraft.getMinecraft().thePlayer.sendChatMessage()" in multiplayer, I get this crash: ---- Minecraft Crash Report ---- // Daisy, daisy... Time: 30/09/14 18.46 Description: Ticking screen java.lang.NullPointerException: Ticking screen at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:110) at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:247) at net.minecraft.client.multiplayer.GuiConnecting.updateScreen(GuiConnecting.java:116) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1751) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1038) at net.minecraft.client.Minecraft.run(Minecraft.java:961) at net.minecraft.client.main.Main.main(Main.java:164) 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) 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 GradleStart.bounce(GradleStart.java:107) at GradleStart.startClient(GradleStart.java:100) at GradleStart.main(GradleStart.java:55) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:110) at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:247) at net.minecraft.client.multiplayer.GuiConnecting.updateScreen(GuiConnecting.java:116) -- Affected screen -- Details: Screen name: net.minecraft.client.multiplayer.GuiConnecting Stacktrace: at net.minecraft.client.Minecraft.runTick(Minecraft.java:1751) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1038) at net.minecraft.client.Minecraft.run(Minecraft.java:961) at net.minecraft.client.main.Main.main(Main.java:164) 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) 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 GradleStart.bounce(GradleStart.java:107) at GradleStart.startClient(GradleStart.java:100) at GradleStart.main(GradleStart.java:55) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_67, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 957437624 bytes (913 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M 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.05 FML v7.10.18.1180 Minecraft Forge 10.13.0.1180 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available FML{7.10.18.1180} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.0.1180.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available Forge{10.13.0.1180} [Minecraft Forge] (forgeSrc-1.7.10-10.13.0.1180.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available mod_Gunscraft{1.0} [Gunscraft Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: AMD Radeon R9 200 Series GL version 4.3.12682 Compatibility Profile Context 13.301.1001.0, ATI Technologies Inc. GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: Italiano (Italia) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1)
  8. I don't host the server. The server is in a remote host, and the host don't have a .minecraft folder. A minecraft server don't have a .minecraft folder.
  9. I need to execute the command with the content of the txt file.
  10. I need to take the contents of a txt file in .minecraft folder and use it in Java. The event must be client-side.
  11. package mods.Gunscraft; import java.awt.AWTException; import java.awt.Robot; import java.awt.event.KeyEvent; import java.io.BufferedReader; import java.io.DataInputStream; import java.io.FileInputStream; import java.io.InputStreamReader; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiChat; import net.minecraft.client.gui.GuiOptions; import net.minecraft.client.gui.ScreenChatOptions; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.server.MinecraftServer; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.client.event.GuiOpenEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.PlayerEvent; import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent; import cpw.mods.fml.common.network.FMLNetworkEvent; public class Events { @SubscribeEvent public void loginEvent(FMLNetworkEvent.ClientConnectedToServerEvent event) { EntityPlayer player = null; PlayerEvent pe = new PlayerEvent(player); MinecraftServer.getServer().getCommandManager().executeCommand(player, "login ciao"); } } Show me how you would do.
  12. I'm new in Java and in Minecraft modding. This is good? "PlayerEvent pe = new PlayerEvent(player);"
×
×
  • Create New...

Important Information

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