This commit is contained in:
ayunami2000 2022-01-17 16:46:18 -05:00
parent b840c50b26
commit fd04546a94
8 changed files with 236596 additions and 46071 deletions

BIN
epkcompiler/out.epk Normal file

Binary file not shown.

Binary file not shown.

BIN
javascript/assets_old.epk Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -5,6 +5,10 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import me.ayunami2000.ayuncraft.tmi.TMI;
import me.ayunami2000.ayuncraft.tmi.TMIConfig;
import me.ayunami2000.ayuncraft.tmi.TMIUtils;
import net.minecraft.client.Minecraft;
import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.TextureLocation;
@ -65,6 +69,7 @@ public abstract class GuiContainer extends GuiScreen {
public GuiContainer(Container par1Container) {
this.inventorySlots = par1Container;
this.field_94068_E = true;
TMI.instance.controller.onCreate(this);
if(itemRenderer == null) itemRenderer = new RenderItem();
}
@ -82,6 +87,18 @@ public abstract class GuiContainer extends GuiScreen {
* Draws the screen and all the components in it.
*/
public void drawScreen(int par1, int par2, float par3) {
if (this instanceof GuiContainerCreative)
{
try
{
GuiTextField var4 = ((GuiContainerCreative)this).searchField;
var4.xPos = this.guiLeft + 82;
}
catch (Exception var15)
{
System.out.println(var15);
}
}
this.drawDefaultBackground();
int var4 = this.guiLeft;
int var5 = this.guiTop;
@ -119,6 +136,8 @@ public abstract class GuiContainer extends GuiScreen {
}
}
TMI.instance.controller.onEnterFrame(par1, par2, this.xSize, this.ySize);
this.drawGuiContainerForegroundLayer(par1, par2);
InventoryPlayer var14 = this.mc.thePlayer.inventory;
ItemStack var16 = this.draggedStack == null ? var14.getItemStack() : this.draggedStack;
@ -182,7 +201,8 @@ public abstract class GuiContainer extends GuiScreen {
}
protected void drawItemStackTooltip(ItemStack par1ItemStack, int par2, int par3) {
List var4 = par1ItemStack.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips);
//par1ItemStack.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips)
List var4 = TMIUtils.itemDisplayNameMultiline(par1ItemStack, TMIConfig.getInstance().isEnabled(), this.mc.gameSettings.advancedItemTooltips);
for (int var5 = 0; var5 < var4.size(); ++var5) {
if (var5 == 0) {
@ -401,6 +421,11 @@ public abstract class GuiContainer extends GuiScreen {
*/
protected void mouseClicked(int par1, int par2, int par3) {
super.mouseClicked(par1, par2, par3);
Slot fard1 = this.getSlotAtPosition(par1, par2);
boolean fard2 = par1 >= this.guiLeft && par2 >= this.guiTop && par1 <= this.guiLeft + this.xSize && par2 <= this.guiTop + this.ySize;
if (TMI.instance.controller.onMouseEvent(par1, par2, par3, fard2, fard1, this.inventorySlots)) {
boolean var4 = par3 == this.mc.gameSettings.keyBindPickBlock.keyCode + 100;
Slot var5 = this.getSlotAtPosition(par1, par2);
long var6 = Minecraft.getSystemTime();
@ -473,6 +498,7 @@ public abstract class GuiContainer extends GuiScreen {
this.field_94070_G = var6;
this.field_94073_I = par3;
}
}
protected void func_85041_a(int par1, int par2, int par3, long par4) {
Slot var6 = this.getSlotAtPosition(par1, par2);
@ -661,6 +687,7 @@ public abstract class GuiContainer extends GuiScreen {
* KeyListener.keyTyped(KeyEvent e).
*/
protected void keyTyped(char par1, int par2) {
if(!TMI.instance.controller.onKeypress(par1, par2)) {
if (par2 == 1 || par2 == this.mc.gameSettings.keyBindInventory.keyCode) {
this.mc.thePlayer.closeScreen();
}
@ -675,6 +702,7 @@ public abstract class GuiContainer extends GuiScreen {
}
}
}
}
/**
* This function is what controls the hotbar shortcut check when you press a
@ -697,6 +725,7 @@ public abstract class GuiContainer extends GuiScreen {
* Called when the screen is unloaded. Used to disable keyboard repeat events
*/
public void onGuiClosed() {
TMI.instance.controller.onClose();
if (this.mc.thePlayer != null) {
this.inventorySlots.onCraftGuiClosed(this.mc.thePlayer);
}
@ -707,7 +736,7 @@ public abstract class GuiContainer extends GuiScreen {
* single-player
*/
public boolean doesGuiPauseGame() {
return false;
return TMI.instance.controller.shouldPauseGame();
}
/**

View File

@ -23,7 +23,7 @@ public class GuiContainerCreative extends InventoryEffectRenderer {
* True if the left mouse button was held down last time drawScreen was called.
*/
private boolean wasClicking;
private GuiTextField searchField;
public GuiTextField searchField;
/**
* Used to back up the ContainerCreative's inventory slots before filling it

View File

@ -2,6 +2,8 @@ package net.minecraft.src;
import java.util.ArrayList;
import java.util.List;
import me.ayunami2000.ayuncraft.tmi.TMI;
import net.minecraft.client.Minecraft;
import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.TextureLocation;
@ -147,6 +149,8 @@ public class GuiScreen extends Gui {
int var1 = EaglerAdapter.mouseGetEventX() * this.width / this.mc.displayWidth;
int var2 = this.height - EaglerAdapter.mouseGetEventY() * this.height / this.mc.displayHeight - 1;
TMI.instance.controller.handleScrollWheel(var1, var2);
if (EaglerAdapter.mouseGetEventButtonState()) {
if (this.mc.gameSettings.touchscreen && this.field_92018_d++ > 0) {
return;