Jump to content

goodiesohhi

Members
  • Posts

    12
  • Joined

  • Last visited

goodiesohhi's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. The reason I made this post is because I saw 3 posts in a row where the OP says basically: I don't wanna spend a long time learning java when on of you guys can just tell me what I need, while the code snippets they supply have random fields created that are never accessed thinking that they just need to make a field called attack damage and it will magically change a tool's attack damage. Or syntactical errors like override annotations thrown around everywhere, even within methods. Or random braces, random casting, random everything and not wanting to learn but rather just copying and pasting.
  2. I've just started using forge a few days ago and I'm making good headway on my project which is a custom Moba-like minigame. This is what I've noticed, so much of these forums just people wanting to have things done for them. Absolutely no understanding of java or oop in general. It's hard sometimes to find relevant forge discussion or help because it's mostly just general java non-understanding. Please. Before attempting to do some programming, try to at least a little bit or programming.
  3. Sorry for so many numps. Fixed it. Have to pass the .Post of the event. Can;t use it by itself. Dur.
  4. I create an empty RenderLivingEvent. and it doesn't register and I get Error registering event handler: FMLMod:pushthelinemc{1.1} class net.minecraftforge.client.event.RenderLivingEvent public void com.foxfyre.pushtheline.MyEventHandler.entityLivingRender(net.minecraftforge.client.event.RenderLivingEvent) java.lang.InstantiationException: null at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:48) ~[?:1.8.0_181] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_181] at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:130) [EventBus.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:112) [EventBus.class:?] at com.foxfyre.pushtheline.ExampleMod.init(ExampleMod.java:88) [ExampleMod.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181] at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:626) [FMLModContainer.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181] at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) [guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) [guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) [guava-21.0.jar:?] at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) [guava-21.0.jar:?] at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) [guava-21.0.jar:?] at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) [guava-21.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:217) [guava-21.0.jar:?] at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:218) [LoadController.class:?] at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:196) [LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181] at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) [guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) [guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) [guava-21.0.jar:?] at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) [guava-21.0.jar:?] at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) [guava-21.0.jar:?] at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) [guava-21.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:217) [guava-21.0.jar:?] at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135) [LoadController.class:?] at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:744) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:581) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] as the stacktrace. I've done nothing different compared to my other handler.
  5. I noticed an error throw in the console and it's this same error as here: https://github.com/BobMowzie/MowziesMobs/issues/38 Idk how to solve it tho.
  6. Sorry. I assumed it can be inferred. I have a class with the @EventBusSubscriber annotation. It's registered in my common proxy init like so: MinecraftForge.EVENT_BUS.register(new MyEventHandler()); All my SubscribeEvents are in this class.
  7. Really? None of my other methods are static. Lemme try this. EDIT: Nope. Didn't do anything.
  8. I have this block: @SideOnly(Side.CLIENT) @SubscribeEvent public void entityLivingRender(RenderLivingEvent<EntityLivingBase> event) { EntityLivingBase e = event.getEntity(); RenderLivingBase<EntityLivingBase> r = event.getRenderer(); drawTexturedQuadFit(e.getPosition().getX(), e.getPosition().getY(), 4, 2, e.getPosition().getZ()); r.getFontRendererFromRenderManager().drawStringWithShadow("HP:" + e.getHealth()+"/"+e.getMaxHealth(), e.getPosition().getX(), e.getPosition().getY()+10, 0xFFFFFF); System.out.println("HELLLLLLLLLLO"); int i = 0; i/=0; } @SideOnly(Side.CLIENT) @SubscribeEvent public void entityLivingRender(RenderLivingEvent<EntityLivingBase> event) { EntityLivingBase e = event.getEntity(); RenderLivingBase<EntityLivingBase> r = event.getRenderer(); drawTexturedQuad(e.getPosition().getX(), e.getPosition().getY(), 4, 2, e.getPosition().getZ()); r.getFontRendererFromRenderManager().drawStringWithShadow("HP:" + e.getHealth()+"/"+e.getMaxHealth(), e.getPosition().getX(), e.getPosition().getY()+10, 0xFFFFFF); System.out.println("HELLLLLLLLLLO"); int i = 0; i/=0; } in the same class as all my other working Subscribed Events. Does it have to be somewhere else? I have it log a string but nothing shows up in console. I even have it divide by zero but no dividebyzero error is thrown..
  9. Title Explains So I have no idea what else to do. Model: Render: ClientProxy Relevant CommonProxyStuff inside base class of mod My ModEntityInit Am I doing some things in the wrong order or missing steps? Texture isn't null, I've checked. When I attempt to spawn using command or egg, nothing apparent happens. By making the entity send message to all players on it's first update in it's update loop, I confirmed that it was summoned but no bounding box or rendered. Sorry if I overlooked anything important to post.
  10. Ah yes. This is what I needed. I totally forgot I can attach capabilities to the world as well. Thank you.
  11. So I would have to also make a plugin and integrate it with the mod? Why wouldn't I be able to use the server side of a forge mod to implement minigame like behaviour.
  12. So I've just started working with forge yesterday. I do have competent experience with Java and other OOP. I'm understanding the Forge API alright. I've figured out eventhandling and server/client messaging. I just have few questions. I know stuff like minigames are generally regulated with Server plugins right? Is it possible to just do this with sides in forge? Say I want to keep track of time elapsed on the server. I already figured out that I can do stuff like teams using capabilities. If I wanted to add custom fields to hold information on the server world, where would I put this? I'm sorry of this sounds really generic, I'm at a loss of words right now to elaborate. How would I just hold gamestate information for the world? Say for example if I wanted to be able to start a new "match" and at 5 minutes in, spawn a mob. I can use onServerTick to tick the server but where would I store information?
×
×
  • Create New...

Important Information

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