Jump to content

Xanderr_K

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by Xanderr_K

  1. Oh, thank you! Crap, that's where I has mistake! I thought it is a new music, but this one is playing only in creative mode, I never played one on my current installed MC! LOL.
  2. That strange question needs to be clarified. When I running a game built in Eclipse workspace, it plays a lot of new, different abient tracks which I never heared in my Minecraft that I use to play. The game is up to date, but Resource folder contains only old music, 12 tracks total. I tried to dig in Forge folder that should contain whole Example project, but found nothing.
  3. Ok, I just hardcoded all names into array and pushed it to ItemMultiTexture to register and got 4 correct ItemBlocks in creative inventory, that's better than nothing. Now I'm scratching head - how I should name correct .json for model and how to point at textures to put on? I have no such problems with single block w/out metas, it was easy, but the same way isn't working here.
  4. That's true, but I'm in search of set-and-forget method which I can feed with any Block-extending object in future and not to hardcode an array of it's meta names, enlarging code by another 10-20 lines.
  5. I'm entangled a bit. That move gives me int of every meta through loop section, but I can't find a way to convert it to meta's name. block.getStateFromMeta().toString() is deprecated and crashing Minecraft.
  6. I'm not stupid at all. I just asking, how I can obtain list of all meta's names? If I using while cycle with names[ i ] = BlockNewStoneBricks.BrickType.byMetadata(i).getName(); throwing an excrption, so I just can't find any way to proprly obtain name of all metas as array. Of course I can register them manually, but hardcoding isn't our way, right? Also, what if I would have 10, 20 blocks with 3 to 10 metas each?
  7. Yes, I looked at this class but cannot understand how to obtain string[] with names by metadata (Block class are not providing methods for that) or even how to feed it's constructor with proper Function<ItemStack, String> (the Guava docs explaining this last one function, but it is too hard for me). Sorry, I'm new to Java, only used C# before and I'm not so experienced programmer =(
  8. My Java-sense tells me nothing, master... =( I have no idea where to take an array of names for every meta of my block, it not provides any public functions for that.
  9. Of course I do =) I just edited swing distance and made it wider to match hammer's size, weight and low attack speed. Maybe I should change the swing and hit sounds too.
  10. Thank you so much! It's working perfectly when I just copy-pasted the section inside if(flag3) and changed entries to attacker and target. Well, now only knockback remains, I think I can win it
  11. Hm, as I realize, the swing is hardcoded in EntityPlayer method attackTargetEntityWithCurrentItem, and there is section that checking if (itemstack != null && itemstack.getItem() instanceof ItemSword). How can I change it through overriding Item's hitEntity? Maybe this question looks noobish, but I missing something there and cannot understand...
  12. Would be nice to edit this falue, for ex., to make stronger knockback from custom weapon - Hammer. But I didn't found any proper way to it =( Also, anybody know how to apply a wide swing to custom weapon, like vanilla swords have?
  13. Hi there! I impacted the same problem with registering render for block with meta. Can you please explain, how you're applied this ItemMultiTexture? My situation is: I can spawn my blocks via code by pointing any proper VARIANT (using tools or items I created for this, like "Pile of Moss" to convert Chiseled Stone Brick into my new custom Chiseled Mossy Stone Brick), but in Creative inventory my blocks shown as one "empty" cell (actually no model/texture shown) and three placeholders. So I need to register render for all my metas somehow, also I need to create proper .json for it (which name I should use? no idea...).
  14. Ok, I thought same way, but stuck when tried to loop through all metas -didn't found how to get every meta as int one by one if, say, we have no idea which block will be registered and how many metas it will have.
  15. Hi again, guys I have a new question. I digged around in MC and Forge code and manuals, but did not found any useful information about how to register render for custom blocks wit meta. I realized how to create, call and draw the blocks itself and I can get them via craft or tools (i.e. my item "moss pile" making chiseled mossy stone bricks from vanilla chiseled one), but my creative tab shows me three placeholders, each gives me the same block when placed (with meta=0). It assumes that standard way of registering render (where we casting Item.getItemFromBlock(block) ) is not correct in this way, so I calso can't register it via loop method described above. Should I manually call getItemFromBlock for each meta somehow?
  16. Yea, I found I experimented with this parameter and forgot to zero it Just came here to edit post, but you replied. Thanks!
  17. Blocks: Have a list that stores blocks Items: Have list that stores items Blocks in ModelLoader: Item.getItemFromBlock(block) Items in ModelLoader: item Ah, of course, that's obvious. Just the word "mirror" confused me a bit Thank you for your advices and patience, I got my new block and item registered and rendered correctly! There is only one question remains: why my block not shading as like Coal Ore and other vanilla blocks does?
  18. Thanks so much, I'm already re-writing my stuff, but not tested yet. BTW, another questions: is the loop method has sense for registering Items; and will this way of rendering Items work?: ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
  19. Hi guys! Last few days I learning all stuff about Forge and trying to write my own example mod to test modding features. I used some tutorials I found on the YouTube and other resources, but, TBH, I've not found proper and actual tutorial for 1.10 that show all steps in creating block. And the hardest thing I've impacted is my custom block isn't displaying texture (black/purple squares) and using placeholder instead BlockItem in inventory. This is my working code: BlockGreenOre class TestBlock class that is called from Main and the Main class And some shots: So, when I trying to register new ItemBlock form green_ore (as told here), game crashes with error telling me about trying to register same name twice. If I changing the name (adding + " Block"), it gives me two blocks in a creative tab, both w/out textures and with same behaviour. Also, when I trying to replace GameRegistry.registerBlock(block, block.getUnlocalizedName) with newest GameRegistry.register(block), it crashes (while creating an Item it is working).
×
×
  • Create New...

Important Information

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