aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/DumymMod.java
diff options
context:
space:
mode:
authorMoulberry <james.jenour@student.scotch.wa.edu.au>2020-11-01 04:28:36 +1100
committerMoulberry <james.jenour@student.scotch.wa.edu.au>2020-11-01 04:28:36 +1100
commit36af336e49662390c0f553da6f7f5ec424e5d37b (patch)
treeaeab2d8fcb87fd50b4995bfd10cc6da75bd5d3a8 /src/main/java/io/github/moulberry/notenoughupdates/DumymMod.java
parent431d4a5eca207aa6f86a90e3c4e1912885f115eb (diff)
downloadnotenoughupdates-36af336e49662390c0f553da6f7f5ec424e5d37b.tar.gz
notenoughupdates-36af336e49662390c0f553da6f7f5ec424e5d37b.tar.bz2
notenoughupdates-36af336e49662390c0f553da6f7f5ec424e5d37b.zip
1.5
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/DumymMod.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/DumymMod.java53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/DumymMod.java b/src/main/java/io/github/moulberry/notenoughupdates/DumymMod.java
deleted file mode 100644
index 07205519..00000000
--- a/src/main/java/io/github/moulberry/notenoughupdates/DumymMod.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package io.github.moulberry.notenoughupdates;
-
-import java.util.Arrays;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.inventory.GuiChest;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.client.event.GuiScreenEvent;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.fml.common.Mod;
-import net.minecraftforge.fml.common.Mod.EventHandler;
-import net.minecraftforge.fml.common.ModMetadata;
-import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
-import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
-
-public class DumymMod {
-
- @SubscribeEvent
- public void onInitGui(GuiScreenEvent.InitGuiEvent.Post event) {
- int width = event.gui.width / 2;
- int height = event.gui.height / 2 - 106;
-
- if (event.gui instanceof GuiChest)
- {
- event.buttonList.add(new GuiButtonItem(1001, width + 88, height + 47, new ItemStack(Blocks.crafting_table)));
- event.buttonList.add(new GuiButtonItem(1000, width + 88, height + 66, new ItemStack(Blocks.ender_chest)));
- }
- }
-
- private long lastButtonClick = -1;
-
- @SubscribeEvent
- public void onPostActionPerformedGui(GuiScreenEvent.ActionPerformedEvent.Post event) {
- long now = System.currentTimeMillis();
-
- if (event.gui instanceof GuiChest)
- {
- if (now - this.lastButtonClick > 100L)
- {
- if (event.button.id == 1000)
- {
- Minecraft.getMinecraft().thePlayer.sendChatMessage("/enderchest");
- }
- else if (event.button.id == 1001)
- {
- Minecraft.getMinecraft().thePlayer.sendChatMessage("/craft");
- }
- this.lastButtonClick = now;
- }
- }
- }
-} \ No newline at end of file