Posted August 11, 201510 yr I really haphazardly put together this code, taking code from Sugar Cane and seeing if it works. I got it so it works exactly like Sugar Cane, but it doesn't have any textures to it. I know I'm missing a part where I label each texture for each age of it, but I have no idea how to do that. So if you can help me out it'd be appreciated. BlockBeans.java package com.kansastoyou.mod.blocks; import java.util.Random; import com.kansastoyou.mod.init.RandomItems; import net.minecraft.block.BlockReed; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.util.EnumWorldBlockLayer; import net.minecraft.world.World; public class BlockBeans extends BlockReed { public BlockBeans(Material materialIn) { super(); this.setHardness(0.3F); this.setResistance(3); this.setStepSound(this.soundTypeGrass); } @Override public boolean isOpaqueCube() { return false; } public Item getItemDropped(IBlockState state, Random rand, int fortune) { return RandomItems.beans_harvested_item; } public int quantityDropped() { return 1; } @Override public EnumWorldBlockLayer getBlockLayer() { return EnumWorldBlockLayer.CUTOUT; } } It also says that i'm missing this in the console. [09:23:14] [Client thread/ERROR] [FML]: Model definition for location rm:beans_block#age=10 not found [09:23:14] [Client thread/ERROR] [FML]: Model definition for location rm:beans_block#age=7 not found [09:23:14] [Client thread/ERROR] [FML]: Model definition for location rm:beans_block#age=6 not found [09:23:14] [Client thread/ERROR] [FML]: Model definition for location rm:beans_block#age=15 not found [09:23:14] [Client thread/ERROR] [FML]: Model definition for location rm:beans_block#age=5 not found [09:23:14] [Client thread/ERROR] [FML]: Model definition for location rm:beans_block#age=4 not found [09:23:14] [Client thread/ERROR] [FML]: Model definition for location rm:beans_block#age=12 not found [09:23:14] [Client thread/ERROR] [FML]: Model definition for location rm:beans_block#age=11 not found [09:23:14] [Client thread/ERROR] [FML]: Model definition for location rm:beans_block#age=14 not found [09:23:14] [Client thread/ERROR] [FML]: Model definition for location rm:beans_block#age=9 not found [09:23:14] [Client thread/ERROR] [FML]: Model definition for location rm:beans_block#age=13 not found [09:23:14] [Client thread/ERROR] [FML]: Model definition for location rm:beans_block#age=8 not found [09:23:14] [Client thread/ERROR] [FML]: Model definition for location rm:beans_block#age=3 not found [09:23:14] [Client thread/ERROR] [FML]: Model definition for location rm:beans_block#age=2 not found [09:23:14] [Client thread/ERROR] [FML]: Model definition for location rm:beans_block#age=1 not found [09:23:14] [Client thread/ERROR] [FML]: Model definition for location rm:beans_block#age=0 not found Screenshots:
August 11, 201510 yr In your blockstate json file for this block you have to state a model for each age it has. { "variants": { "age=0": {"model": "MODID:REED_0"}, "age=1": {"model": "MODID:REED_1"}, "age=2": {"model": "MODID:REED_2"}, "age=3": {"model": "MODID:REED_3"}, "age=4": {"model": "MODID:REED_4"}, "age=5": {"model": "MODID:REED_5"}, } } add ages up to the ages you have set for your reed. You can also refer to the same model for each age. { "variants": { "age=0": {"model": "MODID:REED"}, "age=1": {"model": "MODID:REED"}, "age=2": {"model": "MODID:REED"}, "age=3": {"model": "MODID:REED"}, "age=4": {"model": "MODID:REED"}, "age=5": {"model": "MODID:REED"}, } }
August 11, 201510 yr Make sure that your property and 'age' are spelled exactly the same and have the same case. Long time Bukkit & Forge Programmer Happy to try and help
August 11, 201510 yr Author In your blockstate json file for this block you have to state a model for each age it has. { "variants": { "age=0": {"model": "MODID:REED_0"}, "age=1": {"model": "MODID:REED_1"}, "age=2": {"model": "MODID:REED_2"}, "age=3": {"model": "MODID:REED_3"}, "age=4": {"model": "MODID:REED_4"}, "age=5": {"model": "MODID:REED_5"}, } } add ages up to the ages you have set for your reed. You can also refer to the same model for each age. { "variants": { "age=0": {"model": "MODID:REED"}, "age=1": {"model": "MODID:REED"}, "age=2": {"model": "MODID:REED"}, "age=3": {"model": "MODID:REED"}, "age=4": {"model": "MODID:REED"}, "age=5": {"model": "MODID:REED"}, } } I added that to my Blockstate and It's still not working. I didn't add anything really to my BlockBeans.java that tells it to act anything like Sugar Cane except it extending BlockReed. Where/how would I set up the ages in the Block class?
August 11, 201510 yr never ever copy paste sth without thinking and expect it to work. of course u ned to replace modid and reed.
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.