Skip to content

Commit

Permalink
Add missing accessor mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
Su5eD committed Jul 6, 2023
1 parent 1269c13 commit d1403b2
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 13 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
build:
strategy:
matrix:
java: [17-jdk, 20-jdk]
java: [17-jdk]
runs-on: ubuntu-22.04
container:
image: eclipse-temurin:${{ matrix.java }}
Expand All @@ -20,14 +20,6 @@ jobs:
gradle-home-cache-cleanup: true
gradle-home-cache-excludes: |
gradle.properties
- name: Setup loom cache
uses: actions/cache@v3
with:
path: |
./.gradle/loom-cache/minecraftMaven
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup gradle.properties
env:
GRADLE_PROPERTIES: ${{ vars.GRADLE_PROPERTIES }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.util.Locale;
import java.util.Properties;

import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.loading.FMLPaths;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -33,7 +32,6 @@
import net.fabricmc.fabric.impl.client.indigo.renderer.IndigoRenderer;
import net.fabricmc.fabric.impl.client.indigo.renderer.aocalc.AoConfig;

@Mod("fabric_renderer_indigo")
public class Indigo {
public static final boolean ALWAYS_TESSELATE_INDIGO;
public static final boolean ENSURE_VERTEX_FORMAT_COMPATIBILITY;
Expand Down Expand Up @@ -126,7 +124,7 @@ private static TriState asTriState(String property) {
}
}

public Indigo() {
public static void onInitializeClient() {
if (IndigoMixinConfigPlugin.shouldApplyIndigo()) {
LOGGER.info("[Indigo] Registering Indigo renderer!");

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package net.fabricmc.fabric.impl.client.indigo;

import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.loading.FMLLoader;

@Mod("fabric_renderer_indigo")
public class IndigoMod {

public IndigoMod() {
if (FMLLoader.getDist() == Dist.CLIENT) {
Indigo.onInitializeClient();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"EntityModelsMixin",
"EntityRenderersMixin",
"DimensionEffectsAccessor",
"EntityModelLayersAccessor",
"shader.ShaderProgramMixin",
"shader.ShaderProgramMixin$ShaderProgramGlslProcessorMixin"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public class BucketItemMixin {
index = 4
)
private SoundEvent hookEmptyingSound(SoundEvent previous) {
// TODO FFAPI: Leverage forge fluid types
return FluidVariantAttributes.getHandlerOrDefault(fluid).getEmptySound(FluidVariant.of(fluid)).orElse(previous);
}
}
3 changes: 3 additions & 0 deletions gradle/ffapi-setup.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ abstract class GenerateForgeModMetadata extends DefaultTask {
loaderVersion "[${loaderVersionString.get()},)"
license json.license ?: "All Rights Reserved"
if (json.environment == "client") {
displayTest "IGNORE_ALL_VERSION"
}
if (json.environment == "server") {
displayTest "IGNORE_SERVER_VERSION"
}

Expand Down
15 changes: 15 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ pluginManagement {
}
}

// FFAPI
plugins {
id("com.gradle.enterprise") version("3.13.4")
}

gradleEnterprise {
if (System.getenv("CI") != null) {
buildScan {
publishAlways()
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
}
}

rootProject.name = "fabric-api"

include 'fabric-api-base'
Expand Down

0 comments on commit d1403b2

Please sign in to comment.