This commit is contained in:
ayunami2000 2022-01-17 16:25:06 -05:00
parent a6fa806e8d
commit b840c50b26
16 changed files with 1303 additions and 1292 deletions

File diff suppressed because it is too large Load Diff

View File

@ -177,7 +177,7 @@ public class TMIConfig
{
if (Minecraft.getMinecraft().currentScreen instanceof GuiContainerCreative)
{
TMIPrivateFields.setCreativeTab.invoke((GuiContainerCreative)Minecraft.getMinecraft().currentScreen, new Object[] {CreativeTabs.tabInventory});
((GuiContainerCreative)Minecraft.getMinecraft().currentScreen).setCurrentCreativeTab(CreativeTabs.tabInventory);
}
}
catch (Exception var5)

View File

@ -51,7 +51,7 @@ public class TMIController implements _tmi_MgButtonHandler, _tmi_MgItemHandler,
TMIUtils.suppressAchievementNotice();
boolean var6 = false;
if (this.window instanceof GuiContainerCreative && TMIPrivateFields.creativeTab.getInt(this.window) == CreativeTabs.tabAllSearch.getTabIndex())
if (this.window instanceof GuiContainerCreative && ((GuiContainerCreative)this.window).selectedTabIndex == CreativeTabs.tabAllSearch.getTabIndex())
{
var6 = true;
}
@ -111,9 +111,9 @@ public class TMIController implements _tmi_MgButtonHandler, _tmi_MgItemHandler,
try
{
if (TMIUtils.isCreativeMode() && TMIPrivateFields.creativeTab.getInt(this.window) == CreativeTabs.tabAllSearch.getTabIndex())
if (TMIUtils.isCreativeMode() && ((GuiContainerCreative)this.window).selectedTabIndex == CreativeTabs.tabAllSearch.getTabIndex())
{
TMIPrivateFields.setCreativeTab.invoke((GuiContainerCreative)this.window, new Object[] {CreativeTabs.tabInventory});
((GuiContainerCreative)this.window).setCurrentCreativeTab(CreativeTabs.tabInventory);
}
}
catch (Exception var3)
@ -169,8 +169,8 @@ public class TMIController implements _tmi_MgButtonHandler, _tmi_MgItemHandler,
try
{
TMIPrivateFields.lwjglMouseEventDWheel.setInt((Object)null, 0);
TMIPrivateFields.lwjglMouseDWheel.setInt((Object)null, 0);
//TMIPrivateFields.lwjglMouseEventDWheel.setInt((Object)null, 0);
//TMIPrivateFields.lwjglMouseDWheel.setInt((Object)null, 0);
}
catch (Exception var5)
{
@ -212,7 +212,7 @@ public class TMIController implements _tmi_MgButtonHandler, _tmi_MgItemHandler,
{
try
{
Slot var10 = (Slot)((Slot)TMIPrivateFields.creativeSlot.get((SlotCreativeInventory)var5));
Slot var10 = ((SlotCreativeInventory)var5).theSlot;
var12 = var10.slotNumber;
}
catch (Exception var16)

View File

@ -18,7 +18,7 @@ public class TMIItemSnow extends ItemBlock
{
try
{
TMIPrivateFields.setBlockBounds.invoke(Block.snow, new Object[] {Float.valueOf(0.0F), Float.valueOf(0.0F), Float.valueOf(0.0F), Float.valueOf(1.0F), Float.valueOf((float)(2 * (1 + var1)) / 16.0F), Float.valueOf(1.0F)});
Block.snow.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, (float) (2 * (1 + var1)) / 16.0F, 1.0F);
}
catch (Exception var3)
{

View File

@ -1,19 +1,42 @@
package me.ayunami2000.ayuncraft.tmi;
import java.io.DataInput;
import java.io.DataOutput;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import net.minecraft.src.EntityList;
import java.util.Iterator;
import java.util.Map;
import java.util.SortedSet;
import java.util.TreeSet;
import net.minecraft.src.*;
import net.lax1dude.eaglercraft.EaglerAdapter;
public class TMIPrivateFields
{
public static SortedSet getSpawnerEntityIdSet()
{
try
{
TreeSet var0 = new TreeSet(EntityList.IDtoClassMapping.keySet());
Iterator var1 = TMIItemInfo.excludedSpawnerIds.iterator();
while (var1.hasNext())
{
Integer var2 = (Integer)var1.next();
if (var0.contains(var2))
{
var0.remove(var2);
}
}
return var0;
}
catch (Exception var3)
{
System.out.println(var3);
TreeSet retval=new TreeSet<>();
retval.add(0);
return retval;
}
}
/*
public static Field lwjglMouseDWheel;
public static Field lwjglMouseEventDWheel;
public static Field textFieldX;
@ -205,4 +228,5 @@ public class TMIPrivateFields
var1.printStackTrace();
}
}
*/
}

View File

@ -956,7 +956,7 @@ public class TMIUtils
{
try
{
TMIPrivateFields.stackDamage.setInt(var0, var1);
var0.itemDamage=var1;
}
catch (Exception var3)
{
@ -1007,15 +1007,7 @@ public class TMIUtils
public static int getGameMode()
{
try
{
return ((EnumGameType)TMIPrivateFields.gameMode.get(Minecraft.getMinecraft().playerController)).getID();
}
catch (IllegalAccessException var1)
{
System.out.println(var1);
return 0;
}
return Minecraft.getMinecraft().playerController.currentGameType.getID();
}
public static void setGameMode(int var0)
@ -1486,6 +1478,7 @@ public class TMIUtils
Item var1 = Item.itemsList[var0];
Item.itemsList[var0] = null;
/*
try
{
Class var2 = Class.forName("cpw.mods.fml.common.registry.GameData");
@ -1506,6 +1499,7 @@ public class TMIUtils
{
;
}
*/
return var1;
}

View File

@ -42,7 +42,7 @@ public class _tmi_MgCanvas
try
{
TMIPrivateFields.drawGradientRect.invoke(this.window, new Object[] {Integer.valueOf(var1), Integer.valueOf(var2), Integer.valueOf(var3), Integer.valueOf(var4), Integer.valueOf(var5), Integer.valueOf(var6)});
this.window.drawGradientRect(var1, var2, var3, var4, var5, var6);
}
catch (Exception var8)
{

View File

@ -32,17 +32,10 @@ public class _tmi_MgTextField extends _tmi_MgWidget
{
if (this.show)
{
try
{
TMIPrivateFields.textFieldX.setInt(this.textField, this.x);
TMIPrivateFields.textFieldY.setInt(this.textField, this.y);
TMIPrivateFields.textFieldWidth.setInt(this.textField, this.width);
TMIPrivateFields.textFieldHeight.setInt(this.textField, this.height);
}
catch (IllegalAccessException var5)
{
System.out.println(var5);
}
this.textField.xPos=this.x;
this.textField.yPos=this.y;
this.textField.width=this.width;
this.textField.height=this.height;
this.textField.drawTextBox();

View File

@ -443,7 +443,7 @@ public class Block {
/**
* Sets the bounds of the block. minX, minY, minZ, maxX, maxY, maxZ
*/
protected final void setBlockBounds(float par1, float par2, float par3, float par4, float par5, float par6) {
public final void setBlockBounds(float par1, float par2, float par3, float par4, float par5, float par6) {
this.minX = (double) par1;
this.minY = (double) par2;
this.minZ = (double) par3;

View File

@ -12,7 +12,7 @@ public class EntityList {
private static Map classToStringMapping = new HashMap();
/** provides a mapping between an entityID and an Entity Class */
private static Map IDtoClassMapping = new HashMap();
public static Map IDtoClassMapping = new HashMap();
/** provides a mapping between an Entity Class and an entity ID */
private static Map classToIDMapping = new HashMap();

View File

@ -67,7 +67,7 @@ public class Gui {
/**
* Draws a rectangle with a vertical gradient between the specified colors.
*/
protected void drawGradientRect(int par1, int par2, int par3, int par4, int par5, int par6) {
public void drawGradientRect(int par1, int par2, int par3, int par4, int par5, int par6) {
float var7 = (float) (par5 >> 24 & 255) / 255.0F;
float var8 = (float) (par5 >> 16 & 255) / 255.0F;
float var9 = (float) (par5 >> 8 & 255) / 255.0F;

View File

@ -11,7 +11,7 @@ public class GuiContainerCreative extends InventoryEffectRenderer {
private static InventoryBasic inventory = new InventoryBasic("tmp", true, 45);
/** Currently selected creative inventory tab index. */
private static int selectedTabIndex = CreativeTabs.tabBlock.getTabIndex();
public static int selectedTabIndex = CreativeTabs.tabBlock.getTabIndex();
/** Amount scrolled in Creative mode inventory (0 = top, 1 = bottom) */
private float currentScroll = 0.0F;
@ -367,7 +367,7 @@ public class GuiContainerCreative extends InventoryEffectRenderer {
return selectedTabIndex != CreativeTabs.tabInventory.getTabIndex() && CreativeTabs.creativeTabArray[selectedTabIndex].shouldHidePlayerInventory() && ((ContainerCreative) this.inventorySlots).hasMoreThan1PageOfItemsInList();
}
private void setCurrentCreativeTab(CreativeTabs par1CreativeTabs) {
public void setCurrentCreativeTab(CreativeTabs par1CreativeTabs) {
int var2 = selectedTabIndex;
selectedTabIndex = par1CreativeTabs.getTabIndex();
ContainerCreative var3 = (ContainerCreative) this.inventorySlots;

View File

@ -10,12 +10,12 @@ public class GuiTextField extends Gui {
* screen.
*/
private final FontRenderer fontRenderer;
private final int xPos;
private final int yPos;
public int xPos;
public int yPos;
/** The width of this text field. */
private final int width;
private final int height;
public int width;
public int height;
/** Have the current text beign edited on the textbox. */
private String text = "";

View File

@ -25,7 +25,7 @@ public final class ItemStack {
public NBTTagCompound stackTagCompound;
/** Damage dealt to the item or number of use. Raise when using items. */
private int itemDamage;
public int itemDamage;
/** Item frame this stack is on, or null if not on an item frame. */
private EntityItemFrame itemFrame;

View File

@ -35,7 +35,7 @@ public class PlayerControllerMP {
private boolean isHittingBlock = false;
/** Current game type for the player */
private EnumGameType currentGameType;
public EnumGameType currentGameType;
/** Index of the current item held by the player in the inventory hotbar */
private int currentPlayerItem;

View File

@ -1,7 +1,7 @@
package net.minecraft.src;
public class SlotCreativeInventory extends Slot {
private final Slot theSlot;
public final Slot theSlot;
final GuiContainerCreative theCreativeInventory;