Skip to content

Conversation

@GulpieEXE
Copy link

Features added:

  1. option for blocks to respawn at a configurable time

  2. option for the respawn time to scale with hardness

  3. respawn saves and respawn tile entities (saves nbt only if its a tile entity)

  4. respawn drops/pushes out any blocks that obstruct the space of a respawning block

  5. spawning is persistent across world load

For respawning config and helper methods in respawn logic
Added functionality to tick() for block respawning if enabled
@Insane96
Copy link
Owner

Two things.

  1. Change tabulation back to tabs so I can actually see the changes. Right now, every line is marked as deleted and re-added due to change from tabs to spaces.
  2. Don't make a new class just for the event. Add it to the Miner feature

@Insane96 Insane96 added enhancement New feature or request on hold Further information is requested labels Oct 26, 2025
@GulpieEXE
Copy link
Author

Sorry for the wait, is it better now?

@Insane96
Copy link
Owner

Insane96 commented Nov 9, 2025

Def better. gonna review now

@Insane96
Copy link
Owner

Insane96 commented Nov 9, 2025

Has this been tested with the feature disabled?

this.setFlags(EnumSet.of(Flag.LOOK, Flag.MOVE));
}


Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why all those empty lines between methods?

import java.util.List;

public class MineTowardsTargetGoal extends Goal {
import static insane96mcp.enhancedai.modules.mobs.miner.MinerMobs.blacklistTileEntities;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this static import?

if (this.miner.hasEffect(MobEffects.DIG_SLOWDOWN)) {
//noinspection ConstantConditions
float miningFatigueAmplifier = switch (this.miner.getEffect(MobEffects.DIG_SLOWDOWN).getAmplifier()) {
float f = switch (this.miner.getEffect(MobEffects.DIG_SLOWDOWN).getAmplifier()) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not keep the correct name?

SCALE_RESPAWN_BY_HARDNESS = EAIData.ofBool(this.createDataKey("scale_respawn_by_hardness"));
BASE_RESPAWN_TIME = EAIData.ofInt(this.createDataKey("base_respawn_time"));
HARDNESS_RESPAWN_MULTIPLIER = EAIData.ofDouble(this.createDataKey("hardness_respawn_multiplier"));
net.minecraftforge.common.MinecraftForge.EVENT_BUS.register(MineTowardsTargetGoal.class);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this for?

return data;
}


Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just leave one empty line between methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request on hold Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants