Skip to content

Commit

Permalink
24w38a
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Sep 18, 2024
1 parent 05259b6 commit 80a05bf
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 55 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ plugins {
id("fabric-loom") version ("1.7.3") apply (false)
}

val MINECRAFT_VERSION by extra { "24w37a" }
val MINECRAFT_VERSION by extra { "24w38a" }
val NEOFORGE_VERSION by extra { "21.0.163" }
val FABRIC_LOADER_VERSION by extra { "0.16.5" }
val FABRIC_API_VERSION by extra { "0.104.1+1.21.2" }
val FABRIC_API_VERSION by extra { "0.104.2+1.21.2" }

// This value can be set to null to disable Parchment.
val PARCHMENT_VERSION by extra { null }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ public void emitDirectly() {
}
};

@Deprecated
private final BakedModelConsumerImpl vanillaModelConsumer = new BakedModelConsumerImpl();

/**
* The world which the block is being rendered in.
*/
Expand Down Expand Up @@ -158,13 +155,6 @@ public ItemDisplayContext itemTransformationMode() {
throw new UnsupportedOperationException("itemTransformationMode can only be called on an item render context.");
}

@SuppressWarnings("removal")
@Deprecated
@Override
public BakedModelConsumer bakedModelConsumer() {
return this.vanillaModelConsumer;
}

/**
* Pipeline entrypoint - handles transform and culling checks.
*/
Expand Down Expand Up @@ -260,18 +250,4 @@ public void bufferDefaultModel(BakedModel model, @Nullable BlockState state) {

editorQuad.clear();
}

@SuppressWarnings("removal")
@Deprecated
private class BakedModelConsumerImpl implements BakedModelConsumer {
@Override
public void accept(BakedModel model) {
accept(model, AbstractBlockRenderContext.this.state);
}

@Override
public void accept(BakedModel model, @Nullable BlockState state) {
AbstractBlockRenderContext.this.bufferDefaultModel(model, state);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ public void emitDirectly() {
}
};

@Deprecated
private final BakedModelConsumerImpl vanillaModelConsumer = new BakedModelConsumerImpl();

private final ItemColors colorMap;
private final VanillaModelBufferer vanillaBufferer;

Expand Down Expand Up @@ -123,13 +120,6 @@ public ItemDisplayContext itemTransformationMode() {
return transformMode;
}

@SuppressWarnings("removal")
@Deprecated
@Override
public BakedModelConsumer bakedModelConsumer() {
return vanillaModelConsumer;
}

public void renderModel(ItemStack itemStack, ItemDisplayContext transformMode, boolean invert, PoseStack poseStack, MultiBufferSource bufferSource, int lightmap, int overlay, BakedModel model) {
this.itemStack = itemStack;
this.transformMode = transformMode;
Expand Down Expand Up @@ -285,20 +275,6 @@ public void bufferDefaultModel(BakedModel model, @Nullable BlockState state) {
}
}

@SuppressWarnings("removal")
@Deprecated
private class BakedModelConsumerImpl implements BakedModelConsumer {
@Override
public void accept(BakedModel model) {
accept(model, null);
}

@Override
public void accept(BakedModel model, @Nullable BlockState state) {
bufferDefaultModel(model, state);
}
}

/** used to accept a method reference from the ItemRenderer. */
@FunctionalInterface
public interface VanillaModelBufferer {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.caffeinemc.mods.sodium.client.render.immediate;

import com.mojang.blaze3d.buffers.BufferUsage;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.platform.NativeImage;
import com.mojang.blaze3d.systems.RenderSystem;
Expand Down Expand Up @@ -204,7 +205,7 @@ private FogParameters copyFog(FogParameters shaderFog) {
vertexBuffer = existingGeometry.vertexBuffer();
}
if (vertexBuffer == null) {
vertexBuffer = new VertexBuffer(VertexBuffer.Usage.DYNAMIC);
vertexBuffer = new VertexBuffer(BufferUsage.DYNAMIC_WRITE);
}

uploadToVertexBuffer(vertexBuffer, builtBuffer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class MultiPartBakedModelMixin {

@Shadow
@Final
private List<Pair<Predicate<BlockState>, BakedModel>> selectors;
private List<MultiPartBakedModel.Selector> selectors;

/**
* @author JellySquid
Expand All @@ -52,9 +52,9 @@ public List<BakedQuad> getQuads(BlockState state, Direction face, RandomSource r
try {
List<BakedModel> modelList = new ArrayList<>(this.selectors.size());

for (Pair<Predicate<BlockState>, BakedModel> pair : this.selectors) {
if (pair.getLeft().test(state)) {
modelList.add(pair.getRight());
for (MultiPartBakedModel.Selector selector : this.selectors) {
if (selector.condition().test(state)) {
modelList.add(selector.model());
}
}

Expand Down

0 comments on commit 80a05bf

Please sign in to comment.