Skip to content

Commit

Permalink
Tweak cloning strategy for compatibility with mods modifying biome co…
Browse files Browse the repository at this point in the history
…ntainer
  • Loading branch information
embeddedt committed Sep 19, 2024
1 parent 7bc7707 commit faa0308
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
import org.spongepowered.asm.mixin.Shadow;

@Mixin(ChunkBiomeContainer.class)
public class ChunkBiomeContainerMixin implements ChunkBiomeContainerExtended {
public abstract class ChunkBiomeContainerMixin implements ChunkBiomeContainerExtended {
@Shadow
@Final
private IdMap<Biome> biomeRegistry;

@Shadow
@Final
private Biome[] biomes;
public abstract int[] writeBiomes();

@Override
public ChunkBiomeContainer embeddium$copy() {
return new ChunkBiomeContainer(this.biomeRegistry, this.biomes.clone());
int[] biomeIds = this.writeBiomes();
return new ChunkBiomeContainer(this.biomeRegistry, biomeIds);
}
}

0 comments on commit faa0308

Please sign in to comment.