Jump to content

Sommanker

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by Sommanker

  1. Thanks for the recommendation, but from what I've seen recently, many mods are starting to drop support for RF and are starting to use FE/Tesla more and more instead, sources being things like this https://www.reddit.com/r/feedthebeast/comments/5defce/redstone_flux_and_energy_apis_in_111/?st=j6b7xwui&sh=9d527ad5 . Admittedly, there are more tutorials so it would be far easier for me to get started with RF, but equally I think I would rather, if at all possible, go straight to what appears to be becoming the future popular API to use, and if not FE, then Tesla.
  2. Hi, I'm trying to implement energy into my mod and have decided to use Forge Energy. I am struggling to do this, however. I know that I need to create an energy class extending EnergyStorage for the storage, but even after watching a tutorial I found and studying the source code of existing mods (mainly because most mods have complex systems and implementations and I can't figure out which parts of their code are necessary for this), I am finding it difficult to figure out how to actually do this and get it to work, and so am looking for some in-depth assistance or tutorial, that assumes no prior knowledge when it comes to energy (as I have never used any kind of energy API at all before - some explanations of FE I found assume that the reader has experience with RF). What functions do I need to override, what classes do I need to create to get a basic system working? I'm looking to include storage blocks, producing blocks and energy-using blocks (and items) and I think I want energy to be transmitted wirelessly. Thank you!
  3. Ahhh I think I might finally understand? Sorry if I'm being thick. So forge calls the old getDrops, which calls the new one. I need to override the new getDrops in order to populate the list - and do nothing else. I'll try that!
  4. Then how does forge know what list to pass to getDrops?
  5. But then where do I call getDrops from?
  6. Yeah, but you can't override and use the new one because then there is no way to add items to the NonNullList which must be passed to it unless you override all the other methods I list in earlier posts, which I thought should be unnecessary (and I assumed will be when the deprecated getDrops is removed)?
  7. Ah, I think I understand, so the old getDrops is called automatically, so I don't need to override the onBlockDestroyed methods to call it, nor the dropBlockAsItem methods, so I just need to override the old getDrops to add stuff to the NonNullList it creates, and leave everything else the same, until the old getDrops method is removed. I'll try it :3 If this is correct, it's kinda weird since the comments above the old getDrops tells you to use the other one...
  8. If I don't override those, then when is the new getDrops called? Don't I have to override those, where I declare the NonNullList and pass it to getDrops?
  9. dropBlockAsItemWithChance calls the deprecated getDrops at the moment though: which has different arguments, so overriding the new getDrops won't affect it I thought?
  10. Ok, so I therefore assume that I have to override the onBlockDestroyedByPlayer and the same for explosions so that I can do that? And also override dropBlockAsItem and dropBlockAsItemWithChance, as they still use the deprecated for backwards compatibility meaning that I should un-override them again once the deprecated method is removed?
  11. I can't find any provided list - there doesn't seem to be a NonNullList declared in Block. That could be it considering that onBlockDestroyedByPlayer (assuming that's what you meant since there is no onBlockBroken) has no body in the Block class, I'll give it a try.
  12. Hi, I just went to create a block that is guaranteed to drop three different items (e.g. 1 of item a, 1 of item b and 1 of item c) when broken, which would, previously, have been done through the getDrops method in Block: where you create a NonNullList with the items and return it. However, this is deprecated, so now we should use the new getDrops method in Block: This instead takes the list as an argument, and returns nothing. How does one use this new method? How will forge have the ItemStack list to pass when it is called, or do I have to call it myself - in which case, from where? I couldn't find anything in Block, and I don't know where else to look. Thanks
  13. Works perfectly isOpaqueCube is deprecated, but it works. Thanks a lot for the help, I kinda felt like a bit of an idiot at some points though <3
  14. It works! Thanks <3 Excluding a few things :c The texture is now there, however the transparent sections of the texture (only when placed as a block) appear as solid black rather than transparent. Also, when the block is placed, any adjacent blocks have no texture on that face anymore (invisible) (http://imgur.com/a/wAse1) There are no errors in the console now, though Changed code:
  15. I think I've done what you said above, and now the model does not appear as water, but it does appear as a solid block with no texture. Again, the texture is normal in the hand, including the block/cross ness, which seems to be absent when placed as a block. What did I do wrong? BrownSeaweed class: ClientProxy class: ModBlocks class: And the errors in console:
  16. I doubt it renders the top surface if the block has no water on top, but I'm not sure since at the moment, I can't get it to work. I believe that I have added the level property, as the block now places without the game crashing. However, when placed, it looks and behaves like a water source block (only it doesn't flow). (The model still looks correct when held in hand) BrownSeaweed class: blockstates/brownseaweed.json: models/block/brownseaweed.json: Errors in console: Looking at the errors, it seems as though I need to provide model variants for each level of water even though they are unused? I don't know if that's correct though, and I don't know how to do so.
  17. My bad, thought this would be better. Done.
  18. Hi, I'm trying to make an underwater seaweed block. However, when placed underwater, it looks bad as the water flows around it. I assume therefore I need to change the block's material to be that of water? (as described in another topic) Unless there is an easier way to do it. However, when I do this, the game crashes whenever I place the block now. Crash log:
  19. Hey, I'm trying to do a similar thing in my own mod, how do I set the LEVEL property you describe in the first post? At the moment my game crashes whenever I place the block, because it thinks its water due to the material and has nothing set for that.
  20. Hi, I am trying to make a seaweed item for my mod using block/cross. The block state json looks like this: { "forge_marker": 1, "defaults": { "model": "biochemicalengineering:brownseaweed" }, "variants": { "normal": [{}], "inventory": [{}] } } and the model json { "parent": "block/cross", "textures": { "top": "biochemicalengineering:blocks/brownseaweed" } } The problem is, the texture does not load - I get the unloaded texture black and purple texture, both in hand and when placed. The only errors in the log are these warnings: [19:04:43] [main/WARN]: Unable to resolve texture due to upward reference: #cross in minecraft:models/block/cross [19:04:44] [main/WARN]: Unable to resolve texture due to upward reference: #cross in minecraft:models/block/cross What do these mean and how do I solve the problem? Note that if I change the parent to block/cube_all and "top" to "all", the texture does render correctly (but obviously not in a cross). Thanks in advance!
×
×
  • Create New...

Important Information

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