mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-22 15:47:57 -05:00
1.18
This commit is contained in:
parent
16d92c47a6
commit
7242e9d77d
4 changed files with 11 additions and 11 deletions
|
@ -338,7 +338,7 @@ curseforge {
|
|||
id = "306612"
|
||||
changelog = ENV.CHANGELOG ?: "No changelog provided"
|
||||
releaseType = project.prerelease as Boolean ? "beta" : "release"
|
||||
addGameVersion "1.18-Snapshot"
|
||||
addGameVersion "1.18"
|
||||
addGameVersion "Fabric"
|
||||
|
||||
mainArtifact(remapJar) {
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
|
||||
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.class_6850;
|
||||
import net.minecraft.client.render.chunk.ChunkRendererRegionBuilder;
|
||||
import net.minecraft.client.render.chunk.ChunkRendererRegion;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -39,18 +39,18 @@ import net.minecraft.world.chunk.WorldChunk;
|
|||
import net.fabricmc.fabric.api.rendering.data.v1.RenderAttachmentBlockEntity;
|
||||
import net.fabricmc.fabric.impl.rendering.data.attachment.RenderDataObjectConsumer;
|
||||
|
||||
@Mixin(class_6850.class)
|
||||
@Mixin(ChunkRendererRegionBuilder.class)
|
||||
public abstract class MixinChunkRendererRegionBuilder {
|
||||
private static final AtomicInteger ERROR_COUNTER = new AtomicInteger();
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
|
||||
@Inject(at = @At("RETURN"), method = "method_39969", locals = LocalCapture.CAPTURE_FAILHARD)
|
||||
private void create(World world, BlockPos startPos, BlockPos endPos, int chunkRadius, CallbackInfoReturnable<ChunkRendererRegion> info, int i, int j, int k, int l, class_6850.class_6851[][] chunkData) {
|
||||
@Inject(at = @At("RETURN"), method = "build", locals = LocalCapture.CAPTURE_FAILHARD)
|
||||
private void create(World world, BlockPos startPos, BlockPos endPos, int chunkRadius, CallbackInfoReturnable<ChunkRendererRegion> info, int i, int j, int k, int l, ChunkRendererRegionBuilder.ClientChunk[][] chunkData) {
|
||||
// instantiated lazily - avoids allocation for chunks without any data objects - which is most of them!
|
||||
Long2ObjectOpenHashMap<Object> map = null;
|
||||
|
||||
for (class_6850.class_6851[] chunkDataOuter : chunkData) {
|
||||
for (class_6850.class_6851 data : chunkDataOuter) {
|
||||
for (ChunkRendererRegionBuilder.ClientChunk[] chunkDataOuter : chunkData) {
|
||||
for (ChunkRendererRegionBuilder.ClientChunk data : chunkDataOuter) {
|
||||
// Hash maps in chunks should generally not be modified outside of client thread
|
||||
// but does happen in practice, due to mods or inconsistent vanilla behaviors, causing
|
||||
// CMEs when we iterate the map. (Vanilla does not iterate these maps when it builds
|
||||
|
@ -59,7 +59,7 @@ public abstract class MixinChunkRendererRegionBuilder {
|
|||
// We handle this simply by retrying until it works. Ugly but effective.
|
||||
for (;;) {
|
||||
try {
|
||||
map = mapChunk(data.method_39971(), startPos, endPos, map);
|
||||
map = mapChunk(data.getChunk(), startPos, endPos, map);
|
||||
break;
|
||||
} catch (ConcurrentModificationException e) {
|
||||
final int count = ERROR_COUNTER.incrementAndGet();
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
accessWidener v2 named
|
||||
|
||||
accessible class net/minecraft/class_6850$class_6851
|
||||
accessible class net/minecraft/client/render/chunk/ChunkRendererRegionBuilder$ClientChunk
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
org.gradle.jvmargs=-Xmx2560M
|
||||
|
||||
version=0.43.1
|
||||
minecraft_version=1.18-rc1
|
||||
minecraft_version=1.18
|
||||
yarn_version=+build.1
|
||||
loader_version=0.12.5
|
||||
|
||||
prerelease=true
|
||||
prerelease=false
|
||||
|
||||
# Do not manually update, use the bumpversions task:
|
||||
fabric-api-base-version=0.4.1
|
||||
|
|
Loading…
Reference in a new issue