Relative Content

Tag Archive for minecraftminecraft-forge

How to get yaw and pitch of the closest chosen block in 1.16.5 forge

im trying to get yaw and pitch of a chosen block by me (lets say for example it will be dirt) to later make player rotate towards them. I cant use anything with world or server beacause what i want to do is client-sided only. What can i use to achieve that? Any help will be nice!

Minecraft Forge problems with creating items

I am new to forge and trying to create an item. However, I am getting this error:
[10:55:52] [Client thread/ERROR] [FML]: Exception loading model for variant abrasmagics:ingot_test#inventory for item "abrasmagics:ingot_test", normal location exception: net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model abrasmagics:item/ingot_test with loader VanillaLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:161) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:302) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:175) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:151) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:121) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:513) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:378) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_381] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_381] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_381] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_381] 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_381] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_381] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_381] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_381] at net.minecraftforge.legacydev.Main.start(Main.java:86) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] Caused by: java.io.FileNotFoundException: abrasmagics:models/item/ingot_test.json at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:69) ~[SimpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:334) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.access$1400(ModelLoader.java:115) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:861) ~[ModelLoader$VanillaLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:157) ~[ModelLoaderRegistry.class:?]

Forge How to determine if item is a Block

I am writing a Forge mod for 1.20 and I already have a function to determine if an itemstack is a block. However, all placeable items are seen as a block like fences. In my usage, however, only block-shaped blocks should really be identified as blocks. Can anyone help me with this?

Forge How to display content of Container

I have recently started with Java and the implementation of Minecraft mods. I am currently working on a mod for 1.20.4-49.0.31
I’m trying to get the content of each slot in the console to be displayed when the inventory is opened, which works. In addition, I wanted to do the same with chests (in this case containers). However, I get in the output that there is Air at every slot of the chest, even if the chest is filled.
Does anyone have experience with similar problems and could help me?

1.20 Minecraft Forge Bed Model not lining with Boundry box

Another issue. My Bed model is not lining up properly with the boundary box. IT works perfectly when facing south or east, but facing north or west puts the block one block towards east or south. So the model and the block boundary do not line up.