-
Posts
6157 -
Joined
-
Last visited
-
Days Won
59
Everything posted by Animefan8888
-
Several ways. Why not take a look at the net.minecraftforge.event package and sub-packages? There is definitely an event for what you want.
-
[1.14.4] ReportedException: Saving entity NBT
Animefan8888 replied to andGarrett's topic in Modder Support
I'm sorry what? Its Nonnull and part of a NonNullSupplier but you're returning null... Also did you make sure to register your Capability. -
[1.12.2] Odd Generation with Ores
Animefan8888 replied to minecraftSteveAteMyCat's topic in Modder Support
That's your problem. -
Of course it is.
-
-
[SOLVED] [1.12.2] NBT writing/reading for List
Animefan8888 replied to Differentiation's topic in Modder Support
JSonArray probably. -
[1.14.4] [Solved] Looking for the right event
Animefan8888 replied to Elrol_Arrowsend's topic in Modder Support
Considering that the register event is running on that bus you will need two event handlers. -
[SOLVED] [1.12.2] NBT writing/reading for List
Animefan8888 replied to Differentiation's topic in Modder Support
No you cannot. The server doesn't have capabilities. Because there is only one server in question. It's not that complicated... Use events such as ServerStartingEvent to create a file if it doesnt exist(muted.json). Then whenever you run your mute command save the data to the file using Gson. If you dont want it to save when you run the command use the ServerStoppingEvent to save the data you have. -
[1.14.4] [Solved] Looking for the right event
Animefan8888 replied to Elrol_Arrowsend's topic in Modder Support
This is not true as there are two different event buses. The mod event bus is incorrect for this event. Either dont specify one or change it to Bus.FORGE(the default one). -
@SubscribeEvent public static void onCommonSetup(FMLCommonSetupEvent event) { CapabilityManager.INSTANCE.register(IMoreHealth.class, new MoreHealthStorage(), MoreHealth::new); } This won't run I don't think. You should register it in your constructor like so. FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onCommonSetup);
-
[SOLVED] [1.12.2] NBT writing/reading for List
Animefan8888 replied to Differentiation's topic in Modder Support
Think basic Java file creation. Look up some tutorials on Gson if you need it. Use the ServerStartingEvent or ServerStartedEvent. Then everytime the command is run update the file. -
Learn java. Do you know the difference between a static method and a non static method?
-
[SOLVED] Mana game mechanic in 1.14.4 help
Animefan8888 replied to cinsiian's topic in Modder Support
LazyOptional is the type that you need to return yes. But is IMana a LazyOptional instance? No therefore you can't cast it into a LazyOptional. You need to have a LazyOptional instance in your ICapabilityProvider. -
[SOLVED] Mana game mechanic in 1.14.4 help
Animefan8888 replied to cinsiian's topic in Modder Support
Your IMana instance in your provider can't be static if you are gonna use MANA.getDefaultInstance(). You can't do this either don't know if I'm looking at outdated code or not. -
[SOLVED] Mana game mechanic in 1.14.4 help
Animefan8888 replied to cinsiian's topic in Modder Support
You might not understand how a LazyOptional works take a look at this thread. -
[SOLVED] [1.12.2] NBT writing/reading for List
Animefan8888 replied to Differentiation's topic in Modder Support
You dont. ops.json is for oped players you wouldn't use it for this. Create a file in the server directory called muted.json and save that file when the world saves? You would use the Gson library minecraft uses for its json interactions. I dont think the vanilla ban command let's you ban people that aren't online unless it's with IPs.