-
Posts
422 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Novârch
-
Why do you even need this? Maybe there is a better way to accomplish what you want.
-
Make your own thread and post what you've tried.
-
Okay, a few things. Provider#getCapability should return this, capability == CAPABILITY ? lazyOptional.cast() : LazyOptional.empty() You should use LazyOptional#cast instead of a real cast. Btw, the reason it says that's always false is because it's currently null, it only gets a value at runtime through magic annotation bs. As for your serialize and deserialize NBT methods, you shouldn't write to the capability, you should write to its storage, something like this, @Override public INBT serializeNBT() { return CAPABILITY.getStorage().writeNBT(CAPABILITY, lazyOptional.orElseThrow(() -> new IllegalArgumentException("LazyOptional is empty!")), null); } @Override public void deserializeNBT(INBT nbt) { CAPABILITY.getStorage().readNBT(CAPABILITY, lazyOptional.orElseThrow(() -> new IllegalArgumentException("LazyOptional is empty!")), null, nbt); } Edit: ...I have no idea what happened to the second example's formatting...
-
Or in the words of LexManos,
-
[1.15.2] How to render a custom model for custom Arrow?
Novârch replied to ViktorNguyen's topic in Modder Support
There is none. As I said, take a look at how vanilla does it (WolfModel, WolfRenderer, etc.). -
[1.15.2] How to render a custom model for custom Arrow?
Novârch replied to ViktorNguyen's topic in Modder Support
Look at how vanilla makes models, or use a model creator like Blockbench. Remember that your model won't render if you don't override createSpawnPacket and return NetworksHooks.getEntitySpawningPacket(this). -
Export to .json from Blockbench to this file path Project/src/main/resources/assets/"insert modid here"/models/item/"item_name_here".json.
-
It is, on an unrelated note, you shouldn't post log files directly to GitHub, instead post them to https://gist.github.com/.
-
You should, but just in case you need some vanilla assets, you can use a ResourceLocation with "minecraft" as the first parameter, than the path of the asset.
-
Encountered an error during the load_registries event phase 1.14.4
Novârch replied to HangerThem's topic in Modder Support
I need a file called debug.log. Edit: For some reason this got posted twice? Forum glitches. -
Encountered an error during the load_registries event phase 1.14.4
Novârch replied to HangerThem's topic in Modder Support
I need a file called debug.log. -
That should work, is it possible you just missed the message? Pro tip if you're logging in a spammy log, do something like this to ensure you can see you're message, for (int i = 0; i < 1000; i++) LogManager.getLogger().debug("Common setup fired!"); Please remove it before publishing your mod though.
-
Encountered an error during the load_registries event phase 1.14.4
Novârch replied to HangerThem's topic in Modder Support
You're trying to register a String to the Event bus, I can't even fathom why someone would do this. Please post your debug.log, before you ask where it's located, your OS's file explorer has a search function. -
Nope.
-
You still have to specify them in the build.gradle.
-
Extra Utilities Not All Content Showing Up
Novârch replied to boston333410's topic in Support & Bug Reports
1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. -
https://github.com/Tavi007/ElementalCombat/blob/1390c4b3be278d93c6be25369ac14cb8f7e74b68/1.15.2/src/main/java/Tavi007/ElementalCombat/StartupCommon.java#L26 Your FMLCommonSetupEvent isn't annotated with @SubscribeEvent , it's never called. https://github.com/Tavi007/ElementalCombat/blob/1390c4b3be278d93c6be25369ac14cb8f7e74b68/1.15.2/src/main/java/Tavi007/ElementalCombat/events/AttachCapabilityEvent.java#L14 For events to be called, you have to register them to the event bus by calling IEventBus#register, you never call MinecraftForge.EVENT_BUS.register(new AttachCapabilityEvent), so it doesn't fire. Maybe you can put the ResourceLocation as a parameter in your constructor? I haven't worked with particles myself, just an assumption. I don't think you should, they're all small issues that can be tackled in one post instead of spamming the forums with small 1 reply threads. Edit: Dzuchun is also correct, though you don't have to use @Mod.EventBusSubscriber if you're methods aren't static, but you still have to register an instance of your class. Edit 2: Btw, you can't really have both FMLCommonSetupEvent and ServerAboutToStartEvent in the same @Mod.EventBusSubscriber annotated class as they fire on separate buses, FMLCommonSetupEvent fires on the mod bus, ServerAboutToStartEvent on the Forge bus. Edit 3: This is from the Forge discord,
-
You could try using AnvilRepairEvent and set the tool's NBT there manually.
-
You're missing an IItemTier, float attackDamage and a float attackSpeed, all of these things are basic Java and you do not need to ask about them. Please look at the constructor, unless you're blind it has everything you need, your IDE should even give you a warning and tell you what you didn't put into the constructor. In short, please learn basic Java before modding.
-
Show the class your event is in, I suspect you didn't call IEventBus#addListener(Consumer<T extends Event>) or annotate it with @SubscribeEvent.
-
This class from MrCrayfish's Backpacked mod might be useful, it renders a backpack attached to the player.
-
i get this error while i try to load mekanism mod
Novârch replied to hercules_mc's topic in Support & Bug Reports
You don't.