Skip to content

Commit

Permalink
Merge branch 'api-11' into update/1.20.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ImMorpheus committed May 14, 2024
2 parents 491d5f0 + 7041a5c commit 20225ad
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,11 @@ public ConfigurationHolder(final Configuration configuration) {
}

@Input
public Provider<Set<ModuleComponentIdentifier>> getIds() {
public Provider<Set<String>> getIds() {
return this.getArtifacts().map(set -> set.stream()
.map(art -> art.getId().getComponentIdentifier())
.filter(id -> id instanceof ModuleComponentIdentifier)
.map(art -> (ModuleComponentIdentifier) art)
.map(art -> art.getDisplayName())
.collect(Collectors.toSet()));
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ format = { version = "1.1" }
asm = "9.7"
log4j = "2.19.0"
forgeAutoRenamingTool = "1.0.6"
mixin = "0.8.5"
mixin = "0.8.6"
modlauncher = "8.1.3"
guava = "32.1.2-jre"
mockito = "5.11.0"
Expand Down
8 changes: 8 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3863,6 +3863,14 @@
<sha256 value="e025d1d85fe18ba8a9bdbf347e2a7cf033d579e2c9046cccab7a8e0deabfb6da" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.spongepowered" name="mixin" version="0.8.6">
<artifact name="mixin-0.8.6.jar">
<sha256 value="d64c6db921b76cd55c1b01477a9588349eebbc4fe6ae3863d0cc4cde4cb2d944" origin="Generated by Gradle"/>
</artifact>
<artifact name="mixin-0.8.6.pom">
<sha256 value="de06fa2da09fdcf80c324812357531c165ec596de2b6c1ec4329171aed3f2fca" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.spongepowered" name="plugin-meta" version="0.8.0">
<artifact name="plugin-meta-0.8.0.jar">
<sha256 value="529b9456e9d4eb35e115d1eec60273c3b89bbd74d1430b5164788fd91fb83457" origin="Generated by Gradle"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Holder;
import net.minecraft.core.Registry;
import net.minecraft.core.SectionPos;
import net.minecraft.core.registries.Registries;
Expand All @@ -43,6 +44,7 @@
import net.minecraft.world.level.chunk.ImposterProtoChunk;
import net.minecraft.world.level.chunk.LevelChunk;
import net.minecraft.world.level.chunk.LevelChunkSection;
import net.minecraft.world.level.chunk.PalettedContainer;
import net.minecraft.world.level.chunk.ProtoChunk;
import net.minecraft.world.level.chunk.status.ChunkStatus;
import net.minecraft.world.level.entity.EntitySection;
Expand Down Expand Up @@ -175,7 +177,10 @@ public static boolean setBiomeOnNativeChunk(final int x, final int y, final int
final int maskedX = x & 3;
final int maskedY = y & 3;
final int maskedZ = z & 3;
// TODO section.getBiomes().set(maskedX, maskedY, maskedZ, Holder.direct((Biome) (Object) biome));
final var old = ((PalettedContainer<Holder<Biome>>) section.getBiomes()).getAndSet(maskedX, maskedY, maskedZ, Holder.direct((Biome) (Object) biome));
if (old.value() == (Object) biome) {
return false;
}

finalizer.run();
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,12 @@ public Biome biome(final int x, final int y, final int z) {
if (!this.contains(x, y, z)) {
throw new PositionOutOfBoundsException(new Vector3i(x, y, z), Constants.World.BLOCK_MIN, Constants.World.BLOCK_MAX);
}
return (Biome) (Object) this.level.getBiome(new BlockPos(x, y, z));
return (Biome) (Object) this.level.getBiome(new BlockPos(x, y, z)).value();
}

@Override
public boolean setBiome(final int x, final int y, final int z, final Biome biome) {
// TODO ChunkBiomeContainerAccessor is dead
//return VolumeStreamUtils.setBiomeOnNativeChunk(x, y, z, biome, () -> (ChunkBiomeContainerAccessor) this.biomes, () -> this.setUnsaved(true));
return false;
return VolumeStreamUtils.setBiomeOnNativeChunk(x, y, z, biome, () -> this.getSection(this.getSectionIndex(y)), () -> this.setUnsaved(true));
}

@Intrinsic
Expand Down

0 comments on commit 20225ad

Please sign in to comment.