Skip to content

Commit cada8b6

Browse files
committed
chore: add support for 1.21
1 parent 3a2b644 commit cada8b6

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ preprocess {
1111
def mc1193 = createNode('1.19.3' , 1_19_03, 'yarn')
1212
def mc1201 = createNode('1.20.1' , 1_20_01, 'yarn')
1313
def mc1204 = createNode('1.20.4' , 1_20_04, 'yarn')
14-
def mc1210 = createNode('1.21' , 1_21, 'yarn')
14+
def mc1210 = createNode('1.21' , 1_21_00, 'yarn')
1515

1616
mc117 .link(mc118, null)
1717
mc118 .link(mc1193, null)

common.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ version = simple_version + '-' + project.minecraft_version
1212

1313
group = project.maven_group
1414

15-
16-
if (project.mcVersion >= 11800) {
15+
if (mcVersion >= 12005) {
16+
sourceCompatibility = JavaVersion.VERSION_21
17+
targetCompatibility = JavaVersion.VERSION_21
18+
} else if (project.mcVersion >= 11800) {
1719
sourceCompatibility = JavaVersion.VERSION_17
1820
targetCompatibility = JavaVersion.VERSION_17
1921
} else if (project.mcVersion >= 11700) {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Gradle Configurations
2-
org.gradle.jvmargs=-Xmx3g
2+
org.gradle.jvmargs=-Xmx2560M
33
org.gradle.parallel=true
44

55
# Fabric Configurations
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/java/io/github/optijava/opt_carpet_addition/mixins/rule/removeAllCurseOfBindingArmorWhenPlayerDeadInWall/ServerPlayerEntity_Mixin.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,15 @@ public void injectOnDeath(DamageSource source, CallbackInfo ci) {
2828
if (OptCarpetSettings.removeAllCurseOfBindingArmorWhenPlayerDeadInWall && ((ServerPlayerEntity) (Object)this).world.getGameRules().getBoolean(GameRules.KEEP_INVENTORY) && Objects.equals(source.getName(), "inWall")) {
2929
//#endif
3030
for (ItemStack armor : ((ServerPlayerEntity) (Object)this).getArmorItems()) {
31+
//#if MC >= 12100
32+
//$$ if (EnchantmentHelper.hasAnyEnchantmentsWith(armor, net.minecraft.component.EnchantmentEffectComponentTypes.PREVENT_EQUIPMENT_DROP)) {
33+
//$$ armor.setCount(0);
34+
//$$ }
35+
//#else
3136
if (EnchantmentHelper.getLevel(Enchantments.BINDING_CURSE, armor) > 0) {
3237
armor.setCount(0);
3338
}
39+
//#endif
3440
}
3541
}
3642
}

0 commit comments

Comments
 (0)