Jump to content

Recommended Posts

Posted

I made an custom rendered block, it works just fine. It renders in my hand as it should and in the world as it should, but if I want to remove it with "world.setBlock(x, y, z, Blocks.air);" my game crashes. I figured out that the tileentity I created to custom render my block causes the crash, but I can't find a way to fix it.

 

The block:

package blocks;

import org.Python.StuffForMC.StuffForMC;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import tileEntitys.TileEntityFullyBrockenBedrock;
import javafx.scene.control.Tab;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

public class Block_Fully_Brocken_Bedrock extends BlockContainer {

public Block_Fully_Brocken_Bedrock(Material material) {
	super(material);
	this.setCreativeTab(StuffForMC.tabStuffForMC);
	this.setLightLevel(1.0F);
	this.setHardness(5.0F);
	this.setStepSound(Block.soundTypeStone);
	this.setBlockName("Block_Fully_Brocken_Bedrock");
}

public int getRenderType(){
	return -1;
}
public boolean isOpaqueCube() {
	return false;
}
public boolean renderAsNormalBlock() {
	return false;
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
	return new TileEntityFullyBrockenBedrock();
}
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister){
	this.blockIcon = iconRegister.registerIcon("StuffForMC" + ":" + "fullybrockenbedrockbreakingpartickles");
}
}

Item that should remove it:

package items;

import org.Python.StuffForMC.StuffForMC;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;

public class Item_Portable_Void extends Item 
{
public Item_Portable_Void()
	{
	setCreativeTab(StuffForMC.tabStuffForMC);
	setMaxStackSize(1);
	setUnlocalizedName("Item_Portable_Void");
	setTextureName("StuffForMC:WorkScope");
	}
 @SideOnly(Side.CLIENT)
    public boolean isFull3D()
    {
        return true;
    }
	public boolean onItemUse(ItemStack itemStack, EntityPlayer entity, World world, int x, int y, int z, int l, float a, float b, float c)
	{
	float var4 = 1.0F;
	Block g = Blocks.bedrock;
	Block block = world.getBlock(x, y, z);
	if (block != g)
		{	
				world.playRecord("mob.zombie.woodbreak", x, y, z);
				world.setBlock(x, y, z, Blocks.air);
		}
		else
		{
			world.playRecord("mob.zombie.woodbreak", x, y, z);
			world.setBlock(x, y, z, StuffForMC.blockFullyBrockenBedrock);
		}
		return true;
	}
}

Posted

Crash report:

---- Minecraft Crash Report ----
// This doesn't make any sense!

Time: 18.07.15 04:00
Description: Ticking memory connection

java.lang.RuntimeException: class tileEntitys.TileEntityFullyBrockenBedrock is missing a mapping! This is a bug!
at net.minecraft.tileentity.TileEntity.writeToNBT(TileEntity.java:96)
at net.minecraftforge.common.util.BlockSnapshot.<init>(BlockSnapshot.java:52)
at net.minecraftforge.common.util.BlockSnapshot.<init>(BlockSnapshot.java:81)
at net.minecraftforge.common.util.BlockSnapshot.getBlockSnapshot(BlockSnapshot.java:107)
at net.minecraft.world.World.setBlock(World.java:515)
at net.minecraft.world.World.setBlock(World.java:681)
at items.Item_Portable_Void.onItemUse(Item_Portable_Void.java:41)
at net.minecraftforge.common.ForgeHooks.onPlaceItemIntoWorld(ForgeHooks.java:456)
at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:142)
at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:422)
at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:593)
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74)
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)


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

-- Head --
Stacktrace:
at net.minecraft.tileentity.TileEntity.writeToNBT(TileEntity.java:96)
at net.minecraftforge.common.util.BlockSnapshot.<init>(BlockSnapshot.java:52)
at net.minecraftforge.common.util.BlockSnapshot.<init>(BlockSnapshot.java:81)
at net.minecraftforge.common.util.BlockSnapshot.getBlockSnapshot(BlockSnapshot.java:107)
at net.minecraft.world.World.setBlock(World.java:515)
at net.minecraft.world.World.setBlock(World.java:681)
at items.Item_Portable_Void.onItemUse(Item_Portable_Void.java:41)
at net.minecraftforge.common.ForgeHooks.onPlaceItemIntoWorld(ForgeHooks.java:456)
at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:142)
at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:422)
at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:593)
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74)
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)

-- Ticking connection --
Details:
Connection: net.minecraft.network.NetworkManager@79445130
Stacktrace:
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_51, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 800160264 bytes (763 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
FML: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{7.10.85.1230} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{10.13.2.1230} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
StuffForMCID{1.0.1} [stuff For MC] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Player Count: 1 / 8; [EntityPlayerMP['Player486'/189, l='Neue Welt', x=-10,38, y=68,87, z=-119,82]]
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'

tile entity class:

package tileEntitys;

import net.minecraft.tileentity.TileEntity;

public class TileEntityFullyBrockenBedrock extends TileEntity{

}

Posted

Have you registered your tile entity? (GameRegistry.registerTileEntity())

 

Your crash report has a "java.lang.RuntimeException: class tileEntitys.TileEntityFullyBrockenBedrock is missing a mapping! This is a bug!"

Posted

The Clientproxy(were I registered it):

package org.Python.StuffForMC;

import cpw.mods.fml.client.registry.ClientRegistry;
import renderer.ItemRenderFullyBrockenBedrock;
import renderer.RenderBrockenBedrock1outof8;
import renderer.RenderBrockenBedrock2outof8;
import renderer.RenderBrockenBedrock3outof8;
import renderer.RenderBrockenBedrock4outof8;
import renderer.RenderBrockenBedrock5outof8;
import renderer.RenderBrockenBedrock6outof8;
import renderer.RenderBrockenBedrock7outof8;
import renderer.RenderFullyBrockenBedrock;
import renderer.RenderBrockenBedrock0outof8;
import tileEntitys.TileEntityBrockenBedrock1outof8;
import tileEntitys.TileEntityBrockenBedrock2outof8;
import tileEntitys.TileEntityBrockenBedrock3outof8;
import tileEntitys.TileEntityBrockenBedrock4outof8;
import tileEntitys.TileEntityBrockenBedrock5outof8;
import tileEntitys.TileEntityBrockenBedrock6outof8;
import tileEntitys.TileEntityBrockenBedrock7outof8;
import tileEntitys.TileEntityFullyBrockenBedrock;
import tileEntitys.TileEntityBrockenBedrock0outof8;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraftforge.client.MinecraftForgeClient;


public class StuffForMCClientProxy extends StuffForMCProxy {
@Override
public void registerRenders(){
	//Fully Brocken Bedrock
			TileEntitySpecialRenderer render1 = new RenderFullyBrockenBedrock();
			ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFullyBrockenBedrock.class, render1);
			MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(StuffForMC.blockFullyBrockenBedrock), new ItemRenderFullyBrockenBedrock(render1, new TileEntityFullyBrockenBedrock()));
	//BrockenBedrock0outof8
			TileEntitySpecialRenderer render2 = new RenderBrockenBedrock0outof8();
			ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBrockenBedrock0outof8.class, render2);
	//BrockenBedrock1outof8
			TileEntitySpecialRenderer render3 = new RenderBrockenBedrock1outof8();
			ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBrockenBedrock1outof8.class, render3);
	//BrockenBedrock2outof8
			TileEntitySpecialRenderer render4 = new RenderBrockenBedrock2outof8();
			ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBrockenBedrock2outof8.class, render4);
	//BrockenBedrock3outof8
			TileEntitySpecialRenderer render5 = new RenderBrockenBedrock3outof8();
			ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBrockenBedrock3outof8.class, render5);
	//BrockenBedrock4outof8
			TileEntitySpecialRenderer render6 = new RenderBrockenBedrock4outof8();
			ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBrockenBedrock4outof8.class, render6);
	//BrockenBedrock5outof8
			TileEntitySpecialRenderer render7 = new RenderBrockenBedrock5outof8();
			ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBrockenBedrock5outof8.class, render7);
	//BrockenBedrock6outof8
			TileEntitySpecialRenderer render8 = new RenderBrockenBedrock6outof8();
			ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBrockenBedrock6outof8.class, render8);
	//BrockenBedrock7outof8
			TileEntitySpecialRenderer render9 = new RenderBrockenBedrock7outof8();
			ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBrockenBedrock7outof8.class, render9);
}
public void registerTileEntitySpecialRenderer(){

}
}

Posted

*facepalm* I found the problem I forgot to register it in the main class. Well 6 hours of searching for some silly mistake -.- Anyways thanks for your help :D

For all who are having the same problem, just register your Tileentity with "GameRegistry.registerTileEntity(tileEntityClass, id);" in the preInit of your main.class

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

    • When I first heard about Bitcoin back in 2018, I was skeptical. The idea of a decentralized, digital currency seemed too good to be true. But I was intrigued as I learned more about the technology behind it and its potential. I started small, investing just a few hundred dollars, dipping my toes into the cryptocurrency waters. At first, it was exhilarating to watch the value of my investment grow exponentially. I felt like I was part of the future, an early adopter of this revolutionary new asset. But that euphoria was short-lived. One day, I logged into my digital wallet only to find it empty - my Bitcoin had vanished without a trace. It turned out that the online exchange I had trusted had been hacked, and my funds were stolen. I was devastated, both financially and emotionally. All the potential I had seen in Bitcoin was tainted by the harsh reality that with decentralization came a lack of regulation and oversight. My hard-earned money was gone, lost to the ether of the digital world. This experience taught me a painful lesson about the price of trust in the uncharted territory of cryptocurrency. While the technology holds incredible promise, the risks can be catastrophic if you don't approach it with extreme caution. My Bitcoin investment gamble had failed, and I was left to pick up the pieces, wiser but poorer for having placed my faith in the wrong hands. My sincere appreciation goes to MUYERN TRUST HACKER. You are my hero in recovering my lost funds. Send a direct m a i l ( muyerntrusted ( @ ) mail-me ( . )c o m ) or message on whats app : + 1 ( 4-4-0 ) ( 3 -3 -5 ) ( 0-2-0-5 )
    • You could try posting a log (if there is no log at all, it may be the launcher you are using, the FAQ may have info on how to enable the log) as described in the FAQ, however this will probably need to be reported to/remedied by the mod author.
    • 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
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

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