Jump to content

サムエル

Members
  • Posts

    64
  • Joined

  • Last visited

Everything posted by サムエル

  1. Funny thing you mentioned my mod, version 1.3.0 - 1.3.3 of the Spectrite Mod actually had a horrible bug that produced massive lag (a half-finished dimension that was cancelled due to being so laggy was unintentionally still being generated in the background). If your version is within this range, try updating it and your problem should go away.
  2. I'm still looking for a solution to this. Is it possible for cancellation to be implemented in the existing hook? If not, I'd like to know the name of one of these mods that do what I've been trying to do.
  3. I suggest an event hook for World.playAuxSFX. The specific thing I need it for is that I have custom structures in my mod that use lines of dispensers with hidden redstone circuits and I want to cancel the clicking sound for dispensers according to the BlockPos because they would otherwise click over and over and drive the player crazy.
  4. My bad! I concluded Vanilla armour wasn't working because I only tried the leggings and they weren't showing up because my custom boots were completely overlapping them which I didn't expect. So I guess this is an issue with custom armour only. Here is a screenshot: As for my code, the code for my armour is spread out and I would need to know what code to post. I have the 1.8 version of my mod on GitHub if that's all you need (not much has been changed other than function names): https://github.com/Flashfyre/Chaos_Block/tree/master/main You can refer to the error at the top of this thread too.
  5. I know it failed because it did the same thing as my custom armor that failed: it has a purple/black texture when equipped by entities. I probably should have mentioned that.
  6. This post previously stated that this only happened to HD textured armor but it is now apparent to me that this happens for all armor so I've updated it.
  7. I upgraded my mod from 1.8-11.14.3.1487 to 1.8.8-11.14.4.1586 and now all custom armor textures have a purple/black texture and I get this error with them: I also get the same error for the second layers too. This seems to be a bug with the new forge version but is there a solution/workaround for this yet?
  8. Building my structure in chunk populate seems to have worked judging by the image below. I've seen mine shafts stop right before my structure before so I'm not entirely sure my problem is solved but I haven't had it happen since so it looks promising.
  9. I still have no idea how to fix this. Is anyone able to confirm whether doing this is actually possible yet?
  10. I found your thread about this earlier and also saw the disappointing results of other threads. Doing something like this really should be possible. I doubt I'll be the one to figure it out if there even is a way so I hope someone comes along that has. If there isn't a way then maybe forge needs a new event hook?
  11. Yeah, I figured out it doesn't work. So how can it be done then? (assuming it's possible)
  12. Thank you! I will try this. Edit: I have only tried a few generations but it hasn't happened so far. If I don't come back to this thread then that likely means it worked.
  13. I have a huge maze structure in my mod where alterations caused by vanilla generation can cut across large distances or destroy paths which can ruin the experience. I'd like to know how I can either: (1) prevent my structure from being altered after its generation OR (2) set my structure to generate after the generation of all vanilla structures and anything else that could overwrite the block states of my structure. Image of what I want to prevent (that opening should not be there): WorldGenChaosLabyrinth.java
  14. Thank you! I had lots of other items in my generator and there was a big gap between items using metadata so I didn't notice confusing the arguments.
  15. I actually replaced all the blocks in a huge custom structure with chests and I can definitely tell, since there are many other non-potion items, that all potions are being replaced with regeneration potions. Also, does using Item.getItemById cause this problem?
  16. My chest generator is working fine except for this problem where potions with metadata 8194+ all show up as regeneration potions (8193) in my chests. I don't know if this is a metadata issue with Forge or a silly mistake I'm making, but I can't seem to figure it out. I haven't tested other potions so I don't know if others will do the same thing. Here are the lines of code for the potions:
  17. In case you haven't noticed, your image link no longer works.
  18. I found a somewhat messy way to select four adjacent chunks but the problem is I have to keep checking chunks until I get four adjacent ones that fire the event and because of this I can't build the structure until I select all four chunks. This being the case, changing the ChunkPrimer doesn't do anything since the event has already fired for the selected chunks. Is there a better way to do this, a way to re-fire the event with my altered ChunkPrimer, or a way to pause the event for a given chunk and continue when I know if there are 4 adjacent chunks or not? (I tried wait()/notify() but to no avail) Edit: I gave up on any further help from this thread and went on the Forge IRC and got the solution to the problem. If you have a similar problem, read the edited original post.
  19. Alright, I managed to get a quarter of my structure to load on world creation sometimes without any lag by using the ChunkPrimer from the ReplaceBiomeBlocks event. The reason it's only sometimes is that I've coded it to get the same chunk as the spawn point (for ease of access for testing) and only certain chunks will fire this event so I have to recreate my world until that chunk is among those that fire the event. This being the case, how can I select four adjacent chunks ([x,z],[x+1,z],[x, z+1],[x+1,z+1]) that I can be sure will fire this event? I can't find anything that uses ReplaceBiomeBlocks in the vanilla code so I don't really know where I can find out how it works aside from asking in this forum. I also don't know how chunks load so if they always load in a particular order then please tell me because it will help me greatly.
  20. This ChunkPrimer method sounds promising, but how do I go about doing it and what is the best event to use? Also, do you just mean using setBlockState within a chunk instance, recreating a chunk with a custom ChunkPrimer, or something else?
  21. So I should use world.isRemote on the spawn method instead and I'll be able to use Minecraft.getMinecraft()?
  22. I optimized the code and it's still not much faster than the old code and takes at least 5 minutes. What can I do to make this code more efficient? Also, I actually don't even know if everything works with this code because I seem to have made an error on either the initial schematic I converted or the text replacement and there are less blocks than there should be as a result. ChaosLabyrinth.java ChaosLabyrinth.txt uses the following format where every first number is a block id and every second is the block's metadata:
  23. That depends on which one is faster because I want all blocks in all four chunks to be replaced anyway. I'm not sure how to make a custom chunk though even after looking at the vanilla code. Edit: Nevermind, after wondering why there was no chunkY in the event it finally dawned on me that chunks actually take up the whole Y and aren't 16 blocks like x and z.
  24. That's what I tried to do with the event, but how do I replace the chunk from within the event since they aren't cancellable? Do I just need to use the setBlockState method with loops and references over top of the chunk that will be replaced and the game won't freeze (at least for more than a minute)? Also, what kind of class do you mean that implements WorldSavedData? Do you mean the structure's generation class or a class just to store whether the world has generated?
  25. Well, I'd like it to be generated once per world in a random underground location within a certain radius but I don't know how to efficiently do that which is my main reason for posting this topic. I thought I might be able to use one of the chunk events and replace four adjacent chunks with these blocks, but I couldn't find a way to do it. If I can't figure it out, I will settle for spawning it using a certain arrangement of blocks. My tests so far have just been calling the spawn when I place a certain block. Also, there are 32768 blocks (32x32x32).
×
×
  • Create New...

Important Information

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