diff --git a/src/main/java/eu/ha3/presencefootsteps/compat/PFMixinPlugin.java b/src/main/java/eu/ha3/presencefootsteps/compat/PFMixinPlugin.java deleted file mode 100644 index fde9306f..00000000 --- a/src/main/java/eu/ha3/presencefootsteps/compat/PFMixinPlugin.java +++ /dev/null @@ -1,46 +0,0 @@ -package eu.ha3.presencefootsteps.compat; - -import java.util.List; -import java.util.Set; - -import org.objectweb.asm.tree.ClassNode; -import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; -import org.spongepowered.asm.mixin.extensibility.IMixinInfo; - -import net.fabricmc.loader.api.FabricLoader; - -public class PFMixinPlugin implements IMixinConfigPlugin { - private static final String MIXIN_PACKAGE = "eu.ha3.presencefootsteps.mixins.compat"; - - @Override - public void onLoad(String mixinPackage) { } - - @Override - public String getRefMapperConfig() { - return null; - } - - @Override - public boolean shouldApplyMixin(String targetClassName, String mixinClassName) { - if (mixinClassName.startsWith(MIXIN_PACKAGE)) { - if (mixinClassName.indexOf("create") != -1) { - return FabricLoader.getInstance().isModLoaded("create"); - } - } - return true; - } - - @Override - public void acceptTargets(Set myTargets, Set otherTargets) { } - - @Override - public List getMixins() { - return null; - } - - @Override - public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { } - - @Override - public void postApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { } -} diff --git a/src/main/java/eu/ha3/presencefootsteps/mixins/compat/create/MEntity.java b/src/main/java/eu/ha3/presencefootsteps/mixins/compat/create/MEntity.java deleted file mode 100644 index 52a37bde..00000000 --- a/src/main/java/eu/ha3/presencefootsteps/mixins/compat/create/MEntity.java +++ /dev/null @@ -1,40 +0,0 @@ -package eu.ha3.presencefootsteps.mixins.compat.create; - -import org.apache.logging.log4j.util.TriConsumer; -import org.spongepowered.asm.mixin.Dynamic; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import eu.ha3.presencefootsteps.compat.ContraptionCollidable; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.entity.Entity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Vec3d; - -@Mixin(value = Entity.class, priority = 9999 /* Run us last */) -abstract class MEntity implements ContraptionCollidable { - - private int presenceFootsteps$lastCollidedContraptionStateTick = -1; - private BlockState presenceFootsteps$lastCollidedContraptionState = Blocks.AIR.getDefaultState(); - - @Dynamic( - value = "create$forCollision(center, consumer) - Private member injected by Create. See: https://github.com/Fabricators-of-Create/Create/blob/49cc17e3de33c965b1c409130abe436821f7410c/src/main/java/com/simibubi/create/foundation/mixin/client/EntityContraptionInteractionMixin.java#L81C21-L81C21" - ) - @Shadow(aliases = { - "forCollision", "create$forCollision" - }) - private void create$forCollision(Vec3d anchorPos, TriConsumer action) {} - - @Override - public BlockState getCollidedStateAt(BlockPos pos) { - if (presenceFootsteps$lastCollidedContraptionStateTick != ((Entity)(Object)this).age) { - presenceFootsteps$lastCollidedContraptionStateTick = ((Entity)(Object)this).age; - create$forCollision(((Entity)(Object)this).getPos().add(0, -0.2, 0), (unused, state, p) -> { - if (pos.equals(p)) { - presenceFootsteps$lastCollidedContraptionState = state; - } - }); - } - return presenceFootsteps$lastCollidedContraptionState; - } -} diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index c20cd5f4..e19bef04 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -12,7 +12,7 @@ "issues": "https://github.com/Sollace/Presence-Footsteps/issues" }, "license": "MIT", - "icon": "resourcepacks/default_sound_pack/pack.png", + "icon": "logo.png", "environment": "client", "entrypoints": { "client": [ diff --git a/src/main/resources/logo.png b/src/main/resources/logo.png new file mode 100644 index 00000000..7c86cc4f Binary files /dev/null and b/src/main/resources/logo.png differ diff --git a/src/main/resources/presencefootsteps.mixin.json b/src/main/resources/presencefootsteps.mixin.json index 4c65c251..c1667ec5 100644 --- a/src/main/resources/presencefootsteps.mixin.json +++ b/src/main/resources/presencefootsteps.mixin.json @@ -2,7 +2,6 @@ "required": true, "minVersion": "0.7", "package": "eu.ha3.presencefootsteps.mixins", - "plugin" : "eu.ha3.presencefootsteps.compat.PFMixinPlugin", "refmap": "presencefootsteps.mixin.refmap.json", "compatibilityLevel": "JAVA_17", "client": [ @@ -15,7 +14,6 @@ "MClientPlayNetworkHandler", "MDebugHud", "MLivingEntity", - "MSoundSystem", - "compat.create.MEntity" + "MSoundSystem" ] }