Jump to content

Leomelonseeds

Forge Modder
  • Posts

    407
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Leomelonseeds

  1. When the arrow is FIRED, set FIRE to the ARROW.
  2. Stupid me... Apparently changing the to container, 3(My entity id) fixed the crash... lol. Ok now its giving an error: [16:45:09] [Client thread/ERROR] [FML]: A severe problem occurred during the spawning of an entity at ( -906.96875,71.5, 151.5) java.lang.NullPointerException: The validated object is null at org.apache.commons.lang3.Validate.notNull(Validate.java:222) ~[commons-lang3-3.3.2.jar:3.3.2] at org.apache.commons.lang3.Validate.notNull(Validate.java:203) ~[commons-lang3-3.3.2.jar:3.3.2] at net.minecraft.entity.EntityHanging.updateFacingWithBoundingBox(EntityHanging.java:58) ~[EntityHanging.class:?] at com.leomelonseeds.moarstuff.entity.EntityCamera.<init>(EntityCamera.java:31) ~[EntityCamera.class:?] at com.leomelonseeds.moarstuff.entity.EntityCamera.<init>(EntityCamera.java:37) ~[EntityCamera.class:?] at com.leomelonseeds.moarstuff.entity.SomeSpawnCallBack.apply(SomeSpawnCallBack.java:29) ~[SomeSpawnCallBack.class:?] at com.leomelonseeds.moarstuff.entity.SomeSpawnCallBack.apply(SomeSpawnCallBack.java:1) ~[SomeSpawnCallBack.class:?] at net.minecraftforge.fml.common.registry.EntityRegistry$EntityRegistration.doCustomSpawning(EntityRegistry.java:112) ~[EntityRegistry$EntityRegistration.class:?] at net.minecraftforge.fml.common.network.internal.EntitySpawnHandler.spawnEntity(EntitySpawnHandler.java:93) [EntitySpawnHandler.class:?] at net.minecraftforge.fml.common.network.internal.EntitySpawnHandler.process(EntitySpawnHandler.java:73) [EntitySpawnHandler.class:?] at net.minecraftforge.fml.common.network.internal.EntitySpawnHandler.access$000(EntitySpawnHandler.java:48) [EntitySpawnHandler.class:?] at net.minecraftforge.fml.common.network.internal.EntitySpawnHandler$1.run(EntitySpawnHandler.java:63) [EntitySpawnHandler$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_25] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_25] at net.minecraft.util.Util.runTask(Util.java:25) [Util.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1108) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:406) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] 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_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Code: package com.leomelonseeds.moarstuff.entity; import com.google.common.base.Function; import net.minecraft.client.multiplayer.WorldClient; import net.minecraft.entity.Entity; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.client.FMLClientHandler; import net.minecraftforge.fml.common.network.internal.FMLMessage.EntitySpawnMessage; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class SomeSpawnCallBack implements Function<EntitySpawnMessage, Entity> { WorldClient wc = FMLClientHandler.instance ().getWorldClient (); public BlockPos pos; public EnumFacing facing; public String title; @Override public Entity apply(EntitySpawnMessage m) { System.out.println(m); EntityCamera entityC = new EntityCamera(wc, pos, facing, title); return entityC; } } For message m, im getting this: [16:45:09] [Client thread/INFO] [STDOUT]: [com.leomelonseeds.moarstuff.entity.SomeSpawnCallBack:apply:28]: net.minecraftforge.fml.common.network.internal.FMLMessage$EntitySpawnMessage@2e04d682
  3. Ohhhhhhhhh.... I get what you mean. Ill try that out.
  4. OK in your ENTITY class, call get EntityID. Get the ID in the GUI HANDLER.
  5. Well if the potin effect applied runs out, just reset it.
  6. Its still giving me this: [12:28:34] [Client thread/ERROR] [FML]: Caught exception from Moar Stuff (moarstuff) java.lang.NullPointerException at com.leomelonseeds.moarstuff.ClientProxy.init(ClientProxy.java:65) ~[bin/:?] at com.leomelonseeds.moarstuff.Main.init(Main.java:33) ~[bin/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:602) ~[forgeSrc-1.10.2-12.18.3.2185.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:243) ~[forgeSrc-1.10.2-12.18.3.2185.jar:?] at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:221) ~[forgeSrc-1.10.2-12.18.3.2185.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:145) [LoadController.class:?] at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:795) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:324) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] 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_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] When i try to open game. ClientProxy: package com.leomelonseeds.moarstuff; import com.leomelonseeds.moarstuff.blocks.BlockMegaTNT; import com.leomelonseeds.moarstuff.blocks.BlockNuke; import com.leomelonseeds.moarstuff.blocks.Modblocks; import com.leomelonseeds.moarstuff.client.render.blocks.BlockRenderRegister; import com.leomelonseeds.moarstuff.client.render.blocks.TileGrillRenderer; import com.leomelonseeds.moarstuff.client.render.entity.RenderMegaTNTPrimed; import com.leomelonseeds.moarstuff.client.render.entity.RenderNukePrimed; import com.leomelonseeds.moarstuff.client.render.items.ItemRenderRegister; import com.leomelonseeds.moarstuff.entity.EntityCamera; import com.leomelonseeds.moarstuff.entity.MegaTNTPrimed; import com.leomelonseeds.moarstuff.entity.ModLivingDropsEvent; import com.leomelonseeds.moarstuff.entity.NukePrimed; import com.leomelonseeds.moarstuff.entity.SomeSpawnCallBack; import com.leomelonseeds.moarstuff.tileentity.Grill; import net.minecraft.block.properties.IProperty; import net.minecraft.client.renderer.block.statemap.StateMap; import net.minecraft.item.Item; import net.minecraftforge.client.ForgeHooksClient; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.client.registry.RenderingRegistry; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.ModContainer; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.EntityRegistry; import net.minecraftforge.fml.common.registry.EntityRegistry.EntityRegistration; public class ClientProxy extends CommonProxy { ModContainer container = Loader.instance ().getIndexedModList ().get (Main.MODID); EntityRegistration registration = EntityRegistry.instance ().lookupModSpawn (container, 0); @Override public void preInit(FMLPreInitializationEvent e){ super.preInit(e); ModelLoader.setCustomStateMapper(Modblocks.megatnt, (new StateMap.Builder()).ignore(new IProperty[] {BlockMegaTNT.EXPLODE}).build()); ModelLoader.setCustomStateMapper(Modblocks.nuke, (new StateMap.Builder()).ignore(new IProperty[] {BlockNuke.EXPLODE}).build()); RenderingRegistry.registerEntityRenderingHandler(NukePrimed.class, RenderNukePrimed::new); RenderingRegistry.registerEntityRenderingHandler(MegaTNTPrimed.class, RenderMegaTNTPrimed::new); MinecraftForge.EVENT_BUS.register(new ModLivingDropsEvent()); } @Override public void init(FMLInitializationEvent e) { super.init(e); BlockRenderRegister.registerBlockRenderer(); ItemRenderRegister.registerItemRenderer(); EntityRegistry.registerModEntity(MegaTNTPrimed.class, "megatnt", 1, Main.instance, 160, 10, true); EntityRegistry.registerModEntity(NukePrimed.class, "nuke", 2, Main.instance, 160, 10, true); EntityRegistry.registerModEntity(EntityCamera.class, "camera", 3, Main.instance, 100000, 30, false); ClientRegistry.bindTileEntitySpecialRenderer(Grill.class, new TileGrillRenderer()); ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(Modblocks.grill), 0, Grill.class); registration.setCustomSpawning(new SomeSpawnCallBack(), false); } @Override public void postInit(FMLPostInitializationEvent e) { super.postInit(e); } }
  7. Well you can increase the attack speed using attribute modifiers
  8. Why are you creating a new topic for your problem? Use the old one PLEASE.
  9. Ok check this out: https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/mbe31_inventory_furnace/GuiHandlerMBE31.java
  10. Look! Post your ContainerBasic and GUIHandler classes please
  11. Why is your minecraft deobfuscated? Did you run gradlew setupDecompWorkspace and gradlew Eclipse correctly?
  12. Wait I put this: public ModContainer container = Loader.instance ().getIndexedModList ().get (Main.MODID); EntityRegistration registration = EntityRegistry.instance ().lookupModSpawn (container, 0); Does that work? Cause it errors when I copyPaste yours in there.
  13. And its the exact same log when you try GradleStart?
  14. Post that crash log. Are you using the recommended verision of forge?
  15. Can you run it in normal mode, not debug? Also, does serverside work?
  16. Well look at the horse code. It implements IInventoryChangedListener, so you will probably want to implement that too.
  17. Try looking at the class EntityHorse to see how it opens the GUI of the horse. EDIT: found something at line 750
  18. Try making your register function public in your ModEntities class
  19. Ok I changed my code to this: package com.leomelonseeds.moarstuff.entity; import com.google.common.base.Function; import net.minecraft.entity.Entity; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.common.network.internal.FMLMessage.EntitySpawnMessage; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import com.leomelonseeds.moarstuff.entity.EntityCamera; @SideOnly(Side.CLIENT) public class SomeSpawnCallBack implements Function<EntitySpawnMessage, Entity> { public World worldIn; public BlockPos pos; public EnumFacing facing; public String title; @Override public Entity apply(EntitySpawnMessage m) { System.out.println(m); EntityCamera entityC = new EntityCamera(worldIn, pos, facing, title); return entityC; } } But now its giving me a null pointer exeption for this line: registration.setCustomSpawning( new SomeSpawnCallBack (), false);
  20. Does nobody know the answer to these questions? Also yay Im a diamond finder now
  21. Well, some examples please? Like, what do I put for worldIn?
  22. -Shoudn't ClientProxy EXTEND CommonProxy? -In each eventhandler of your main mod class, you need proxy.init(event); (or preinit, postinit)
×
×
  • Create New...

Important Information

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