Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Aether mod prevents setting bedrock on fire for Grains of Infinity #603

Closed
1 task done
KageDragon opened this issue Jan 25, 2024 · 8 comments · Fixed by #606
Closed
1 task done

[BUG] Aether mod prevents setting bedrock on fire for Grains of Infinity #603

KageDragon opened this issue Jan 25, 2024 · 8 comments · Fixed by #606
Labels
Status-Triage A Triage Member should take a look at this Type-Bug There is a problem.

Comments

@KageDragon
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When The Aether is loaded with EnderIO, setting bedrock on fire to get Grains results in 0% chance of getting them.

Expected Behavior

Lighting a dozen or so blocks should net ~6 grains after the fires goes out.

Steps To Reproduce

  1. Place several Bedrock blocks in creative
  2. Light them all on fire

Environment

- OS: Windows 10
- Java version:  17.0.6
- Minecraft version: 1.20.1
- Version: 6.0.23 alpha
- The Aether - 1.20.1-1.1.0-neoforge (its for Forge too)

Anything else?

Behaviour is the same in creative or survival
Without Aether, grains spawn as expected.

This might be relevent:
https://github.com/The-Aether-Team/The-Aether/blob/58a7331c5707fc6991a86304857f5c215dd4edc3/src/main/java/com/aetherteam/aether/world/AetherLevelData.java
Line 23:
this.gameRules = new WrappedGameRules(worldData.getGameRules(), ImmutableSet.of(GameRules.RULE_WEATHER_CYCLE, GameRules.RULE_DOFIRETICK));

doFireTick is true in the test vanilla superflat world though

@KageDragon KageDragon added Status-Triage A Triage Member should take a look at this Type-Bug There is a problem. labels Jan 25, 2024
@CitiesXL2815
Copy link
Collaborator

while it is 50% chance to spawn grains of infinity, but i believe this maybe on Aether side, we will have look at it, Aether does do weird shit to the game like overhaul Vanilla's play style

@JoschiZ
Copy link

JoschiZ commented Jan 26, 2024

Is there an alternative setting or workaround for making Grains of Infinity?

@KABLUEE2
Copy link

I am also having this issue, I have no idea how to fix this besides removing the Aether mod or something, but that will break my current survival world and I don't really wanna get rid of the Aether in the first place

@bconlon1
Copy link

bconlon1 commented Feb 3, 2024

Could you open this issue on The Aether's issue tracker as well? I try to look into bugs that are reported there as quickly as I can. From a quick look though I have no concrete ideas; my first guess would be there has to be some kind of conflict preventing code in the FireCraftingHandler class from running, but there's no event cancellation so that makes the theory a bit confusing.

@Rover656
Copy link
Member

Rover656 commented Feb 5, 2024

Could you open this issue on The Aether's issue tracker as well? I try to look into bugs that are reported there as quickly as I can. From a quick look though I have no concrete ideas; my first guess would be there has to be some kind of conflict preventing code in the FireCraftingHandler class from running, but there's no event cancellation so that makes the theory a bit confusing.

Thanks for looking into this :) if it leads you to something that's being done incorrectly on our end, please let us know, thanks!

@Techjar
Copy link
Contributor

Techjar commented Feb 7, 2024

Also ran into this issue, and I believe I tracked down the cause. Did some testing and found that disabling doFireTick would actually make it work. Dug into the code and it appears that the issue is caused by a specific interaction between Aether's method of disabling fire ticks in its dimension, and EnderIO's fallback path for when doFireTick is disabled.

public static void onWorldTick(TickEvent.LevelTickEvent event) {
if (!FIRE_TRACKER.isEmpty() && !event.level.getGameRules().getBoolean(GameRules.RULE_DOFIRETICK)) {
// Create a list of positions that need to be turned to air. Fixes issues with the fire tracker being modified while we iterate
List<BlockPos> blocksToClear = new ArrayList<>();
// Search for any fires that are due to spawn drops.
long gameTime = event.level.getGameTime();
for (Map.Entry<FireIndex, Long> fire : FIRE_TRACKER.entrySet()) {
BlockPos pos = fire.getKey().pos();
if (gameTime > fire.getValue()) {
if (event.level.getBlockState(pos).getBlock() instanceof FireBlock) {
blocksToClear.add(pos);
} else {
FIRE_TRACKER.remove(fire.getKey());
}
}
}
// Turn them to air to trigger the usual event.
for (BlockPos pos : blocksToClear) {
event.level.setBlock(pos, Blocks.AIR.defaultBlockState(), Block.UPDATE_ALL);
}
}
}
}

Aether mod makes doFireTick false for its dimension only, which triggers this code path. Since there is no check for which dimension the tracked fire is in, it tries to find the fire blocks in the wrong dimension, and stops tracking when it of course doesn't find fire at the expected positions. If I understand the code correctly, this may also be broken when you have doFireTick disabled and try to make grains of infinity in any dimension other than the overworld, though I didn't actually test that.

I made a patch locally, and confirmed that adding a check for the matching dimension in the loop fixes the issue. Conveniently, the FireIndex record already has this info, so it's an easy 1-2 line change.

@Rover656
Copy link
Member

Rover656 commented Feb 7, 2024

Away from my pc so unable to double check this, but it makes complete sense! Thanks a lot for looking into this, feel free to send a PR if you would like :)

@Techjar
Copy link
Contributor

Techjar commented Feb 7, 2024

There ya go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status-Triage A Triage Member should take a look at this Type-Bug There is a problem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants