PersonTheCat / OreStoneVariants

A powerful utility for generating new blocks when given a foreground and background.
GNU General Public License v3.0
7 stars 8 forks source link

Galacticraft planet stones #50

Closed kragnoth closed 5 years ago

kragnoth commented 6 years ago

Mars/Venus/Moon (and others I'm sure) stones will not work as a base stone item for making new ores. The game will generate the ore, but as soon as you try to interact with a left click the game crashes.

I am at work, and don't have my logs at the moment, but wanted to document this error while it was fresh in my mind (no coffee at home this morning)

It looks like it tries to assign properties to the block (i.e. falling sand falling when an ore) but unfortunately galacticraft does some black voodoo to make its blocks.

Maybe have an option to blacklist certain blocks from trying to get properties, and allow the modpack dev to assign different stone properties instead.

I.e. lets say I want my copper ore to spawn on wool, but want the wool to have the properties of sand and fall if above another item that is mined. That could bypass this if the mod pack dev came across this error.

Otherwise you would need to add galacticraft compatibility on your end to make it work. While that would be appreciated, I hardly expect someone to code around my needs.

PersonTheCat commented 6 years ago

Hi, there. Sorry for ignoring you! I definitely didn't mean to do that, but have just been very busy with classes and somehow didn't see the notification for this issue. Is there any way you could share a crash report with me? If not, I'll try to install the mod at some point in the near future and see whether I can reproduce it. In the meantime, how are these properties added? Are you using the preset files in /config/ore_stone_variants_mods/, or is this is the dynamic properties (using the block list in the config file)? The more dynamic something becomes, the more difficult it becomes to ensure that everything will always work correctly, of course.

kragnoth commented 6 years ago

I put it in the dynamic generation place, it generates the files in the ore_stone_variants folder for each ore. Places the ores in game after logging out and back in. But when interacting it throws a crash.

Hopefully I still have these crash logs, this was 9 days ago, and I never thought to back up the logs and just moved galacticraft out of the pack. If I'm not stressed out later I'll try making a plain world with just these two mods, and send you a pristine crash log.

I'll also look at the preset file and see if it can do what I want.

PersonTheCat commented 6 years ago

Okay, I was able to produce an error when doing something similar. I couldn't actually get the properties to generate at all. Unfortunately, dynamically retrieving information about blocks can be fairly tricky. However, I am going to look into this and see what I can come up with. In the meantime, do your presets all look right? Does any information look like it could be wrong? If not, could you send them to me? That might help in figuring this out.

kragnoth commented 6 years ago

Crashlog: https://pastebin.com/Ly9MPm6k sorry about not posting this earlier. I've had a bad couple days.

config file: https://pastebin.com/m9jZ3NcX

PersonTheCat commented 6 years ago

Hey, that's not problem. Take your time. I'm sorry to hear that, but I'll take a look at this soon for you.

PersonTheCat commented 5 years ago

Hey, again. Sorry that it took me quite some time to get back to you on this issue. I just want to let you know that I finally looked at it in greater depth and don't think there's really a good solution. The problem occurs when Mars Stone gets polled for its hardness. What it does is it retrieves the actual state from the world (an OSV block) and then tries to retrieve properties from that which of course do not exist. In other words, it just assumes that the blockstate is a Galacticraft block, which it is not. My solution would have to be to catch this error in some way, and then just assume the value that needs to be returned. But there are two problems with this:

  1. I'd have to do it 10-15 times throughout BlockOresBase, which would be very sloppy and not at all a good design, and
  2. It would effectively be the same as disabling bgBlockImitation in the config file.

As a result, doing so is all I can suggest, moving forward. I wish I could come up with a better way to indicate this to the user, but sadly, I just don't think I can.. :/ I'll go ahead and close this issue.