Jump to content

Recommended Posts

Posted

First I am confused why in game my block that has a tile entity is invincible litteraly.

package com.clowcadia.tutorial.handlers;

import com.clowcadia.tutorial.blocks.BlockContainerTutorial;
import com.clowcadia.tutorial.blocks.BlockTutorial;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.fml.common.registry.GameRegistry;

//Class to initialize blocks
public class BlockHandler {
	
	public static Block blockTutorial;
	public static ItemBlock itemBlockTutorial;
	
	public static Block blockContainerTutorial;
	public static Block litBlockContainerTutorial;
	public static ItemBlock itemBlockContainerTutorial;
	
	public static void init()
	{
		blockTutorial = new BlockTutorial(Material.ROCK, "tutorial_block_json", CreativeTabHandler.tabBlocks, 5F, 15F, 3, "pickaxe");		  
		itemBlockTutorial = (ItemBlock) new ItemBlock(blockTutorial);
		
		blockContainerTutorial = new BlockContainerTutorial();
		itemBlockContainerTutorial = (ItemBlock) new ItemBlock(blockContainerTutorial);
	}
	 
	public static void register()
	{
		GameRegistry.register(blockTutorial);
		GameRegistry.register(itemBlockTutorial, blockTutorial.getRegistryName());
		
		GameRegistry.register(blockContainerTutorial);
		GameRegistry.register(itemBlockContainerTutorial, blockContainerTutorial.getRegistryName());
	}
	 
	public static void registerRenders()
	{
		registerRender(blockTutorial);
		registerRender(blockContainerTutorial);
	}
	 
	public static void registerRender(Block block)
	{
		Item item = Item.getItemFromBlock(block);
		Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
	}
}
package com.clowcadia.tutorial.blocks;


import com.clowcadia.tutorial.handlers.CreativeTabHandler;

import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

public class BlockContainerTutorial extends BlockContainer{

	public BlockContainerTutorial() {
		super(Material.ROCK);
		this.setCreativeTab(CreativeTabHandler.tabBlocks);
		this.setUnlocalizedName("tutorial_block_container_json");
		this.setRegistryName("tutorial_block_container_json");
		// TODO Auto-generated constructor stub
	}

	@Override
	public TileEntity createNewTileEntity(World worldIn, int meta) {
		// TODO Auto-generated method stub
		return new TileEntityBlockTutorial();
	}

}

and then i have some errors to do with the tile entity itself

2017-02-20 22:38:56,721 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2017-02-20 22:38:56,723 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[22:38:56] [main/INFO] [GradleStart]: Extra: []
[22:38:56] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/Andre/.gradle/caches/minecraft/assets, --assetIndex, 1.11, --accessToken{REDACTED}, --version, 1.11.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[22:38:56] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[22:38:56] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[22:38:56] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[22:38:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[22:38:56] [main/INFO] [FML]: Forge Mod Loader version 13.20.0.2228 for Minecraft 1.11.2 loading
[22:38:56] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_121, running on Windows 10:amd64:10.0, installed at C:\Program Files\JDK
[22:38:56] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[22:38:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[22:38:56] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[22:38:56] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[22:38:56] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[22:38:56] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[22:38:56] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[22:38:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[22:38:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[22:38:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[22:38:57] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[22:38:59] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[22:38:59] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[22:38:59] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[22:38:59] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[22:38:59] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[22:38:59] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[22:39:00] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
2017-02-20 22:39:00,844 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2017-02-20 22:39:00,886 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2017-02-20 22:39:00,888 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[22:39:01] [Client thread/INFO]: Setting user: Player700
[22:39:06] [Client thread/WARN]: Skipping bad option: lastServer:
[22:39:06] [Client thread/INFO]: LWJGL Version: 2.9.4
[22:39:07] [Client thread/INFO]: [STDOUT]: ---- Minecraft Crash Report ----
// Don't be sad. I'll do better next time, I promise!

Time: 2/20/17 10:39 PM
Description: Loading screen debug info

This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
	Minecraft Version: 1.11.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_121, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 799086080 bytes (762 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.5.0 NVIDIA 369.09' Renderer: 'GeForce 920MX/PCIe/SSE2'
[22:39:07] [Client thread/INFO] [FML]: MinecraftForge v13.20.0.2228 Initialized
[22:39:07] [Client thread/INFO] [FML]: Replaced 232 ore recipes
[22:39:08] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[22:39:08] [Client thread/INFO] [FML]: Searching C:\Users\Andre\OneDrive\Documents\forge\1.11\run\mods for mods
[22:39:10] [Client thread/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
[22:39:10] [Client thread/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, tutorial] at CLIENT
[22:39:10] [Client thread/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, tutorial] at SERVER
[22:39:11] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Tutorial Mod
[22:39:11] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
[22:39:11] [Client thread/INFO] [FML]: Found 444 ObjectHolder annotations
[22:39:11] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
[22:39:11] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
[22:39:11] [Client thread/INFO] [FML]: Applying holder lookups
[22:39:11] [Client thread/INFO] [FML]: Holder lookups applied
[22:39:11] [Client thread/INFO] [FML]: Applying holder lookups
[22:39:11] [Client thread/INFO] [FML]: Holder lookups applied
[22:39:11] [Client thread/INFO] [FML]: Applying holder lookups
[22:39:11] [Client thread/INFO] [FML]: Holder lookups applied
[22:39:11] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[22:39:11] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[22:39:11] [Client thread/INFO] [FML]: Applying holder lookups
[22:39:11] [Client thread/INFO] [FML]: Holder lookups applied
[22:39:11] [Client thread/INFO] [FML]: Injecting itemstacks
[22:39:11] [Client thread/INFO] [FML]: Itemstack injection complete
[22:39:11] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Found status: UP_TO_DATE Target: null
[22:39:15] [Sound Library Loader/INFO]: Starting up SoundSystem...
[22:39:15] [Thread-8/INFO]: Initializing LWJGL OpenAL
[22:39:15] [Thread-8/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[22:39:15] [Thread-8/INFO]: OpenAL initialized.
[22:39:16] [Sound Library Loader/INFO]: Sound engine started
[22:39:22] [Client thread/INFO] [FML]: Max texture size: 16384
[22:39:22] [Client thread/INFO]: Created: 16x16 textures-atlas
[22:39:22] [Client thread/ERROR] [FML]: Exception loading model for variant tutorial:tutorial_block_container_json#normal for blockstate "tutorial:tutorial_block_container_json"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model tutorial:tutorial_block_container_json#normal 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:260) ~[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:248) ~[ModelLoader.class:?]
	at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:155) ~[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:122) [SimpleReloadableResourceManager.class:?]
	at net.minecraft.client.Minecraft.init(Minecraft.java:541) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:387) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
	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_121]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
	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:78) ~[ModelBlockDefinition.class:?]
	at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1253) ~[ModelLoader$VariantLoader.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
	... 21 more
[22:39:22] [Client thread/ERROR] [FML]: Exception loading blockstate for the variant tutorial:tutorial_block_container_json#normal: 
java.lang.Exception: Could not load model definition for variant tutorial:tutorial_block_container_json
	at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:293) ~[ModelLoader.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:121) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:248) ~[ModelLoader.class:?]
	at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:155) ~[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:122) [SimpleReloadableResourceManager.class:?]
	at net.minecraft.client.Minecraft.init(Minecraft.java:541) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:387) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
	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_121]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: java.lang.RuntimeException: Encountered an exception when loading model definition of model tutorial:blockstates/tutorial_block_container_json.json
	at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:228) ~[ModelBakery.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:208) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:289) ~[ModelLoader.class:?]
	... 20 more
Caused by: java.io.FileNotFoundException: tutorial:blockstates/tutorial_block_container_json.json
	at net.minecraft.client.resources.FallbackResourceManager.getAllResources(FallbackResourceManager.java:104) ~[FallbackResourceManager.class:?]
	at net.minecraft.client.resources.SimpleReloadableResourceManager.getAllResources(SimpleReloadableResourceManager.java:79) ~[SimpleReloadableResourceManager.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:221) ~[ModelBakery.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:208) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:289) ~[ModelLoader.class:?]
	... 20 more
[22:39:23] [Client thread/INFO] [FML]: Injecting itemstacks
[22:39:23] [Client thread/INFO] [FML]: Itemstack injection complete
[22:39:23] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods
[22:39:23] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Tutorial Mod
[22:39:26] [Client thread/INFO]: SoundSystem shutting down...
[22:39:27] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
[22:39:27] [Sound Library Loader/INFO]: Starting up SoundSystem...
[22:39:27] [Thread-10/INFO]: Initializing LWJGL OpenAL
[22:39:27] [Thread-10/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[22:39:27] [Thread-10/INFO]: OpenAL initialized.
[22:39:27] [Sound Library Loader/INFO]: Sound engine started
[22:39:32] [Client thread/INFO] [FML]: Max texture size: 16384
[22:39:32] [Client thread/INFO]: Created: 512x512 textures-atlas
[22:39:34] [Client thread/WARN]: Skipping bad option: lastServer:
[22:39:36] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id
[22:39:39] [Server thread/INFO]: Starting integrated minecraft server version 1.11.2
[22:39:39] [Server thread/INFO]: Generating keypair
[22:39:39] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
[22:39:39] [Server thread/INFO] [FML]: Applying holder lookups
[22:39:39] [Server thread/INFO] [FML]: Holder lookups applied
[22:39:39] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@1e6bd553)
[22:39:40] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@1e6bd553)
[22:39:40] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@1e6bd553)
[22:39:40] [Server thread/INFO]: Preparing start region for level 0
[22:39:41] [Server thread/INFO]: Changing view distance to 12, from 10
[22:39:42] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2
[22:39:42] [Netty Server IO #1/INFO] [FML]: Client protocol version 2
[22:39:42] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 5 mods : [email protected],[email protected],[email protected],[email protected],[email protected]_a
[22:39:42] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established
[22:39:42] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
[22:39:42] [Server thread/INFO]: Player700[local:E:da8cdc3f] logged in with entity id 93 at (-217.58450025780354, 4.0, 412.80269425069326)
[22:39:42] [Server thread/INFO]: Player700 joined the game
[22:39:43] [Server thread/INFO]: Saving and pausing game...
[22:39:43] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld
[22:39:44] [Server thread/INFO]: Saving chunks for level 'New World'/Nether
[22:39:44] [Server thread/INFO]: Saving chunks for level 'New World'/The End
[22:39:44] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@4d06184e[id=183eef8c-2608-3c01-af67-e8b358459ccf,name=Player700,properties={},legacy=false]
com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time
	at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:79) ~[YggdrasilAuthenticationService.class:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:180) [YggdrasilMinecraftSessionService.class:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:60) [YggdrasilMinecraftSessionService$1.class:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:57) [YggdrasilMinecraftSessionService$1.class:?]
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) [guava-17.0.jar:?]
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) [guava-17.0.jar:?]
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) [guava-17.0.jar:?]
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) [guava-17.0.jar:?]
	at com.google.common.cache.LocalCache.get(LocalCache.java:3934) [guava-17.0.jar:?]
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) [guava-17.0.jar:?]
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) [guava-17.0.jar:?]
	at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) [guava-17.0.jar:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:170) [YggdrasilMinecraftSessionService.class:?]
	at net.minecraft.client.Minecraft.getProfileProperties(Minecraft.java:3056) [Minecraft.class:?]
	at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:138) [SkinManager$3.class:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_121]
	at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_121]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]
[22:39:48] [Server thread/INFO]: Player700 has just earned the achievement [Taking Inventory]
[22:39:48] [Client thread/INFO]: [CHAT] Player700 has just earned the achievement [Taking Inventory]
[22:39:55] [Server thread/INFO]: [Player700: Set own game mode to Creative Mode]
[22:39:55] [Client thread/INFO]: [CHAT] Your game mode has been updated to Creative Mode
[22:40:21] [Server thread/INFO]: Saving and pausing game...
[22:40:21] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld
[22:40:21] [Server thread/ERROR] [FML]: A TileEntity type com.clowcadia.tutorial.blocks.TileEntityBlockTutorial has throw an exception trying to write state. It will not persist. Report this to the mod author
java.lang.RuntimeException: class com.clowcadia.tutorial.blocks.TileEntityBlockTutorial is missing a mapping! This is a bug!
	at net.minecraft.tileentity.TileEntity.writeInternal(TileEntity.java:89) ~[TileEntity.class:?]
	at net.minecraft.tileentity.TileEntity.writeToNBT(TileEntity.java:80) ~[TileEntity.class:?]
	at com.clowcadia.tutorial.blocks.TileEntityBlockTutorial.writeToNBT(TileEntityBlockTutorial.java:20) ~[TileEntityBlockTutorial.class:?]
	at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeChunkToNBT(AnvilChunkLoader.java:418) [AnvilChunkLoader.class:?]
	at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:191) [AnvilChunkLoader.class:?]
	at net.minecraft.world.gen.ChunkProviderServer.saveChunkData(ChunkProviderServer.java:209) [ChunkProviderServer.class:?]
	at net.minecraft.world.gen.ChunkProviderServer.saveChunks(ChunkProviderServer.java:237) [ChunkProviderServer.class:?]
	at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:1065) [WorldServer.class:?]
	at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:425) [MinecraftServer.class:?]
	at net.minecraft.server.integrated.IntegratedServer.saveAllWorlds(IntegratedServer.java:238) [IntegratedServer.class:?]
	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:141) [IntegratedServer.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:547) [MinecraftServer.class:?]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]
[22:40:21] [Server thread/INFO]: Saving chunks for level 'New World'/Nether
[22:40:21] [Server thread/INFO]: Saving chunks for level 'New World'/The End
[22:40:22] [Client thread/INFO]: Stopping!
[22:40:22] [Server thread/INFO]: Stopping server
[22:40:22] [Server thread/INFO]: Saving players
[22:40:22] [Server thread/INFO]: Saving worlds
[22:40:22] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld
[22:40:22] [Server thread/INFO]: Saving chunks for level 'New World'/Nether
[22:40:22] [Server thread/INFO]: Saving chunks for level 'New World'/The End
[22:40:22] [Server thread/INFO] [FML]: Unloading dimension 0
[22:40:22] [Server thread/INFO] [FML]: Unloading dimension -1
[22:40:22] [Server thread/INFO] [FML]: Unloading dimension 1
[22:40:22] [Client thread/INFO]: SoundSystem shutting down...
[22:40:22] [Server thread/INFO] [FML]: Applying holder lookups
[22:40:22] [Server thread/INFO] [FML]: Holder lookups applied
[22:40:23] [Client thread/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
package com.clowcadia.tutorial.blocks;

import javax.annotation.Nullable;

import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.ItemStackHandler;

public class TileEntityBlockTutorial extends TileEntity 
{
	
	private ItemStackHandler inventory = new ItemStackHandler(1);
	
	@Override
	public NBTTagCompound writeToNBT(NBTTagCompound compound) {
		compound.setTag("inventory", inventory.serializeNBT());
		return super.writeToNBT(compound);
	}
	
	@Override
	public void readFromNBT(NBTTagCompound compound) {
		inventory.deserializeNBT(compound.getCompoundTag("inventory"));
		super.readFromNBT(compound);
	}
	
	@Override
	public boolean hasCapability(Capability<?> capability, @Nullable EnumFacing facing) {
		return capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY || super.hasCapability(capability, facing);
	}
	
	@Nullable
	@Override
	public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing) {
		return capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY ? (T)inventory : super.getCapability(capability, facing);
	}

}

 

Posted

Yes, in the same place you register your mod blocks and items

  • Like 1

Apparently I'm addicted to these forums and can't help but read all the posts. So if I somehow help you, please click the "Like This" button, it helps.

Posted
1 minute ago, Leomelonseeds said:

Yes, in the same place you register your mod blocks and items

Mellon I dont overestimate when i say you are very helpfull.(the detail i was exactly confused about)

Posted

Well just like a block you have to put the json files for blockstates and models.

Apparently I'm addicted to these forums and can't help but read all the posts. So if I somehow help you, please click the "Like This" button, it helps.

Posted
1 minute ago, Leomelonseeds said:

Well just like a block you have to put the json files for blockstates and models.

its already done, it the black i am holding, and everything is done correctly

Posted

Do not extend BlockContainer. BlockContainer is the vanilla way of doing things and often causes problems like yours because people don't realize some of the things it does. BlockContainer changes the render type of your block to INVISIBLE, and you probably want MODEL (as per your JSON blockstates and models). Override these Forge functions from Block instead of extending BlockContainer:

public boolean hasTileEntity(IBlockState state)

public TileEntity createTileEntity(World world, IBlockState state)

 

Posted

Or you could use EnumBlockRenderType#getRenderType to return EnumBlockRenderType.MODEL.

The above post is probably for the better tho.

Apparently I'm addicted to these forums and can't help but read all the posts. So if I somehow help you, please click the "Like This" button, it helps.

Posted
On 1/16/2017 at 1:45 PM, diesieben07 said:

It's Mojang's way to say "this block has a TileEntity". They used to have


BlockContainer
 

only, so Forge introduced


hasTileEntity
 

on the


Block
 

class, to allow for Blocks to have TileEntities without extending


BlockContainer
 

. Then Mojang added


ITileEntityProvider
 

for a similar purpose. But the API is not the greatest, since it still uses metadata instead of block states. So it's recommended you stick to Forge's API.

1

 

 

Posted

How is this

package com.clowcadia.tutorial.blocks;


import com.clowcadia.tutorial.handlers.CreativeTabHandler;

import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

public class BlockContainerTutorial extends Block{
	
	@Override
	public boolean hasTileEntity(IBlockState state)
	{
		return true;
	}
	
	@Override
	public TileEntity createTileEntity(World world, IBlockState state)
	{
		return new TileEntityBlockTutorial();
	}
	
	public BlockContainerTutorial() {
		super(Material.ROCK);
		this.setCreativeTab(CreativeTabHandler.tabBlocks);
		this.setUnlocalizedName("tutorial_block_container_json");
		this.setRegistryName("tutorial_block_container_json");
		// TODO Auto-generated constructor stub
	}


}

 

Posted

But now the problems is i am trying to put an item in and it wont take it.

package com.clowcadia.tutorial.blocks;

import javax.annotation.Nullable;

import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.ItemStackHandler;

public class TileEntityBlockTutorial extends TileEntity 
{
	
	private ItemStackHandler inventory = new ItemStackHandler(1);
	
	@Override
	public NBTTagCompound writeToNBT(NBTTagCompound compound) {
		compound.setTag("inventory", inventory.serializeNBT());
		return super.writeToNBT(compound);
	}
	
	@Override
	public void readFromNBT(NBTTagCompound compound) {
		inventory.deserializeNBT(compound.getCompoundTag("inventory"));
		super.readFromNBT(compound);
	}
	
	@Override
	public boolean hasCapability(Capability<?> capability, @Nullable EnumFacing facing) {
		return capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY || super.hasCapability(capability, facing);
	}
	
	@Nullable
	@Override
	public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing) {
		return capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY ? (T)inventory : super.getCapability(capability, facing);
	}

}

 

Posted

What do you mean are you trying to put some item in with a hopper?

Apparently I'm addicted to these forums and can't help but read all the posts. So if I somehow help you, please click the "Like This" button, it helps.

Posted

btw is this right

package com.clowcadia.tutorial.proxy;

import com.clowcadia.tutorial.blocks.TileEntityBlockTutorial;
import com.clowcadia.tutorial.handlers.ArmorHandler;
import com.clowcadia.tutorial.handlers.BlockHandler;
import com.clowcadia.tutorial.handlers.CraftingHandler;
import com.clowcadia.tutorial.handlers.ItemHandler;
import com.clowcadia.tutorial.handlers.SmeltingHandler;
import com.clowcadia.tutorial.world.WorldGenOre;

import net.minecraft.init.Blocks;
import net.minecraftforge.fml.common.registry.GameRegistry;

//Class to register models, textures, blocks, items
public class CommonProxy implements IProxy{

	@Override
	public void preInit() 
	{
		GameRegistry.registerWorldGenerator(new WorldGenOre(), 0);
		ItemHandler.init();
		ItemHandler.register();		
		BlockHandler.init();
		BlockHandler.register();
		ArmorHandler.init();
		ArmorHandler.register();
		GameRegistry.registerTileEntity(TileEntityBlockTutorial.class, "tutorial_tile_entity");
	}

	@Override
	public void init() {
		// TODO Auto-generated method stub
		
		
	}

	@Override
	public void postInit() {
		// TODO Auto-generated method stub
		CraftingHandler.init();
		SmeltingHandler.init();
		
	}
	
	

}
package com.clowcadia.tutorial.blocks;

import javax.annotation.Nullable;

import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.ItemStackHandler;

public class TileEntityBlockTutorial extends TileEntity 
{
	
	private ItemStackHandler inventory = new ItemStackHandler(1);
	
	@Override
	public NBTTagCompound writeToNBT(NBTTagCompound compound) {
		compound.setTag("inventory", inventory.serializeNBT());
		return super.writeToNBT(compound);
	}
	
	@Override
	public void readFromNBT(NBTTagCompound compound) {
		inventory.deserializeNBT(compound.getCompoundTag("inventory"));
		super.readFromNBT(compound);
	}
	
	@Override
	public boolean hasCapability(Capability<?> capability, @Nullable EnumFacing facing) {
		return capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY || super.hasCapability(capability, facing);
	}
	
	@Nullable
	@Override
	public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing) {
		return capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY ? (T)inventory : super.getCapability(capability, facing);
	}

}

 

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

    • that happens every time I enter a new dimension.
    • This is the last line before the crash: [ebwizardry]: Synchronising spell emitters for PixelTraveler But I have no idea what this means
    • What in particular? I barely used that mod this time around, and it's never been a problem in the past.
    • Im trying to build my mod using shade since i use the luaj library however i keep getting this error Reason: Task ':reobfJar' uses this output of task ':shadowJar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. So i try adding reobfJar.dependsOn shadowJar  Could not get unknown property 'reobfJar' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. my gradle file plugins { id 'eclipse' id 'idea' id 'maven-publish' id 'net.minecraftforge.gradle' version '[6.0,6.2)' id 'com.github.johnrengelman.shadow' version '7.1.2' id 'org.spongepowered.mixin' version '0.7.+' } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.spongepowered.mixin' apply plugin: 'com.github.johnrengelman.shadow' version = mod_version group = mod_group_id base { archivesName = mod_id } // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. java.toolchain.languageVersion = JavaLanguageVersion.of(17) //jarJar.enable() println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" minecraft { mappings channel: mapping_channel, version: mapping_version copyIdeResources = true runs { configureEach { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' arg "-mixin.config=derp.mixin.json" mods { "${mod_id}" { source sourceSets.main } } } client { // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. property 'forge.enabledGameTestNamespaces', mod_id } server { property 'forge.enabledGameTestNamespaces', mod_id args '--nogui' } gameTestServer { property 'forge.enabledGameTestNamespaces', mod_id } data { workingDirectory project.file('run-data') args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') } } } sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { flatDir { dirs './libs' } maven { url = "https://jitpack.io" } } configurations { shade implementation.extendsFrom shade } dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" implementation 'org.luaj:luaj-jse-3.0.2' implementation fg.deobf("com.github.Virtuoel:Pehkui:${pehkui_version}") annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' minecraftLibrary 'luaj:luaj-jse:3.0.2' shade 'luaj:luaj-jse:3.0.2' } // Example for how to get properties into the manifest for reading at runtime. tasks.named('jar', Jar).configure { manifest { attributes([ 'Specification-Title' : mod_id, 'Specification-Vendor' : mod_authors, 'Specification-Version' : '1', // We are version 1 of ourselves 'Implementation-Title' : project.name, 'Implementation-Version' : project.jar.archiveVersion, 'Implementation-Vendor' : mod_authors, 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", "TweakOrder" : 0, "MixinConfigs" : "derp.mixin.json" ]) } rename 'mixin.refmap.json', 'derp.mixin-refmap.json' } shadowJar { archiveClassifier = '' configurations = [project.configurations.shade] finalizedBy 'reobfShadowJar' } assemble.dependsOn shadowJar reobf { re shadowJar {} } publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file://${project.projectDir}/mcmodsrepo" } } } my entire project:https://github.com/kevin051606/DERP-Mod/tree/Derp-1.0-1.20
  • Topics

×
×
  • Create New...

Important Information

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