Skip to content

Commit

Permalink
1.21.2 (#305)
Browse files Browse the repository at this point in the history
Update to 1.21.2
  • Loading branch information
1foxy2 authored Oct 22, 2024
1 parent e8bca54 commit c392815
Show file tree
Hide file tree
Showing 44 changed files with 492 additions and 450 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
with:
files: neoforge/build/libs/!(*-@(dev|sources|api|javadoc)).jar
github-files: neoforge/build/libs/*-@(dev|sources|api|javadoc).jar
version-type: release
game-versions: 1.21.1
version-type: beta
game-versions: 1.21.2
game-version-filter: releases
dependencies: |
cloth-config(required){modrinth:9s6osm5g}{curseforge:348521}#(ignore:github)
Expand Down Expand Up @@ -59,8 +59,8 @@ jobs:
with:
files: fabric/build/libs/!(*-@(dev|sources|api|javadoc)).jar
github-files: fabric/build/libs/*-@(dev|sources|api|javadoc).jar
version-type: release
game-versions: 1.21.1
version-type: beta
game-versions: 1.21.2
game-version-filter: releases
dependencies: |
cloth-config(required){modrinth:9s6osm5g}{curseforge:348521}#(ignore:github)
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
// see https://fabricmc.net/develop/ for new versions
id 'fabric-loom' version '1.7-SNAPSHOT' apply false
id 'fabric-loom' version '1.8-SNAPSHOT' apply false
// see https://projects.neoforged.net/neoforged/moddevgradle for new versions
id 'net.neoforged.moddev' version '1.0.19' apply false
id 'net.neoforged.moddev' version '2.0.40-beta' apply false
}
26 changes: 3 additions & 23 deletions buildSrc/src/main/groovy/multiloader-common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ java {
repositories {
mavenCentral()
// https://docs.gradle.org/current/userguide/declaring_repositories.html#declaring_content_exclusively_found_in_one_repository
exclusiveContent {
forRepository {
maven {
name = 'Sponge'
url = 'https://repo.spongepowered.org/repository/maven-public'
}
}
filter { includeGroupAndSubgroups('org.spongepowered') }
}
exclusiveContent {
forRepositories(
maven {
Expand All @@ -43,18 +34,17 @@ repositories {
filter {
includeGroup('org.parchmentmc.data')
includeGroup "maven.modrinth"
includeModule("net.neoforged", "testframework")
includeModule("net.neoforged", "neoforge")
}
}
maven {
name = 'BlameJared'
url = 'https://maven.blamejared.com'
}
maven { //AutoConfig
name = "Shedaniel's Maven"
url = "https://maven.shedaniel.me/"
}
maven { url 'https://maven.fallenbreath.me/releases' }
maven { url 'https://maven.bawnorton.com/releases' }
maven { url 'https://libraries.minecraft.net/' }
}

// Declare capabilities on the outgoing configurations.
Expand All @@ -70,17 +60,7 @@ repositories {
}
}

sourcesJar {
from(rootProject.file('LICENSE')) {
rename { "${it}_${mod_name}" }
}
}

jar {
from(rootProject.file('LICENSE')) {
rename { "${it}_${mod_name}" }
}

manifest {
attributes([
'Specification-Title' : mod_name,
Expand Down
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ neoForge {
}

dependencies {
compileOnly group: 'org.spongepowered', name: 'mixin', version: '0.8.5'
compileOnly group: 'org.spongepowered', name: 'mixin', version: '0.8.7'

compileOnly group: 'io.github.llamalad7', name: 'mixinextras-common', version: '0.3.5'
annotationProcessor group: 'io.github.llamalad7', name: 'mixinextras-common', version: '0.3.5'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import net.minecraft.client.Camera;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.entity.ItemRenderer;
import net.minecraft.client.renderer.entity.state.ItemFrameRenderState;
import net.minecraft.client.resources.model.BakedModel;
import net.minecraft.core.Direction;
import net.minecraft.world.entity.decoration.ItemFrame;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.Nullable;

Expand Down Expand Up @@ -58,5 +58,5 @@ public interface ExtendedItemRenderer {
* @since 0.25.0
*/
void moreculling$renderItemFrameItem(ItemStack stack, PoseStack poseStack, MultiBufferSource multiBufferSource,
int light, ItemFrame frame, Camera camera);
int light, ItemFrameRenderState frame, Camera camera);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
package ca.fxco.moreculling.mixin;

import ca.fxco.moreculling.MoreCulling;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.BufferBuilder;
import me.fallenbreath.conditionalmixin.api.annotation.Condition;
import me.fallenbreath.conditionalmixin.api.annotation.Restriction;
import net.minecraft.client.renderer.CloudRenderer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Restriction(conflict = {
@Condition("cullclouds"),
@Condition("extended-clouds"),
@Condition("extendedclouds")
})
@Mixin(CloudRenderer.class)
public abstract class CloudRenderer_cloudsMixin {
@Shadow
private static boolean isNorthEmpty(long l) {
return false;
}

@Shadow
private static boolean isSouthEmpty(long l) {
return false;
}

@Shadow
private static boolean isWestEmpty(long l) {
return false;
}

@Shadow
private static boolean isEastEmpty(long l) {
return false;
}

@Inject(
method = "buildExtrudedCell",
at = @At(value = "HEAD"),
cancellable = true
)
private void moreculling$renderClouds(CloudRenderer.RelativeCameraPos relativeCameraPos,
BufferBuilder bufferBuilder, int i, int j, int k,
int l, int m, int n, long o, CallbackInfo ci) {
if (!MoreCulling.CONFIG.cloudCulling) {
return;
}
RenderSystem.enableCull();
float f = (float)m * 12.0F;
float g = f + 12.0F;
float h = 0.0F;
float p = 4.0F;
float q = (float)n * 12.0F;
float r = q + 12.0F;
if (relativeCameraPos != CloudRenderer.RelativeCameraPos.BELOW_CLOUDS) {
bufferBuilder.addVertex(g, 4.0F, q).setColor(j);
bufferBuilder.addVertex(g, 4.0F, r).setColor(j);
bufferBuilder.addVertex(f, 4.0F, r).setColor(j);
bufferBuilder.addVertex(f, 4.0F, q).setColor(j);
}

if (relativeCameraPos != CloudRenderer.RelativeCameraPos.ABOVE_CLOUDS) {
bufferBuilder.addVertex(g, 0.0F, q).setColor(i);
bufferBuilder.addVertex(g, 0.0F, r).setColor(i);
bufferBuilder.addVertex(f, 0.0F, r).setColor(i);
bufferBuilder.addVertex(f, 0.0F, q).setColor(i);
}

if (isNorthEmpty(o) && n > 0) {
bufferBuilder.addVertex(f, 0.0F, q).setColor(l);
bufferBuilder.addVertex(f, 4.0F, q).setColor(l);
bufferBuilder.addVertex(g, 4.0F, q).setColor(l);
bufferBuilder.addVertex(g, 0.0F, q).setColor(l);
}

if (isSouthEmpty(o) && n < 0) {
bufferBuilder.addVertex(f, 0.0F, r).setColor(l);
bufferBuilder.addVertex(f, 4.0F, r).setColor(l);
bufferBuilder.addVertex(g, 4.0F, r).setColor(l);
bufferBuilder.addVertex(g, 0.0F, r).setColor(l);
}

if (isWestEmpty(o) && m > 0) {
bufferBuilder.addVertex(f, 0.0F, r).setColor(k);
bufferBuilder.addVertex(f, 4.0F, r).setColor(k);
bufferBuilder.addVertex(f, 4.0F, q).setColor(k);
bufferBuilder.addVertex(f, 0.0F, q).setColor(k);
}

if (isEastEmpty(o) && m < 0) {
bufferBuilder.addVertex(g, 0.0F, r).setColor(k);
bufferBuilder.addVertex(g, 4.0F, r).setColor(k);
bufferBuilder.addVertex(g, 4.0F, q).setColor(k);
bufferBuilder.addVertex(g, 0.0F, q).setColor(k);
}

boolean bl = Math.abs(m) <= 1 && Math.abs(n) <= 1;
if (bl) {
bufferBuilder.addVertex(g, 4.0F, q).setColor(j);
bufferBuilder.addVertex(g, 4.0F, r).setColor(j);
bufferBuilder.addVertex(f, 4.0F, r).setColor(j);
bufferBuilder.addVertex(f, 4.0F, q).setColor(j);
bufferBuilder.addVertex(f, 0.0F, q).setColor(i);
bufferBuilder.addVertex(f, 0.0F, r).setColor(i);
bufferBuilder.addVertex(g, 0.0F, r).setColor(i);
bufferBuilder.addVertex(g, 0.0F, q).setColor(i);
bufferBuilder.addVertex(g, 0.0F, q).setColor(l);
bufferBuilder.addVertex(g, 4.0F, q).setColor(l);
bufferBuilder.addVertex(f, 4.0F, q).setColor(l);
bufferBuilder.addVertex(f, 0.0F, q).setColor(l);
bufferBuilder.addVertex(f, 0.0F, r).setColor(l);
bufferBuilder.addVertex(f, 4.0F, r).setColor(l);
bufferBuilder.addVertex(g, 4.0F, r).setColor(l);
bufferBuilder.addVertex(g, 0.0F, r).setColor(l);
bufferBuilder.addVertex(f, 0.0F, q).setColor(k);
bufferBuilder.addVertex(f, 4.0F, q).setColor(k);
bufferBuilder.addVertex(f, 4.0F, r).setColor(k);
bufferBuilder.addVertex(f, 0.0F, r).setColor(k);
bufferBuilder.addVertex(g, 0.0F, r).setColor(k);
bufferBuilder.addVertex(g, 4.0F, r).setColor(k);
bufferBuilder.addVertex(g, 4.0F, q).setColor(k);
bufferBuilder.addVertex(g, 0.0F, q).setColor(k);
}
ci.cancel();
}
}

This file was deleted.

Loading

0 comments on commit c392815

Please sign in to comment.