Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Everything posted by AntonBespoiasov

  1. I have a TESR. It has a ModelRenderer field in it that contains custom model. But this custom model is only used for this TESR. How can I load the ModelRenderer from JSON file of model? I tried to do it via ModelLoader but it requires me to bind the model to some block, item or etc...
  2. What is capabilities? Why and where do I need to use them? How to use them? What do they do?
  3. I want to make sword that increases and decreases its attack damage. To do that I use attributes of item stack. To change attack damage I need to change amount of attribute generic.attackDamage. How can I do that in hitEntity method of ItemStack?
  4. When you press F3 debug screen opens. On right side you can find block state info about block you are looking at. Once I noticed that this info isn't synchronized with actual block state, i.e. it isn't the same as actual block state. I came up with idea that debug screen block state info is based on metadata of block because methods getStateFromMeta and getMetaFromState don't use some properties. Is it true? 1.12.2 Java edition
  5. updateTick method of Block is like timer. I can set when I want it to be called and delay before calling using World.udateBlockTick method. But now I want to get somehow amount of ticks left before updateTick will be called. I can use tile entity to store this value but I thin there is more optimized way because if world knows delay I set and when to call updateTick then this delay must be stored somewhere.
  6. I wan't to put all faces and parts of block in one texture instead of putting them in separate files limited by 16x16 resolution. How can use sprite set for block that contains all textures of block? I tried to put all textures of block in one file, it threw warning that says that I broke aspect ratio of resource.
  7. There are properties in my block that are responsive for model of block. But they don't fit in metadata. It means I can't store them in unloaded chunk. To solve it I store these properties(that don't fit in meta) in tile entity(to unload and save them) and in block state(to affect model). I want to know is it normal and enough optimized? And yeah I could use TESR to affect block appearance but I think it's not optimized way due to this block will be in a chunk in big amount.
  8. I have a block that stores a lot of data, rendering of this block is depended on the data. All this data didn't fit block state so I move some of it in tile entity. But now I must somehow make a tile entity depended rendering. This block renders part of another block on it. Rendering of this block is depended on tile entity. I know how to render item in block via tile entity but in this case I must render block in block via tile entity.
  9. Forge lib is big thing, there are many types, functions and etc. So there must be explanation of all of them. There are few pages about basics on official Forge Wiki but learning them you won't have enough knowledge to use Forge lib fully and create cool mods like Industrialcraft, Thaumcraft, Immersive Engineering and etc. So according to other programming branches what you can learn well reading books about them, there are probably books about Forge. If there are books about Forge can you recommend me some.
  10. @Override public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { state.withProperty(BlockBed.FACING, placer.getHorizontalFacing()); calculateBedTileBorders(worldIn, pos, state); calculateBedTilePillow(worldIn, pos, state, placer.getHorizontalFacing()); notifyNeighborsOfBorderRecalculation(worldIn, pos); worldIn.setBlockState(pos, state); } calculateBedTileBorders(...) and calculateBedTilePillows(...) are functions that affect state, they don't set blcok state in world. no
  11. Creating block I override methods that take block state as parameter and do something with it(for example onBlockPlacedBy). But I don't know must I call setBlockState from World to update block state?
  12. I want to make block that will change its model depending on neighbor blocks. I.e. I want to make blocks connected textures. I know that I should use properties and block states but I don't want to save this properties when the chunk is unloaded. Because I can count them on chunk loading. So I need a way to fire these calculations on chunk loading. Maybe there is event-method that fires on chunk loading. I know I ended 4 sentences in row with "chunk loading".
  13. Thanks for answer. Are you real ZigTheHedge? I'm your subscriber.
  14. I have a sword that increase its attack damage each time it hits someone and then after few seconds decreases attack damage back to normal. I need somehow to affect on damage of certain ItemStack and not all ItemStacks of this Item. I already know about attributes of item(I even played with them using Minecraft commands). But I don't know how to change attributes using code. Can you advice some tutorial about attributes or just explain?
  15. Learning about block damage and subblocks I noticed that there is META_LOOKUP variable in every enumeration that response for damage. I even found this variable in enumeration of planks from source code of Minecraft. This variable stores all values of enumeration it is in. I think META_LOOKUP variable is useless because you can just use values() for enumeration to get array of its values. Am I right?
  16. To add block in my mod I assign class of this block to variable in my mod registry and add it to List in that registry. That List has type parameter Block. All my blocks classes extend this Block. So I create a lot of things in these mod blocks and I want to know does Minecraft create instance of these mod blocks in chunk grid to store theme or these blocks classes is needed only to identify block and their instances are created only once in that mod registry?
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.