Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use SHsuperCM/FletchingTable so you dont have to specify mixins #372

Open
wants to merge 1 commit into
base: rewrite
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ plugins {
id 'fabric-loom' version '1.4-SNAPSHOT'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '8.+'
id "io.shcm.shsupercm.fabric.fletchingtable" version "1.6"

}

sourceCompatibility = JavaVersion.VERSION_17
Expand Down Expand Up @@ -103,3 +105,7 @@ publishing {
// retrieving dependencies.
}
}

fletchingTable {
defaultMixinEnvironment = "auto" //default, can be either "none", "auto", "mixins", "client", "server"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package tools.redstone.redstonetools.mixin.accessors;

import io.shcm.shsupercm.fabric.fletchingtable.api.MixinEnvironment;
import net.minecraft.block.BlockState;
import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.render.WorldRenderer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package tools.redstone.redstonetools.mixin.features;

import io.shcm.shsupercm.fabric.fletchingtable.api.MixinEnvironment;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.entity.player.PlayerEntity;
Expand All @@ -26,7 +27,7 @@


public abstract class ItemBindMixin {

@MixinEnvironment()
@Mixin(ItemStack.class)
private abstract static class ItemStackMixin {

Expand Down Expand Up @@ -58,7 +59,7 @@ private boolean tryToExecuteNBTCommand(Hand hand, World world) {
}
}


@MixinEnvironment()
@Mixin(ClientPlayNetworkHandler.class)
private abstract static class NetworkHandlerMixin {

Expand Down
22 changes: 1 addition & 21 deletions src/main/resources/redstonetools.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,5 @@
"compatibilityLevel": "JAVA_17",
"injectors": {
"defaultRequire": 1
},
"mixins": [
"blocks.RedstoneHitboxMixin",
"features.AirPlaceServerMixin",
"features.AutoDustMixin",
"features.CopyStateMixin",
"features.ItemBindMixin$ItemStackMixin",
"gamerules.DoContainerDropsMixin"
],
"client": [
"accessors.MinecraftClientAccessor",
"accessors.WorldRendererAccessor",
"features.AirPlaceClientMixin",
"features.ItemBindMixin$NetworkHandlerMixin",
"macros.AddMacroButtonMixin",
"macros.InitializeMacroManagerMixin",
"macros.KeyBindingMixinImpl",
"macros.autocomplete.ClientPlayerEntityMixinImpl",
"macros.autocomplete.CommandSuggestorMixin",
"update.CheckUpdateMixin"
]
}
}