Jump to content

Kuuu

Members
  • Posts

    62
  • Joined

  • Last visited

Everything posted by Kuuu

  1. Make sure your folder with textures has lower case letters. Your modid is 'MTM', folder in assets should be called 'mtm'.
  2. Have you registered your generator?
  3. Seems I removed registering line while was testing other things and forgot to return it back thanks for help.
  4. Hello, I'm updating my mod to 1.9, can't get GUIs to open. onBlockActivated is called but GUI doesn't show up @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { if (worldIn.isRemote) { return true; } else { System.out.println("onBlockActived was called! Trying to open GUI"); playerIn.openGui(More.instance, 0, worldIn, pos.getX(), pos.getY(), pos.getZ()); return true; } } Here is my GuiHandler: Thanks in advance!
  5. Put this in init() ChestGenHooks.getInfo(ChestGenHooks.CATEGORY).addItem(new WeightedRandomChestContent(new ItemStack(YourItem),Min,Max,Rarity));
  6. Awesome_Spider, I copied all the code from my working mod, so I can't understand what's the problem. Do you use big or small oak tree generation? Hmm, try to remove IWorldGenerator implementation and remove this from MaztrixTreeGen: @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { int x = random.nextInt(16); int z = random.nextInt(16); this.generate(world, random, x, world.getHeightValue(x, z), z); }
  7. It won't generate in air because MaztrixTreeGen should check if the block is grass, but i think i've got long world generating because of this, thanks, i'll use int randPosY= world.getHeightValue(randPosX, randPosZ);
  8. At first you have to make a class that implements IWorldGenerator and register it. Let's call it Generate.java: Generate.java Then create a var to register it: Main mod class: Generate generate = new Generate(); And register it in init(): GameRegistry.registerWorldGenerator(generate, 0); And in Generate.java you can generate your trees Write this in generateSurface method: I hope it helps.
  9. Thanks, it works now, here's the code if someone needs it: @Override public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemstack) { return true; } @Override public boolean isDamageable() { return true; } @Override public boolean hasContainerItem(ItemStack itemstack) { return true; } @Override public ItemStack getContainerItem(ItemStack itemStack) { ItemStack cStack = itemStack.copy(); cStack.setItemDamage(cStack.getItemDamage() + 1); cStack.stackSize = 1; return cStack; }
  10. You don't need to write shape for shapeless recipe new Object[]{"SCO"} just do this: GameRegistry.addShapelessRecipe(new ItemStack(Items.diamond, 1), new Object[]{Blocks.stone,MBlocks.ComStone, Blocks.obsidian});
  11. Hello. I'm trying to make it so my tool will get back in inventory with little damage after crafting. I have this code: But i don't get the item back after crafting, and i can't understand why. Please help.
  12. Fixed, the problem was in Minions mod.
  13. Hello. I want to play minecraft 1.7.2 with mods on my server, I installed cauldron-1.7.2-1.1147.04.91-server and some mods: When i join my server I get an error "Fatally missing blocks and items" I re-created my world but still can't join. here's server log:
  14. Replace EnumToolMaterial with ToolMaterial
  15. Tried these both, but it didn't work, I think my problem is in another place. I'll create a new topic and will post all code in it. Thanks!
  16. I need to know if the item isRepairable. in 1.6.4 I used this: Item.itemsList[var4.itemID].isRepairable() Item.field_150901_e.getObject() //this returns Object, I need something that will return Item
  17. I know what there's no more itemID
  18. Hello! I need to get an Item from list of Items, in 1.6.4 I used: Item.itemsList[itemstack.itemID]; But now I can't find itemsList in Item.class
  19. Hello! I'm updating my mod from 1.6.4 to 1.7.2 In this mod I have a block with gui, onContainerClosed I need to drop an item, in 1.6.4 I used: entityplayer.dropPlayerItem(itemstack); now dropPlayerItem doesn't exist and I couldn't find similar function.
  20. Hello! I need to compare my block with block, which is at x,y,z I used this in 1.6.4: if(worldObj.getBlockId(posX, posY, posZ) != MyMod.MyBlock) but in 1.7 I can't get id of my block I couldn't find function in World.java what takes coords and returns Block
  21. Thanks for reply! PlayerEvent.ItemCraftedEvent() //Did you mean this? It takes 3 args: player, itemstack, iinventory I just need to register my crafting handler I used GameRegistry.registerCraftingHandler(new MyCraftingHandler()); It needs only my crafting handler to register it
  22. Hello! How can I register crafting handler in 1.7.2? In 1.6.4 I used GameRegistry.registerCraftingHandler(); But now registerCraftingHandler() doesn't exist in GameRegistry Thanks in advance!
×
×
  • Create New...

Important Information

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