Skip to content

Commit

Permalink
added carpet fixes on runtime.
Browse files Browse the repository at this point in the history
and fix conditional mixin is not working.
  • Loading branch information
topi-banana committed Oct 7, 2024
1 parent 063c1b7 commit 80db8d5
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 2 deletions.
4 changes: 4 additions & 0 deletions common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ dependencies {
// dependencies
modImplementation "carpet:fabric-carpet:${project.carpet_version}"

if (project.carpet_fixes_version) {
modRuntimeOnly "maven.modrinth:carpet-fixes:${project.carpet_fixes_version}"
}

// library mods
// include(modImplementation(fabricApi.module("fabric-resource-loader-v0", project.fabric_api_version)))
include(modImplementation("me.fallenbreath:conditional-mixin-fabric:${project.conditionalmixin_version}"))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.vulpeus.vulpeus_carpet.mixins;

import java.util.List;
import java.util.Set;
import me.fallenbreath.conditionalmixin.api.mixin.RestrictiveMixinConfigPlugin;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class VulpeusCarpetMixinPlugin extends RestrictiveMixinConfigPlugin {
private final Logger LOGGER = LogManager.getLogger();

@Override
protected void onRestrictionCheckFailed(String mixinClassName, String reason) {
LOGGER.debug("[VCM] Disabled mixin {} due to {}", mixinClassName, reason);
}

@Override
public String getRefMapperConfig() {
return null;
}

@Override
public void acceptTargets(Set<String> myTargets, Set<String> otherTargets) {
}

@Override
public List<String> getMixins() {
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

@Restriction(
require = @Condition(value = "minecraft", versionPredicates = "<=1.21.1"),
conflict = @Condition(value = "carpet-fixes")
conflict = @Condition(value = "carpet-fixes", versionPredicates = "*")
)
@Mixin(BeehiveBlockEntity.class)
public class MixinBeehiveBlockEntity {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/vulpeus_carpet.mixins.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"required": true,
"minVersion": "0.8",
"package": "com.vulpeus.vulpeus_carpet.mixins",
"compatibilityLevel": "{{COMPATIBILITY_LEVEL}}",
"plugin": "com.vulpeus.vulpeus_carpet.mixins.VulpeusCarpetMixinPlugin",
"mixins": [
"MixinHUDController",
"commandSit.MixinArmorStandEntity",
Expand Down
1 change: 1 addition & 0 deletions versions/1.19.4/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
# Dependencies
fabric_api_version=0.87.2+1.19.4
carpet_version=1.19.4-1.4.100+v230314
carpet_fixes_version=v1.14.1
1 change: 1 addition & 0 deletions versions/1.20.1/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
# Dependencies
fabric_api_version=0.92.2+1.20.1
carpet_version=1.20-1.4.112+v230608
carpet_fixes_version=v1.16.1
1 change: 1 addition & 0 deletions versions/1.20.2/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
# Dependencies
fabric_api_version=0.91.6+1.20.2
carpet_version=1.20.6-1.4.141+v240429
carpet_fixes_version=1.17.0
1 change: 1 addition & 0 deletions versions/1.20.6/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
# Dependencies
fabric_api_version=0.100.4+1.20.6
carpet_version=1.20.6-1.4.141+v240429
carpet_fixes_version=
1 change: 1 addition & 0 deletions versions/1.21.1/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
# Dependencies
fabric_api_version=0.102.1+1.21.1
carpet_version=1.21-1.4.147+v240613
carpet_fixes_version=

0 comments on commit 80db8d5

Please sign in to comment.