Everything posted by Novârch
-
[1.16.1] World save file
Why do you even need this? Maybe there is a better way to accomplish what you want.
-
1.16.1 Custom Entity attributes
Make your own thread and post what you've tried.
-
[Solved] [1.15.2] Trouble making a custom inventory attached to the player
As I said, the cap variable isn't equal to your capability because your capability is null in your IDE, it gets a value at runtime through magic annotation bs (@CapabilityInject).
-
[Solved] [1.15.2] Trouble making a custom inventory attached to the player
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...
-
Error when starting mod server
Or in the words of LexManos,
-
[1.15.2] How to render a custom model for custom Arrow?
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?
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).
-
[1.15.2] Custom Weapon models
Export to .json from Blockbench to this file path Project/src/main/resources/assets/"insert modid here"/models/item/"item_name_here".json.
-
Help with stairs (JSON Files) [1.15.2]
It is, on an unrelated note, you shouldn't post log files directly to GitHub, instead post them to https://gist.github.com/.
-
Using vanilla Minecraft textures
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
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
I need a file called debug.log.
-
[1.16.1] Advancement quantity criterion
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
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.
-
Help with stairs (JSON Files) [1.15.2]
Nope.
-
The texture of the weapons is not seen (only when I throw or take it) and I cannot aim
If this isn't your mod, you should report this to the dev, Forge has nothing to do with independent mods.
-
Mod using minecraft magma
You still have to specify them in the build.gradle.
-
[1.16.1] The Book of Minecraft Modding - complete guide for beginners
RegistryEvent, don't use vanilla registration if there is a Forge version available.
-
Extra Utilities Not All Content Showing Up
1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
[1.15.2] I revamped some classes and I would like to know, why my stuff broke.
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,
-
Bypassing Max Enchant Level
You could try using AnvilRepairEvent and set the tool's NBT there manually.
-
Create Shovel Item
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.
-
[1.16.1] Advancement quantity criterion
Show the class your event is in, I suspect you didn't call IEventBus#addListener(Consumer<T extends Event>) or annotate it with @SubscribeEvent.
-
Attaching models to a player
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
You don't.
IPS spam blocked by CleanTalk.