Jump to content

Mii1128

Members
  • Posts

    12
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am back!

Mii1128's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hello, I got back into modding and started from scratch today. So my question might be very stupid but bear with me. To get a feeling for forge i wanted to add a simple item and a simple block (plus blockitem) via DeferredRegistry. The item and the blockitem render fine, but the placed block neither renders correctly nor does it drop the item. I added a screenshot of the game. Thank you for your help. Here is the code that registers blocks and items: public class Blocks { public static final DeferredRegister<Block> BLOCKS = new DeferredRegister<Block>(ForgeRegistries.BLOCKS, Constants.MODID); //Simple Blocks public static final RegistryObject<Block> CORRUPTED_BRICK = BLOCKS.register("corrupted_brick", () -> new Block(Block.Properties.create(Material.ROCK).hardnessAndResistance(6f,1.5f).harvestTool(ToolType.PICKAXE).harvestLevel(1).sound(SoundType.STONE))); //Complex Blocks public static void registerBlocks(){ BLOCKS.register(FMLJavaModLoadingContext.get().getModEventBus()); } } public class Items { public static final DeferredRegister<Item> ITEMS = new DeferredRegister<Item>(ForgeRegistries.ITEMS, Constants.MODID); //BlockItem public static final RegistryObject<Item> CORRUPTED_BRICK = register("corrupted_brick", Blocks.CORRUPTED_BRICK); //Simple Item public static final RegistryObject<Item> CORRUPTED_DIAMOND = ITEMS.register("corrupted_diamond", () -> new Item( new Item.Properties().group(Constants.GROUP))); //Complex Item public static void registerItems(){ ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus()); } private static RegistryObject register(String name, RegistryObject<Block> block){ return ITEMS.register(name, () -> new BlockItem(block.get(), new Item.Properties().group(Constants.GROUP))); } } @Mod(Constants.MODID) public class CallOfTheVoid { public CallOfTheVoid(){ Blocks.registerBlocks(); Items.registerItems(); } } EDIT: I forgot to add the Blockstates json file
  2. I have got the Model.class the renderer.class and a Block for it how i register the handler there are only Entityrenderers. or ISimpleBlockRenderingHelper
  3. I am searching someone who can teach me modding and may help me with my mod about food. Thanks to all replies Mii1128.
  4. ummm simpler please ...
  5. How i render a block with a texture on tob, another on bottom, one on the side that faces to you when u place it and one for all the other sides Sorry but im new to jawa and modding so make the answer simple please.
  6. well for some issues i dont understand it still doesnt work. i'll give that up for now.
  7. Ok thanks i can live with that
  8. public StcmItemFood(int par1, int par2, float par3, boolean par4) { super(par1); this.itemUseDuration = 32; this.healAmount = par2; this.isWolfsFavoriteMeat = par4; this.saturationModifier = par3; this.setCreativeTab(CreativeTabs.tabFood); } public ItemStack onEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { --par1ItemStack.stackSize; par3EntityPlayer.getFoodStats().addStats(this); par2World.playSoundAtEntity(par3EntityPlayer, "random.burp", 0.5F, par2World.rand.nextFloat() * 0.1F + 0.9F); this.onFoodEaten(par1ItemStack, par2World, par3EntityPlayer); return par1ItemStack; } this is the problem when i hover over it sais :The method addStats(ItemFood) in the type FoodStats is not applicable for the arguments (StcmItemFood)
  9. .addStats(this) doesnt work now
  10. Thanks
  11. How change the time i need to eat some custom foods.
  12. ---- Minecraft Crash Report ---- // This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~] Time: 18.07.13 20:46 Description: Initializing game java.lang.ClassCastException: net.minecraft.item.ItemStack cannot be cast to java.lang.Character at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:187) at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:244) at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:239) at mii1128.stcm.Stcm.load(Stcm.java:54) 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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:540) 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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:193) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173) 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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:104) at cpw.mods.fml.common.Loader.initializeMods(Loader.java:697) at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:222) at net.minecraft.client.Minecraft.startGame(Minecraft.java:506) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796) at net.minecraft.client.main.Main.main(Main.java:93) 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:57) at net.minecraft.launchwrapper.Launch.main(Launch.java:18) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:187) at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:244) at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:239) at mii1128.stcm.Stcm.load(Stcm.java:54) 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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:540) 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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:193) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173) 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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:104) at cpw.mods.fml.common.Loader.initializeMods(Loader.java:697) at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:222) at net.minecraft.client.Minecraft.startGame(Minecraft.java:506) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796) at net.minecraft.client.main.Main.main(Main.java:93) 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:57) at net.minecraft.launchwrapper.Launch.main(Launch.java:18) -- System Details -- Details: Minecraft Version: 1.6.2 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_03, Oracle Corporation Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 726930384 bytes (693 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Suspicious classes: FML and Forge are installed IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v8.04 FML v6.2.19.789 Minecraft Forge 9.10.0.789 4 mods loaded, 4 mods active mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized FML{6.2.19.789} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized Forge{9.10.0.789} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized stcm{0.0.1 pre alpha} [Cooking with Steve] (bin) Unloaded->Constructed->Pre-initialized->Errored Launched Version: 1.6 LWJGL: 2.9.0 OpenGL: Intel® HD Graphics Family GL version 3.1.0 - Build 8.15.10.2418, Intel Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Pack: Default Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
×
×
  • Create New...

Important Information

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