Jump to content

robmart

Members
  • Posts

    56
  • Joined

  • Last visited

Everything posted by robmart

  1. That does not work on 1.8
  2. So i have this code for my crop base package com.robmart.MoreMinecraft.block; import net.minecraft.block.Block; import net.minecraft.block.BlockCrops; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.util.EnumWorldBlockLayer; import net.minecraft.world.IBlockAccess; import net.minecraftforge.common.EnumPlantType; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class Crops extends BlockCrops{ @SideOnly(Side.CLIENT) public EnumWorldBlockLayer getBlockLayer() { return EnumWorldBlockLayer.CUTOUT; } public boolean isFullCube() { return false; } public boolean isOpaqueCube() { return false; } @Override protected boolean canPlaceBlockOn(Block ground) { return ground == Blocks.farmland; } public Crops() { this.setDefaultState(this.blockState.getBaseState().withProperty(AGE, Integer.valueOf(0))); this.setTickRandomly(true); float f = 0.5F; this.setCreativeTab((CreativeTabs)null); this.setHardness(0.0F); this.setStepSound(soundTypeGrass); this.disableStats(); } public EnumPlantType getPlantType(IBlockAccess world, int x, int y, int z) { return EnumPlantType.Plains; } } And this code for the crop itself package com.robmart.MoreMinecraft.block; import com.robmart.MoreMinecraft.init.InitItem; import com.robmart.MoreMinecraft.reference.Reference; import net.minecraft.init.Items; import net.minecraft.item.Item; public class BlockStrawberriesCrop extends Crops{ private static String name = "StrawberriesCrop"; public BlockStrawberriesCrop(){ this.setUnlocalizedName(Reference.MOD_ID.toLowerCase() + ":" + name); } @Override protected Item getSeed() { //return InitItem.StrawberrySeed; return Items.wheat_seeds; } @Override protected Item getCrop() { return InitItem.Strawberry; } public static String getName(){ return name; } } And this code for my blockstates { "variants": { "age=0": { "model": "moreminecraft:strawberries_stage_0" }, "age=1": { "model": "moreminecraft:strawberries_stage_1" }, "age=2": { "model": "moreminecraft:strawberries_stage_2" }, "age=3": { "model": "moreminecraft:strawberries_stage_3" }, "age=4": { "model": "moreminecraft:strawberries_stage_4" }, "age=5": { "model": "moreminecraft:strawberries_stage_5" }, "age=6": { "model": "moreminecraft:strawberries_stage_6" }, "age=7": { "model": "moreminecraft:strawberries_stage_7" } } } And I´m getting this error [19:14:09] [Client thread/WARN]: Unable to load definition moreminecraft:StrawberryCrop#age=1 java.lang.RuntimeException: Encountered an exception when loading model definition of model moreminecraft:blockstates/StrawberryCrop.json at net.minecraft.client.resources.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:177) ~[ModelBakery.class:?] at net.minecraft.client.resources.model.ModelBakery.loadVariants(ModelBakery.java:118) [ModelBakery.class:?] at net.minecraft.client.resources.model.ModelBakery.func_177577_b(ModelBakery.java:98) [ModelBakery.class:?] at net.minecraft.client.resources.model.ModelBakery.setupModelRegistry(ModelBakery.java:88) [ModelBakery.class:?] at net.minecraft.client.resources.model.ModelManager.onResourceManagerReload(ModelManager.java:29) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [simpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:766) [Minecraft.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:306) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:520) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:355) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) [idea_rt.jar:?] Caused by: java.io.FileNotFoundException: moreminecraft:blockstates/StrawberryCrop.json at net.minecraft.client.resources.FallbackResourceManager.getAllResources(FallbackResourceManager.java:99) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getAllResources(SimpleReloadableResourceManager.java:81) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.resources.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:152) ~[ModelBakery.class:?] ... 24 more And other errors like that one for age 1-7. What do i do?
  3. How do i make a block drop 1-3 items (randomly) I have this code for dropping items @Override public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) { ArrayList<ItemStack> items = new ArrayList<ItemStack>(); items.add(new ItemStack(InitItem.StrawberrySeed)); items.add(new ItemStack(InitItem.Strawberry)); return items; }
  4. where do i place the id and what id do i use(you cant for example do minecraft:stone)
×
×
  • Create New...

Important Information

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