diff options
Diffstat (limited to 'src/main/java/com/example')
-rw-r--r-- | src/main/java/com/example/ExampleMod.java | 22 | ||||
-rw-r--r-- | src/main/java/com/example/Settings.java | 5 | ||||
-rw-r--r-- | src/main/java/com/example/commands/ClientCommandBase.java | 27 | ||||
-rw-r--r-- | src/main/java/com/example/commands/Commands.java | 14 | ||||
-rw-r--r-- | src/main/java/com/example/commands/EnchantRuneCommand.java | 23 | ||||
-rw-r--r-- | src/main/java/com/example/commands/HelpCommand.java | 23 | ||||
-rw-r--r-- | src/main/java/com/example/mixin/MixinRendererManager.java | 49 | ||||
-rw-r--r-- | src/main/java/com/example/mixin/MixinWorld.java | 21 |
8 files changed, 0 insertions, 184 deletions
diff --git a/src/main/java/com/example/ExampleMod.java b/src/main/java/com/example/ExampleMod.java deleted file mode 100644 index c43c2c5..0000000 --- a/src/main/java/com/example/ExampleMod.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.example; - -import com.example.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; - -@Mod(modid = "examplemod", version = "1.0.0") -public class ExampleMod { - 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/example/Settings.java b/src/main/java/com/example/Settings.java deleted file mode 100644 index e7576f4..0000000 --- a/src/main/java/com/example/Settings.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.example;
-
-public class Settings {
- public static boolean EnchantRune = true;
-}
diff --git a/src/main/java/com/example/commands/ClientCommandBase.java b/src/main/java/com/example/commands/ClientCommandBase.java deleted file mode 100644 index 566fb6e..0000000 --- a/src/main/java/com/example/commands/ClientCommandBase.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.example.commands;
-
-import net.minecraft.command.CommandBase;
-import net.minecraft.command.ICommandSender;
-
-public abstract class ClientCommandBase extends CommandBase {
- private final String name;
-
- protected ClientCommandBase(String name) {
- this.name = name;
- }
-
- @Override
- public String getCommandName() {
- return name;
- }
-
- @Override
- public String getCommandUsage(ICommandSender sender) {
- return "/" + name;
- }
-
- @Override
- public boolean canCommandSenderUseCommand(ICommandSender sender) {
- return true;
- }
-}
diff --git a/src/main/java/com/example/commands/Commands.java b/src/main/java/com/example/commands/Commands.java deleted file mode 100644 index 4a3db44..0000000 --- a/src/main/java/com/example/commands/Commands.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.commands;
-
-import com.example.commands.HelpCommand;
-import net.minecraftforge.client.ClientCommandHandler;
-
-public class Commands {
- public Commands() {
- // Help Commands
- ClientCommandHandler.instance.registerCommand(new HelpCommand());
-
- // General
- ClientCommandHandler.instance.registerCommand(new EnchantRuneCommand());
- }
-}
\ No newline at end of file diff --git a/src/main/java/com/example/commands/EnchantRuneCommand.java b/src/main/java/com/example/commands/EnchantRuneCommand.java deleted file mode 100644 index 98296ae..0000000 --- a/src/main/java/com/example/commands/EnchantRuneCommand.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.example.commands;
-
-import com.example.Settings;
-import com.example.commands.ClientCommandBase;
-import net.minecraft.client.Minecraft;
-import net.minecraft.command.CommandException;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-
-public class EnchantRuneCommand extends ClientCommandBase {
-
- public EnchantRuneCommand() {
- super("enchantrune");
- }
-
- @Override
- public void processCommand(ICommandSender sender, String[] args) throws CommandException {
- Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(
- EnumChatFormatting.BLACK+ "" + EnumChatFormatting.BOLD + "TOGGLED."));
- Settings.EnchantRune = !Settings.EnchantRune;
- }
-}
\ No newline at end of file diff --git a/src/main/java/com/example/commands/HelpCommand.java b/src/main/java/com/example/commands/HelpCommand.java deleted file mode 100644 index 603fbdc..0000000 --- a/src/main/java/com/example/commands/HelpCommand.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.example.commands;
-
-import com.example.commands.ClientCommandBase;
-import net.minecraft.client.Minecraft;
-import net.minecraft.command.CommandException;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-
-public class HelpCommand extends ClientCommandBase {
-
- public HelpCommand() {
- super("dulkir");
- }
-
- @Override
- public void processCommand(ICommandSender sender, String[] args) throws CommandException {
- Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(
- EnumChatFormatting.GOLD + "HI THIS IS DULKIRMOD"));
- Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(
- EnumChatFormatting.GRAY + "/enchantrune - toggles enchant rune visibility."));
- }
-}
\ No newline at end of file diff --git a/src/main/java/com/example/mixin/MixinRendererManager.java b/src/main/java/com/example/mixin/MixinRendererManager.java deleted file mode 100644 index eae11fa..0000000 --- a/src/main/java/com/example/mixin/MixinRendererManager.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.example.mixin;
-
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.item.EntityArmorStand;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-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;
-
-@Mixin(RenderManager.class)
-public class MixinRendererManager {
-
- @Inject(method = "doRenderEntity", at = @At("HEAD"))
- public void doRender(
- Entity entity,
- double x,
- double y,
- double z,
- float entityYaw,
- float partialTicks,
- boolean p_147939_10_,
- CallbackInfoReturnable<Boolean> cir
- ) {
-
- if (entity instanceof EntityArmorStand) {
- if (((EntityArmorStand) entity).getHeldItem() != null && ((EntityArmorStand) entity).getHeldItem().getItem() == Items.skull) {
- ItemStack stack = ((EntityArmorStand) entity).getHeldItem();
- if (stack.hasTagCompound() && stack.getTagCompound().hasKey("SkullOwner")) {
- NBTTagCompound skullOwner = stack.getTagCompound().getCompoundTag("SkullOwner");
- if (skullOwner.hasKey("Properties")) {
- NBTTagCompound properties = skullOwner.getCompoundTag("Properties");
- if (properties.hasKey("textures")) {
- if ("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTZjM2UzMWNmYzY2NzMzMjc1YzQyZmNmYjVkOWE0NDM0MmQ2NDNiNTVjZDE0YzljNzdkMjczYTIzNTIifX19"
- .equals(properties.getTagList("textures", 10).getCompoundTagAt(0).getString("Value")))
- cir.cancel();
- }
-
- }
-
- }
-
- }
- }
- }
-}
\ No newline at end of file diff --git a/src/main/java/com/example/mixin/MixinWorld.java b/src/main/java/com/example/mixin/MixinWorld.java deleted file mode 100644 index 9bacbcd..0000000 --- a/src/main/java/com/example/mixin/MixinWorld.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.example.mixin; - -import net.minecraft.client.gui.GuiMainMenu; -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.example.Settings; - -@Mixin(World.class) -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) { - ci.cancel(); - } - } -} |