tangled
alpha
login
or
join now
potota54.bsky.social
/
minecraft-breakfree
0
fork
atom
https://modrinth.com/mod/breakfree
0
fork
atom
overview
issues
pulls
pipelines
feat: update to 26.1-snapshot-1
potota.tngl.sh
3 months ago
7ddcb859
2f74bd22
0/1
build.yml
failed
1m 10s
+35
-123
9 changed files
expand all
collapse all
unified
split
build.gradle
gradle
wrapper
gradle-wrapper.properties
gradle.properties
src
main
java
dev
potota
breakfree
mixin
MultiPlayerGameModeMixin.java
io
github
justapotota
breakfree
mixin
ClientPlayerInteractionManagerMixin119.java
ClientPlayerInteractionManagerMixin120.java
ConfigPlugin.java
resources
breakfree.mixins.json
fabric.mod.json
+6
-9
build.gradle
···
1
1
plugins {
2
2
-
id 'fabric-loom' version "${loom_version}"
2
2
+
id 'net.fabricmc.fabric-loom' version "${loom_version}"
3
3
id 'maven-publish'
4
4
}
5
5
···
11
11
}
12
12
13
13
dependencies {
14
14
-
// To change the versions see the gradle.properties file
15
14
minecraft "com.mojang:minecraft:${project.minecraft_version}"
16
16
-
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
17
17
-
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
15
15
+
implementation "net.fabricmc:fabric-loader:${project.loader_version}"
18
16
}
19
17
20
18
processResources {
21
19
inputs.property "version", project.version
22
22
-
inputs.property "minecraft_version", project.minecraft_version
23
20
24
21
filesMatching("fabric.mod.json") {
25
25
-
expand "version": inputs.properties.version, "minecraft_version": inputs.properties.minecraft_version
22
22
+
expand "version": inputs.properties.version
26
23
}
27
24
}
28
25
29
26
tasks.withType(JavaCompile).configureEach {
30
30
-
it.options.release = 8
27
27
+
it.options.release = 25
31
28
}
32
29
33
30
java {
···
36
33
// If you remove this line, sources will not be generated.
37
34
withSourcesJar()
38
35
39
39
-
sourceCompatibility = JavaVersion.VERSION_17
40
40
-
targetCompatibility = JavaVersion.VERSION_17
36
36
+
sourceCompatibility = JavaVersion.VERSION_25
37
37
+
targetCompatibility = JavaVersion.VERSION_25
41
38
}
42
39
43
40
jar {
+4
-5
gradle.properties
···
4
4
5
5
# Fabric Properties
6
6
# check these on https://fabricmc.net/versions.html
7
7
-
minecraft_version=25w36b
8
8
-
yarn_mappings=25w36b+build.2
9
9
-
loader_version=0.17.2
10
10
-
loom_version=1.11-SNAPSHOT
7
7
+
minecraft_version=26.1-snapshot-1
8
8
+
loader_version=0.18.3
9
9
+
loom_version=1.14-SNAPSHOT
11
10
12
11
# Mod Properties
13
12
mod_version=1.4.0
14
14
-
maven_group=io.github.justapotota
13
13
+
maven_group=dev.potota
15
14
archives_base_name=breakfree
+1
-1
gradle/wrapper/gradle-wrapper.properties
···
1
1
distributionBase=GRADLE_USER_HOME
2
2
distributionPath=wrapper/dists
3
3
-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
3
3
+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
4
4
networkTimeout=10000
5
5
validateDistributionUrl=true
6
6
zipStoreBase=GRADLE_USER_HOME
+15
src/main/java/dev/potota/breakfree/mixin/MultiPlayerGameModeMixin.java
···
1
1
+
package dev.potota.breakfree.mixin;
2
2
+
3
3
+
import net.minecraft.client.multiplayer.MultiPlayerGameMode;
4
4
+
import net.minecraft.world.item.ItemStack;
5
5
+
import org.spongepowered.asm.mixin.Mixin;
6
6
+
import org.spongepowered.asm.mixin.injection.At;
7
7
+
import org.spongepowered.asm.mixin.injection.Redirect;
8
8
+
9
9
+
@Mixin(MultiPlayerGameMode.class)
10
10
+
public abstract class MultiPlayerGameModeMixin {
11
11
+
@Redirect(method = "sameDestroyTarget", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/ItemStack;isSameItemSameComponents(Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/item/ItemStack;)Z"))
12
12
+
private boolean breakfree$forceSameItem(ItemStack a, ItemStack b) {
13
13
+
return true;
14
14
+
}
15
15
+
}
-14
src/main/java/io/github/justapotota/breakfree/mixin/ClientPlayerInteractionManagerMixin119.java
···
1
1
-
package io.github.justapotota.breakfree.mixin;
2
2
-
3
3
-
import net.minecraft.client.network.ClientPlayerInteractionManager;
4
4
-
import org.spongepowered.asm.mixin.Mixin;
5
5
-
import org.spongepowered.asm.mixin.injection.At;
6
6
-
import org.spongepowered.asm.mixin.injection.ModifyVariable;
7
7
-
8
8
-
@Mixin(ClientPlayerInteractionManager.class)
9
9
-
public class ClientPlayerInteractionManagerMixin119 {
10
10
-
@ModifyVariable(method = "isCurrentlyBreaking", at = @At("STORE"))
11
11
-
private boolean bl(boolean original) {
12
12
-
return true;
13
13
-
}
14
14
-
}
-18
src/main/java/io/github/justapotota/breakfree/mixin/ClientPlayerInteractionManagerMixin120.java
···
1
1
-
package io.github.justapotota.breakfree.mixin;
2
2
-
3
3
-
import net.minecraft.client.network.ClientPlayerInteractionManager;
4
4
-
import net.minecraft.item.ItemStack;
5
5
-
import org.spongepowered.asm.mixin.Mixin;
6
6
-
import org.spongepowered.asm.mixin.Shadow;
7
7
-
import org.spongepowered.asm.mixin.injection.At;
8
8
-
import org.spongepowered.asm.mixin.injection.ModifyVariable;
9
9
-
10
10
-
@Mixin(ClientPlayerInteractionManager.class)
11
11
-
public class ClientPlayerInteractionManagerMixin120 {
12
12
-
@Shadow private ItemStack selectedStack;
13
13
-
14
14
-
@ModifyVariable(method = "isCurrentlyBreaking", at = @At("STORE"))
15
15
-
private ItemStack stack(ItemStack stack) {
16
16
-
return this.selectedStack;
17
17
-
}
18
18
-
}
-66
src/main/java/io/github/justapotota/breakfree/mixin/ConfigPlugin.java
···
1
1
-
package io.github.justapotota.breakfree.mixin;
2
2
-
3
3
-
import net.fabricmc.loader.api.FabricLoader;
4
4
-
import net.fabricmc.loader.api.SemanticVersion;
5
5
-
import net.fabricmc.loader.api.Version;
6
6
-
import net.fabricmc.loader.api.VersionParsingException;
7
7
-
import org.objectweb.asm.tree.ClassNode;
8
8
-
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
9
9
-
import org.spongepowered.asm.mixin.extensibility.IMixinInfo;
10
10
-
11
11
-
import java.util.Collections;
12
12
-
import java.util.List;
13
13
-
import java.util.Objects;
14
14
-
import java.util.Set;
15
15
-
16
16
-
public class ConfigPlugin implements IMixinConfigPlugin {
17
17
-
private SemanticVersion v1_20;
18
18
-
19
19
-
private Version minecraftVersion;
20
20
-
21
21
-
@Override
22
22
-
public void onLoad(String mixinPackage) {
23
23
-
try {
24
24
-
this.v1_20 = SemanticVersion.parse("1.20");
25
25
-
} catch (VersionParsingException e) {
26
26
-
throw new RuntimeException(e);
27
27
-
}
28
28
-
29
29
-
this.minecraftVersion = FabricLoader.getInstance().getModContainer("minecraft").get().getMetadata().getVersion();
30
30
-
}
31
31
-
32
32
-
@Override
33
33
-
public String getRefMapperConfig() {
34
34
-
return null;
35
35
-
}
36
36
-
37
37
-
@Override
38
38
-
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
39
39
-
if (Objects.equals(mixinClassName, "io.github.justapotota.breakfree.mixin.ClientPlayerInteractionManagerMixin120")) {
40
40
-
return this.v1_20.compareTo(this.minecraftVersion) <= 0;
41
41
-
} else if (Objects.equals(mixinClassName, "io.github.justapotota.breakfree.mixin.ClientPlayerInteractionManagerMixin119")) {
42
42
-
return this.v1_20.compareTo(this.minecraftVersion) > 0;
43
43
-
}
44
44
-
return false;
45
45
-
}
46
46
-
47
47
-
@Override
48
48
-
public void acceptTargets(Set<String> myTargets, Set<String> otherTargets) {
49
49
-
50
50
-
}
51
51
-
52
52
-
@Override
53
53
-
public List<String> getMixins() {
54
54
-
return Collections.emptyList();
55
55
-
}
56
56
-
57
57
-
@Override
58
58
-
public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) {
59
59
-
60
60
-
}
61
61
-
62
62
-
@Override
63
63
-
public void postApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) {
64
64
-
65
65
-
}
66
66
-
}
+3
-5
src/main/resources/breakfree.mixins.json
···
1
1
{
2
2
"required": true,
3
3
"minVersion": "0.8",
4
4
-
"package": "io.github.justapotota.breakfree.mixin",
5
5
-
"compatibilityLevel": "JAVA_8",
6
6
-
"plugin": "io.github.justapotota.breakfree.mixin.ConfigPlugin",
4
4
+
"package": "dev.potota.breakfree.mixin",
5
5
+
"compatibilityLevel": "JAVA_21",
7
6
"client": [
8
8
-
"ClientPlayerInteractionManagerMixin119",
9
9
-
"ClientPlayerInteractionManagerMixin120"
7
7
+
"MultiPlayerGameModeMixin"
10
8
],
11
9
"injectors": {
12
10
"defaultRequire": 1
+6
-5
src/main/resources/fabric.mod.json
···
7
7
"authors": ["Potota"],
8
8
"contact": {
9
9
"homepage": "https://modrinth.com/mod/breakfree",
10
10
-
"sources": "https://github.com/JustAPotota/fabric-breakfree",
11
11
-
"issues": "https://github.com/JustAPotota/fabric-breakfree/issues"
10
10
+
"sources": "https://tangled.org/potota54.bsky.social/minecraft-breakfree",
11
11
+
"issues": "https://tangled.org/potota54.bsky.social/minecraft-breakfree/issues",
12
12
+
"discord": "https://discord.gg/PKK2RkNhYd"
12
13
},
13
14
"license": "unlicense",
14
15
"icon": "assets/breakfree/icon.png",
···
19
20
"breakfree.mixins.json"
20
21
],
21
22
"depends": {
22
22
-
"fabricloader": ">=0.16.10",
23
23
-
"minecraft": ">=1.14",
24
24
-
"java": ">=8"
23
23
+
"fabricloader": ">=0.18.0",
24
24
+
"minecraft": ">=26.1-alpha.1",
25
25
+
"java": ">=21"
25
26
}
26
27
}