Skip to content

Commit b9d9d47

Browse files
committed
24w18a
1 parent 79328cd commit b9d9d47

22 files changed

+91
-29
lines changed

build.gradle

+25-23
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,32 @@ plugins {
1111
}
1212

1313
preprocess {
14-
def mc114 = createNode('1.14.4' , 1_14_04, '')
15-
def mc115 = createNode('1.15.2' , 1_15_02, '')
16-
def mc116 = createNode('1.16.5' , 1_16_05, '')
17-
def mc117 = createNode('1.17.1' , 1_17_01, '')
18-
def mc118 = createNode('1.18.2' , 1_18_02, '')
19-
def mc1192 = createNode('1.19.2' , 1_19_02, '') // TODO: drop support when mc1.21 is out
20-
def mc1193 = createNode('1.19.3' , 1_19_03, '') // TODO: drop support when mc1.21 is out
21-
def mc1194 = createNode('1.19.4' , 1_19_04, '')
22-
def mc1201 = createNode('1.20.1' , 1_20_01, '') // TODO: drop support when mc1.22 is out
23-
def mc1202 = createNode('1.20.2' , 1_20_02, '') // TODO: drop support when mc1.22 is out
24-
def mc1204 = createNode('1.20.4' , 1_20_04, '') // TODO: drop support when mc1.22 is out
25-
def mc1206 = createNode('1.20.6' , 1_20_06, '')
14+
def mc114 = createNode('1.14.4' , 1_14_04, '')
15+
def mc115 = createNode('1.15.2' , 1_15_02, '')
16+
def mc116 = createNode('1.16.5' , 1_16_05, '')
17+
def mc117 = createNode('1.17.1' , 1_17_01, '')
18+
def mc118 = createNode('1.18.2' , 1_18_02, '')
19+
def mc1192 = createNode('1.19.2' , 1_19_02, '') // TODO: drop support when mc1.21 is out
20+
def mc1193 = createNode('1.19.3' , 1_19_03, '') // TODO: drop support when mc1.21 is out
21+
def mc1194 = createNode('1.19.4' , 1_19_04, '')
22+
def mc1201 = createNode('1.20.1' , 1_20_01, '') // TODO: drop support when mc1.22 is out
23+
def mc1202 = createNode('1.20.2' , 1_20_02, '') // TODO: drop support when mc1.22 is out
24+
def mc1204 = createNode('1.20.4' , 1_20_04, '') // TODO: drop support when mc1.22 is out
25+
def mc1206 = createNode('1.20.6' , 1_20_06, '')
26+
def mc121 = createNode('1.21' , 1_21_00, '')
2627

27-
mc115 .link(mc114 , file('versions/mapping-1.15-1.14.txt'))
28-
mc115 .link(mc116 , file('versions/mapping-1.15-1.16.txt'))
29-
mc116 .link(mc117 , file('versions/mapping-1.16-1.17.txt'))
30-
mc117 .link(mc118 , file('versions/mapping-1.17-1.18.txt'))
31-
mc118 .link(mc1192 , file('versions/mapping-1.18-1.19.txt'))
32-
mc1192.link(mc1193 , null)
33-
mc1193.link(mc1194 , null)
34-
mc1194.link(mc1201 , null)
35-
mc1201.link(mc1202 , null)
36-
mc1202.link(mc1204 , null)
37-
mc1204.link(mc1206 , null)
28+
mc115 .link(mc114 , file('versions/mapping-1.15-1.14.txt'))
29+
mc115 .link(mc116 , file('versions/mapping-1.15-1.16.txt'))
30+
mc116 .link(mc117 , file('versions/mapping-1.16-1.17.txt'))
31+
mc117 .link(mc118 , file('versions/mapping-1.17-1.18.txt'))
32+
mc118 .link(mc1192, file('versions/mapping-1.18-1.19.txt'))
33+
mc1192.link(mc1193, null)
34+
mc1193.link(mc1194, null)
35+
mc1194.link(mc1201, null)
36+
mc1201.link(mc1202, null)
37+
mc1202.link(mc1204, null)
38+
mc1204.link(mc1206, null)
39+
mc1206.link(mc121 , null)
3840
}
3941

4042
tasks.register('buildAndGather') {

common.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ if (mcVersion >= 12005) {
6666
JavaVersion MIXIN_COMPATIBILITY_LEVEL = JAVA_COMPATIBILITY
6767

6868
loom {
69+
accessWidenerPath = file("ivan-carpet-addition.accesswidener")
70+
6971
runConfigs.configureEach {
7072
// to make sure it generates all "Minecraft Client (:subproject_name)" applications
7173
ideConfigGenerated = true
@@ -100,6 +102,8 @@ if (System.getenv("JITPACK") == "true") {
100102
// See https://youtrack.jetbrains.com/issue/IDEA-296490
101103
// if IDEA complains about "Cannot resolve resource filtering of MatchingCopyAction" and you want to know why
102104
processResources {
105+
from "ivan-carpet-addition.accesswidener"
106+
103107
inputs.property "id", project.mod_id
104108
inputs.property "name", project.mod_name
105109
inputs.property "version", fullModVersion

settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"1.20.1",
1212
"1.20.2",
1313
"1.20.4",
14-
"1.20.6"
14+
"1.20.6",
15+
"1.21"
1516
]
1617
}

src/main/java/me/ivan/ivancarpetaddition/mixins/rule/endLightningRod/EndRodBlockMixin.java

+15-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,22 @@
44
import net.minecraft.block.BlockState;
55
import net.minecraft.block.EndRodBlock;
66
import net.minecraft.block.FacingBlock;
7-
import net.minecraft.enchantment.EnchantmentHelper;
87
import net.minecraft.entity.LightningEntity;
98
import net.minecraft.entity.projectile.TridentEntity;
9+
import net.minecraft.item.ItemStack;
1010
import net.minecraft.util.hit.BlockHitResult;
1111
import net.minecraft.util.math.BlockPos;
1212
import net.minecraft.util.math.Vec3d;
1313
import net.minecraft.world.World;
1414
import org.spongepowered.asm.mixin.Mixin;
1515

16+
//#if MC >= 12100
17+
//$$ import net.minecraft.enchantment.Enchantments;
18+
//$$ import net.minecraft.component.DataComponentTypes;
19+
//#else
20+
import net.minecraft.enchantment.EnchantmentHelper;
21+
//#endif
22+
1623
//#if MC >= 11600
1724
//$$ import net.minecraft.entity.EntityType;
1825
//#else
@@ -50,7 +57,13 @@ public void onProjectileHit(
5057
) {
5158
if (!IvanCarpetAdditionSettings.endLightningRod) return;
5259
//#if MC >= 11600
53-
//#if MC >= 12004
60+
//#if MC >= 12100
61+
//$$ if (world.isThundering() && projectile instanceof TridentEntity) {
62+
//$$ ItemStack stack = ((TridentEntity) projectile).asItemStack();
63+
//$$ if (stack.get(DataComponentTypes.ENCHANTMENTS).getEnchantments().stream().noneMatch((e) -> e.matchesKey(Enchantments.CHANNELING))) {
64+
//$$ return;
65+
//$$ }
66+
//#elseif MC >= 12004
5467
//$$ if (world.isThundering() && projectile instanceof TridentEntity && ((TridentEntity) projectile).hasChanneling()) {
5568
//#else
5669
//$$ boolean hasChanneling = EnchantmentHelper.hasChanneling(((TridentEntityAccessor) projectile).getTridentStack());

src/main/java/me/ivan/ivancarpetaddition/mixins/translations/StyleAccessor.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
//#endif
1414

1515
@Mixin(Style.class)
16-
public interface StyleAccessor
17-
{
16+
public interface StyleAccessor {
1817
@Accessor("bold")
1918
Boolean getBoldField();
2019

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
package me.ivan.ivancarpetaddition.utils.compat;
22

3+
/**
4+
* A dummy class for fallback mixin target
5+
*/
36
public class DummyClass {
47
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package me.ivan.ivancarpetaddition.utils.compat;
2+
3+
/**
4+
* A dummy interface for fallback mixin target
5+
*/
6+
public interface DummyInterface {
7+
}

src/main/resources/fabric.mod.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"mixins": [
2727
"ivan-carpet-addition.mixins.json"
2828
],
29-
29+
"accessWidener": "ivan-carpet-addition.accesswidener",
3030
"depends": {
3131
"fabricloader": ">=0.14.25",
3232
"carpet": "${carpet_dependency}",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
accessWidener v1 named
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
accessWidener v1 named
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
accessWidener v1 named
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
accessWidener v1 named
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
accessWidener v1 named
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
accessWidener v1 named
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
accessWidener v1 named
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
accessWidener v1 named
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
accessWidener v1 named
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
accessWidener v1 named
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
accessWidener v1 named
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
accessWidener v1 named

versions/1.21/gradle.properties

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Fabric Properties
2+
# check these on https://fallen-breath.github.io/fabric-versions/
3+
minecraft_version=24w18a
4+
yarn_mappings=24w18a+build.4
5+
6+
# Fabric Mod Metadata
7+
carpet_dependency=>=1.4.142
8+
minecraft_dependency=>=1.21-alpha.0
9+
lithium_confliction=<=0.11.0
10+
11+
# Build Information
12+
# The target mc versions for the mod during mod publishing, separated with \n
13+
game_versions=24w18a
14+
15+
# Mod Dependency
16+
# check available versions on maven for the given minecraft version you are using
17+
# https://masa.dy.fi/maven/carpet/fabric-carpet/
18+
carpet_core_version=24w18a-1.4.142+v240504
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
accessWidener v1 named
2+
3+
accessible method net/minecraft/entity/projectile/PersistentProjectileEntity asItemStack ()Lnet/minecraft/item/ItemStack;

0 commit comments

Comments
 (0)