diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/dulkirmod/DulkirMod.java | 26 | ||||
-rw-r--r-- | src/main/java/com/dulkirmod/Settings.java | 6 | ||||
-rw-r--r-- | src/main/java/dulkirmod/mixins/MixinRendererManager.java (renamed from src/main/java/com/dulkirmod/mixin/MixinRendererManager.java) | 6 | ||||
-rw-r--r-- | src/main/java/dulkirmod/mixins/MixinWorld.java (renamed from src/main/java/com/dulkirmod/mixin/MixinWorld.java) | 9 |
4 files changed, 9 insertions, 38 deletions
diff --git a/src/main/java/com/dulkirmod/DulkirMod.java b/src/main/java/com/dulkirmod/DulkirMod.java deleted file mode 100644 index 937031f..0000000 --- a/src/main/java/com/dulkirmod/DulkirMod.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.dulkirmod; - -import com.dulkirmod.commands.Commands; -import net.minecraft.init.Blocks; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.event.FMLInitializationEvent; -import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; - -import javax.swing.text.JTextComponent; - -@Mod(modid = "dulkirmod", version = "1.0.0") -public class DulkirMod { - public Commands commands; - - @Mod.EventHandler - public void init(FMLInitializationEvent event) { - System.out.println("Dirt: " + Blocks.dirt.getUnlocalizedName()); - } - - @Mod.EventHandler - public void preinit(FMLPreInitializationEvent event) { - this.commands = new Commands(); - } - - -} diff --git a/src/main/java/com/dulkirmod/Settings.java b/src/main/java/com/dulkirmod/Settings.java deleted file mode 100644 index 316aa2f..0000000 --- a/src/main/java/com/dulkirmod/Settings.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.dulkirmod; - -public class Settings { - public static boolean EnchantRune = true; - public static boolean HealerFairy = true; -} diff --git a/src/main/java/com/dulkirmod/mixin/MixinRendererManager.java b/src/main/java/dulkirmod/mixins/MixinRendererManager.java index 359b67e..b545107 100644 --- a/src/main/java/com/dulkirmod/mixin/MixinRendererManager.java +++ b/src/main/java/dulkirmod/mixins/MixinRendererManager.java @@ -1,6 +1,5 @@ -package com.dulkirmod.mixin; +package dulkirmod.mixins; -import com.dulkirmod.Settings; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityArmorStand; @@ -11,6 +10,7 @@ import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; +import dulkirmod.DulkirMod; @Mixin(RenderManager.class) public class MixinRendererManager { @@ -26,7 +26,7 @@ public class MixinRendererManager { boolean p_147939_10_, CallbackInfoReturnable<Boolean> cir ) { - if(!Settings.HealerFairy) return; + if(!DulkirMod.Companion.getConfig().getHideHealerFairy()) return; if (entity instanceof EntityArmorStand) { if (((EntityArmorStand) entity).getHeldItem() != null && ((EntityArmorStand) entity).getHeldItem().getItem() == Items.skull) { ItemStack stack = ((EntityArmorStand) entity).getHeldItem(); diff --git a/src/main/java/com/dulkirmod/mixin/MixinWorld.java b/src/main/java/dulkirmod/mixins/MixinWorld.java index 8ae76cd..97133e1 100644 --- a/src/main/java/com/dulkirmod/mixin/MixinWorld.java +++ b/src/main/java/dulkirmod/mixins/MixinWorld.java @@ -1,11 +1,11 @@ -package com.dulkirmod.mixin; +package dulkirmod.mixins; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import com.dulkirmod.Settings; +import dulkirmod.DulkirMod; @Mixin(World.class) public class MixinWorld { @@ -13,7 +13,10 @@ public class MixinWorld { @Inject(method = "spawnParticle(IZDDDDDD[I)V", at = @At("HEAD"), cancellable = true) public void onInitGui(int particleID, boolean p_175720_2_, double xCood, double yCoord, double zCoord, double xOffset, double yOffset, double zOffset, int[] p_175720_15_, CallbackInfo ci) { - if (particleID == 25 && Settings.EnchantRune) { + if (particleID == 25 && DulkirMod.Companion.getConfig().getHideEnchantRune()) { + ci.cancel(); + } + else if (particleID == 34 && DulkirMod.Companion.getConfig().getHideHeartParticles()) { ci.cancel(); } } |