Skip to content

Commit

Permalink
Merge branch '1.21.x' into frame_graph_setup_events
Browse files Browse the repository at this point in the history
  • Loading branch information
XFactHD authored Oct 23, 2024
2 parents 1734745 + dd989e5 commit 50547be
Show file tree
Hide file tree
Showing 45 changed files with 846 additions and 907 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ jobs:
run: ./gradlew assemble checkFormatting

- name: Run JCC
if: ${{ ! startsWith(github.event.pull_request.head.ref, 'port/') && ! startsWith(github.ref_name, 'port/') }}
if: ${{ ! startsWith(github.event.pull_request.head.ref, 'port/') && ! startsWith(github.ref_name, 'port/') && ! startsWith(github.event.pull_request.base.ref, 'port/') }}
run: ./gradlew checkJarCompatibility

- name: Upload JCC
if: ${{ ! startsWith(github.event.pull_request.head.ref, 'port/') && ! startsWith(github.ref_name, 'port/') }}
if: ${{ ! startsWith(github.event.pull_request.head.ref, 'port/') && ! startsWith(github.ref_name, 'port/') && ! startsWith(github.event.pull_request.base.ref, 'port/') }}
uses: neoforged/action-jar-compatibility/upload@v1

- name: Publish artifacts
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ org.gradle.debug=false

java_version=21

minecraft_version=1.21.2-rc1
neoform_version=20241017.134216
minecraft_version=1.21.3
neoform_version=20241023.131943
# on snapshot versions, used to prefix the version
neoforge_snapshot_next_stable=21.2
neoforge_snapshot_next_stable=21.4

mergetool_version=2.0.0
accesstransformers_version=10.0.1
Expand Down
8 changes: 8 additions & 0 deletions patches/net/minecraft/client/KeyboardHandler.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
return;
}
}
@@ -507,6 +_,7 @@
}
}
}
+ net.neoforged.neoforge.client.ClientHooks.onKeyInput(p_90895_, p_90896_, p_90897_, p_90898_);
}
}

@@ -516,10 +_,20 @@
if (screen != null && this.minecraft.getOverlay() == null) {
try {
Expand Down
5 changes: 3 additions & 2 deletions patches/net/minecraft/client/gui/GuiGraphics.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@
int i1 = vector2ic.y();
this.pose.pushPose();
int j1 = 400;
+ net.neoforged.neoforge.client.event.RenderTooltipEvent.Color colorEvent = net.neoforged.neoforge.client.ClientHooks.onRenderTooltipColor(this.tooltipStack, this, l, i1, preEvent.getFont(), p_282615_);
TooltipRenderUtil.renderTooltipBackground(this, l, i1, i, j, 400, p_371327_);
- TooltipRenderUtil.renderTooltipBackground(this, l, i1, i, j, 400, p_371327_);
+ var textureEvent = net.neoforged.neoforge.client.ClientHooks.onRenderTooltipTexture(this.tooltipStack, this, l, i1, preEvent.getFont(), p_282615_, p_371327_);
+ TooltipRenderUtil.renderTooltipBackground(this, l, i1, i, j, 400, textureEvent.getTexture());
this.pose.translate(0.0F, 0.0F, 400.0F);
int k1 = i1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@
};
ParticleRenderType PARTICLE_SHEET_TRANSLUCENT = new ParticleRenderType() {
@Override
@@ -60,6 +_,11 @@
public String toString() {
return "PARTICLE_SHEET_TRANSLUCENT";
}
+
+ @Override
+ public boolean isTranslucent() {
+ return false;
+ }
};
ParticleRenderType CUSTOM = new ParticleRenderType() {
@Override
@@ -89,4 +_,9 @@

@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
+ var model = this.selectors.get(k).model;
+ if (renderType == null || model.getRenderTypes(p_235050_, p_235052_, modelData).contains(renderType)) { // FORGE: Only put quad data if the model is using the render type passed
+ p_235052_.setSeed(j);
+ list.add(model.getQuads(p_235050_, p_235051_, RandomSource.create(k), net.neoforged.neoforge.client.model.data.MultipartModelData.resolve(modelData, model), renderType));
+ list.add(model.getQuads(p_235050_, p_235051_, p_235052_, net.neoforged.neoforge.client.model.data.MultipartModelData.resolve(modelData, model), renderType));
+ }
}
}
Expand Down
10 changes: 5 additions & 5 deletions patches/net/minecraft/server/level/ChunkMap.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
this.markPosition(p_140418_, chunkaccess.getPersistedStatus().getChunkType());
return chunkaccess;
} else {
@@ -778,6 +_,7 @@
@@ -780,6 +_,7 @@
Profiler.get().incrementCounter("chunkSave");
this.activeChunkWrites.incrementAndGet();
SerializableChunkData serializablechunkdata = SerializableChunkData.copyOf(this.level, p_140259_);
+ net.neoforged.neoforge.common.NeoForge.EVENT_BUS.post(new net.neoforged.neoforge.event.level.ChunkDataEvent.Save(p_140259_, this.level, serializablechunkdata));
CompletableFuture<CompoundTag> completablefuture = CompletableFuture.supplyAsync(serializablechunkdata::write, Util.backgroundExecutor());
this.write(chunkpos, completablefuture::join).handle((p_381690_, p_381691_) -> {
if (p_381691_ != null) {
@@ -844,9 +_,11 @@
@@ -846,9 +_,11 @@

private static void markChunkPendingToSend(ServerPlayer p_295834_, LevelChunk p_296281_) {
p_295834_.connection.chunkSender.markChunkPendingToSend(p_296281_);
Expand All @@ -48,15 +48,15 @@
p_294215_.connection.chunkSender.dropChunk(p_294215_, p_294758_);
}

@@ -1057,6 +_,7 @@
@@ -1059,6 +_,7 @@
this.playerMap.unIgnorePlayer(p_140185_);
}

+ //PATCH 1.20.2: Figure out the firing of the watch and unwatch events when chunk tracking updates.
this.updateChunkTracking(p_140185_);
}
}
@@ -1108,7 +_,7 @@
@@ -1110,7 +_,7 @@
}

protected void addEntity(Entity p_140200_) {
Expand All @@ -65,7 +65,7 @@
EntityType<?> entitytype = p_140200_.getType();
int i = entitytype.clientTrackingRange() * 16;
if (i != 0) {
@@ -1352,5 +_,20 @@
@@ -1354,5 +_,20 @@
this.updatePlayer(serverplayer);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
this.storeInCache(i, chunkaccess1, ChunkStatus.FULL);
@@ -384,7 +_,7 @@
private void collectTickingChunks(List<LevelChunk> p_363421_) {
this.chunkMap.forEachSpawnCandidateChunk(p_370483_ -> {
LevelChunk levelchunk = p_370483_.getTickingChunk();
- if (levelchunk != null && this.level.isNaturalSpawningAllowed(p_370483_.getPos())) {
+ if (levelchunk != null && this.level.isNaturalSpawningAllowed(p_370483_.getPos()) || this.distanceManager.shouldForceTicks(p_370483_.getPos().toLong())) {
this.chunkMap.forEachSpawnCandidateChunk(p_381767_ -> {
LevelChunk levelchunk = p_381767_.getTickingChunk();
- if (levelchunk != null && this.level.isNaturalSpawningAllowed(p_381767_.getPos())) {
+ if (levelchunk != null && this.level.isNaturalSpawningAllowed(p_381767_.getPos()) || this.distanceManager.shouldForceTicks(p_381767_.getPos().toLong())) {
p_363421_.add(levelchunk);
}
});
Expand Down
4 changes: 2 additions & 2 deletions patches/net/minecraft/util/datafix/DataFixers.java.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/util/datafix/DataFixers.java
+++ b/net/minecraft/util/datafix/DataFixers.java
@@ -1307,10 +_,35 @@
@@ -1308,10 +_,35 @@
Schema schema199 = p_14514_.addSchema(3800, SAME_NAMESPACED);
UnaryOperator<String> unaryoperator2 = createRenamer(Map.of("minecraft:scute", "minecraft:turtle_scute"));
p_14514_.addFixer(ItemRenameFix.create(schema199, "Rename scute item to turtle_scute", unaryoperator2));
Expand Down Expand Up @@ -36,7 +36,7 @@
Schema schema201 = p_14514_.addSchema(3807, V3807::new);
p_14514_.addFixer(new AddNewChoices(schema201, "Added Vault", References.BLOCK_ENTITY));
Schema schema202 = p_14514_.addSchema(3807, 1, SAME_NAMESPACED);
@@ -1333,6 +_,18 @@
@@ -1334,6 +_,18 @@
schema209, "Rename jump strength attribute", createRenamer("minecraft:horse.jump_strength", "minecraft:generic.jump_strength")
)
);
Expand Down
Loading

0 comments on commit 50547be

Please sign in to comment.