Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Kaneka

Members
  • Joined

  • Last visited

Everything posted by Kaneka

  1. Hi everyone, is there any guide or can someone explain, how to add own loot tables so i can use these in my generated structure? thanks for the answers:)
  2. Hi everyone, I am trying to generate structures with mod blocks, but atm I dont know how to do this. I found a tutorial with MCedit, but i read that there is no compability with mod blocks. Can someone help me? Additional to say, i have my own ChunkProvider, maybe it can make the thing easier! Thanks for every answer! Kaneka
  3. Maybe this links will help you a bit: http://www.wuppy29.com/minecraft/1-8-tutorial/updating-1-7-to-1-8-part-1-setup-mod-file/ http://www.wuppy29.com/minecraft/1-8-tutorial/updating-1-7-to-1-8-part-2-basic-items/ http://www.wuppy29.com/minecraft/1-8-tutorial/updating-1-7-to-1-8-part-3-basic-blocks/
  4. oh ok, thanks for the answers...
  5. This do no work....addenchantment return void, but the addRecipe method needs only ItemStack as input, but i think i found the major problem: My code in CraftingRecipes: .. GameRegistry.addShapelessRecipe(new ItemStack(Modblocks.eff1,1,0), Items.enchanted_book.getEnchantedItemStack(new EnchantmentData(Enchantment.efficiency, 1))); ... GameRegistry.class: ... public static void addShapelessRecipe(ItemStack output, Object... params) { CraftingManager.getInstance().addShapelessRecipe(output, params); } ... CrafttingManager.class: ... public void addShapelessRecipe(ItemStack stack, Object ... recipeComponents) { ArrayList arraylist = Lists.newArrayList(); Object[] aobject = recipeComponents; int i = recipeComponents.length; for (int j = 0; j < i; ++j) { Object object1 = aobject[j]; if (object1 instanceof ItemStack) { arraylist.add(((ItemStack)object1).copy()); } else if (object1 instanceof Item) { arraylist.add(new ItemStack((Item)object1)); } else { if (!(object1 instanceof Block)) { throw new IllegalArgumentException("Invalid shapeless recipe: unknown type " + object1.getClass().getName() + "!"); } arraylist.add(new ItemStack((Block)object1)); } } [u] this.recipes.add(new ShapelessRecipes(stack, arraylist));[/u] } ... recipes.class: ... public void addShapelessRecipe(ItemStack stack, Object ... recipeComponents) { ArrayList arraylist = Lists.newArrayList(); Object[] aobject = recipeComponents; int i = recipeComponents.length; for (int j = 0; j < i; ++j) { Object object1 = aobject[j]; if (object1 instanceof ItemStack) { arraylist.add(((ItemStack)object1).copy()); } else if (object1 instanceof Item) { arraylist.add(new ItemStack((Item)object1)); } else { if (!(object1 instanceof Block)) { throw new IllegalArgumentException("Invalid shapeless recipe: unknown type " + object1.getClass().getName() + "!"); } arraylist.add(new ItemStack((Block)object1)); } } [u]this.recipes.add(new ShapelessRecipes(stack, arraylist));[/u] } ... ShapelessRecipes.class ... public boolean matches(InventoryCrafting p_77569_1_, World worldIn) { ArrayList arraylist = Lists.newArrayList(this.recipeItems); for (int i = 0; i < p_77569_1_.getHeight(); ++i) { for (int j = 0; j < p_77569_1_.getWidth(); ++j) { ItemStack itemstack = p_77569_1_.getStackInRowAndColumn(j, i); if (itemstack != null) { boolean flag = false; Iterator iterator = arraylist.iterator(); while (iterator.hasNext()) { ItemStack itemstack1 = (ItemStack)iterator.next(); if (itemstack.getItem() == itemstack1.getItem() && (itemstack1.getMetadata() == 32767 || itemstack.getMetadata() == itemstack1.getMetadata())) { flag = true; arraylist.remove(itemstack1); break; } } if (!flag) { return false; } } } } return arraylist.isEmpty(); } ... I see that with the .getItem in the last Code it erases the enchantment....
  6. Did all you said, nothing works...
  7. It is set up correctly, my mod works fine...check planttech if you dont think so ....see here(I deletet all unimportant parts and wrote there a ...): Main.class: public class Main { ... @SidedProxy(clientSide="net.kaneka.planttech.ClientProxy", serverSide="net.kaneka.planttech.ServerProxy") public static CommonProxy proxy; @EventHandler public void preinit(FMLPreInitializationEvent e) { ... this.proxy.preInit(e); } @EventHandler public void init(FMLInitializationEvent e) { this.proxy.init(e); } @EventHandler public void postinit(FMLPostInitializationEvent e) { this.proxy.postInit(e); } } Commonproxy.class: public class CommonProxy { public void preInit(FMLPreInitializationEvent e) { ... } public void init(FMLInitializationEvent e) { Craftingrecipes.addRecipe(); ... } public void postInit(FMLPostInitializationEvent e) { } } and least but not last: Craftingrecipes: public class Craftingrecipes { public static void addRecipe() { .... ItemStack eff1 = new ItemStack(Items.enchanted_book); eff1.addEnchantment(Enchantment.efficiency, 1); GameRegistry.addShapelessRecipe(new ItemStack(Modblocks.eff1), eff1); } }
  8. In the init part of my Common proxy
  9. hi, i read the ItemEnchantedBook, and see that the addEnchantment - method adds the NBT, but this wount work : ItemStack eff1 = new ItemStack(Items.enchanted_book); eff1.addEnchantment(Enchantment.efficiency, 1); GameRegistry.addShapelessRecipe(new ItemStack(Modblocks.eff1), eff1);
  10. HI everybody, I wanted to add some recipes(shapeless) with enchated books, but only one at a time... all i get is that you can craft with all enchanted books, not only the one i type. Thanks for your answers, Kaneka
  11. I simply change the getDrops as diesieben07 told me and it works fine:= thanks for all answers
  12. ItemStack item = new ItemStack(Items.enchanted_book); @Override public Item getItemDropped(IBlockState state, Random rand, int fortune) { item.addEnchantment(Enchantment.sharpness, 5); return item.getItem(); } It do not work....help please.
  13. Hi everyone, how do i get a enchanted book, yould you make me an example like a sharpness 4 book ? I want my block drop it. Please give me an example. Thanks for the answers, Kaneka
  14. Thanks, now it is working fine
  15. Hi everyone, for my mod i need to extend a GuiContainer, because my Slots are to much for the normal size, the background isnt that problem, I draw it atm with this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize+16); Everything is drawn, that is not the problem, but the problem I have is, that I needed to put the slots for inventory and hotbar a bit lower, and now the problem is happening. When I am clicking on the items in the hotbar, i throw one of the items i am clicking on(not the whole stack, just 1 at a time) out of my inventory into the world. And this is not what it ment to be doing.. May someone help?? Thanks for every answer. Kaneka
  16. Tip for everyone: snipping tool from Microsoft gives you the wrong .PNG
  17. That was the perfect clue... find my mistake, i don't know why, but all the pictures was saved as .PNG, not as .png... that was the mistake... Thanks for your help
  18. Hope this is enought: public class GuiGuidebook extends GuiScreen { public static final ResourceLocation BACKGROUND = new ResourceLocation("planttech:textures/gui/bookt.png"); private static ResourceLocation[] picture = new ResourceLocation[bookTotalPages]; ... public GuiGuidebook() { stringHeaderText[0] = "Compost Bin"; stringPageText[0] = "Takes apples, potatoes, leaves or equal and a bit of time to transform them to biomass. \n\nThe basic of every good planttechian!"; picture[0] = new ResourceLocation("planttech:textures/gui/recipes/compostbin.png"); ... public void drawScreen(int parWidth, int parHeight, float p_73863_3_) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.getTextureManager().bindTexture(BACKGROUND); int offsetFromScreenLeft = (width - bookImageWidth ) / 2; drawModalRectWithCustomSizedTexture(offsetFromScreenLeft, 2, 0, 0, 400, 250, 400, 300); mc.getTextureManager().bindTexture(picture[currPage]); drawModalRectWithCustomSizedTexture(280, 80, 0, 0, 100, 100, 100, 100); ... If more is needet, tell me to post more
  19. Hi everyone, I am trying to make a GuiScreen as a guide for my mod, and it have pictures in it. And in Eclipse it works well, every picture is shown, but when i export the mod, the bookbackground is shown, every text shows up, but the images i put in are only shown as error image(these purple/black image). Where is my mistake when it is right in Eclipse but not in the exported mod? Thanks for answers, Kaneka
  20. It works, thanks!
  21. Hello everybody, I am trying to make a guiscreen for my mod, but it always uses my texture for the background as a square, but my texture is scaled 400x600 px. I used the drawTexturedModalRect method for the drawing. Can someone help me? Thanks for the answers! Kaneka
  22. Thanks all for the answers, i already got a IGuiHandler in my mod, cause i have planty machines in it with GUI. Hope i can manage to add this to my mod, cause it is complex enought and if you have to go to my minecraftforum thread to check everything, this isnt effectiv
  23. Hello everybody, my mod is growing and i am thinking of making a "book" like the one from Tinker Construct or Draconic Evolution, but i am programming in 1.8. Is there any guide or something like that where i can learn it? Or can someone tell me how to do it? Thanks for the answers, Kaneka
  24. hi, you could even drop exp with public void dropXpOnBlockBreak(World worldIn, BlockPos pos, int amount) { if (!worldIn.isRemote) { while (amount > 0) { int j = EntityXPOrb.getXPSplit(amount); amount -= j; worldIn.spawnEntityInWorld(new EntityXPOrb(worldIn, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, j)); } } } (Taken from the Block.class)
  25. Noone have any idea how i can make this to serverside??

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.