Skip to content

Commit

Permalink
Update to 24w34a
Browse files Browse the repository at this point in the history
  • Loading branch information
DrexHD committed Aug 22, 2024
1 parent 56ff78e commit 0618056
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.jetbrains.changelog.Changelog

plugins {
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'io.github.goooler.shadow' version '8.1.7'
id 'maven-publish'
id "me.modmuss50.mod-publish-plugin" version "0.5.1"
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21
curseforge_minecraft_version=1.21
loader_version=0.15.11
minecraft_version=24w34a
curseforge_minecraft_version=1.21.2-Snapshot
loader_version=0.16.2
# Mod Properties
mod_version=1.5.6
maven_group=me.drex
archives_base_name=vanish
# Dependencies
fabric_version=0.100.1+1.21
fabric_version=0.102.3+1.21.2
permission_api_version=0.3.1
placeholder_api_version=2.4.0-pre.2+1.21
placeholder_api_version=2.4.1+1.21
player_data_api_version=0.6.0+1.21
translations_version=2.3.1+1.21-pre2
configurate_hocon_version=4.1.2
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
import net.minecraft.world.entity.EntitySelector;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.entity.vehicle.AbstractMinecart;
import net.minecraft.world.entity.vehicle.NewMinecartBehavior;
import net.minecraft.world.entity.vehicle.OldMinecartBehavior;
import net.minecraft.world.item.ArmorItem;
import net.minecraft.world.level.EntityGetter;
import net.minecraft.world.level.Level;
Expand Down Expand Up @@ -107,11 +108,10 @@ private static Predicate<Entity> vanish_preventArmorItemEquip(Operation<Predicat
}
}

@Mixin(AbstractMinecart.class)
public abstract static class AbstractMinecartMixin {

@Mixin(OldMinecartBehavior.class)
public abstract static class OldMinecartBehaviorMixin {
@WrapOperation(
method = "tick",
method = "pushAndPickupEntities",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/level/Level;getEntities(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/phys/AABB;)Ljava/util/List;"
Expand All @@ -120,7 +120,20 @@ public abstract static class AbstractMinecartMixin {
private List<Entity> vanish_preventMinecartColision(Level instance, Entity entity, AABB aABB, Operation<List<Entity>> original) {
return ConfigManager.vanish().interaction.entityCollisions ? instance.getEntities(entity, aABB, VanishMod.NO_SPECTATORS_AND_NO_VANISH) : original.call(instance, entity, aABB);
}
}

@Mixin(NewMinecartBehavior.class)
public abstract static class NewMinecartBehaviorMixin {
@WrapOperation(
method = "pushEntities",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/level/Level;getEntities(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/phys/AABB;)Ljava/util/List;"
)
)
private List<Entity> vanish_preventMinecartColision(Level instance, Entity entity, AABB aABB, Operation<List<Entity>> original) {
return ConfigManager.vanish().interaction.entityCollisions ? instance.getEntities(entity, aABB, VanishMod.NO_SPECTATORS_AND_NO_VANISH) : original.call(instance, entity, aABB);
}
}

@Mixin(Player.class)
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/vanish.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@
"interaction.PlayerMixin",
"interaction.SimpleCriterionTriggerMixin",
"interaction.StepOnBlockMixin",
"interaction.VanishEntitySelector$AbstractMinecartMixin",
"interaction.VanishEntitySelector$ArmorItemMixin",
"interaction.VanishEntitySelector$BasePressurePlateBlockMixin",
"interaction.VanishEntitySelector$BeehiveBlockMixin",
"interaction.VanishEntitySelector$EntityGetterMixin",
"interaction.VanishEntitySelector$EntitySelectorMixin",
"interaction.VanishEntitySelector$NewMinecartBehaviorMixin",
"interaction.VanishEntitySelector$OldMinecartBehaviorMixin",
"interaction.VanishEntitySelector$PlayerMixin",
"interaction.VibrationSystemMixin"
]
Expand Down

0 comments on commit 0618056

Please sign in to comment.