Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spawning cardbox using Command Block may give a crash #254

Open
Lythom opened this issue Oct 30, 2014 · 2 comments
Open

Spawning cardbox using Command Block may give a crash #254

Lythom opened this issue Oct 30, 2014 · 2 comments

Comments

@Lythom
Copy link

Lythom commented Oct 30, 2014

Hello,
I tried to spawn a colored Cardbox using commandblock, It leaded to a crash because the given color was not a number. The world crashed and I had to use the former version of the mod to repair data them upgrade it again.
The command were :

/give @p 185 1 0 {display:{Lore:["Il faut stocker PLUS d'items !"],Name:"Storage deck 1",color:#FFFFFF}}

here's the stacktrace :

---- Minecraft Crash Report ----
// Don't do that.    

Time: 30/10/14 22:54
Description: Rendering entity in world    

java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
    at net.mcft.copy.betterstorage.item.tile.ItemCardboardBox.func_82790_a(ItemCardboardBox.java:45)
    at net.mcft.copy.betterstorage.client.renderer.ItemRendererCardboardBox.renderItem(ItemRendererCardboardBox.java:32)
    at net.minecraftforge.client.ForgeHooksClient.renderEntityItem(ForgeHooksClient.java:136)
    at net.minecraft.client.renderer.entity.RenderItem.func_76986_a(RenderItem.java:93)
    at net.minecraft.client.renderer.entity.RenderItem.func_76986_a(RenderItem.java:746)
    at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:293)
    at net.minecraft.client.renderer.entity.RenderManager.func_147940_a(RenderManager.java:276)
    at net.minecraft.client.particle.EntityPickupFX.func_70539_a(SourceFile:52)
    at net.minecraft.client.particle.EffectRenderer.func_78872_b(EffectRenderer.java:211)
    at net.minecraft.client.renderer.EntityRenderer.func_78471_a(EntityRenderer.java:1604)
    at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1298)
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:990)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:887)
    at net.minecraft.client.main.Main.main(SourceFile:148)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

Version : 0.10.4.116

I hope it will help improve this already very good mod ! Thanks :)

@copygirl
Copy link
Owner

Not sure if this would classify as a bug. Most of the code handling NBT data in BetterStorage doesn't work well with invalid data / types, whether it is from spawning in items / blocks using commands, changing them ingame somehow (in-game NBTEdit) or outside the game (MCEdit).

@Lythom
Copy link
Author

Lythom commented Oct 30, 2014

Having some safeguard on NBT data would help map makers playing around with customizing blocks from the mod without the fear of crashing everything at a single wrong step. That said it won't stop me from using the mod in my maps, I'll just have to be more carefull =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants