Jump to content

Custom Flower - Texture only shows up for the item but not the block


Recommended Posts

Posted

Good evening fellow devs.

 

I've been sitting on this issue since 4 hours, and it's really frustrating because I'm sure it's probably just a really obvious error.

I made a custom flower model. (I have already made a custom workbench, and for this one everything worked just fine, so I followed the steps I did for the workbench)

However, the model only shows for the ItemBlock in the Inventory. When I place the block down, I get a missing texture

 

So, here is my BlockBaseSunflower class:

Spoiler
package com.korlimann.sushimod.blocks;

import com.korlimann.sushimod.Main;
import com.korlimann.sushimod.util.IHasModel;

import net.minecraft.block.BlockFlower;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.Item;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;

public class BlockBaseSunflower extends BlockFlower implements IHasModel {

	
	public BlockBaseSunflower(String name) {
		setRegistryName(name);
		setUnlocalizedName(name);
		setCreativeTab(Main.korlissushicraft);
	}
	
	@Override
	public void registerModels() {
		Main.proxy.registerItemRenderer(Item.getItemFromBlock(this), 0, "inventory");
	}

	@Override
	public EnumFlowerColor getBlockType() {
		return EnumFlowerColor.YELLOW;
	}
	
    public static final AxisAlignedBB AABB = new AxisAlignedBB(0.1875D,0,0.1875D,0.8215D,1D,0.8215D);
    
    @Override
    public BlockRenderLayer getBlockLayer() {
        return BlockRenderLayer.CUTOUT;
    }
    
    @Override
    public boolean isOpaqueCube(IBlockState state) 
    {
        return false;
    }
    
    @Override
    public boolean isFullCube(IBlockState state) 
    {
        return false;
    }
    
    @Override
    public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) 
    {
        return AABB;
    }
    
}

 

 

I created three jsons.

One for the item, located in assets/[modid](in my case sm)/models/items/sunflower.json

One for the block, located in assets/sm/models/blocks/sunflower.json

And one for the blockstates, located in assets/sm/blockstates

 

Here are the three json files:

item:

Spoiler

package com.korlimann.sushimod.blocks;

import com.korlimann.sushimod.Main;
import com.korlimann.sushimod.util.IHasModel;

import net.minecraft.block.BlockFlower;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.Item;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;

public class BlockBaseSunflower extends BlockFlower implements IHasModel {

	
	public BlockBaseSunflower(String name) {
		setRegistryName(name);
		setUnlocalizedName(name);
		setCreativeTab(Main.korlissushicraft);
	}
	
	@Override
	public void registerModels() {
		Main.proxy.registerItemRenderer(Item.getItemFromBlock(this), 0, "inventory");
	}

	@Override
	public EnumFlowerColor getBlockType() {
		return EnumFlowerColor.YELLOW;
	}
	
    public static final AxisAlignedBB AABB = new AxisAlignedBB(0.1875D,0,0.1875D,0.8215D,1D,0.8215D);
    
    @Override
    public BlockRenderLayer getBlockLayer() {
        return BlockRenderLayer.CUTOUT;
    }
    
    @Override
    public boolean isOpaqueCube(IBlockState state) 
    {
        return false;
    }
    
    @Override
    public boolean isFullCube(IBlockState state) 
    {
        return false;
    }
    
    @Override
    public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) 
    {
        return AABB;
    }
    
}

 

 

block:

Spoiler

{
    "credit": "Made with Blockbench, a free, modern block model editor by JannisX11",
    "textures": {
        "0": "sm:blocks/sunflower",
        "particle": "sm:blocks/sunflower"
    },
    "elements": [
        {
            "name": "cube",
            "from": [7.5, 0, 7.5],
            "to": [8.5, 15, 8.5],
            "faces": {
                "north": {"uv": [1, 4, 1.5, 11.5], "texture": "#0"},
                "east": {"uv": [1, 4, 1.5, 11.5], "texture": "#0"},
                "south": {"uv": [1, 4, 1.5, 11.5], "texture": "#0"},
                "west": {"uv": [1, 4, 1.5, 11.5], "texture": "#0"},
                "up": {"uv": [0, 0, 1, 1], "texture": "#0"},
                "down": {"uv": [0, 0, 1, 1], "texture": "#0"}
            },
            "type": "cube"
        },
        {
            "name": "cube",
            "from": [3, 15, 3],
            "to": [13, 16, 13],
            "faces": {
                "north": {"uv": [14, 4, 14.5, 9], "texture": "#0"},
                "east": {
                    "uv": [14, 4, 14.5, 9],
                    "texture": "#0",
                    "rotation": 90
                },
                "south": {"uv": [14, 4, 14.5, 9], "texture": "#0"},
                "west": {"uv": [14, 4, 14.5, 9], "texture": "#0"},
                "up": {"uv": [9, 4, 14, 9], "texture": "#0"},
                "down": {"uv": [4, 4, 9, 9], "texture": "#0"}
            },
            "rotation": {
                "origin": [8, 8, 8],
                "axis": "x",
                "angle": 0
            },
            "type": "cube"
        }
    ],
    "display": {
        "fixed": {
            "scale": [1, 1, 1],
            "rotation": [0, 180, 0],
            "translation": [0, 0, 0]
        },
        "gui": {
            "scale": [0.625, 0.625, 0.625],
            "rotation": [30, 225, 0],
            "translation": [0, 0, 0]
        }
    }
}

 

and blockstates:

Spoiler

{
    "variants": {
        "normal": { "model": "sm:sunflower" }
    }
}

 

I believe that there's a problem with the blockstates, because the ItemBlock in the inventory seems to work fine, but I couldn't figure it out yet.

When I start the game, I get an exception for the model, but I don't know what to do about it

log:

Spoiler

2018-02-16 21:04:25,719 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2018-02-16 21:04:25,722 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[21:04:25] [main/INFO] [GradleStart]: username: yutendohd@gmail.com
[21:04:25] [main/INFO] [GradleStart]: Extra: []
[21:04:25] [main/INFO] [GradleStart]: Password found, attempting login
[21:04:25] [main/INFO]: Logging in with username & password
[21:04:26] [main/INFO] [GradleStart]: Login Succesful!
[21:04:26] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, [], --assetsDir, C:/Users/stefa/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --userType, mojang, --accessToken{REDACTED}, --version, 1.12.2, --uuid, c100c5fcedb64104a4b51a3e38bc95f4, --username, Korlimann, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[21:04:26] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[21:04:26] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[21:04:26] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[21:04:26] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[21:04:26] [main/INFO] [FML]: Forge Mod Loader version 14.23.2.2611 for Minecraft 1.12.2 loading
[21:04:26] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_162, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_162
[21:04:26] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[21:04:26] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin
[21:04:26] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin
[21:04:26] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[21:04:26] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[21:04:26] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[21:04:26] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[21:04:26] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[21:04:26] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[21:04:26] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[21:04:26] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[21:04:26] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
2018-02-16 21:04:27,002 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2018-02-16 21:04:27,287 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2018-02-16 21:04:27,289 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[21:04:28] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[21:04:28] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[21:04:28] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[21:04:28] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[21:04:28] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[21:04:28] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[21:04:28] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[21:04:29] [main/INFO]: Setting user: Korlimann
[21:04:32] [main/WARN]: Skipping bad option: lastServer:
[21:04:32] [main/INFO]: LWJGL Version: 2.9.4
[21:04:33] [main/INFO] [FML]: -- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_162, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 727684776 bytes (693 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: 
	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 390.65' Renderer: 'GeForce GTX 1060 6GB/PCIe/SSE2'
[21:04:33] [main/INFO] [FML]: MinecraftForge v14.23.2.2611 Initialized
[21:04:33] [main/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients.
[21:04:33] [main/INFO] [FML]: Replaced 1036 ore ingredients
[21:04:33] [main/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[21:04:33] [main/INFO] [FML]: Searching C:\Users\stefa\Desktop\Mods\SushiMod\run\mods for mods
[21:04:34] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
[21:04:34] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, sm] at CLIENT
[21:04:34] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, sm] at SERVER
[21:04:35] [main/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Sushi Mod
[21:04:35] [main/INFO] [FML]: Processing ObjectHolder annotations
[21:04:35] [main/INFO] [FML]: Found 1168 ObjectHolder annotations
[21:04:35] [main/INFO] [FML]: Identifying ItemStackHolder annotations
[21:04:35] [main/INFO] [FML]: Found 0 ItemStackHolder annotations
[21:04:35] [main/INFO] [FML]: Configured a dormant chunk cache size of 0
[21:04:35] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[21:04:35] [main/INFO] [FML]: Applying holder lookups
[21:04:35] [main/INFO] [FML]: Holder lookups applied
[21:04:35] [main/INFO] [FML]: Applying holder lookups
[21:04:35] [main/INFO] [FML]: Holder lookups applied
[21:04:35] [main/INFO] [FML]: Applying holder lookups
[21:04:35] [main/INFO] [FML]: Holder lookups applied
[21:04:35] [main/INFO] [FML]: Applying holder lookups
[21:04:35] [main/INFO] [FML]: Holder lookups applied
[21:04:35] [main/INFO] [FML]: Injecting itemstacks
[21:04:35] [main/INFO] [FML]: Itemstack injection complete
[21:04:35] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 90438386 nanos
[21:04:35] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Found status: UP_TO_DATE Target: null
[21:04:37] [Sound Library Loader/INFO]: Starting up SoundSystem...
[21:04:37] [Thread-5/INFO]: Initializing LWJGL OpenAL
[21:04:37] [Thread-5/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[21:04:37] [Thread-5/INFO]: OpenAL initialized.
[21:04:37] [Sound Library Loader/INFO]: Sound engine started
[21:04:41] [main/INFO] [FML]: Max texture size: 16384
[21:04:42] [main/INFO]: Created: 512x512 textures-atlas
[21:04:42] [main/ERROR] [FML]: Exception loading model for variant sm:messer#inventory for item "sm:messer", normal location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model sm:item/messer with loader VanillaLoader.INSTANCE, skipping
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
	at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:314) ~[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:164) ~[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:559) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
	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_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: java.io.FileNotFoundException: sm:models/item/messer.json
	at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:69) ~[FallbackResourceManager.class:?]
	at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:65) ~[SimpleReloadableResourceManager.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:334) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.access$1600(ModelLoader.java:130) ~[ModelLoader.class:?]
	at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:880) ~[ModelLoader$VanillaLoader.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
	... 20 more
[21:04:42] [main/ERROR] [FML]: Exception loading model for variant sm:messer#inventory for item "sm:messer", blockstate location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model sm:messer#inventory with loader VariantLoader.INSTANCE, skipping
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
	at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:322) ~[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:164) ~[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:559) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
	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_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
	at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:83) ~[ModelBlockDefinition.class:?]
	at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1189) ~[ModelLoader$VariantLoader.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
	... 20 more
[21:04:42] [main/ERROR] [FML]: Exception loading model for variant sm:nudelholz#inventory for item "sm:nudelholz", normal location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model sm:item/nudelholz with loader VanillaLoader.INSTANCE, skipping
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
	at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:314) ~[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:164) ~[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:559) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
	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_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: java.io.FileNotFoundException: sm:models/item/nudelholz.json
	at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:69) ~[FallbackResourceManager.class:?]
	at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:65) ~[SimpleReloadableResourceManager.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:334) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.access$1600(ModelLoader.java:130) ~[ModelLoader.class:?]
	at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:880) ~[ModelLoader$VanillaLoader.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
	... 20 more
[21:04:42] [main/ERROR] [FML]: Exception loading model for variant sm:nudelholz#inventory for item "sm:nudelholz", blockstate location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model sm:nudelholz#inventory with loader VariantLoader.INSTANCE, skipping
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
	at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:322) ~[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:164) ~[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:559) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
	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_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
	at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:83) ~[ModelBlockDefinition.class:?]
	at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1189) ~[ModelLoader$VariantLoader.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
	... 20 more
[21:04:42] [main/ERROR] [FML]: Exception loading model for variant sm:pfanne#inventory for item "sm:pfanne", normal location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model sm:item/pfanne with loader VanillaLoader.INSTANCE, skipping
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
	at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:314) ~[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:164) ~[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:559) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
	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_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: java.io.FileNotFoundException: sm:models/item/pfanne.json
	at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:69) ~[FallbackResourceManager.class:?]
	at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:65) ~[SimpleReloadableResourceManager.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:334) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.access$1600(ModelLoader.java:130) ~[ModelLoader.class:?]
	at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:880) ~[ModelLoader$VanillaLoader.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
	... 20 more
[21:04:42] [main/ERROR] [FML]: Exception loading model for variant sm:pfanne#inventory for item "sm:pfanne", blockstate location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model sm:pfanne#inventory with loader VariantLoader.INSTANCE, skipping
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
	at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:322) ~[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:164) ~[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:559) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
	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_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
	at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:83) ~[ModelBlockDefinition.class:?]
	at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1189) ~[ModelLoader$VariantLoader.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
	... 20 more
[21:04:42] [main/ERROR] [FML]: Exception loading model for variant sm:sunflower#type=dandelion for blockstate "sm:sunflower[type=dandelion]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model sm:sunflower#type=dandelion with loader VariantLoader.INSTANCE, skipping
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
	at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:248) ~[ModelLoader.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:236) ~[ModelLoader.class:?]
	at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:163) ~[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:559) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
	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_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
	at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:83) ~[ModelBlockDefinition.class:?]
	at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1189) ~[ModelLoader$VariantLoader.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
	... 21 more
[21:04:42] [main/FATAL] [FML]: Suppressed additional 15 model loading errors for domain sm
[21:04:43] [main/INFO] [FML]: Applying holder lookups
[21:04:43] [main/INFO] [FML]: Holder lookups applied
[21:04:43] [main/INFO] [FML]: Injecting itemstacks
[21:04:43] [main/INFO] [FML]: Itemstack injection complete
[21:04:43] [main/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods
[21:04:43] [main/WARN]: Skipping bad option: lastServer:
[21:04:43] [main/INFO]: Narrator library for x64 successfully loaded
[21:04:43] [main/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
[21:04:43] [main/ERROR] [TEXTURE ERRORS]: The following texture errors were found.
[21:04:43] [main/ERROR] [TEXTURE ERRORS]: ==================================================
[21:04:43] [main/ERROR] [TEXTURE ERRORS]:   DOMAIN sm
[21:04:43] [main/ERROR] [TEXTURE ERRORS]: --------------------------------------------------
[21:04:43] [main/ERROR] [TEXTURE ERRORS]:   domain sm is missing 1 texture
[21:04:43] [main/ERROR] [TEXTURE ERRORS]:     domain sm has 1 location:
[21:04:43] [main/ERROR] [TEXTURE ERRORS]:       mod sm resources at C:\Users\stefa\Desktop\Mods\SushiMod\bin
[21:04:43] [main/ERROR] [TEXTURE ERRORS]: -------------------------
[21:04:43] [main/ERROR] [TEXTURE ERRORS]:     The missing resources for domain sm are:
[21:04:43] [main/ERROR] [TEXTURE ERRORS]:       textures/items/sushi.png
[21:04:43] [main/ERROR] [TEXTURE ERRORS]: -------------------------
[21:04:43] [main/ERROR] [TEXTURE ERRORS]:     No other errors exist for domain sm
[21:04:43] [main/ERROR] [TEXTURE ERRORS]: ==================================================
[21:04:43] [main/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
[21:04:46] [Server thread/INFO]: Starting integrated minecraft server version 1.12.2
[21:04:46] [Server thread/INFO]: Generating keypair
[21:04:46] [Server thread/INFO] [FML]: Injecting existing registry data into this server instance
[21:04:46] [Server thread/INFO] [FML]: Registry Block: Found a missing id from the world sm:corn_crop
[21:04:46] [Server thread/INFO] [FML]: Applying holder lookups
[21:04:46] [Server thread/INFO] [FML]: Holder lookups applied
[21:04:46] [Server thread/INFO] [FML]: Loading dimension 0 (Test2) (net.minecraft.server.integrated.IntegratedServer@7942628)
[21:04:46] [Server thread/INFO]: Loaded 488 advancements
[21:04:46] [Server thread/INFO] [FML]: Loading dimension 1 (Test2) (net.minecraft.server.integrated.IntegratedServer@7942628)
[21:04:46] [Server thread/INFO] [FML]: Loading dimension -1 (Test2) (net.minecraft.server.integrated.IntegratedServer@7942628)
[21:04:46] [Server thread/INFO]: Preparing start region for level 0
[21:04:47] [Server thread/INFO]: Preparing spawn area: 98%
[21:04:48] [Server thread/INFO]: Changing view distance to 12, from 10
[21:04:49] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2
[21:04:49] [Netty Server IO #1/INFO] [FML]: Client protocol version 2
[21:04:49] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 5 mods : [email protected],[email protected],[email protected],[email protected],[email protected]
[21:04:49] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established
[21:04:49] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
[21:04:49] [Server thread/INFO]: Korlimann[local:E:22a5435c] logged in with entity id 362 at (-126.49515329152798, 113.0, 157.5463072699938)
[21:04:49] [Server thread/INFO]: Korlimann joined the game
[21:04:50] [Server thread/INFO]: Saving and pausing game...
[21:04:50] [Server thread/INFO]: Saving chunks for level 'Test2'/overworld
[21:04:50] [Server thread/INFO]: Saving chunks for level 'Test2'/the_nether
[21:04:50] [Server thread/INFO]: Saving chunks for level 'Test2'/the_end
[21:04:50] [main/INFO]: Loaded 34 advancements
[21:04:50] [main/WARN]: Received passengers for unknown entity
[21:04:56] [Server thread/INFO]: Saving and pausing game...
[21:04:56] [Server thread/INFO]: Saving chunks for level 'Test2'/overworld
[21:04:56] [Server thread/INFO]: Saving chunks for level 'Test2'/the_nether
[21:04:56] [Server thread/INFO]: Saving chunks for level 'Test2'/the_end
[21:04:57] [main/INFO]: Stopping!
[21:04:57] [Server thread/INFO]: Stopping server
[21:04:57] [Server thread/INFO]: Saving players
[21:04:57] [Server thread/INFO]: Saving worlds
[21:04:57] [Server thread/INFO]: Saving chunks for level 'Test2'/overworld
[21:04:57] [Server thread/INFO]: Saving chunks for level 'Test2'/the_nether
[21:04:57] [Server thread/INFO]: Saving chunks for level 'Test2'/the_end
[21:04:57] [Server thread/INFO] [FML]: Unloading dimension 0
[21:04:57] [Server thread/INFO] [FML]: Unloading dimension -1
[21:04:57] [Server thread/INFO] [FML]: Unloading dimension 1
[21:04:57] [Server thread/INFO] [FML]: Applying holder lookups
[21:04:57] [Server thread/INFO] [FML]: Holder lookups applied
[21:04:57] [main/INFO]: SoundSystem shutting down...
[21:04:57] [main/WARN]: Author: Paul Lamb, www.paulscode.com
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

 

Also, somehow the block get's initialized 9 times, but the model (in the inventory) works only for one. The others just have missing textures.

 

Any help in any form would be highly appreciated. :)

Thanks :D

Posted
31 minutes ago, Korlimann said:

Caused by: java.io.FileNotFoundException: sm:models/item/messer.json

 

31 minutes ago, Korlimann said:

Caused by: java.io.FileNotFoundException: sm:models/item/nudelholz.json

 

31 minutes ago, Korlimann said:

Caused by: java.io.FileNotFoundException: sm:models/item/pfanne.json

 

31 minutes ago, Korlimann said:

[21:04:43] [main/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

[21:04:43] [main/ERROR] [TEXTURE ERRORS]: The following texture errors were found.

[21:04:43] [main/ERROR] [TEXTURE ERRORS]: ==================================================

[21:04:43] [main/ERROR] [TEXTURE ERRORS]: DOMAIN sm

[21:04:43] [main/ERROR] [TEXTURE ERRORS]: --------------------------------------------------

[21:04:43] [main/ERROR] [TEXTURE ERRORS]: domain sm is missing 1 texture

[21:04:43] [main/ERROR] [TEXTURE ERRORS]: domain sm has 1 location:

[21:04:43] [main/ERROR] [TEXTURE ERRORS]: mod sm resources at C:\Users\stefa\Desktop\Mods\SushiMod\bin

[21:04:43] [main/ERROR] [TEXTURE ERRORS]: -------------------------

[21:04:43] [main/ERROR] [TEXTURE ERRORS]: The missing resources for domain sm are:

[21:04:43] [main/ERROR] [TEXTURE ERRORS]: textures/items/sushi.png

You have missing files.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
1 minute ago, Draco18s said:

 

 

 

You have missing files.

Yes, I know, because I haven't created any textures or json for this items yet, so they get shown with missing textures. But that's not the problem.

Posted
Quote

 so they get shown with missing textures. But that's not the problem.

Quote

When I place the block down, I get a missing texture

Huh.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted (edited)
10 minutes ago, Draco18s said:

Huh.

Look. I have some ITEMS, that currently don't have a texture/json, because some friends of mine are going to do these later on for me.

I made my own textures/model for a flower.

I want to concentrate on getting the flower to work for now. (Because for the flower, I actually have the textures)

The flower has textures, but I think the blockstate variant is not right or smth like that, because the ItemBlock gets shown but the block/flower only has missing textures.

 

Here's a screenshot of how it looks. You can see I'm holding the flower in my hands, looking at a flower I just placed down, but as you can see, it only shows missing textures.

2018-02-16_19.09.36.png

 

And, I even have more items that have no json/textures, but somehow, those don't throw an exception

Edited by Korlimann
Posted

Look:

Fix the errors I can see, because either they're the error causing your problem, or they are not.

If they are, and you fix them, problem solved. I was right.

If they're not, then I might be able to find the error that is because the 397 errors you currently have won't be there letting me see the one that is causing your problem and then I can actually help you.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
11 hours ago, Draco18s said:

Look:

Fix the errors I can see, because either they're the error causing your problem, or they are not.

If they are, and you fix them, problem solved. I was right.

If they're not, then I might be able to find the error that is because the 397 errors you currently have won't be there letting me see the one that is causing your problem and then I can actually help you.

Alright, I'll do so. Thanks for the suggestion. I will let you know if it works or not.

Posted (edited)
1 hour ago, Korlimann said:

Alright, I'll do so. Thanks for the suggestion. I will let you know if it works or not.

Okay, so I fixed all of the errors. Only error for now is still that the textures for the flower won't show up.

Here is the log file:

2018-02-17 13:17:13,272 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2018-02-17 13:17:13,274 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[13:17:13] [main/INFO] [GradleStart]: username: yutendohd@gmail.com
[13:17:13] [main/INFO] [GradleStart]: Extra: []
[13:17:13] [main/INFO] [GradleStart]: Password found, attempting login
[13:17:13] [main/INFO]: Logging in with username & password
[13:17:14] [main/INFO] [GradleStart]: Login Succesful!
[13:17:14] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, [], --assetsDir, C:/Users/stefa/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --userType, mojang, --accessToken{REDACTED}, --version, 1.12.2, --uuid, c100c5fcedb64104a4b51a3e38bc95f4, --username, Korlimann, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[13:17:14] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[13:17:14] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[13:17:14] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[13:17:14] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[13:17:14] [main/INFO] [FML]: Forge Mod Loader version 14.23.2.2611 for Minecraft 1.12.2 loading
[13:17:14] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_162, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_162
[13:17:14] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[13:17:14] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin
[13:17:14] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin
[13:17:14] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[13:17:14] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[13:17:14] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[13:17:14] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[13:17:14] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[13:17:14] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[13:17:14] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[13:17:14] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[13:17:14] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
2018-02-17 13:17:14,362 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2018-02-17 13:17:14,547 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2018-02-17 13:17:14,550 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[13:17:15] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[13:17:15] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[13:17:15] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[13:17:15] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[13:17:15] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[13:17:15] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[13:17:15] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[13:17:16] [main/INFO]: Setting user: Korlimann
[13:17:18] [main/WARN]: Skipping bad option: lastServer:
[13:17:18] [main/INFO]: LWJGL Version: 2.9.4
[13:17:19] [main/INFO] [FML]: -- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_162, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 713867680 bytes (680 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: 
	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 390.65' Renderer: 'GeForce GTX 1060 6GB/PCIe/SSE2'
[13:17:19] [main/INFO] [FML]: MinecraftForge v14.23.2.2611 Initialized
[13:17:19] [main/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients.
[13:17:19] [main/INFO] [FML]: Replaced 1036 ore ingredients
[13:17:19] [main/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[13:17:19] [main/INFO] [FML]: Searching C:\Users\stefa\Desktop\Mods\SushiMod\run\mods for mods
[13:17:20] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
[13:17:20] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, sm] at CLIENT
[13:17:20] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, sm] at SERVER
[13:17:20] [main/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Sushi Mod
[13:17:20] [main/INFO] [FML]: Processing ObjectHolder annotations
[13:17:20] [main/INFO] [FML]: Found 1168 ObjectHolder annotations
[13:17:20] [main/INFO] [FML]: Identifying ItemStackHolder annotations
[13:17:20] [main/INFO] [FML]: Found 0 ItemStackHolder annotations
[13:17:20] [main/INFO] [FML]: Configured a dormant chunk cache size of 0
[13:17:20] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[13:17:20] [main/INFO] [FML]: Applying holder lookups
[13:17:20] [main/INFO] [FML]: Holder lookups applied
[13:17:20] [main/INFO] [FML]: Applying holder lookups
[13:17:20] [main/INFO] [FML]: Holder lookups applied
[13:17:20] [main/INFO] [FML]: Applying holder lookups
[13:17:20] [main/INFO] [FML]: Holder lookups applied
[13:17:20] [main/INFO] [FML]: Applying holder lookups
[13:17:20] [main/INFO] [FML]: Holder lookups applied
[13:17:20] [main/INFO] [FML]: Injecting itemstacks
[13:17:20] [main/INFO] [FML]: Itemstack injection complete
[13:17:21] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Found status: UP_TO_DATE Target: null
[13:17:21] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 94530059 nanos
[13:17:22] [Sound Library Loader/INFO]: Starting up SoundSystem...
[13:17:22] [Thread-5/INFO]: Initializing LWJGL OpenAL
[13:17:22] [Thread-5/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[13:17:22] [Thread-5/INFO]: OpenAL initialized.
[13:17:23] [Sound Library Loader/INFO]: Sound engine started
[13:17:25] [main/INFO] [FML]: Max texture size: 16384
[13:17:26] [main/INFO]: Created: 512x512 textures-atlas
[13:17:26] [main/ERROR] [FML]: Exception loading model for variant sm:sunflower#type=dandelion for blockstate "sm:sunflower[type=dandelion]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model sm:sunflower#type=dandelion with loader VariantLoader.INSTANCE, skipping
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
	at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:248) ~[ModelLoader.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:236) ~[ModelLoader.class:?]
	at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:163) ~[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:559) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
	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_162]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_162]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_162]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
	at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:83) ~[ModelBlockDefinition.class:?]
	at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1189) ~[ModelLoader$VariantLoader.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
	... 21 more
[13:17:27] [main/INFO] [FML]: Applying holder lookups
[13:17:27] [main/INFO] [FML]: Holder lookups applied
[13:17:27] [main/INFO] [FML]: Injecting itemstacks
[13:17:27] [main/INFO] [FML]: Itemstack injection complete
[13:17:27] [main/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods
[13:17:27] [main/WARN]: Skipping bad option: lastServer:
[13:17:27] [main/INFO]: Narrator library for x64 successfully loaded

 

Edited by Korlimann
Posted
28 minutes ago, Korlimann said:

[13:17:26] [main/ERROR] [FML]: Exception loading model for variant sm:sunflower#type=dandelion for blockstate "sm:sunflower[type=dandelion]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model sm:sunflower#type=dandelion with loader VariantLoader.INSTANCE, skipping
	...
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
...

 

Because your Block extends BlockFlower and overrides BlockFlower#getBlockType to return BlockFlower.EnumFlowerColor.YELLOW, it has a single property called type with a single value called dandelion. Your blockstates file doesn't specify the type=dandelion variant, so the block renders as the missing model. The normal variant is only used for blocks with no properties.

 

You could specify the type=dandelion variant to fix this, but I think it would be better not to extend BlockFlower at all since it's only designed to work with the Vanilla BlockFlower.EnumFlowerType values.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Yeah, I just made a custom flower and decided to do it "flat" meaning making separate flower for each type rather than have a type variant. So then I just extended BlockBush instead of BlockFlower. 

public class BlockFlowerCloud extends BlockBush
{
    public BlockFlowerCloud()
    {
    }

    @Override
    public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
    {
        return super.getBoundingBox(state, source, pos).offset(state.getOffset(source, pos));
    }

    /**
     * Get the OffsetType for this Block. Determines if the model is rendered slightly offset.
     */
    @Override
    public Block.EnumOffsetType getOffsetType()
    {
        return Block.EnumOffsetType.XZ;
    }
}

 

Then the blockstate and model were pretty easy. Note that you still need to handle the growth stage variant:

{
    "forge_marker": 1,
     "defaults": {
        "model": "examplemod:cloud_flower",
        "uvlock": true
    },
    "variants": {
        "normal": [{ }],
        "inventory": [{ }],
	    "stage=0":[{ }],
	    "stage=1":[{ }]
    }
}

 model:

{
    "parent": "block/cross",
    "textures": {
        "cross": "examplemod:blocks/cloud_flower"
    }
}

 

 

 

 

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • So me and a couple of friends are playing with a shitpost mod pack and one of the mods in the pack is corail tombstone and for some reason there is a problem with it, where on death to fire the player will get kicked out of the server and the tombstone will not spawn basically deleting an entire inventory, it doesn't matter what type of fire it is, whether it's from vanilla fire/lava, or from modded fire like ice&fire/lycanites and it's common enough to where everyone on the server has experienced at least once or twice and it doesn't give any crash log. a solution to this would be much appreciated thank you!
    • It is 1.12.2 - I have no idea if there is a 1.12 pack
    • Okay, but does the modpack works with 1.12 or just with 1.12.2, because I need the Forge client specifically for Minecraft 1.12, not 1.12.2
    • Version 1.19 - Forge 41.0.63 I want to create a wolf entity that I can ride, so far it seems to be working, but the problem is that when I get on the wolf, I can’t control it. I then discovered that the issue is that the server doesn’t detect that I’m riding the wolf, so I’m struggling with synchronization. However, it seems to not be working properly. As I understand it, the server receives the packet but doesn’t register it correctly. I’m a bit new to Java, and I’ll try to provide all the relevant code and prints *The comments and prints are translated by chatgpt since they were originally in Spanish* Thank you very much in advance No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. MountableWolfEntity package com.vals.valscraft.entity; import com.vals.valscraft.network.MountSyncPacket; import com.vals.valscraft.network.NetworkHandler; import net.minecraft.client.Minecraft; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.animal.Wolf; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.Entity; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.network.PacketDistributor; public class MountableWolfEntity extends Wolf { private boolean hasSaddle; private static final EntityDataAccessor<Byte> DATA_ID_FLAGS = SynchedEntityData.defineId(MountableWolfEntity.class, EntityDataSerializers.BYTE); public MountableWolfEntity(EntityType<? extends Wolf> type, Level level) { super(type, level); this.hasSaddle = false; } @Override protected void defineSynchedData() { super.defineSynchedData(); this.entityData.define(DATA_ID_FLAGS, (byte)0); } public static AttributeSupplier.Builder createAttributes() { return Wolf.createAttributes() .add(Attributes.MAX_HEALTH, 20.0) .add(Attributes.MOVEMENT_SPEED, 0.3); } @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemstack = player.getItemInHand(hand); if (itemstack.getItem() == Items.SADDLE && !this.hasSaddle()) { if (!player.isCreative()) { itemstack.shrink(1); } this.setSaddle(true); return InteractionResult.SUCCESS; } else if (!level.isClientSide && this.hasSaddle()) { player.startRiding(this); MountSyncPacket packet = new MountSyncPacket(true); // 'true' means the player is mounted NetworkHandler.CHANNEL.sendToServer(packet); // Ensure the server handles the packet return InteractionResult.SUCCESS; } return InteractionResult.PASS; } @Override public void travel(Vec3 travelVector) { if (this.isVehicle() && this.getControllingPassenger() instanceof Player) { System.out.println("The wolf has a passenger."); System.out.println("The passenger is a player."); Player player = (Player) this.getControllingPassenger(); // Ensure the player is the controller this.setYRot(player.getYRot()); this.yRotO = this.getYRot(); this.setXRot(player.getXRot() * 0.5F); this.setRot(this.getYRot(), this.getXRot()); this.yBodyRot = this.getYRot(); this.yHeadRot = this.yBodyRot; float forward = player.zza; float strafe = player.xxa; if (forward <= 0.0F) { forward *= 0.25F; } this.flyingSpeed = this.getSpeed() * 0.1F; this.setSpeed((float) this.getAttributeValue(Attributes.MOVEMENT_SPEED) * 1.5F); this.setDeltaMovement(new Vec3(strafe, travelVector.y, forward).scale(this.getSpeed())); this.calculateEntityAnimation(this, false); } else { // The wolf does not have a passenger or the passenger is not a player System.out.println("No player is mounted, or the passenger is not a player."); super.travel(travelVector); } } public boolean hasSaddle() { return this.hasSaddle; } public void setSaddle(boolean hasSaddle) { this.hasSaddle = hasSaddle; } @Override protected void dropEquipment() { super.dropEquipment(); if (this.hasSaddle()) { this.spawnAtLocation(Items.SADDLE); this.setSaddle(false); } } @SubscribeEvent public static void onServerTick(TickEvent.ServerTickEvent event) { if (event.phase == TickEvent.Phase.START) { MinecraftServer server = net.minecraftforge.server.ServerLifecycleHooks.getCurrentServer(); if (server != null) { for (ServerPlayer player : server.getPlayerList().getPlayers()) { if (player.isPassenger() && player.getVehicle() instanceof MountableWolfEntity) { MountableWolfEntity wolf = (MountableWolfEntity) player.getVehicle(); System.out.println("Tick: " + player.getName().getString() + " is correctly mounted on " + wolf); } } } } } private boolean lastMountedState = false; @Override public void tick() { super.tick(); if (!this.level.isClientSide) { // Only on the server boolean isMounted = this.isVehicle() && this.getControllingPassenger() instanceof Player; // Only print if the state changed if (isMounted != lastMountedState) { if (isMounted) { Player player = (Player) this.getControllingPassenger(); // Verify the passenger is a player System.out.println("Server: Player " + player.getName().getString() + " is now mounted."); } else { System.out.println("Server: The wolf no longer has a passenger."); } lastMountedState = isMounted; } } } @Override public void addPassenger(Entity passenger) { super.addPassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(true)); } } } @Override public void removePassenger(Entity passenger) { super.removePassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is no longer mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(false)); } } } @Override public boolean isControlledByLocalInstance() { Entity entity = this.getControllingPassenger(); return entity instanceof Player; } @Override public void positionRider(Entity passenger) { if (this.hasPassenger(passenger)) { double xOffset = Math.cos(Math.toRadians(this.getYRot() + 90)) * 0.4; double zOffset = Math.sin(Math.toRadians(this.getYRot() + 90)) * 0.4; passenger.setPos(this.getX() + xOffset, this.getY() + this.getPassengersRidingOffset() + passenger.getMyRidingOffset(), this.getZ() + zOffset); } } } MountSyncPacket package com.vals.valscraft.network; import com.vals.valscraft.entity.MountableWolfEntity; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class MountSyncPacket { private final boolean isMounted; public MountSyncPacket(boolean isMounted) { this.isMounted = isMounted; } public void encode(FriendlyByteBuf buffer) { buffer.writeBoolean(isMounted); } public static MountSyncPacket decode(FriendlyByteBuf buffer) { return new MountSyncPacket(buffer.readBoolean()); } public void handle(NetworkEvent.Context context) { context.enqueueWork(() -> { ServerPlayer player = context.getSender(); // Get the player from the context if (player != null) { // Verifies if the player has dismounted if (!isMounted) { Entity vehicle = player.getVehicle(); if (vehicle instanceof MountableWolfEntity wolf) { // Logic to remove the player as a passenger wolf.removePassenger(player); System.out.println("Server: Player " + player.getName().getString() + " is no longer mounted."); } } } }); context.setPacketHandled(true); // Marks the packet as handled } } networkHandler package com.vals.valscraft.network; import com.vals.valscraft.valscraft; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.simple.SimpleChannel; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class NetworkHandler { private static final String PROTOCOL_VERSION = "1"; public static final SimpleChannel CHANNEL = NetworkRegistry.newSimpleChannel( new ResourceLocation(valscraft.MODID, "main"), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals ); public static void init() { int packetId = 0; // Register the mount synchronization packet CHANNEL.registerMessage( packetId++, MountSyncPacket.class, MountSyncPacket::encode, MountSyncPacket::decode, (msg, context) -> msg.handle(context.get()) // Get the context with context.get() ); } }  
  • Topics

×
×
  • Create New...

Important Information

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