Jump to content

FishSauce

Members
  • Posts

    112
  • Joined

  • Last visited

Posts posted by FishSauce

  1. Your code formatting is a mess and pretty much unreadable. I do see though that you are using global Entity IDs. Don't. You should only use registerModEntity to register your entities.

    Sorry, I will try to clean it up. I will change that and see if it works, because I can't see anything else that could go wrong with the spawning.

  2. I installed my mod and ExtabiomesXL together, and for some reason my biome takes the place of most if not all of that mods biomes. It also takes the place of some vanilla biomes. I have no idea why this is happening. Maybe you would know? If so please reply.

     

    Biome Class: http://pastebin.com/WByUjaLU

    Main Class: http://pastebin.com/w01reYHh

    (I do have 2 biomes, but it is only that one that is having a problem)

     

  3. Hello, I have a mod that has a lightning wand and when I right click the server crashes. I don't need to know how to make it work with other players. Just making the server not crash. When Im kicked, it just says server closed. Here is the logs/crash report/ code.

     

     

     

    Lightning Staff Class: http://pastebin.com/fRuVUGgh

     

    Server Crash Report: http://pastebin.com/hMM4caHK

     

    Server Logs: http://pastebin.com/mBJ2NyHD

  4. I cleaned up my mod and now my mod crashes? I have no idea what is going on. It does work outside of the workspace though. Please help. Here is the crash report.

     ---- Minecraft Crash Report ----
    // I blame Dinnerbone.
    
    Time: 3/1/15 1:10 PM
    Description: Initializing game
    
    java.lang.NullPointerException: Initializing game
    at mymod.main.Main.preInit(Main.java:231)
    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:513)
    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.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
    at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
    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.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
    at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)
    at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
    at net.minecraft.client.Minecraft.run(Minecraft.java:931)
    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:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:85)
    at GradleStart.main(GradleStart.java:45)
    
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Stacktrace:
    at mymod.main.Main.preInit(Main.java:231)
    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:513)
    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.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
    at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
    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.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
    at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)
    at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
    
    -- Initialization --
    Details:
    Stacktrace:
    at net.minecraft.client.Minecraft.run(Minecraft.java:931)
    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:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:85)
    at GradleStart.main(GradleStart.java:45)
    
    -- System Details --
    Details:
    Minecraft Version: 1.7.10
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 1.8.0_31, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 890980640 bytes (849 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.85.1230 Minecraft Forge 10.13.2.1230 4 mods loaded, 4 mods active
    mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
    FML{7.10.85.1230} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized
    Forge{10.13.2.1230} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized
    InfiniCraft{1.1} [infiniCraft] (bin) Unloaded->Constructed->Errored
    Launched Version: 1.7.10
    LWJGL: 2.9.1
    OpenGL: AMD Radeon(TM) HD 6620G   GL version 4.1.10627 Compatibility Profile Context, 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: English (US)
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    Anisotropic Filtering: Off (1) 

  5. Ok, I already done that, it's seriously the most simple in my drone launcher weapon. Take example on the code, here is my github link https://github.com/Yuri6037/AncientAddinMod/blob/master/src/main/java/net/yuri6037/AncientAddinMod/items/ItemHandDroneLauncher.java

     

    Just watch on my onUpdate and onItemRightClick, it's not as much complicated, just use the Minecraft damage system to make the timer, and use some nbt booleans.

    It works, thanks!

  6. ItemStack#stackTagCompound

    is the NBT data for an ItemStack, put anything you want into it.

    For the cooldown use

    World#getTotalWorldTime

    it gives you the amount of ticks since the world was created. Using that you can then check how many ticks have passed since the last time the Item was used.

    Yeah but how do I use those, I haven't messed with really anthing like these before

  7. I don't see anywhere in there where you tried to implement what I suggested, storing the cooldown in the ItemStack's NBT tag. The way you have it now, every single player with your item is using the same cooldown field (which doesn't even cool down, since you didn't implement onUpdate).

     

    Item#onCreated only gets called if the item is crafted, btw, so your NBT tag will not be initialized if you get one from the Creative tab, by command, as loot, or any other such means.

    1. Im not sure how to store the cooldown in the Itemstack's NBT tag.

    2. I didnt implement onUpdate because Im not sure what to do with it. That is why I am here

  8. hold.getItem() ?

    That removes the error for that bit, but still the line next to that wont work. It doesnt have getItem() or itemID

    And we're supposed to magically know what the next line is?

     

    As for the article being outdated, sure, slightly, but any required code changes would be readily apparent with just a bit of Java knowledge and poking around a little in vanilla code.

     

    Anyway, show your code or we cannot help.

    http://pastebin.com/2t0H4vw6

  9. Don't make a field in your Item class - every single one of your weapons will then be on the same timer, so if I right-click, my friend's timer will start, too. This is because Items are each a static object, i.e. there is only ONE of each Item in the game.

     

    Instead, you need to store the timer in the ItemStack's NBT compound. See the Forge Wiki article.

    Some of that is outdated, and I am not sure what they have changed to. Like the hold.itemID

×
×
  • Create New...

Important Information

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