
Kuuu
Members-
Posts
62 -
Joined
-
Last visited
Everything posted by Kuuu
-
Make sure your folder with textures has lower case letters. Your modid is 'MTM', folder in assets should be called 'mtm'.
-
Have you registered your generator?
-
Seems I removed registering line while was testing other things and forgot to return it back thanks for help.
-
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!
-
Put this in init() ChestGenHooks.getInfo(ChestGenHooks.CATEGORY).addItem(new WeightedRandomChestContent(new ItemStack(YourItem),Min,Max,Rarity));
-
[1.7.10] [Resolved] Help with creating custom tree generation.
Kuuu replied to a topic in Modder Support
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); } -
[1.7.10] [Resolved] Help with creating custom tree generation.
Kuuu replied to a topic in Modder Support
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); -
[1.7.10] [Resolved] Help with creating custom tree generation.
Kuuu replied to a topic in Modder Support
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. -
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; }
-
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});
-
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.
-
Fixed, the problem was in Minions mod.
-
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:
-
Replace EnumToolMaterial with ToolMaterial
-
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!
-
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
-
I know what there's no more itemID
-
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
-
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.
-
[1.7.2]How to get Block from world using coordinates?
Kuuu replied to Kuuu's topic in Modder Support
Thanks! -
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
-
Thanks!
-
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
-
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!
-
Take a look at Cauldron code