Jump to content

mat44

Members
  • Posts

    8
  • Joined

  • Last visited

mat44's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thanks for the advice! After some tweaking it seems like it was my pack.mcmeta , which had a json error (a comma in the last element of a list). The reason i did not include my gradle stuff in the repo is because theyre the default ones.
  2. Yes https://github.com/MatCorgi/PrefixChat
  3. When running my mod in eclipse it works fine but after i've builded it and put it in a normal minecraft instance it doesnt work [18:53:30] [main/FATAL] [FML]: There is a severe problem with prefixchat - it appears not to have constructed correctly [18:53:30] [main/ERROR] [FML]: Could not dispatch event: public void net.minecraftforge.fml.common.LoadController.propogateStateMessage(net.minecraftforge.fml.common.event.FMLEvent) to java.lang.NullPointerException [18:53:30] [main/FATAL] [FML]: Fatal errors were detected during PREINITIALIZATION. Loading cannot continue. [18:53:30] [main/FATAL] [FML]: States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored | State | ID | Version | Source | Signature | |:----- |:---------- |:------------ |:--------------------------------------- |:---------------------------------------- | | U | minecraft | 1.12.2 | minecraft.jar | None | | U | mcp | 9.42 | minecraft.jar | None | | U | FML | 8.0.99.99 | forge-1.12.2-14.23.3.2655-universal.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 | | U | forge | 14.23.3.2655 | forge-1.12.2-14.23.3.2655-universal.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 | | U | prefixchat | 1.0 | prefixchat-1.0.jar | None | [18:53:30] [main/FATAL] [FML]: The following problems were captured during this phase [18:53:30] [main/ERROR] [FML]: Caught exception from prefixchat (null) java.lang.RuntimeException: null at net.minecraftforge.fml.common.LoadController.buildModObjectList(LoadController.java:314) ~[LoadController.class:?] at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:250) [LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171] 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:148) [LoadController.class:?] at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:602) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:270) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:466) [bib.class:?] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:377) [bib.class:?] at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171] 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_171] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_171] at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?] at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?] at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?] at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]
  4. Thanks! I tried that before but i was getting a error, probably because i didn't have the extends CommandBase part.
  5. Is there any way to make it only run with the prefix? main package rf.mat.prefixchat; import net.minecraft.client.Minecraft; import net.minecraft.command.ICommand; import net.minecraft.init.Blocks; import net.minecraftforge.client.ClientCommandHandler; import net.minecraftforge.client.event.ClientChatEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @Mod(modid = PrefixChat.MODID, name = PrefixChat.NAME, version = PrefixChat.VERSION) public class PrefixChat { public static final String MODID = "prefixchat"; public static final String NAME = "Chat prefix"; public static final String VERSION = "0.1"; private boolean hasPrefix; public PrefixChat() { this.hasPrefix = false; } @EventHandler public void preInit(FMLInitializationEvent event) { FMLCommonHandler.instance().bus().register(this); MinecraftForge.EVENT_BUS.register(this); ClientCommandHandler.instance.registerCommand(new testCMD()); } } command class package rf.mat.prefixchat; import net.minecraft.command.*; import net.minecraft.server.MinecraftServer; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextComponentString; import net.minecraftforge.client.IClientCommand; public class testCMD extends CommandBase { private void showMessage(final String message, final ICommandSender sender) { sender.sendMessage((ITextComponent)new TextComponentString(message)); } @Override public String getName() { return "test"; } @Override public String getUsage(ICommandSender sender) { return "test testing!"; } @Override public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { // TODO showMessage("testing.",sender); } @Override public boolean checkPermission(MinecraftServer server, ICommandSender sender) { return true; } }
  6. I would like to get every message the player types in the chat and "process" it to then send to chat later. How would i do such a thing?
  7. I've been looking for the tellraw command class file in net.minecraft.command package and i cant seem to find it
  8. When i try to compile my mod using gradlew build it fails the build and at the top it says: (use -source 8 or higher to enable lambda expressions) but then when i try to do gradlew build -source 8 it doesnt work
×
×
  • Create New...

Important Information

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