mirror of
https://github.com/GTNewHorizons/ThaumicEnergistics.git
synced 2026-10-25 20:32:27 +00:00
Source Cleanup
Applied new formatting rules to entire project.
This commit is contained in:
1 parent
135f765728
commit
ee3b1309fe
288 files changed
+2411
-2378
No files matched your search
@@ -1,7 +1,9 @@
|
||||
04/17/2016 1.0.0.4 - Beta
|
||||
Fixes #300 and #282: Microblock compatibility added.
|
||||
Fixes #293: Added missing redstone method to level emitter.
|
||||
Craftable essentia no longer shows in item terminals.
|
||||
Texture updated: Level Emitter
|
||||
Applied new formatting rules to entire project.
|
||||
|
||||
04/15/2016 1.0.0.4 - Beta
|
||||
Cleaned up ASM transformer code.
|
||||
|
||||
@@ -4,9 +4,9 @@ import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Thaumic Energistics Blocks.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public abstract class IThEBlocks
|
||||
{
|
||||
|
||||
@@ -2,15 +2,15 @@ package thaumicenergistics.api;
|
||||
|
||||
/**
|
||||
* Thaumic Energistics configuration options.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IThEConfig
|
||||
{
|
||||
/**
|
||||
* If true essentia gas will be blacklisted from ExtraCells.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean blacklistEssentiaFluidInExtraCells();
|
||||
@@ -23,28 +23,28 @@ public interface IThEConfig
|
||||
|
||||
/**
|
||||
* Can the Arcane Assembler be crafted.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean craftArcaneAssembler();
|
||||
|
||||
/**
|
||||
* Can the ACT be crafted.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean craftArcaneCraftingTerminal();
|
||||
|
||||
/**
|
||||
* Can the DPE be crafted.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean craftDistillationPatternEncoder();
|
||||
|
||||
/**
|
||||
* Can Essentia cells be crafted.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean craftEssentiaCells();
|
||||
@@ -56,14 +56,14 @@ public interface IThEConfig
|
||||
|
||||
/**
|
||||
* Can the EVC be crafted.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean craftEssentiaVibrationChamber();
|
||||
|
||||
/**
|
||||
* Can the golem backpack be crafted.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean craftGolemWifiBackpack();
|
||||
@@ -75,21 +75,21 @@ public interface IThEConfig
|
||||
|
||||
/**
|
||||
* Controls if the import/export/storage can be crafted.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean craftIOBuses();
|
||||
|
||||
/**
|
||||
* Can the VRI be crafted.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean craftVisRelayInterface();
|
||||
|
||||
/**
|
||||
* Can the WET be crafted.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean craftWirelessEssentiaTerminal();
|
||||
@@ -107,7 +107,7 @@ public interface IThEConfig
|
||||
|
||||
/**
|
||||
* Is the wrench focus enabled.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean enableWrenchFocus();
|
||||
@@ -115,7 +115,7 @@ public interface IThEConfig
|
||||
/**
|
||||
* When enabled, overwrites the AE2 facade setting for certain Thaumcraft blocks,
|
||||
* allowing them to become facades.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean forceTCFacades();
|
||||
|
||||
@@ -2,9 +2,9 @@ package thaumicenergistics.api;
|
||||
|
||||
/**
|
||||
* Essentia container options.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IThEEssentiaContainerPermission
|
||||
{
|
||||
|
||||
@@ -5,16 +5,16 @@ import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
/**
|
||||
* Gaseous essentia accessor methods.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IThEEssentiaGas
|
||||
{
|
||||
/**
|
||||
* Get the aspect of the gas.<br>
|
||||
* Can be null if the gas itself is invalid.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nullable
|
||||
|
||||
@@ -2,39 +2,39 @@ package thaumicenergistics.api;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumicenergistics.api.entities.IGolemHookHandler;
|
||||
import thaumicenergistics.api.storage.IAspectStack;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Contains miscellaneous functionality intended to help other moders interact with ThE.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IThEInteractionHelper
|
||||
{
|
||||
/**
|
||||
* Converts an amount of milibuckets to an amount of Essentia.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
long convertEssentiaAmountToFluidAmount( long essentiaAmount );
|
||||
|
||||
/**
|
||||
* Converts an amount of Essentia to an amount of milibuckets.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
long convertFluidAmountToEssentiaAmount( long milibuckets );
|
||||
|
||||
/**
|
||||
* Creates a new instance of an aspect stack.
|
||||
*
|
||||
*
|
||||
* @param aspect
|
||||
* @param stackSize
|
||||
* @return
|
||||
@@ -52,15 +52,15 @@ public interface IThEInteractionHelper
|
||||
* Opens the wireless gui for the specified player.
|
||||
* The item the player is holding is used for the settings and power.
|
||||
* Must be called from the server side.
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
*/
|
||||
void openWirelessTerminalGui( @Nonnull EntityPlayer player );
|
||||
|
||||
/**
|
||||
* The {@code IThEWirelessEssentiaTerminal} is assumed to be the item the player is holding, and is no longer needs to be passed in.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
* @param terminalInterface
|
||||
* is now ignored
|
||||
@@ -71,7 +71,7 @@ public interface IThEInteractionHelper
|
||||
|
||||
/**
|
||||
* Registers a handler to receive golem events.
|
||||
*
|
||||
*
|
||||
* @param handler
|
||||
*/
|
||||
void registerGolemHookHandler( @Nonnull IGolemHookHandler handler );
|
||||
|
||||
@@ -8,16 +8,16 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Item information.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IThEItemDescription
|
||||
{
|
||||
|
||||
/**
|
||||
* Gets the block of this item, if it has one.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nullable
|
||||
@@ -25,14 +25,14 @@ public interface IThEItemDescription
|
||||
|
||||
/**
|
||||
* Gets the damage, or meta, value of the item.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int getDamage();
|
||||
|
||||
/**
|
||||
* Gets the item.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nonnull
|
||||
@@ -40,7 +40,7 @@ public interface IThEItemDescription
|
||||
|
||||
/**
|
||||
* Gets a stack of size 1.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nonnull
|
||||
@@ -48,7 +48,7 @@ public interface IThEItemDescription
|
||||
|
||||
/**
|
||||
* Gets a stack of the specified size.
|
||||
*
|
||||
*
|
||||
* @param amount
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -4,9 +4,9 @@ import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Thaumic Energistics items.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public abstract class IThEItems
|
||||
{
|
||||
|
||||
@@ -4,9 +4,9 @@ import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Thaumic Energistics AE2 cable parts.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public abstract class IThEParts
|
||||
{
|
||||
|
||||
@@ -10,9 +10,9 @@ import thaumcraft.api.aspects.IEssentiaContainerItem;
|
||||
/**
|
||||
* Defines what items and tile entities ThaumicEnergistics is allowed to
|
||||
* interact with.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IThETransportPermissions
|
||||
{
|
||||
@@ -21,7 +21,7 @@ public interface IThETransportPermissions
|
||||
* Adds a tile entity to both inject & extract whitelists.
|
||||
* The tile must implement the interface {@link IAspectContainer}<br>
|
||||
* Capacity is required to function properly
|
||||
*
|
||||
*
|
||||
* @param tileClass
|
||||
* @return True if added to the lists, False if not.
|
||||
*/
|
||||
@@ -31,7 +31,7 @@ public interface IThETransportPermissions
|
||||
* Adds a tile entity to the extract whitelist.
|
||||
* The tile must implement the interface {@link IAspectContainer}<br>
|
||||
* Note: Capacity can be 0 if the tile doesn't truely 'contain' essentia.
|
||||
*
|
||||
*
|
||||
* @param tileClass
|
||||
* @return True if added to the list or already present, False otherwise.
|
||||
*/
|
||||
@@ -41,7 +41,7 @@ public interface IThETransportPermissions
|
||||
* Adds a tile entity to the inject whitelist.
|
||||
* The tile must implement the interface {@link IAspectContainer}<br>
|
||||
* Capacity is required to function properly.
|
||||
*
|
||||
*
|
||||
* @param tileClass
|
||||
* @return True if added to the list, False if not.
|
||||
*/
|
||||
@@ -49,18 +49,18 @@ public interface IThETransportPermissions
|
||||
|
||||
/**
|
||||
* Adds an item to the whitelist that must match the specified damage value.
|
||||
*
|
||||
*
|
||||
* @param itemClass
|
||||
* @param capacity
|
||||
* @param damageValue
|
||||
* @param canHoldPartialAmount
|
||||
*/
|
||||
void addEssentiaContainerItemToTransportPermissions( @Nonnull Class<? extends IEssentiaContainerItem> itemClass, int capacity, int damageValue,
|
||||
void addEssentiaContainerItemToTransportPermissions( @Nonnull Class<? extends IEssentiaContainerItem> itemClass, int capacity, int damageValue,
|
||||
boolean canHoldPartialAmount );
|
||||
|
||||
/**
|
||||
* Adds the specified item to the whitelist.
|
||||
*
|
||||
*
|
||||
* @param containerItem
|
||||
* @param capacity
|
||||
* @param canHoldPartialAmount
|
||||
@@ -69,7 +69,7 @@ public interface IThETransportPermissions
|
||||
|
||||
/**
|
||||
* Checks if the container can be extracted from
|
||||
*
|
||||
*
|
||||
* @param container
|
||||
* @return
|
||||
*/
|
||||
@@ -77,7 +77,7 @@ public interface IThETransportPermissions
|
||||
|
||||
/**
|
||||
* Checks if the container can be injected into
|
||||
*
|
||||
*
|
||||
* @param container
|
||||
* @return
|
||||
*/
|
||||
@@ -85,7 +85,7 @@ public interface IThETransportPermissions
|
||||
|
||||
/**
|
||||
* Returns the registered capacity of the specified container.
|
||||
*
|
||||
*
|
||||
* @param container
|
||||
* @return Registered capacity, or -1 if not registered.
|
||||
*/
|
||||
@@ -94,7 +94,7 @@ public interface IThETransportPermissions
|
||||
/**
|
||||
* Gets the information about the container as it was registered to the
|
||||
* whitelist.
|
||||
*
|
||||
*
|
||||
* @param itemClass
|
||||
* @param damageValue
|
||||
* @return Info if was registered, null otherwise.
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
package thaumicenergistics.api;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import appeng.api.features.INetworkEncodable;
|
||||
import appeng.api.implementations.items.IAEItemPowerStorage;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
/**
|
||||
* Provides the required functionality of a wireless terminal.
|
||||
* Presumably this interface would be implemented on an Item, but that is
|
||||
* not a requirement.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IThEWirelessEssentiaTerminal
|
||||
extends INetworkEncodable, IAEItemPowerStorage
|
||||
{
|
||||
/**
|
||||
* Gets the tag used to store the terminal data.
|
||||
*
|
||||
*
|
||||
* @param terminalItemstack
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -8,9 +8,9 @@ import com.google.common.collect.ImmutableList;
|
||||
|
||||
/**
|
||||
* Thaumic Energistics API
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public abstract class ThEApi
|
||||
{
|
||||
@@ -67,7 +67,7 @@ public abstract class ThEApi
|
||||
|
||||
/**
|
||||
* Gets the ThE interaction manager
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nonnull
|
||||
|
||||
@@ -2,12 +2,12 @@ package thaumicenergistics.api.entities;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import thaumcraft.common.entities.golems.EntityGolemBase;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Defines the methods required to interact with the golem hook system.</br>
|
||||
@@ -43,20 +43,21 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
* Following the above situation, if later during a call to setupGolem the server-side handler sets the sync character to 'n'(no), when the client
|
||||
* receives the update, the client-side handlerData can be set to, for example, null. This will let the handler know to not perform the special
|
||||
* render.<br/>
|
||||
* </br> If you want to see an example of a class that implements this, lookup my {@code WirelessGolemHandler} class on the ThE github.
|
||||
*
|
||||
* </br>
|
||||
* If you want to see an example of a class that implements this, lookup my {@code WirelessGolemHandler} class on the ThE github.
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
* @see IGolemHookSyncRegistry
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IGolemHookHandler
|
||||
{
|
||||
/**
|
||||
* Defines interaction levels.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public static enum InteractionLevel
|
||||
{
|
||||
@@ -109,14 +110,14 @@ public interface IGolemHookHandler
|
||||
/**
|
||||
* Any data you wish to sync between the server and clients can be added here.<br/>
|
||||
* The added bytes are considered the default state, and will be added to all golems in that state.
|
||||
*
|
||||
*
|
||||
* @param syncRegistry
|
||||
*/
|
||||
void addDefaultSyncEntries( @Nonnull IGolemHookSyncRegistry syncRegistry );
|
||||
|
||||
/**
|
||||
* Called when the golem was left clicked by a player holding the Golemancers Bell.
|
||||
*
|
||||
*
|
||||
* @param golem
|
||||
* @param handlerData
|
||||
* Handler data attached to the golem.
|
||||
@@ -128,12 +129,12 @@ public interface IGolemHookHandler
|
||||
* @param side
|
||||
* Server or Client @Nonnull Side side
|
||||
*/
|
||||
void bellLeftClicked( @Nonnull final EntityGolemBase golem, @Nullable Object handlerData, @Nonnull ItemStack itemGolemPlacer,
|
||||
void bellLeftClicked( @Nonnull final EntityGolemBase golem, @Nullable Object handlerData, @Nonnull ItemStack itemGolemPlacer,
|
||||
@Nonnull EntityPlayer player, boolean dismantled, @Nonnull Side side );
|
||||
|
||||
/**
|
||||
* Return true if you can handle this interaction.<br/>
|
||||
*
|
||||
*
|
||||
* @param golem
|
||||
* @param handlerData
|
||||
* Handler data attached to the golem.
|
||||
@@ -143,12 +144,12 @@ public interface IGolemHookHandler
|
||||
* @return The level of interaction.
|
||||
*/
|
||||
@Nonnull
|
||||
InteractionLevel canHandleInteraction( @Nonnull final EntityGolemBase golem, @Nullable Object handlerData, @Nonnull EntityPlayer player,
|
||||
InteractionLevel canHandleInteraction( @Nonnull final EntityGolemBase golem, @Nullable Object handlerData, @Nonnull EntityPlayer player,
|
||||
@Nonnull Side side );
|
||||
|
||||
/**
|
||||
* Called when the golem has been interacted with and it hasn't been handled by Thaumcraft.<br/>
|
||||
*
|
||||
*
|
||||
* @param golem
|
||||
* @param handlerData
|
||||
* Handler data attached to the golem.
|
||||
@@ -159,7 +160,7 @@ public interface IGolemHookHandler
|
||||
* @return Return the handler data you wish to attach to the golem, or null to clear any attached data.
|
||||
*/
|
||||
@Nullable
|
||||
Object customInteraction( @Nonnull final EntityGolemBase golem, @Nullable Object handlerData, @Nonnull IGolemHookSyncRegistry syncData,
|
||||
Object customInteraction( @Nonnull final EntityGolemBase golem, @Nullable Object handlerData, @Nonnull IGolemHookSyncRegistry syncData,
|
||||
@Nonnull EntityPlayer player, @Nonnull Side side );
|
||||
|
||||
/**
|
||||
@@ -168,7 +169,7 @@ public interface IGolemHookHandler
|
||||
* tracks this internally and will only ever send updates if the data has actually changed. Although for performance reasons
|
||||
* it would be a good idea to keep a tick counter and only set the data periodically if there is any processing involved.<br>
|
||||
* Note: This is only called server side.
|
||||
*
|
||||
*
|
||||
* @param golem
|
||||
* @param serverHandlerData
|
||||
* @param syncData
|
||||
@@ -177,7 +178,7 @@ public interface IGolemHookHandler
|
||||
|
||||
/**
|
||||
* Return true if your handler wants to be called each time the golem gets a tick from the server.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean needsDynamicUpdates();
|
||||
@@ -185,7 +186,7 @@ public interface IGolemHookHandler
|
||||
/**
|
||||
* Return true if your handler wants to be called when a golem is rendered.<br/>
|
||||
* Note: This is called only once during registration.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean needsRenderer();
|
||||
@@ -193,7 +194,7 @@ public interface IGolemHookHandler
|
||||
/**
|
||||
* Called when reading the golem's NBT.<br />
|
||||
* Note: Called during a world load, not when the golem is placed via its item.
|
||||
*
|
||||
*
|
||||
* @param golem
|
||||
* @param nbtTag
|
||||
* @return Return the handler data you wish to attach to the golem, or null to clear any attached data.
|
||||
@@ -203,7 +204,7 @@ public interface IGolemHookHandler
|
||||
|
||||
/**
|
||||
* Called when a golem is being rendered, if {@code needsRenderer} returned true during registration.
|
||||
*
|
||||
*
|
||||
* @param golem
|
||||
* @param clientHandlerData
|
||||
* @param x
|
||||
@@ -212,7 +213,7 @@ public interface IGolemHookHandler
|
||||
* @param partialElaspsedTick
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
void renderGolem( @Nonnull EntityGolemBase golem, @Nullable Object clientHandlerData, double x, double y, double z,
|
||||
void renderGolem( @Nonnull EntityGolemBase golem, @Nullable Object clientHandlerData, double x, double y, double z,
|
||||
float partialElaspsedTick );
|
||||
|
||||
/**
|
||||
@@ -220,7 +221,7 @@ public interface IGolemHookHandler
|
||||
* If you are adding an AI script(s) to the golem, be aware that Thaumcraft clears all of the golems scripts at the beginning of this call. You
|
||||
* will need to add the script(s) each time this is called, but you do not need to worry about removing them.<br/>
|
||||
* Note: The golems inventory may not be ready.
|
||||
*
|
||||
*
|
||||
* @param golem
|
||||
* @param handlerData
|
||||
* Handler data attached to the golem.
|
||||
@@ -229,13 +230,13 @@ public interface IGolemHookHandler
|
||||
* @return Return the handler data you wish to attach to the golem, or null to clear any attached data.
|
||||
*/
|
||||
@Nullable
|
||||
Object setupGolem( @Nonnull final EntityGolemBase golem, @Nullable Object handlerData, @Nonnull IGolemHookSyncRegistry syncData,
|
||||
Object setupGolem( @Nonnull final EntityGolemBase golem, @Nullable Object handlerData, @Nonnull IGolemHookSyncRegistry syncData,
|
||||
@Nonnull Side side );
|
||||
|
||||
/**
|
||||
* Called when a golem is being spawned via it's item.<br/>
|
||||
* Note: This is not called if the item has no NBT data.
|
||||
*
|
||||
*
|
||||
* @param golem
|
||||
* @param itemGolemPlacer
|
||||
* @param side
|
||||
@@ -247,7 +248,7 @@ public interface IGolemHookHandler
|
||||
|
||||
/**
|
||||
* Called when sync data has changed.
|
||||
*
|
||||
*
|
||||
* @param syncData
|
||||
* @param clientHandlerData
|
||||
* Handler data attached to the golem on the client side.
|
||||
@@ -259,7 +260,7 @@ public interface IGolemHookHandler
|
||||
/**
|
||||
* Called when saving the golem's NBT.<br />
|
||||
* Note: Called during a world save, not when the golem is being turned into an item via Golemancer's Bell.
|
||||
*
|
||||
*
|
||||
* @param golem
|
||||
* @param serverHandlerData
|
||||
* @param nbtTag
|
||||
|
||||
@@ -2,15 +2,15 @@ package thaumicenergistics.api.entities;
|
||||
|
||||
/**
|
||||
* Allows a hook handler to register data to be synchronized between the server and clients.<br/>
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IGolemHookSyncRegistry
|
||||
{
|
||||
/**
|
||||
* Returns the sync char if it is mapped, returns {@code defaultChar} otherwise.
|
||||
*
|
||||
*
|
||||
* @param id
|
||||
* @param defaultChar
|
||||
* @return
|
||||
@@ -20,7 +20,7 @@ public interface IGolemHookSyncRegistry
|
||||
/**
|
||||
* Registers a new sync byte, and returns the ID that maps to it.<br/>
|
||||
* Note: This can only be called during registration, will throw exception otherwise.
|
||||
*
|
||||
*
|
||||
* @param handler
|
||||
* @param c
|
||||
* Initial value of the char.
|
||||
@@ -30,7 +30,7 @@ public interface IGolemHookSyncRegistry
|
||||
|
||||
/**
|
||||
* Updates the sync char.
|
||||
*
|
||||
*
|
||||
* @param handler
|
||||
* @param id
|
||||
* @param c
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
package thaumicenergistics.api.grid;
|
||||
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
|
||||
/**
|
||||
* Defines the requirements for a terminal that wishes to issue AE2 crafting jobs.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface ICraftingIssuerHost
|
||||
extends ITerminalHost
|
||||
{
|
||||
/**
|
||||
* Gets the icon for this terminal.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
ItemStack getIcon();
|
||||
|
||||
@@ -2,22 +2,22 @@ package thaumicenergistics.api.grid;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import appeng.api.networking.IGrid;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
/**
|
||||
* Digital Vis source.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IDigiVisSource
|
||||
{
|
||||
/**
|
||||
* Drains digivis from this source.
|
||||
*
|
||||
*
|
||||
* @param digiVisAspect
|
||||
* @param amount
|
||||
* @return The amount drained.
|
||||
@@ -26,7 +26,7 @@ public interface IDigiVisSource
|
||||
|
||||
/**
|
||||
* Get's the AE grid the source is attached to.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nullable
|
||||
@@ -34,7 +34,7 @@ public interface IDigiVisSource
|
||||
|
||||
/**
|
||||
* Returns the location of the source.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nonnull
|
||||
@@ -43,7 +43,7 @@ public interface IDigiVisSource
|
||||
/**
|
||||
* Gets the side of cable the source part is attached to.
|
||||
* If this returns UNKNOWN, it is assumed the source is a whole block.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nonnull
|
||||
@@ -51,14 +51,14 @@ public interface IDigiVisSource
|
||||
|
||||
/**
|
||||
* Get's the unique identifier for this source.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
long getUID();
|
||||
|
||||
/**
|
||||
* Is the source active?
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isActive();
|
||||
|
||||
@@ -4,9 +4,9 @@ import appeng.api.networking.IGridCache;
|
||||
|
||||
/**
|
||||
* Grid-level essentia manager.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IEssentiaGrid
|
||||
extends IGridCache, IMEEssentiaMonitor
|
||||
|
||||
@@ -5,16 +5,16 @@ import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
/**
|
||||
* Watches the essentia grid for changes, informs the host when changes occur.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IEssentiaWatcher
|
||||
extends Collection<Aspect>
|
||||
{
|
||||
/**
|
||||
* Return the host for this watcher.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IEssentiaWatcherHost getHost();
|
||||
|
||||
@@ -4,15 +4,15 @@ import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
/**
|
||||
* A host that wants to be informed of essentia events.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IEssentiaWatcherHost
|
||||
{
|
||||
/**
|
||||
* Called when essentia levels change in the network.
|
||||
*
|
||||
*
|
||||
* @param aspect
|
||||
* Aspect of the changed essentia.
|
||||
* @param storedAmount
|
||||
@@ -24,7 +24,7 @@ public interface IEssentiaWatcherHost
|
||||
|
||||
/**
|
||||
* Providers the essentia watcher for your host.
|
||||
*
|
||||
*
|
||||
* @param newWatcher
|
||||
*/
|
||||
void updateWatcher( IEssentiaWatcher newWatcher );
|
||||
|
||||
@@ -2,22 +2,22 @@ package thaumicenergistics.api.grid;
|
||||
|
||||
import java.util.Collection;
|
||||
import javax.annotation.Nonnull;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumicenergistics.api.storage.IAspectStack;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumicenergistics.api.storage.IAspectStack;
|
||||
|
||||
/**
|
||||
* Provides access to essentia storage.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IMEEssentiaMonitor
|
||||
{
|
||||
/**
|
||||
* Adds a listener to the essentia grid.
|
||||
*
|
||||
*
|
||||
* @param listener
|
||||
* @param verificationToken
|
||||
* Token used to verify the receiver is still valid, and wants to continue receiving events.
|
||||
@@ -26,7 +26,7 @@ public interface IMEEssentiaMonitor
|
||||
|
||||
/**
|
||||
* Extract the specified essentia from the network.<br>
|
||||
*
|
||||
*
|
||||
* @param aspect
|
||||
* @param amount
|
||||
* @param mode
|
||||
@@ -39,7 +39,7 @@ public interface IMEEssentiaMonitor
|
||||
|
||||
/**
|
||||
* Returns the how much of the specified essentia is in the network.
|
||||
*
|
||||
*
|
||||
* @param aspect
|
||||
* @return
|
||||
*/
|
||||
@@ -47,7 +47,7 @@ public interface IMEEssentiaMonitor
|
||||
|
||||
/**
|
||||
* Gets the list of essentia in the network.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nonnull
|
||||
@@ -55,7 +55,7 @@ public interface IMEEssentiaMonitor
|
||||
|
||||
/**
|
||||
* Inject the specified essentia into the network.<br>
|
||||
*
|
||||
*
|
||||
* @param aspect
|
||||
* @param amount
|
||||
* @param mode
|
||||
@@ -68,7 +68,7 @@ public interface IMEEssentiaMonitor
|
||||
|
||||
/**
|
||||
* Removes a listener from the essentia grid.
|
||||
*
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
public void removeListener( @Nonnull IMEEssentiaMonitorReceiver listener );
|
||||
|
||||
@@ -5,9 +5,9 @@ import thaumicenergistics.api.storage.IAspectStack;
|
||||
|
||||
/**
|
||||
* Defines a class that will attach to a monitor to receive all essentia change events.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IMEEssentiaMonitorReceiver
|
||||
{
|
||||
@@ -15,7 +15,7 @@ public interface IMEEssentiaMonitorReceiver
|
||||
* Verifies that the receiver is still valid.<br>
|
||||
* If returning false the receiver will be removed from the monitor
|
||||
* and the receiver should NOT call removeListener itself.
|
||||
*
|
||||
*
|
||||
* @param verificationToken
|
||||
* @return False if the receiver should no longer get updates.
|
||||
*/
|
||||
@@ -23,7 +23,7 @@ public interface IMEEssentiaMonitorReceiver
|
||||
|
||||
/**
|
||||
* Called when a change to the stored essentia occurs.
|
||||
*
|
||||
*
|
||||
* @param fromMonitor
|
||||
* @param changes
|
||||
*/
|
||||
|
||||
@@ -5,15 +5,15 @@ import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
/**
|
||||
* Container that can have a selected aspect.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IAspectSelectorContainer
|
||||
{
|
||||
/**
|
||||
* Set the selected aspect.
|
||||
*
|
||||
*
|
||||
* @param selectedAspect
|
||||
* Null if no selection.
|
||||
*/
|
||||
|
||||
@@ -6,16 +6,16 @@ import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
/**
|
||||
* GUI that has a selectable aspect.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IAspectSelectorGui
|
||||
extends IWidgetHost
|
||||
{
|
||||
/**
|
||||
* Return the selector container.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nonnull
|
||||
@@ -23,7 +23,7 @@ public interface IAspectSelectorGui
|
||||
|
||||
/**
|
||||
* Return the selected aspect, or null if no aspect is selected.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nullable
|
||||
|
||||
@@ -6,16 +6,16 @@ import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
/**
|
||||
* GUI that displays aspects.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IAspectSlotGui
|
||||
extends IWidgetHost
|
||||
{
|
||||
/**
|
||||
* The list of aspects to display.
|
||||
*
|
||||
*
|
||||
* @param aspectList
|
||||
*/
|
||||
void updateAspects( @Nonnull List<Aspect> aspectList );
|
||||
|
||||
@@ -5,15 +5,15 @@ import thaumicenergistics.api.grid.ICraftingIssuerHost;
|
||||
|
||||
/**
|
||||
* Container that can issue AE2 crafting jobs.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface ICraftingIssuerContainer
|
||||
{
|
||||
/**
|
||||
* Gets the crafting issuer host terminal.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nonnull
|
||||
|
||||
@@ -5,15 +5,15 @@ import net.minecraft.client.gui.FontRenderer;
|
||||
|
||||
/**
|
||||
* GUI that displays widgets.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IWidgetHost
|
||||
{
|
||||
/**
|
||||
* Gets the font renderer for the GUI.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nonnull
|
||||
@@ -21,14 +21,14 @@ public interface IWidgetHost
|
||||
|
||||
/**
|
||||
* Return the left of the GUI.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int guiLeft();
|
||||
|
||||
/**
|
||||
* Return the top of the GUI.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int guiTop();
|
||||
|
||||
@@ -6,16 +6,16 @@ import thaumcraft.api.aspects.IEssentiaContainerItem;
|
||||
|
||||
/**
|
||||
* Essentia container item that restricts what aspects it can store.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IRestrictedEssentiaContainerItem
|
||||
extends IEssentiaContainerItem
|
||||
{
|
||||
/**
|
||||
* Returns true if the container accepts the specified aspect.
|
||||
*
|
||||
*
|
||||
* @param aspect
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -2,4 +2,3 @@
|
||||
package thaumicenergistics.api;
|
||||
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
package thaumicenergistics.api.storage;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
/**
|
||||
* A stack, or collection, of a single aspect.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IAspectStack
|
||||
{
|
||||
/**
|
||||
* Changes the stack size by the delta amount and returns the new stack size.
|
||||
*
|
||||
*
|
||||
* @param delta
|
||||
* @return Adjusted stack size.
|
||||
*/
|
||||
@@ -25,7 +25,7 @@ public interface IAspectStack
|
||||
|
||||
/**
|
||||
* Creates a copy of this stack and returns it.
|
||||
*
|
||||
*
|
||||
* @return Copy of the stack.
|
||||
*/
|
||||
@Nonnull
|
||||
@@ -33,7 +33,7 @@ public interface IAspectStack
|
||||
|
||||
/**
|
||||
* Returns the aspect that is stored.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nullable
|
||||
@@ -41,7 +41,7 @@ public interface IAspectStack
|
||||
|
||||
/**
|
||||
* Gets the Thaumcraft description for the aspect.
|
||||
*
|
||||
*
|
||||
* @return Localized description, or empty string if no aspect.
|
||||
*/
|
||||
@Nonnull
|
||||
@@ -50,7 +50,7 @@ public interface IAspectStack
|
||||
/**
|
||||
* Gets the name of the aspect.<br>
|
||||
* This method does not take into consideration if the player has yet discovered the aspect.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nonnull
|
||||
@@ -58,7 +58,7 @@ public interface IAspectStack
|
||||
|
||||
/**
|
||||
* Gets the display name of the aspect for the player.
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
* @return
|
||||
*/
|
||||
@@ -67,7 +67,7 @@ public interface IAspectStack
|
||||
|
||||
/**
|
||||
* Gets the Thaumcraft tag for the aspect
|
||||
*
|
||||
*
|
||||
* @return Thaumcraft tag, or empty string if no aspect.
|
||||
*/
|
||||
@Nonnull
|
||||
@@ -75,7 +75,7 @@ public interface IAspectStack
|
||||
|
||||
/**
|
||||
* The chat color associated with this aspect.
|
||||
*
|
||||
*
|
||||
* @return Chat prefix string, or empty string if no aspect.
|
||||
*/
|
||||
@Nonnull
|
||||
@@ -83,28 +83,28 @@ public interface IAspectStack
|
||||
|
||||
/**
|
||||
* Returns true if the aspect is craftable.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean getCraftable();
|
||||
|
||||
/**
|
||||
* Returns the stack size.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
long getStackSize();
|
||||
|
||||
/**
|
||||
* Returns true if the stack has a non-null aspect set.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean hasAspect();
|
||||
|
||||
/**
|
||||
* Checks if the player has discovered this aspect.
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
* @return
|
||||
*/
|
||||
@@ -112,21 +112,21 @@ public interface IAspectStack
|
||||
|
||||
/**
|
||||
* Returns true if the size is not positive.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isEmpty();
|
||||
|
||||
/**
|
||||
* Sets this stack to the data in the stream.
|
||||
*
|
||||
*
|
||||
* @param stream
|
||||
*/
|
||||
void readFromStream( @Nonnull ByteBuf stream );
|
||||
|
||||
/**
|
||||
* Sets everything.
|
||||
*
|
||||
*
|
||||
* @param aspect
|
||||
* @param size
|
||||
* @param craftable
|
||||
@@ -136,35 +136,35 @@ public interface IAspectStack
|
||||
/**
|
||||
* Sets the values of this stack to match the passed stack.<br>
|
||||
* If the stack is null, all values are reset.
|
||||
*
|
||||
*
|
||||
* @param stack
|
||||
*/
|
||||
void setAll( @Nullable IAspectStack stack );
|
||||
|
||||
/**
|
||||
* Sets the aspect for the stack.
|
||||
*
|
||||
*
|
||||
* @param aspect
|
||||
*/
|
||||
void setAspect( @Nullable Aspect aspect );
|
||||
|
||||
/**
|
||||
* Sets if the aspect is craftable.
|
||||
*
|
||||
*
|
||||
* @param craftable
|
||||
*/
|
||||
void setCraftable( boolean craftable );
|
||||
|
||||
/**
|
||||
* Sets the size of the stack.
|
||||
*
|
||||
*
|
||||
* @param size
|
||||
*/
|
||||
void setStackSize( long size );
|
||||
|
||||
/**
|
||||
* Writes this aspect stack to the specified NBT tag
|
||||
*
|
||||
*
|
||||
* @param data
|
||||
* The tag to write to
|
||||
* @return The nbt tag passed in.
|
||||
@@ -174,7 +174,7 @@ public interface IAspectStack
|
||||
|
||||
/**
|
||||
* Writes the stack to a bytebuf stream.
|
||||
*
|
||||
*
|
||||
* @param stream
|
||||
*/
|
||||
void writeToStream( @Nonnull ByteBuf stream );
|
||||
|
||||
@@ -8,16 +8,16 @@ import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
/**
|
||||
* Repository, or collection, of essentia.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IEssentiaRepo
|
||||
{
|
||||
|
||||
/**
|
||||
* Returns a set of the stored aspects.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nonnull
|
||||
@@ -30,7 +30,7 @@ public interface IEssentiaRepo
|
||||
|
||||
/**
|
||||
* Returns true if the repo has the aspect stored.
|
||||
*
|
||||
*
|
||||
* @param aspect
|
||||
* @return
|
||||
*/
|
||||
@@ -39,7 +39,7 @@ public interface IEssentiaRepo
|
||||
/**
|
||||
* Sets the repo to match the specified collection.
|
||||
* Any existing data is removed.
|
||||
*
|
||||
*
|
||||
* @param stacks
|
||||
*/
|
||||
void copyFrom( @Nonnull Collection<IAspectStack> stacks );
|
||||
@@ -51,7 +51,7 @@ public interface IEssentiaRepo
|
||||
|
||||
/**
|
||||
* Returns all aspect information stored in the repo.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nonnull
|
||||
@@ -64,14 +64,14 @@ public interface IEssentiaRepo
|
||||
|
||||
/**
|
||||
* Returns true if the repo is empty.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isEmpty();
|
||||
|
||||
/**
|
||||
* Changes the aspect in the repo by the specified values.
|
||||
*
|
||||
*
|
||||
* @param aspect
|
||||
* @param change
|
||||
* @param isCraftable
|
||||
@@ -84,7 +84,7 @@ public interface IEssentiaRepo
|
||||
|
||||
/**
|
||||
* Changes the aspect in the repo by the specified aspect stack.
|
||||
*
|
||||
*
|
||||
* @param change
|
||||
* @return The previous stack, if there was one.
|
||||
*/
|
||||
@@ -94,7 +94,7 @@ public interface IEssentiaRepo
|
||||
/**
|
||||
* Removes an aspect from the repo.<br>
|
||||
* Returns the removed stack, if there was one removed.
|
||||
*
|
||||
*
|
||||
* @param aspect
|
||||
* @return
|
||||
*/
|
||||
@@ -103,7 +103,7 @@ public interface IEssentiaRepo
|
||||
|
||||
/**
|
||||
* Sets the aspect in the repo by the specified values.
|
||||
*
|
||||
*
|
||||
* @param aspect
|
||||
* @param amount
|
||||
* @param isCraftable
|
||||
@@ -114,7 +114,7 @@ public interface IEssentiaRepo
|
||||
|
||||
/**
|
||||
* Sets the aspect in the repo to the specified aspect stack.
|
||||
*
|
||||
*
|
||||
* @param stack
|
||||
* @return The previous stack, if there was one.
|
||||
*/
|
||||
@@ -123,7 +123,7 @@ public interface IEssentiaRepo
|
||||
|
||||
/**
|
||||
* Returns the number of unique aspects stored.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int size();
|
||||
|
||||
@@ -4,15 +4,15 @@ import net.minecraft.inventory.IInventory;
|
||||
|
||||
/**
|
||||
* Implementer wants updates when an inventory is changed.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IInventoryUpdateReceiver
|
||||
{
|
||||
/**
|
||||
* Called when an inventory is changed.
|
||||
*
|
||||
*
|
||||
* @param sourceInventory
|
||||
*/
|
||||
public void onInventoryChanged( IInventory sourceInventory );
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
package thaumicenergistics.api.tiles;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import appeng.api.config.Actionable;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.IEssentiaTransport;
|
||||
import appeng.api.config.Actionable;
|
||||
|
||||
/**
|
||||
* An essentia transport that supports {@link Actionable#SIMULATE} and {@link Actionable#MODULATE}.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IEssentiaTransportWithSimulate
|
||||
extends IEssentiaTransport
|
||||
{
|
||||
/**
|
||||
* Adds essentia to the transport.
|
||||
*
|
||||
*
|
||||
* @param aspect
|
||||
* @param amount
|
||||
* @param side
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package thaumicenergistics.client.gui;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
/**
|
||||
* Particles that can be displayed in a GUI.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public enum EnumGuiParticles
|
||||
@@ -42,7 +42,7 @@ public enum EnumGuiParticles
|
||||
*/
|
||||
private ResourceLocation texture;
|
||||
|
||||
private EnumGuiParticles( final ResourceLocation textureLocation, final int U, final int V, final int width, final int height,
|
||||
private EnumGuiParticles( final ResourceLocation textureLocation, final int U, final int V, final int width, final int height,
|
||||
final int UStep, final int VStep, final int Frames )
|
||||
{
|
||||
this.texture = textureLocation;
|
||||
@@ -71,7 +71,7 @@ public enum EnumGuiParticles
|
||||
* Draws the particle.
|
||||
* If settings "needsPrepare" to false, prepare and finish must be called manually.
|
||||
* However this can be useful if drawing multiple of the same particle.
|
||||
*
|
||||
*
|
||||
* @param gui
|
||||
* @param positionX
|
||||
* @param positionY
|
||||
@@ -81,7 +81,7 @@ public enum EnumGuiParticles
|
||||
* @param blue
|
||||
* @param needsPrepare
|
||||
*/
|
||||
public void drawParticle( final Gui gui, final int positionX, final int positionY, final int frameNumber, final float red, final float green,
|
||||
public void drawParticle( final Gui gui, final int positionX, final int positionY, final int frameNumber, final float red, final float green,
|
||||
final float blue, final boolean needsPrepare )
|
||||
{
|
||||
if( needsPrepare )
|
||||
|
||||
@@ -2,12 +2,14 @@ package thaumicenergistics.client.gui;
|
||||
|
||||
import java.util.Dictionary;
|
||||
import java.util.Hashtable;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumicenergistics.client.gui.abstraction.ThEBaseGui;
|
||||
@@ -15,14 +17,12 @@ import thaumicenergistics.client.textures.GuiTextureManager;
|
||||
import thaumicenergistics.common.container.ContainerArcaneAssembler;
|
||||
import thaumicenergistics.common.registries.ThEStrings;
|
||||
import thaumicenergistics.common.tiles.TileArcaneAssembler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link TileArcaneAssembler} GUI
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiArcaneAssembler
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
package thaumicenergistics.client.gui;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumicenergistics.api.grid.ICraftingIssuerHost;
|
||||
import thaumicenergistics.common.network.packet.server.Packet_S_ConfirmCraftingJob;
|
||||
import appeng.client.gui.implementations.GuiCraftAmount;
|
||||
import appeng.client.gui.widgets.GuiNumberBox;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.core.localization.GuiText;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumicenergistics.api.grid.ICraftingIssuerHost;
|
||||
import thaumicenergistics.common.network.packet.server.Packet_S_ConfirmCraftingJob;
|
||||
|
||||
/**
|
||||
* Bridges the AE2 CraftAmount GUI and the ThE API
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiCraftAmountBridge
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package thaumicenergistics.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import thaumicenergistics.api.grid.ICraftingIssuerHost;
|
||||
import appeng.client.gui.implementations.GuiCraftConfirm;
|
||||
import appeng.core.localization.GuiText;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import thaumicenergistics.api.grid.ICraftingIssuerHost;
|
||||
|
||||
/**
|
||||
* Bridges the AE2 CraftConfirm GUI and the ThE API.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiCraftConfirmBridge
|
||||
|
||||
@@ -2,6 +2,9 @@ package thaumicenergistics.client.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@@ -10,7 +13,6 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumicenergistics.api.storage.IInventoryUpdateReceiver;
|
||||
@@ -24,14 +26,12 @@ import thaumicenergistics.common.network.packet.server.Packet_S_DistillationEnco
|
||||
import thaumicenergistics.common.registries.ThEStrings;
|
||||
import thaumicenergistics.common.tiles.TileDistillationPatternEncoder;
|
||||
import thaumicenergistics.common.utils.ThEUtils;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link TileDistillationPatternEncoder} GUI
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiDistillationPatternEncoder
|
||||
|
||||
@@ -3,6 +3,12 @@ package thaumicenergistics.client.gui;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import appeng.api.config.ViewItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@@ -11,9 +17,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumicenergistics.api.IThEWirelessEssentiaTerminal;
|
||||
import thaumicenergistics.api.gui.IAspectSelectorContainer;
|
||||
@@ -37,15 +40,12 @@ import thaumicenergistics.common.parts.PartEssentiaTerminal;
|
||||
import thaumicenergistics.common.registries.ThEStrings;
|
||||
import thaumicenergistics.common.storage.AspectStackComparator;
|
||||
import thaumicenergistics.common.storage.AspectStackComparator.AspectStackComparatorMode;
|
||||
import appeng.api.config.ViewItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link PartEssentiaTerminal}, {@link ItemWirelessEssentiaTerminal}, and {@link ItemEssentiaCell} GUI
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiEssentiaCellTerminal
|
||||
@@ -155,7 +155,7 @@ public class GuiEssentiaCellTerminal
|
||||
|
||||
/**
|
||||
* Creates the gui.
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
* Player viewing this gui.
|
||||
* @param container
|
||||
@@ -210,7 +210,7 @@ public class GuiEssentiaCellTerminal
|
||||
|
||||
/**
|
||||
* Creates the GUI for an essentia cell inside an ME chest.
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
* Player viewing the gui.
|
||||
* @param world
|
||||
@@ -231,7 +231,7 @@ public class GuiEssentiaCellTerminal
|
||||
|
||||
/**
|
||||
* Creates the GUI for an essentia terminal.
|
||||
*
|
||||
*
|
||||
* @param terminal
|
||||
* @param player
|
||||
* @return
|
||||
@@ -244,7 +244,7 @@ public class GuiEssentiaCellTerminal
|
||||
|
||||
/**
|
||||
* Creates the GUI for a wireless essentia terminal.
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
* @return
|
||||
*/
|
||||
@@ -286,7 +286,7 @@ public class GuiEssentiaCellTerminal
|
||||
|
||||
/**
|
||||
* True if the mouse is over the widget area
|
||||
*
|
||||
*
|
||||
* @param mouseX
|
||||
* @param mouseY
|
||||
* @return
|
||||
@@ -390,9 +390,8 @@ public class GuiEssentiaCellTerminal
|
||||
}
|
||||
|
||||
// Is the search term in this aspects tag or name?
|
||||
if( ( this.searchTerm == "" )
|
||||
|| ( stack.getAspectName().contains( this.searchTerm ) )
|
||||
|| ( stack.getAspectTag().contains( this.searchTerm ) ) )
|
||||
if( ( this.searchTerm == "" ) || ( stack.getAspectName().contains( this.searchTerm ) ) ||
|
||||
( stack.getAspectTag().contains( this.searchTerm ) ) )
|
||||
{
|
||||
this.matchingSearchStacks.add( stack );
|
||||
}
|
||||
@@ -581,8 +580,7 @@ public class GuiEssentiaCellTerminal
|
||||
{
|
||||
// Check if the aspect is to be crafted
|
||||
if( ( !isRightClick && widget.hasAspect() && widget.getCraftable() ) &&
|
||||
( viewingCraftable
|
||||
|| ( isMiddleClick || ( isLeftClick && ( widget.getAmount() == 0 ) ) ) ) )
|
||||
( viewingCraftable || ( isMiddleClick || ( isLeftClick && ( widget.getAmount() == 0 ) ) ) ) )
|
||||
{
|
||||
// Send request
|
||||
Packet_S_EssentiaCellTerminal.sendAutoCraft( this.player, widget.getAspect() );
|
||||
@@ -600,10 +598,8 @@ public class GuiEssentiaCellTerminal
|
||||
}
|
||||
|
||||
// Is the mouse over the search bar?
|
||||
boolean mouseOverSearchBar = ( mouseX >= this.searchBar.xPosition )
|
||||
&& ( mouseX < ( this.searchBar.xPosition + this.searchBar.width ) )
|
||||
&& ( mouseY >= this.searchBar.yPosition )
|
||||
&& ( mouseY < ( this.searchBar.yPosition + this.searchBar.height ) );
|
||||
boolean mouseOverSearchBar = ( mouseX >= this.searchBar.xPosition ) && ( mouseX < ( this.searchBar.xPosition + this.searchBar.width ) ) &&
|
||||
( mouseY >= this.searchBar.yPosition ) && ( mouseY < ( this.searchBar.yPosition + this.searchBar.height ) );
|
||||
if( mouseOverSearchBar )
|
||||
{
|
||||
// Left click?
|
||||
@@ -693,7 +689,7 @@ public class GuiEssentiaCellTerminal
|
||||
|
||||
/**
|
||||
* Draw the widgets
|
||||
*
|
||||
*
|
||||
* @param mouseX
|
||||
* @param mouseY
|
||||
*/
|
||||
@@ -822,7 +818,7 @@ public class GuiEssentiaCellTerminal
|
||||
|
||||
/**
|
||||
* Called when the server sends a full list of network aspects.
|
||||
*
|
||||
*
|
||||
* @param aspectStackList
|
||||
*/
|
||||
public void onReceiveAspectList( final Collection<IAspectStack> aspectStackList )
|
||||
@@ -836,7 +832,7 @@ public class GuiEssentiaCellTerminal
|
||||
|
||||
/**
|
||||
* Called when an aspect in the list changes amount.
|
||||
*
|
||||
*
|
||||
* @param change
|
||||
*/
|
||||
public void onReceiveAspectListChange( final IAspectStack change )
|
||||
@@ -851,7 +847,7 @@ public class GuiEssentiaCellTerminal
|
||||
|
||||
/**
|
||||
* Called when the server sends a change to the selected aspect.
|
||||
*
|
||||
*
|
||||
* @param selectedAspect
|
||||
*/
|
||||
public void onReceiveSelectedAspect( final Aspect selectedAspect )
|
||||
@@ -865,7 +861,7 @@ public class GuiEssentiaCellTerminal
|
||||
|
||||
/**
|
||||
* Called when the server sends a change in the sorting mode.
|
||||
*
|
||||
*
|
||||
* @param sortMode
|
||||
*/
|
||||
public void onViewingModesChanged( final AspectStackComparatorMode sortMode, final ViewItems viewMode )
|
||||
@@ -882,7 +878,7 @@ public class GuiEssentiaCellTerminal
|
||||
|
||||
/**
|
||||
* Called when a new view mode is sent.
|
||||
*
|
||||
*
|
||||
* @param mode
|
||||
*/
|
||||
public void onViewModeChanged( final ViewItems mode )
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package thaumicenergistics.client.gui;
|
||||
|
||||
import java.util.List;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumicenergistics.api.gui.IAspectSlotGui;
|
||||
import thaumicenergistics.client.gui.abstraction.ThEBaseGui;
|
||||
@@ -19,14 +21,12 @@ import thaumicenergistics.common.integration.tc.EssentiaItemContainerHelper;
|
||||
import thaumicenergistics.common.network.packet.server.Packet_S_EssentiaCellWorkbench;
|
||||
import thaumicenergistics.common.registries.ThEStrings;
|
||||
import thaumicenergistics.common.tiles.TileEssentiaCellWorkbench;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link TileEssentiaCellWorkbench} GUI
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiEssentiaCellWorkbench
|
||||
@@ -156,7 +156,8 @@ public class GuiEssentiaCellWorkbench
|
||||
|
||||
// Draw the cell slot background
|
||||
this.drawTexturedModalRect( this.guiLeft + ContainerEssentiaCellWorkbench.CELL_SLOT_X, this.guiTop +
|
||||
ContainerEssentiaCellWorkbench.CELL_SLOT_Y, GuiEssentiaCellWorkbench.CELL_BG_ICON.getU(),
|
||||
ContainerEssentiaCellWorkbench.CELL_SLOT_Y,
|
||||
GuiEssentiaCellWorkbench.CELL_BG_ICON.getU(),
|
||||
GuiEssentiaCellWorkbench.CELL_BG_ICON.getV(), GuiEssentiaCellWorkbench.CELL_BG_ICON.getWidth(),
|
||||
GuiEssentiaCellWorkbench.CELL_BG_ICON.getHeight() );
|
||||
|
||||
|
||||
@@ -2,10 +2,13 @@ package thaumicenergistics.client.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumicenergistics.api.gui.IAspectSlotGui;
|
||||
import thaumicenergistics.client.gui.abstraction.ThEBaseGui;
|
||||
@@ -21,15 +24,12 @@ import thaumicenergistics.common.parts.AEPartsEnum;
|
||||
import thaumicenergistics.common.parts.PartEssentiaExportBus;
|
||||
import thaumicenergistics.common.parts.PartEssentiaImportBus;
|
||||
import thaumicenergistics.common.parts.ThEPartEssentiaIOBus_Base;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link PartEssentiaExportBus} and {@link PartEssentiaImportBus} GUI
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiEssentiaIO
|
||||
@@ -157,7 +157,7 @@ public class GuiEssentiaIO
|
||||
|
||||
/**
|
||||
* Creates the gui
|
||||
*
|
||||
*
|
||||
* @param partBus
|
||||
* @param player
|
||||
*/
|
||||
@@ -381,7 +381,7 @@ public class GuiEssentiaIO
|
||||
|
||||
/**
|
||||
* Called when the server sends a filter size update.
|
||||
*
|
||||
*
|
||||
* @param filterSize
|
||||
*/
|
||||
public void onReceiveFilterSize( final byte filterSize )
|
||||
@@ -405,7 +405,7 @@ public class GuiEssentiaIO
|
||||
|
||||
/**
|
||||
* Called when the server sends if the bus is redstone controlled.
|
||||
*
|
||||
*
|
||||
* @param newRedstoneControled
|
||||
*/
|
||||
public void onReceiveRedstoneControlled( final boolean newRedstoneControled )
|
||||
@@ -446,7 +446,7 @@ public class GuiEssentiaIO
|
||||
|
||||
/**
|
||||
* Called when the server sends the void mode status
|
||||
*
|
||||
*
|
||||
* @param isVoidAllowed
|
||||
*/
|
||||
public void onServerSendVoidMode( final boolean isVoidAllowed )
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package thaumicenergistics.client.gui;
|
||||
|
||||
import java.util.List;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumicenergistics.api.gui.IAspectSlotGui;
|
||||
import thaumicenergistics.client.gui.abstraction.ThEBaseGui;
|
||||
@@ -18,15 +21,12 @@ import thaumicenergistics.common.integration.tc.EssentiaItemContainerHelper;
|
||||
import thaumicenergistics.common.network.packet.server.Packet_S_EssentiaEmitter;
|
||||
import thaumicenergistics.common.parts.AEPartsEnum;
|
||||
import thaumicenergistics.common.parts.PartEssentiaLevelEmitter;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link PartEssentiaLevelEmitter} GUI
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiEssentiaLevelEmitter
|
||||
@@ -180,7 +180,7 @@ public class GuiEssentiaLevelEmitter
|
||||
|
||||
/**
|
||||
* Create the GUI.
|
||||
*
|
||||
*
|
||||
* @param part
|
||||
* AE part associated with the gui.
|
||||
* @param player
|
||||
@@ -293,7 +293,8 @@ public class GuiEssentiaLevelEmitter
|
||||
if( this.aspectFilterSlot.isMouseOverWidget( mouseX, mouseY ) )
|
||||
{
|
||||
// Pass to the widget
|
||||
this.aspectFilterSlot.mouseClicked( EssentiaItemContainerHelper.INSTANCE.getFilterAspectFromItem( this.player.inventory.getItemStack() ) );
|
||||
this.aspectFilterSlot
|
||||
.mouseClicked( EssentiaItemContainerHelper.INSTANCE.getFilterAspectFromItem( this.player.inventory.getItemStack() ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,7 +403,8 @@ public class GuiEssentiaLevelEmitter
|
||||
int buttonIndex = ( row * 3 ) + column;
|
||||
|
||||
// Calculate the x position of the button
|
||||
int xPos = ( ( this.guiLeft + GuiEssentiaLevelEmitter.BUTTON_POS_X ) + ( column * ( GuiEssentiaLevelEmitter.BUTTON_WIDTH + GuiEssentiaLevelEmitter.BUTTON_PADDING_HORZ ) ) );
|
||||
int xPos = ( ( this.guiLeft + GuiEssentiaLevelEmitter.BUTTON_POS_X ) +
|
||||
( column * ( GuiEssentiaLevelEmitter.BUTTON_WIDTH + GuiEssentiaLevelEmitter.BUTTON_PADDING_HORZ ) ) );
|
||||
|
||||
this.buttonList.add( new GuiButton( buttonIndex, xPos, yPos, GuiEssentiaLevelEmitter.BUTTON_WIDTH,
|
||||
GuiEssentiaLevelEmitter.BUTTON_HEIGHT, GuiEssentiaLevelEmitter.BUTTON_LABELS[buttonIndex] ) );
|
||||
@@ -427,7 +429,7 @@ public class GuiEssentiaLevelEmitter
|
||||
|
||||
/**
|
||||
* Sets the redstone mode
|
||||
*
|
||||
*
|
||||
* @param mode
|
||||
*/
|
||||
public void onReceiveRedstoneMode( final RedstoneMode mode )
|
||||
@@ -437,7 +439,7 @@ public class GuiEssentiaLevelEmitter
|
||||
|
||||
/**
|
||||
* Returns the amount
|
||||
*
|
||||
*
|
||||
* @param amount
|
||||
*/
|
||||
public void onReceiveThresholdValue( final long amount )
|
||||
|
||||
@@ -2,12 +2,14 @@ package thaumicenergistics.client.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumicenergistics.api.gui.IAspectSlotGui;
|
||||
import thaumicenergistics.client.gui.abstraction.ThEBaseGui;
|
||||
@@ -24,14 +26,12 @@ import thaumicenergistics.common.network.packet.server.Packet_S_ChangeGui;
|
||||
import thaumicenergistics.common.network.packet.server.Packet_S_EssentiaStorageBus;
|
||||
import thaumicenergistics.common.parts.AEPartsEnum;
|
||||
import thaumicenergistics.common.parts.PartEssentiaStorageBus;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link PartEssentiaStorageBus} GUI
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiEssentiaStorageBus
|
||||
@@ -136,7 +136,7 @@ public class GuiEssentiaStorageBus
|
||||
|
||||
/**
|
||||
* Creates the GUI.
|
||||
*
|
||||
*
|
||||
* @param storageBus
|
||||
* The part associated with the gui.
|
||||
* @param player
|
||||
@@ -267,7 +267,7 @@ public class GuiEssentiaStorageBus
|
||||
// Was the priority button clicked?
|
||||
if( button.id == BUTTON_PRIORITY_ID )
|
||||
{
|
||||
// Get the storage buses host
|
||||
// Get the storage buses host
|
||||
TileEntity host = this.storageBus.getHostTile();
|
||||
|
||||
// Get the side the storage bus is attached to
|
||||
@@ -320,7 +320,7 @@ public class GuiEssentiaStorageBus
|
||||
|
||||
/**
|
||||
* Called when the server has sent a change to void mode.
|
||||
*
|
||||
*
|
||||
* @param isVoidAllowed
|
||||
*/
|
||||
public void onServerSentVoidMode( final boolean isVoidAllowed )
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
package thaumicenergistics.client.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumicenergistics.client.gui.abstraction.ThEBaseGui;
|
||||
import thaumicenergistics.client.textures.GuiTextureManager;
|
||||
import thaumicenergistics.common.container.ContainerEssentiaVibrationChamber;
|
||||
import thaumicenergistics.common.tiles.TileEssentiaVibrationChamber;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link TileEssentiaVibrationChamber} GUI
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiEssentiaVibrationChamber
|
||||
@@ -82,7 +82,8 @@ public class GuiEssentiaVibrationChamber
|
||||
int storedHeightOffset = (int)( GuiEssentiaVibrationChamber.STORED_HEIGHT * this.container.getStoredEssentiaPercent() );
|
||||
|
||||
this.drawTexturedModalRect( this.guiLeft + GuiEssentiaVibrationChamber.STORED_POS_X, this.guiTop + GuiEssentiaVibrationChamber.STORED_POS_Y +
|
||||
storedHeightOffset, GuiEssentiaVibrationChamber.STORED_TEX_X, storedHeightOffset, GuiEssentiaVibrationChamber.STORED_WIDTH,
|
||||
storedHeightOffset,
|
||||
GuiEssentiaVibrationChamber.STORED_TEX_X, storedHeightOffset, GuiEssentiaVibrationChamber.STORED_WIDTH,
|
||||
GuiEssentiaVibrationChamber.STORED_HEIGHT - storedHeightOffset );
|
||||
|
||||
// Enable alpha blending
|
||||
@@ -99,7 +100,8 @@ public class GuiEssentiaVibrationChamber
|
||||
int progressHeightOffset = (int)( GuiEssentiaVibrationChamber.FIRE_HEIGHT * this.container.getTicksRemainingPercent() );
|
||||
|
||||
this.drawTexturedModalRect( this.guiLeft + GuiEssentiaVibrationChamber.FIRE_POS_X, this.guiTop + GuiEssentiaVibrationChamber.FIRE_POS_Y +
|
||||
progressHeightOffset, GuiEssentiaVibrationChamber.FIRE_TEX_X, progressHeightOffset, GuiEssentiaVibrationChamber.FIRE_WIDTH,
|
||||
progressHeightOffset,
|
||||
GuiEssentiaVibrationChamber.FIRE_TEX_X, progressHeightOffset, GuiEssentiaVibrationChamber.FIRE_WIDTH,
|
||||
GuiEssentiaVibrationChamber.FIRE_HEIGHT - progressHeightOffset );
|
||||
|
||||
// Disable blending
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package thaumicenergistics.client.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumicenergistics.client.gui.abstraction.ThEBaseGui;
|
||||
import thaumicenergistics.client.gui.buttons.GuiButtonClearCraftingGrid;
|
||||
import thaumicenergistics.client.gui.buttons.GuiButtonSaveDelete;
|
||||
@@ -16,14 +18,12 @@ import thaumicenergistics.common.container.ContainerKnowledgeInscriber.CoreSaveS
|
||||
import thaumicenergistics.common.network.packet.server.Packet_S_KnowledgeInscriber;
|
||||
import thaumicenergistics.common.registries.ThEStrings;
|
||||
import thaumicenergistics.common.tiles.TileKnowledgeInscriber;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link TileKnowledgeInscriber} GUI
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiKnowledgeInscriber
|
||||
@@ -109,19 +109,17 @@ public class GuiKnowledgeInscriber
|
||||
|
||||
/**
|
||||
* Creates a particle for the specified slot number.
|
||||
*
|
||||
*
|
||||
* @param slotNumber
|
||||
* @return
|
||||
*/
|
||||
private GuiParticleAnimator createSaveParticle( final int slotNumber )
|
||||
{
|
||||
int startX = ContainerKnowledgeInscriber.CRAFTING_SLOT_X + (
|
||||
( slotNumber % ContainerKnowledgeInscriber.CRAFTING_COLS )
|
||||
* ContainerKnowledgeInscriber.CRAFTING_SLOT_SPACING );
|
||||
int startX = ContainerKnowledgeInscriber.CRAFTING_SLOT_X +
|
||||
( ( slotNumber % ContainerKnowledgeInscriber.CRAFTING_COLS ) * ContainerKnowledgeInscriber.CRAFTING_SLOT_SPACING );
|
||||
|
||||
int startY = ContainerKnowledgeInscriber.CRAFTING_SLOT_Y + (
|
||||
( slotNumber / ContainerKnowledgeInscriber.CRAFTING_COLS )
|
||||
* ContainerKnowledgeInscriber.CRAFTING_SLOT_SPACING );
|
||||
int startY = ContainerKnowledgeInscriber.CRAFTING_SLOT_Y +
|
||||
( ( slotNumber / ContainerKnowledgeInscriber.CRAFTING_COLS ) * ContainerKnowledgeInscriber.CRAFTING_SLOT_SPACING );
|
||||
|
||||
// Create the animator
|
||||
GuiParticleAnimator gpa = new GuiParticleAnimator( startX, startY,
|
||||
@@ -247,7 +245,7 @@ public class GuiKnowledgeInscriber
|
||||
/**
|
||||
* Called when the server sends a change in the save/load button
|
||||
* functionality.
|
||||
*
|
||||
*
|
||||
* @param saveState
|
||||
* @param justSaved
|
||||
*/
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package thaumicenergistics.client.gui;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
|
||||
/**
|
||||
* Animates {@link EnumGuiParticles}.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiParticleAnimator
|
||||
@@ -64,7 +64,7 @@ public class GuiParticleAnimator
|
||||
*/
|
||||
public int framesPerSecond = 1;
|
||||
|
||||
public GuiParticleAnimator( final int startX, final int startY, final int destX, final int destY, final float time,
|
||||
public GuiParticleAnimator( final int startX, final int startY, final int destX, final int destY, final float time,
|
||||
@Nonnull final EnumGuiParticles particle )
|
||||
{
|
||||
// Set starting position
|
||||
@@ -95,7 +95,7 @@ public class GuiParticleAnimator
|
||||
|
||||
/**
|
||||
* Returns false if the particle has reached the end of its life.
|
||||
*
|
||||
*
|
||||
* @param gui
|
||||
* @param needsPrepare
|
||||
* @return
|
||||
@@ -117,7 +117,7 @@ public class GuiParticleAnimator
|
||||
|
||||
/**
|
||||
* Returns false if the particle has reached the end of its life.
|
||||
*
|
||||
*
|
||||
* @param gui
|
||||
* @param particleFrame
|
||||
* @param needsPrepare
|
||||
@@ -164,7 +164,7 @@ public class GuiParticleAnimator
|
||||
|
||||
/**
|
||||
* Sets the color of the particle.
|
||||
*
|
||||
*
|
||||
* @param red
|
||||
* @param green
|
||||
* @param blue
|
||||
@@ -178,7 +178,7 @@ public class GuiParticleAnimator
|
||||
|
||||
/**
|
||||
* Sets the number of MS to wait before starting the animation.
|
||||
*
|
||||
*
|
||||
* @param timeMS
|
||||
*/
|
||||
public void setDelayTime( final long timeMS )
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
package thaumicenergistics.client.gui;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.helpers.IPriorityHost;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumicenergistics.client.gui.abstraction.ThEBaseGui;
|
||||
import thaumicenergistics.client.gui.buttons.GuiButtonAETab;
|
||||
import thaumicenergistics.client.gui.widget.DigitTextField;
|
||||
@@ -15,16 +19,12 @@ import thaumicenergistics.common.container.ContainerPriority;
|
||||
import thaumicenergistics.common.network.packet.server.Packet_S_ChangeGui;
|
||||
import thaumicenergistics.common.network.packet.server.Packet_S_Priority;
|
||||
import thaumicenergistics.common.parts.ThEPartBase;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.helpers.IPriorityHost;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Gui for the priority window
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiPriority
|
||||
@@ -68,7 +68,7 @@ public class GuiPriority
|
||||
|
||||
/**
|
||||
* Creates the button definition
|
||||
*
|
||||
*
|
||||
* @param buttonWidth
|
||||
* @param amount
|
||||
*/
|
||||
@@ -86,7 +86,7 @@ public class GuiPriority
|
||||
|
||||
/**
|
||||
* Creates a GUI button based of this definition
|
||||
*
|
||||
*
|
||||
* @param ID
|
||||
* @param xPosition
|
||||
* @param yPosition
|
||||
@@ -204,7 +204,7 @@ public class GuiPriority
|
||||
|
||||
/**
|
||||
* Create the gui.
|
||||
*
|
||||
*
|
||||
* @param host
|
||||
* @param player
|
||||
*/
|
||||
@@ -298,7 +298,7 @@ public class GuiPriority
|
||||
// Was the priority button clicked?
|
||||
if( button.id == GuiPriority.PART_SWITCH_BUTTON_ID )
|
||||
{
|
||||
// Get the storage buses host
|
||||
// Get the storage buses host
|
||||
TileEntity host = this.part.getHostTile();
|
||||
|
||||
// Ask the server to change to the priority gui
|
||||
@@ -392,7 +392,7 @@ public class GuiPriority
|
||||
|
||||
/**
|
||||
* Called when the server sends the priority.
|
||||
*
|
||||
*
|
||||
* @param priority
|
||||
*/
|
||||
public void onServerSendPriority( final int priority )
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package thaumicenergistics.client.gui;
|
||||
|
||||
import java.util.HashMap;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
/**
|
||||
* Helper methods for GUI's.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public final class ThEGuiHelper
|
||||
@@ -63,7 +63,8 @@ public final class ThEGuiHelper
|
||||
|
||||
}
|
||||
|
||||
public static final void drawScaledText( final FontRenderer fontRenderer, final String text, final float scale, final float posX, final float posY )
|
||||
public static final void drawScaledText( final FontRenderer fontRenderer, final String text, final float scale, final float posX,
|
||||
final float posY )
|
||||
{
|
||||
// Disable lighting
|
||||
GL11.glDisable( GL11.GL_LIGHTING );
|
||||
@@ -195,7 +196,7 @@ public final class ThEGuiHelper
|
||||
|
||||
/**
|
||||
* Gets the chat color associated with the specified aspect.
|
||||
*
|
||||
*
|
||||
* @param aspect
|
||||
* @return
|
||||
*/
|
||||
@@ -211,7 +212,7 @@ public final class ThEGuiHelper
|
||||
/**
|
||||
* Checks if the specified point is within or on the bounds of a rectangle.
|
||||
* This version localizes the rectangle to the confounds of the current gui.
|
||||
*
|
||||
*
|
||||
* @param top
|
||||
* @param left
|
||||
* @param height
|
||||
@@ -222,7 +223,7 @@ public final class ThEGuiHelper
|
||||
* @param guiTop
|
||||
* @return
|
||||
*/
|
||||
public final boolean isPointInGuiRegion( final int top, final int left, final int height, final int width, final int pointX, final int pointY,
|
||||
public final boolean isPointInGuiRegion( final int top, final int left, final int height, final int width, final int pointX, final int pointY,
|
||||
final int guiLeft, final int guiTop )
|
||||
{
|
||||
return this.isPointInRegion( top, left, height, width, pointX - guiLeft, pointY - guiTop );
|
||||
@@ -230,7 +231,7 @@ public final class ThEGuiHelper
|
||||
|
||||
/**
|
||||
* Checks if the specified point is within or on the bounds of a rectangle
|
||||
*
|
||||
*
|
||||
* @param top
|
||||
* @param left
|
||||
* @param height
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package thaumicenergistics.client.gui.abstraction;
|
||||
|
||||
import net.minecraft.inventory.Container;
|
||||
import thaumicenergistics.client.gui.GuiArcaneCraftingTerminal;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.inventory.Container;
|
||||
import thaumicenergistics.client.gui.GuiArcaneCraftingTerminal;
|
||||
|
||||
/**
|
||||
* Holds all constants for {@link GuiArcaneCraftingTerminal}
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public abstract class GuiConstants_ACT
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package thaumicenergistics.client.gui.abstraction;
|
||||
|
||||
import net.minecraft.inventory.Container;
|
||||
import thaumicenergistics.client.gui.GuiEssentiaCellTerminal;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.inventory.Container;
|
||||
import thaumicenergistics.client.gui.GuiEssentiaCellTerminal;
|
||||
|
||||
/**
|
||||
* Holds all the constants for {@link GuiEssentiaCellTerminal}.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public abstract class GuiConstants_ECT
|
||||
|
||||
@@ -2,6 +2,10 @@ package thaumicenergistics.client.gui.abstraction;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.parts.automation.UpgradeInventory;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
@@ -14,16 +18,12 @@ import thaumicenergistics.client.gui.buttons.ThEGuiButtonBase;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import thaumicenergistics.common.container.ContainerWithNetworkTool;
|
||||
import thaumicenergistics.common.container.slot.SlotNetworkTool;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.parts.automation.UpgradeInventory;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Base gui of all Thaumic Energistics guis
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public abstract class ThEBaseGui
|
||||
@@ -47,7 +47,7 @@ public abstract class ThEBaseGui
|
||||
|
||||
/**
|
||||
* Adds to the tooltip based on which button the mouse is over.
|
||||
*
|
||||
*
|
||||
* @param mouseX
|
||||
* @param mouseY
|
||||
* @return True when a tooltip was added, false otherwise.
|
||||
@@ -80,7 +80,7 @@ public abstract class ThEBaseGui
|
||||
|
||||
/**
|
||||
* Checks if the specified point is within the bounds of the specified slot.
|
||||
*
|
||||
*
|
||||
* @param slot
|
||||
* @param x
|
||||
* @param y
|
||||
@@ -94,7 +94,7 @@ public abstract class ThEBaseGui
|
||||
/**
|
||||
* Checks if a not-left-click was on a button.<BR>
|
||||
* Left click is handled by GuiScreen.mouseClicked()
|
||||
*
|
||||
*
|
||||
* @param mouseX
|
||||
* @param mouseY
|
||||
* @return True if click was handled.
|
||||
@@ -129,7 +129,7 @@ public abstract class ThEBaseGui
|
||||
|
||||
/**
|
||||
* Draws the slot backgrounds for the network tool and upgrade slots.
|
||||
*
|
||||
*
|
||||
* @param alpha
|
||||
* @param mouseX
|
||||
* @param mouseY
|
||||
@@ -156,7 +156,7 @@ public abstract class ThEBaseGui
|
||||
|
||||
/**
|
||||
* Gets the slot who contains the specified point.
|
||||
*
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
* @return Slot the point is within, null if point is within no slots.
|
||||
@@ -218,7 +218,7 @@ public abstract class ThEBaseGui
|
||||
|
||||
/**
|
||||
* Called when a button is clicked. Includes which button was pressed.
|
||||
*
|
||||
*
|
||||
* @param button
|
||||
* @param mouseButton
|
||||
*/
|
||||
@@ -229,7 +229,7 @@ public abstract class ThEBaseGui
|
||||
/**
|
||||
* Called when a button is left-clicked<BR>
|
||||
* Note: Do not override, use {@link #onButtonClicked(GuiButton, int) onButtonClicked} instead.
|
||||
*
|
||||
*
|
||||
* @see #onButtonClicked(GuiButton, int )
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
package thaumicenergistics.client.gui.abstraction;
|
||||
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import thaumicenergistics.client.gui.ThEGuiHelper;
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiScrollbar;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import thaumicenergistics.client.gui.ThEGuiHelper;
|
||||
|
||||
/**
|
||||
* Base GUI for guis with scrollbars.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public abstract class ThEScrollbarGui
|
||||
@@ -44,7 +44,7 @@ public abstract class ThEScrollbarGui
|
||||
|
||||
/**
|
||||
* Create the parameters
|
||||
*
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
* @param height
|
||||
@@ -58,7 +58,7 @@ public abstract class ThEScrollbarGui
|
||||
|
||||
/**
|
||||
* Sets the height of the scrollbar
|
||||
*
|
||||
*
|
||||
* @param height
|
||||
*/
|
||||
void setHeight( final int height )
|
||||
@@ -114,7 +114,7 @@ public abstract class ThEScrollbarGui
|
||||
|
||||
/**
|
||||
* Gets the scroll bar parameters from the subclass.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected abstract ScrollbarParams getScrollbarParameters();
|
||||
@@ -192,7 +192,7 @@ public abstract class ThEScrollbarGui
|
||||
|
||||
/**
|
||||
* Called when the mouse wheel is scrolled.
|
||||
*
|
||||
*
|
||||
* @param deltaZ
|
||||
* @param mouseX
|
||||
* @param mouseY
|
||||
@@ -206,7 +206,7 @@ public abstract class ThEScrollbarGui
|
||||
|
||||
/**
|
||||
* Changes the height of the scroll bar.
|
||||
*
|
||||
*
|
||||
* @param newHeight
|
||||
*/
|
||||
protected void setScrollBarHeight( final int newHeight )
|
||||
@@ -344,7 +344,7 @@ public abstract class ThEScrollbarGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawTexturedModalRect( final int posX, final int posY, final int sourceOffsetX, final int sourceOffsetY, final int width,
|
||||
public void drawTexturedModalRect( final int posX, final int posY, final int sourceOffsetX, final int sourceOffsetY, final int width,
|
||||
final int height )
|
||||
{
|
||||
ThEScrollbarGui.this.drawTexturedModalRect( posX, posY, sourceOffsetX, sourceOffsetY, width, height );
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package thaumicenergistics.client.gui.buttons;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import thaumicenergistics.client.textures.IStateIconTexture;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import thaumicenergistics.client.textures.IStateIconTexture;
|
||||
|
||||
/**
|
||||
* Large corner-button.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiButtonAETab
|
||||
@@ -43,7 +43,7 @@ public class GuiButtonAETab
|
||||
public GuiButtonAETab( final int ID, final int xPosition, final int yPosition, final IStateIconTexture icon, final String unlocalizedTooltip )
|
||||
{
|
||||
// Call super
|
||||
super( ID, xPosition, yPosition, GuiButtonAETab.BUTTON_WIDTH, GuiButtonAETab.BUTTON_HEIGHT, icon, GuiButtonAETab.ICON_X_POSITION,
|
||||
super( ID, xPosition, yPosition, GuiButtonAETab.BUTTON_WIDTH, GuiButtonAETab.BUTTON_HEIGHT, icon, GuiButtonAETab.ICON_X_POSITION,
|
||||
GuiButtonAETab.ICON_Y_POSITION, AEStateIconsEnum.TAB_BUTTON );
|
||||
|
||||
// Set the tooltip
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package thaumicenergistics.client.gui.buttons;
|
||||
|
||||
import java.util.List;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
@@ -10,14 +12,12 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import thaumicenergistics.common.registries.ThEStrings;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Displays void status.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiButtonAllowVoid
|
||||
|
||||
+5
-5
@@ -1,16 +1,16 @@
|
||||
package thaumicenergistics.client.gui.buttons;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
|
||||
/**
|
||||
* Displays cell partitioning icon.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiButtonClearCellPartitioning
|
||||
@@ -24,7 +24,7 @@ public class GuiButtonClearCellPartitioning
|
||||
|
||||
/**
|
||||
* Creates the button
|
||||
*
|
||||
*
|
||||
* @param ID
|
||||
* @param xPosition
|
||||
* @param yPosition
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package thaumicenergistics.client.gui.buttons;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import appeng.core.localization.ButtonToolTips;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
|
||||
/**
|
||||
* Displays clear grid icon.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiButtonClearCraftingGrid
|
||||
@@ -26,14 +26,14 @@ public class GuiButtonClearCraftingGrid
|
||||
|
||||
/**
|
||||
* Creates the button
|
||||
*
|
||||
*
|
||||
* @param ID
|
||||
* @param xPosition
|
||||
* @param yPosition
|
||||
* @param width
|
||||
* @param height
|
||||
*/
|
||||
public GuiButtonClearCraftingGrid( final int ID, final int xPosition, final int yPosition, final int width, final int height,
|
||||
public GuiButtonClearCraftingGrid( final int ID, final int xPosition, final int yPosition, final int width, final int height,
|
||||
final boolean showTooltip )
|
||||
{
|
||||
// Call super
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package thaumicenergistics.client.gui.buttons;
|
||||
|
||||
import java.util.List;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import appeng.core.localization.ButtonToolTips;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
|
||||
/**
|
||||
* Displays encode pattern icon.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiButtonEncodePattern
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package thaumicenergistics.client.gui.buttons;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
|
||||
/**
|
||||
* Displays redstone mode icons.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiButtonRedstoneModes
|
||||
@@ -34,7 +34,7 @@ public class GuiButtonRedstoneModes
|
||||
|
||||
/**
|
||||
* Creates the button.
|
||||
*
|
||||
*
|
||||
* @param ID
|
||||
* @param xPos
|
||||
* @param yPos
|
||||
@@ -49,7 +49,7 @@ public class GuiButtonRedstoneModes
|
||||
|
||||
/**
|
||||
* Creates the button with argument for if this is an emitter.
|
||||
*
|
||||
*
|
||||
* @param ID
|
||||
* @param xPos
|
||||
* @param yPos
|
||||
@@ -58,7 +58,7 @@ public class GuiButtonRedstoneModes
|
||||
* @param mode
|
||||
* @param emitter
|
||||
*/
|
||||
public GuiButtonRedstoneModes( final int ID, final int xPos, final int yPos, final int width, final int height, final RedstoneMode mode,
|
||||
public GuiButtonRedstoneModes( final int ID, final int xPos, final int yPos, final int width, final int height, final RedstoneMode mode,
|
||||
final boolean emitter )
|
||||
{
|
||||
// Call super
|
||||
@@ -105,7 +105,7 @@ public class GuiButtonRedstoneModes
|
||||
|
||||
/**
|
||||
* Sets the redstone mode this button represents.
|
||||
*
|
||||
*
|
||||
* @param mode
|
||||
*/
|
||||
public void setRedstoneMode( final RedstoneMode mode )
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package thaumicenergistics.client.gui.buttons;
|
||||
|
||||
import java.util.List;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import thaumicenergistics.common.container.ContainerKnowledgeInscriber.CoreSaveState;
|
||||
import thaumicenergistics.common.registries.ThEStrings;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Displays save state icons.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiButtonSaveDelete
|
||||
@@ -36,7 +36,7 @@ public class GuiButtonSaveDelete
|
||||
|
||||
/**
|
||||
* Sets the save state of the button.
|
||||
*
|
||||
*
|
||||
* @param saveState
|
||||
*/
|
||||
public void setSaveState( final CoreSaveState saveState )
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package thaumicenergistics.client.gui.buttons;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import appeng.api.config.SearchBoxMode;
|
||||
import appeng.core.localization.ButtonToolTips;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
|
||||
/**
|
||||
* Displays search mode icons.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiButtonSearchMode
|
||||
@@ -20,7 +20,7 @@ public class GuiButtonSearchMode
|
||||
{
|
||||
private String tooltipMode = "";
|
||||
|
||||
public GuiButtonSearchMode( final int ID, final int xPosition, final int yPosition, final int buttonWidth, final int buttonHeight,
|
||||
public GuiButtonSearchMode( final int ID, final int xPosition, final int yPosition, final int buttonWidth, final int buttonHeight,
|
||||
final SearchBoxMode currentMode )
|
||||
{
|
||||
super( ID, xPosition, yPosition, buttonWidth, buttonHeight, null, 0, 0, AEStateIconsEnum.REGULAR_BUTTON );
|
||||
@@ -36,7 +36,7 @@ public class GuiButtonSearchMode
|
||||
|
||||
/**
|
||||
* Sets the icon and tooltip based on the specified mode.
|
||||
*
|
||||
*
|
||||
* @param mode
|
||||
*/
|
||||
public void setSearchMode( final SearchBoxMode mode )
|
||||
|
||||
+5
-5
@@ -1,16 +1,16 @@
|
||||
package thaumicenergistics.client.gui.buttons;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
|
||||
/**
|
||||
* Displays partition to current icon.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiButtonSetCellPartitioningToCurrent
|
||||
@@ -23,7 +23,7 @@ public class GuiButtonSetCellPartitioningToCurrent
|
||||
|
||||
/**
|
||||
* Creates the button
|
||||
*
|
||||
*
|
||||
* @param ID
|
||||
* @param xPosition
|
||||
* @param yPosition
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package thaumicenergistics.client.gui.buttons;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import appeng.api.config.SortDir;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
|
||||
/**
|
||||
* Displays sorting direction icons.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiButtonSortingDirection
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
package thaumicenergistics.client.gui.buttons;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import thaumicenergistics.common.storage.AspectStackComparator.AspectStackComparatorMode;
|
||||
import appeng.api.config.SortOrder;
|
||||
import appeng.core.localization.ButtonToolTips;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import thaumicenergistics.common.storage.AspectStackComparator.AspectStackComparatorMode;
|
||||
|
||||
/**
|
||||
* Displays sorting mode icons.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiButtonSortingMode
|
||||
@@ -35,7 +35,7 @@ public class GuiButtonSortingMode
|
||||
|
||||
/**
|
||||
* Sets the buttons icon based on the specified comparator mode.
|
||||
*
|
||||
*
|
||||
* @param mode
|
||||
*/
|
||||
public void setSortMode( final AspectStackComparatorMode mode )
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package thaumicenergistics.client.gui.buttons;
|
||||
|
||||
import java.util.List;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import thaumicenergistics.client.textures.ThEStateIconsEnum;
|
||||
import thaumicenergistics.common.registries.ThEStrings;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Displays swap armor icon.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiButtonSwapArmor
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package thaumicenergistics.client.gui.buttons;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import appeng.api.config.TerminalStyle;
|
||||
import appeng.core.localization.ButtonToolTips;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
|
||||
/**
|
||||
* Displays terminal style icons.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiButtonTerminalStyle
|
||||
@@ -20,7 +20,7 @@ public class GuiButtonTerminalStyle
|
||||
{
|
||||
private String tooltipStyle = "";
|
||||
|
||||
public GuiButtonTerminalStyle( final int ID, final int xPosition, final int yPosition, final int buttonWidth, final int buttonHeight,
|
||||
public GuiButtonTerminalStyle( final int ID, final int xPosition, final int yPosition, final int buttonWidth, final int buttonHeight,
|
||||
final TerminalStyle currentStyle )
|
||||
{
|
||||
super( ID, xPosition, yPosition, buttonWidth, buttonHeight, null, 0, 0, AEStateIconsEnum.REGULAR_BUTTON );
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package thaumicenergistics.client.gui.buttons;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
import appeng.api.config.ViewItems;
|
||||
import appeng.core.localization.ButtonToolTips;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import thaumicenergistics.client.textures.AEStateIconsEnum;
|
||||
|
||||
/**
|
||||
* Displays view types icons.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiButtonViewType
|
||||
@@ -25,7 +25,7 @@ public class GuiButtonViewType
|
||||
|
||||
/**
|
||||
* Creates the view button.
|
||||
*
|
||||
*
|
||||
* @param ID
|
||||
* @param xPosition
|
||||
* @param yPosition
|
||||
@@ -46,7 +46,7 @@ public class GuiButtonViewType
|
||||
|
||||
/**
|
||||
* Sets the icon based on the view mode.
|
||||
*
|
||||
*
|
||||
* @param mode
|
||||
*/
|
||||
public void setViewMode( final ViewItems mode )
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package thaumicenergistics.client.gui.buttons;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import thaumicenergistics.client.gui.ThEGuiHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import thaumicenergistics.client.gui.ThEGuiHelper;
|
||||
|
||||
/**
|
||||
* Base class for ThE buttons.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public abstract class ThEGuiButtonBase
|
||||
@@ -28,7 +28,7 @@ public abstract class ThEGuiButtonBase
|
||||
|
||||
/**
|
||||
* Called to get the tooltip for this button.
|
||||
*
|
||||
*
|
||||
* @param tooltip
|
||||
* List to add tooltip string to.
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ public abstract class ThEGuiButtonBase
|
||||
|
||||
/**
|
||||
* Checks if the mouse is over this button.
|
||||
*
|
||||
*
|
||||
* @param mouseX
|
||||
* @param mouseY
|
||||
* @return
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
package thaumicenergistics.client.gui.buttons;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumicenergistics.client.textures.IStateIconTexture;
|
||||
import com.google.common.base.Splitter;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import thaumicenergistics.client.textures.IStateIconTexture;
|
||||
|
||||
/**
|
||||
* Base class for ThE state buttons.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public abstract class ThEStateButton
|
||||
@@ -37,7 +37,7 @@ public abstract class ThEStateButton
|
||||
public int iconXOffset = 0, iconYOffset = 0;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param ID
|
||||
* @param xPosition
|
||||
* @param yPosition
|
||||
@@ -48,7 +48,7 @@ public abstract class ThEStateButton
|
||||
* @param iconYOffset
|
||||
* @param backgroundIcon
|
||||
*/
|
||||
public ThEStateButton( final int ID, final int xPosition, final int yPosition, final int buttonWidth, final int buttonHeight,
|
||||
public ThEStateButton( final int ID, final int xPosition, final int yPosition, final int buttonWidth, final int buttonHeight,
|
||||
final IStateIconTexture icon, final int iconXOffset, final int iconYOffset, final IStateIconTexture backgroundIcon )
|
||||
{
|
||||
// Call super
|
||||
@@ -69,7 +69,7 @@ public abstract class ThEStateButton
|
||||
* Draws a textured rectangle at the stored z-value, the texture will
|
||||
* be scaled to fit within the width and height
|
||||
*/
|
||||
private void drawScaledTexturedModalRect( final int xPosition, final int yPosition, final int u, final int v, final int width, final int height,
|
||||
private void drawScaledTexturedModalRect( final int xPosition, final int yPosition, final int u, final int v, final int width, final int height,
|
||||
final int textureWidth, final int textureHeight )
|
||||
{
|
||||
// No idea what this is
|
||||
@@ -106,7 +106,7 @@ public abstract class ThEStateButton
|
||||
/**
|
||||
* Adds info to the tooltip as a white header, and grey body.
|
||||
* The body is broken down into lines of length 30.
|
||||
*
|
||||
*
|
||||
* @param tooltip
|
||||
* @param title
|
||||
* @param text
|
||||
@@ -125,7 +125,7 @@ public abstract class ThEStateButton
|
||||
|
||||
/**
|
||||
* Draws an icon to the screen.
|
||||
*
|
||||
*
|
||||
* @param minecraftInstance
|
||||
* @param icon
|
||||
* @param xPos
|
||||
@@ -133,7 +133,7 @@ public abstract class ThEStateButton
|
||||
* @param iconWidth
|
||||
* @param iconHeight
|
||||
*/
|
||||
protected void drawIcon( final Minecraft minecraftInstance, final IStateIconTexture icon, final int xPos, final int yPos, final int iconWidth,
|
||||
protected void drawIcon( final Minecraft minecraftInstance, final IStateIconTexture icon, final int xPos, final int yPos, final int iconWidth,
|
||||
final int iconHeight )
|
||||
{
|
||||
// Bind the sheet
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package thaumicenergistics.client.gui.widget;
|
||||
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
|
||||
/**
|
||||
* Text field that only allows numeric input.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class DigitTextField
|
||||
@@ -19,7 +19,7 @@ public class DigitTextField
|
||||
|
||||
/**
|
||||
* Creates the text field
|
||||
*
|
||||
*
|
||||
* @param fontRenderer
|
||||
* @param x
|
||||
* @param y
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package thaumicenergistics.client.gui.widget;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumicenergistics.api.gui.IWidgetHost;
|
||||
import thaumicenergistics.client.gui.ThEGuiHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import thaumicenergistics.api.gui.IWidgetHost;
|
||||
import thaumicenergistics.client.gui.ThEGuiHelper;
|
||||
|
||||
/**
|
||||
* Base class of ThE widgets.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public abstract class ThEWidget
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
package thaumicenergistics.client.gui.widget;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.util.ReadableNumberConverter;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumicenergistics.api.gui.IAspectSelectorGui;
|
||||
import thaumicenergistics.api.storage.IAspectStack;
|
||||
import thaumicenergistics.client.gui.ThEGuiHelper;
|
||||
import thaumicenergistics.common.utils.ThEUtils;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.util.ReadableNumberConverter;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Widget displaying an aspect and if it is selected.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class WidgetAspectSelector
|
||||
@@ -50,7 +50,7 @@ public class WidgetAspectSelector
|
||||
*/
|
||||
protected boolean hideAmount = false;
|
||||
|
||||
public WidgetAspectSelector( final IAspectSelectorGui selectorGui, final IAspectStack stack, final int xPos, final int yPos,
|
||||
public WidgetAspectSelector( final IAspectSelectorGui selectorGui, final IAspectStack stack, final int xPos, final int yPos,
|
||||
final EntityPlayer player )
|
||||
{
|
||||
// Call super
|
||||
@@ -59,7 +59,7 @@ public class WidgetAspectSelector
|
||||
|
||||
/**
|
||||
* Draws the selector outline.
|
||||
*
|
||||
*
|
||||
* @param posX
|
||||
* @param posY
|
||||
* @param width
|
||||
@@ -74,7 +74,7 @@ public class WidgetAspectSelector
|
||||
// Ending X point of the right line
|
||||
int rightXEnd = posX + width;
|
||||
|
||||
// Beginning X point of the right line
|
||||
// Beginning X point of the right line
|
||||
int rightXBegin = rightXEnd - thickness;
|
||||
|
||||
// Ending X point of the left line
|
||||
@@ -123,7 +123,7 @@ public class WidgetAspectSelector
|
||||
|
||||
/**
|
||||
* Gets the background gradient color based on the current time.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private int getBackgroundColor()
|
||||
@@ -186,7 +186,7 @@ public class WidgetAspectSelector
|
||||
// Does the selected aspect match the widgets?
|
||||
if( selectedAspect == this.getAspect() )
|
||||
{
|
||||
// Draw the selection box
|
||||
// Draw the selection box
|
||||
this.drawHollowRectWithCorners( this.xPosition, this.yPosition,
|
||||
ThEWidget.WIDGET_SIZE, ThEWidget.WIDGET_SIZE,
|
||||
this.getBackgroundColor(), WidgetAspectSelector.borderThickness );
|
||||
@@ -310,7 +310,7 @@ public class WidgetAspectSelector
|
||||
|
||||
/**
|
||||
* Sets whether or not to show the amount.
|
||||
*
|
||||
*
|
||||
* @param hide
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
package thaumicenergistics.client.gui.widget;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumicenergistics.api.gui.IWidgetHost;
|
||||
import thaumicenergistics.client.textures.GuiTextureManager;
|
||||
import thaumicenergistics.common.network.IAspectSlotPart;
|
||||
import thaumicenergistics.common.network.packet.server.Packet_S_AspectSlot;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Widget displaying an aspect.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class WidgetAspectSlot
|
||||
@@ -38,13 +38,13 @@ public class WidgetAspectSlot
|
||||
this( hostGui, player, part, 0, posX, posY, null, (byte)0 );
|
||||
}
|
||||
|
||||
public WidgetAspectSlot( final IWidgetHost hostGui, final EntityPlayer player, final IAspectSlotPart part, final int id, final int posX,
|
||||
public WidgetAspectSlot( final IWidgetHost hostGui, final EntityPlayer player, final IAspectSlotPart part, final int id, final int posX,
|
||||
final int posY )
|
||||
{
|
||||
this( hostGui, player, part, id, posX, posY, null, (byte)0 );
|
||||
}
|
||||
|
||||
public WidgetAspectSlot( final IWidgetHost hostGui, final EntityPlayer player, final IAspectSlotPart part, final int id, final int posX,
|
||||
public WidgetAspectSlot( final IWidgetHost hostGui, final EntityPlayer player, final IAspectSlotPart part, final int id, final int posX,
|
||||
final int posY, final IConfigurable configurable, final byte configOption )
|
||||
{
|
||||
super( hostGui, null, posX, posY, player );
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package thaumicenergistics.client.render;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumicenergistics.client.textures.BlockTextureManager;
|
||||
import thaumicenergistics.common.registries.Renderers;
|
||||
import thaumicenergistics.common.tiles.TileEssentiaProvider;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Renders the {@link TileEssentiaProvider}
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderBlockEssentiaProvider
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package thaumicenergistics.client.render;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumicenergistics.client.textures.BlockTextureManager;
|
||||
import thaumicenergistics.common.registries.Renderers;
|
||||
import thaumicenergistics.common.tiles.TileInfusionProvider;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Renders the {@link TileInfusionProvider}
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderBlockInfusionProvider
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
package thaumicenergistics.client.render;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumicenergistics.client.textures.BlockTextureManager;
|
||||
import thaumicenergistics.common.registries.Renderers;
|
||||
import thaumicenergistics.common.tiles.abstraction.TileProviderBase;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Renders the providers.
|
||||
*
|
||||
*
|
||||
* TODO: GL Display lists
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public abstract class RenderBlockProviderBase
|
||||
@@ -39,7 +39,7 @@ public abstract class RenderBlockProviderBase
|
||||
|
||||
/**
|
||||
* Creates the renderer.
|
||||
*
|
||||
*
|
||||
* @param baseTexture
|
||||
* @param overlayTexture
|
||||
*/
|
||||
@@ -50,7 +50,7 @@ public abstract class RenderBlockProviderBase
|
||||
|
||||
/**
|
||||
* Renders all faces of the provider.
|
||||
*
|
||||
*
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
@@ -172,10 +172,10 @@ public abstract class RenderBlockProviderBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean renderWorldBlock( final IBlockAccess world, final int x, final int y, final int z, final Block block, final int modelId,
|
||||
public final boolean renderWorldBlock( final IBlockAccess world, final int x, final int y, final int z, final Block block, final int modelId,
|
||||
final RenderBlocks renderer )
|
||||
{
|
||||
// Get the tessellator
|
||||
// Get the tessellator
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
// Texture
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package thaumicenergistics.client.render;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
@@ -8,19 +11,16 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumicenergistics.api.ThEApi;
|
||||
import thaumicenergistics.client.render.model.ModelArcaneAssembler;
|
||||
import thaumicenergistics.common.ThaumicEnergistics;
|
||||
import thaumicenergistics.common.tiles.TileArcaneAssembler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Renders the {@link TileArcaneAssembler}
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderTileArcaneAssembler
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package thaumicenergistics.client.render;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
@@ -8,19 +11,16 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumicenergistics.api.ThEApi;
|
||||
import thaumicenergistics.client.render.model.ModelGearbox;
|
||||
import thaumicenergistics.common.ThaumicEnergistics;
|
||||
import thaumicenergistics.common.tiles.TileGearBox;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Renders the {@link TileGearBox}
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderTileGearbox
|
||||
@@ -44,7 +44,7 @@ public class RenderTileGearbox
|
||||
|
||||
/**
|
||||
* Renders the gearbox.
|
||||
*
|
||||
*
|
||||
* @param gearboxTile
|
||||
* @param world
|
||||
* @param x
|
||||
@@ -107,7 +107,7 @@ public class RenderTileGearbox
|
||||
|
||||
/**
|
||||
* Called when a gearbox tile entity needs to be rendered.
|
||||
*
|
||||
*
|
||||
* @param tileEntity
|
||||
* @param d
|
||||
* @param d1
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
package thaumicenergistics.client.render;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.client.lib.UtilsFX;
|
||||
import thaumicenergistics.common.items.ItemCraftingAspect;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Renders the {@link ItemCraftingAspect}.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RendererItemCraftingAspect
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package thaumicenergistics.client.render;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Renders a tile entity as an item.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TileAsItemRenderer
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package thaumicenergistics.client.render.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumicenergistics.common.tiles.TileArcaneAssembler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link TileArcaneAssembler} model.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelArcaneAssembler
|
||||
@@ -105,7 +105,7 @@ public class ModelArcaneAssembler
|
||||
|
||||
/**
|
||||
* Renders the glass on one side of the block.
|
||||
*
|
||||
*
|
||||
* @param YRotation
|
||||
* @param XRotation
|
||||
* @param f5
|
||||
@@ -120,7 +120,7 @@ public class ModelArcaneAssembler
|
||||
|
||||
/**
|
||||
* Renders the inner frame on one side of the block.
|
||||
*
|
||||
*
|
||||
* @param YRotation
|
||||
* @param XRotation
|
||||
* @param f5
|
||||
@@ -148,7 +148,7 @@ public class ModelArcaneAssembler
|
||||
|
||||
/**
|
||||
* Renders the outer frame on one side of the block.
|
||||
*
|
||||
*
|
||||
* @param rotation
|
||||
* @param f5
|
||||
*/
|
||||
@@ -211,7 +211,8 @@ public class ModelArcaneAssembler
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles( final float f, final float f1, final float f2, final float f3, final float f4, final float f5, final Entity entity )
|
||||
public void setRotationAngles( final float f, final float f1, final float f2, final float f3, final float f4, final float f5,
|
||||
final Entity entity )
|
||||
{
|
||||
super.setRotationAngles( f, f1, f2, f3, f4, f5, entity );
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package thaumicenergistics.client.render.model;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import thaumicenergistics.common.tiles.TileGearBox;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link TileGearBox} model.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelGearbox
|
||||
@@ -49,7 +49,7 @@ public class ModelGearbox
|
||||
|
||||
/**
|
||||
* Creates the transfomation
|
||||
*
|
||||
*
|
||||
* @param rotateAngleY
|
||||
* @param rotateAngleZ
|
||||
* @param offsetX
|
||||
@@ -76,7 +76,7 @@ public class ModelGearbox
|
||||
|
||||
/**
|
||||
* Set what is rendered.
|
||||
*
|
||||
*
|
||||
* @param shaft
|
||||
* @param gear
|
||||
*/
|
||||
@@ -163,7 +163,7 @@ public class ModelGearbox
|
||||
|
||||
/**
|
||||
* Renders a shaft on the specified side.
|
||||
*
|
||||
*
|
||||
* @param side
|
||||
* @param withGear
|
||||
* @param withExtension
|
||||
@@ -235,7 +235,7 @@ public class ModelGearbox
|
||||
|
||||
/**
|
||||
* Updates the model to match the tile entity data.
|
||||
*
|
||||
*
|
||||
* @param gearboxTile
|
||||
*/
|
||||
public void updateToTileEntity( final TileGearBox gearboxTile )
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
package thaumicenergistics.client.render.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.entity.Entity;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import thaumicenergistics.common.items.ItemGolemWirelessBackpack;
|
||||
import thaumicenergistics.common.items.ItemGolemWirelessBackpack.BackpackSkins;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link ItemGolemWirelessBackpack} model.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelGolemWifiBackpack
|
||||
@@ -183,7 +183,7 @@ public class ModelGolemWifiBackpack
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render( final Entity entity, final float f, final float f1, final float f2, final float f3, final float f4,
|
||||
public void render( final Entity entity, final float f, final float f1, final float f2, final float f3, final float f4,
|
||||
final float f5 )
|
||||
{
|
||||
this.render( 0.03f, f5, true, BackpackSkins.Thaumium );
|
||||
|
||||
@@ -4,9 +4,9 @@ import net.minecraft.util.ResourceLocation;
|
||||
|
||||
/**
|
||||
* Icons stored in the AE2's "states" texture.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public enum AEStateIconsEnum
|
||||
implements IStateIconTexture
|
||||
@@ -93,7 +93,7 @@ public enum AEStateIconsEnum
|
||||
|
||||
/**
|
||||
* Standard icon constructor
|
||||
*
|
||||
*
|
||||
* @param u
|
||||
* @param v
|
||||
*/
|
||||
@@ -104,7 +104,7 @@ public enum AEStateIconsEnum
|
||||
|
||||
/**
|
||||
* Icon constructor
|
||||
*
|
||||
*
|
||||
* @param u
|
||||
* @param v
|
||||
* @param width
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package thaumicenergistics.client.textures;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.util.IIcon;
|
||||
import thaumicenergistics.common.ThaumicEnergistics;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Textures for all ThE blocks.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public enum BlockTextureManager
|
||||
@@ -50,7 +50,8 @@ public enum BlockTextureManager
|
||||
|
||||
ARCANE_ASSEMBLER (TextureTypes.Block, new String[] { "arcane.assembler.fallback" }),
|
||||
|
||||
KNOWLEDGE_INSCRIBER (TextureTypes.Block, new String[] { "knowledge.inscriber.side", "knowledge.inscriber.top", "knowledge.inscriber.bottom" }),
|
||||
KNOWLEDGE_INSCRIBER (TextureTypes.Block,
|
||||
new String[] { "knowledge.inscriber.side", "knowledge.inscriber.top", "knowledge.inscriber.bottom" }),
|
||||
|
||||
ESSENTIA_VIBRATION_CHAMBER (TextureTypes.Block, new String[] { "e.vibration.input", "e.vibration.face.off", "e.vibration.face.ignis",
|
||||
"e.vibration.face.potentia" }),
|
||||
@@ -64,17 +65,17 @@ public enum BlockTextureManager
|
||||
Part;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cache of the enum values
|
||||
*/
|
||||
public static final BlockTextureManager[] VALUES = BlockTextureManager.values();
|
||||
|
||||
private TextureTypes textureType;
|
||||
|
||||
private String[] textureNames;
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
/**
|
||||
* Cache of the enum values
|
||||
*/
|
||||
public static final BlockTextureManager[] VALUES = BlockTextureManager.values();
|
||||
|
||||
private BlockTextureManager( final TextureTypes textureType, final String[] textureNames )
|
||||
{
|
||||
this.textureType = textureType;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package thaumicenergistics.client.textures;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import thaumicenergistics.common.ThaumicEnergistics;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import thaumicenergistics.common.ThaumicEnergistics;
|
||||
|
||||
/**
|
||||
* Textures for all ThE GUIs.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public enum GuiTextureManager
|
||||
|
||||
@@ -5,22 +5,22 @@ import net.minecraft.util.ResourceLocation;
|
||||
|
||||
/**
|
||||
* Icon from a state texture.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IStateIconTexture
|
||||
{
|
||||
/**
|
||||
* Height of the icon.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int getHeight();
|
||||
|
||||
/**
|
||||
* Texture the icon is in.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Nonnull
|
||||
@@ -28,21 +28,21 @@ public interface IStateIconTexture
|
||||
|
||||
/**
|
||||
* U coordinate of the icon.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int getU();
|
||||
|
||||
/**
|
||||
* V coordinate of the icon.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int getV();
|
||||
|
||||
/**
|
||||
* Width of the icon.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int getWidth();
|
||||
|
||||
@@ -5,14 +5,14 @@ import thaumicenergistics.common.ThaumicEnergistics;
|
||||
|
||||
/**
|
||||
* Icons from the ThE "states" texture.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public enum ThEStateIconsEnum
|
||||
implements IStateIconTexture
|
||||
{
|
||||
SWAP (0, 0);
|
||||
SWAP (0, 0);
|
||||
|
||||
/**
|
||||
* Location of the AE states texture
|
||||
@@ -46,7 +46,7 @@ public enum ThEStateIconsEnum
|
||||
|
||||
/**
|
||||
* Standard icon constructor
|
||||
*
|
||||
*
|
||||
* @param u
|
||||
* @param v
|
||||
*/
|
||||
@@ -57,7 +57,7 @@ public enum ThEStateIconsEnum
|
||||
|
||||
/**
|
||||
* Icon constructor
|
||||
*
|
||||
*
|
||||
* @param u
|
||||
* @param v
|
||||
* @param width
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package thaumicenergistics.common;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.movable.IMovableRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
@@ -9,15 +12,12 @@ import thaumicenergistics.common.items.ItemEnum;
|
||||
import thaumicenergistics.common.items.ItemMaterial;
|
||||
import thaumicenergistics.common.registries.FeatureRegistry;
|
||||
import thaumicenergistics.common.tiles.TileEnum;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.movable.IMovableRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
/**
|
||||
* Proxy shared by both client and server.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class CommonProxy
|
||||
{
|
||||
|
||||
@@ -6,9 +6,9 @@ import thaumicenergistics.api.IThEConfig;
|
||||
|
||||
/**
|
||||
* Controls the ThE configuration.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
class ConfigurationHandler
|
||||
implements IThEConfig
|
||||
@@ -26,8 +26,7 @@ class ConfigurationHandler
|
||||
* Default values.
|
||||
*/
|
||||
private static final int DFT_CONVERSION_EXPONENT = 7;
|
||||
private static final boolean
|
||||
DFT_CRAFT_ARCANE_ASSEMBLER = true,
|
||||
private static final boolean DFT_CRAFT_ARCANE_ASSEMBLER = true,
|
||||
DFT_CRAFT_ARCANE_CRAFTING_TERM = true,
|
||||
DFT_CRAFT_DISTILLATION_PATTERN_ENCODER = true,
|
||||
DFT_CRAFT_ESSENTIA_CELLS = true,
|
||||
@@ -80,7 +79,7 @@ class ConfigurationHandler
|
||||
|
||||
/**
|
||||
* Loads and synchronizes the config file.
|
||||
*
|
||||
*
|
||||
* @param configFile
|
||||
*/
|
||||
public static IThEConfig loadAndSyncConfigFile( final File configFile )
|
||||
@@ -105,9 +104,9 @@ class ConfigurationHandler
|
||||
ConfigurationHandler.DFT_CONVERSION_EXPONENT,
|
||||
1,
|
||||
11,
|
||||
"Controls the conversion ratio of essentia/fluid. 1 essentia is converted to (2^this) milibuckets of fluid. "
|
||||
+ "Please be aware that this value effects how much fluid is transferred through the AE system, which also effects transfer speed and power consumption. "
|
||||
+ "Values above 11 make it impossible to use fluid transfer devices such as the ME IO Port, or anything from EC2." );
|
||||
"Controls the conversion ratio of essentia/fluid. 1 essentia is converted to (2^this) milibuckets of fluid. " +
|
||||
"Please be aware that this value effects how much fluid is transferred through the AE system, which also effects transfer speed and power consumption. " +
|
||||
"Values above 11 make it impossible to use fluid transfer devices such as the ME IO Port, or anything from EC2." );
|
||||
this.conversionMultiplier = (int)Math.pow( 2, Math.min( fluidPow, 11 ) );
|
||||
|
||||
// Crafting ========================================================
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
package thaumicenergistics.common;
|
||||
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.api.parts.IPartHost;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.implementations.ContainerCraftAmount;
|
||||
import appeng.container.implementations.ContainerCraftConfirm;
|
||||
import appeng.helpers.IPriorityHost;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@@ -9,19 +16,12 @@ import thaumicenergistics.client.gui.*;
|
||||
import thaumicenergistics.common.container.*;
|
||||
import thaumicenergistics.common.inventory.HandlerWirelessEssentiaTerminal;
|
||||
import thaumicenergistics.common.parts.ThEPartBase;
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.api.parts.IPartHost;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.implementations.ContainerCraftAmount;
|
||||
import appeng.container.implementations.ContainerCraftConfirm;
|
||||
import appeng.helpers.IPriorityHost;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
||||
/**
|
||||
* Handles ThE GUI launching.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ThEGuiHandler
|
||||
implements IGuiHandler
|
||||
@@ -94,7 +94,7 @@ public class ThEGuiHandler
|
||||
|
||||
/**
|
||||
* Gets the crafting issuer host or null.
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
* @return
|
||||
*/
|
||||
@@ -125,7 +125,7 @@ public class ThEGuiHandler
|
||||
|
||||
/**
|
||||
* Gets the AE part at the specified location.
|
||||
*
|
||||
*
|
||||
* @param tileSide
|
||||
* @param world
|
||||
* @param x
|
||||
@@ -150,7 +150,7 @@ public class ThEGuiHandler
|
||||
|
||||
/**
|
||||
* Gets the sided part for the GUI ID.
|
||||
*
|
||||
*
|
||||
* @param ID
|
||||
* @param world
|
||||
* @param x
|
||||
@@ -166,7 +166,7 @@ public class ThEGuiHandler
|
||||
|
||||
/**
|
||||
* Get the gui element for the AE part at the specified location
|
||||
*
|
||||
*
|
||||
* @param tileSide
|
||||
* @param player
|
||||
* @param world
|
||||
@@ -176,7 +176,7 @@ public class ThEGuiHandler
|
||||
* @param isServerSide
|
||||
* @return
|
||||
*/
|
||||
private static Object getPartGuiElement( final ForgeDirection tileSide, final EntityPlayer player, final World world, final int x, final int y,
|
||||
private static Object getPartGuiElement( final ForgeDirection tileSide, final EntityPlayer player, final World world, final int x, final int y,
|
||||
final int z, final boolean isServerSide )
|
||||
{
|
||||
// Get the part
|
||||
@@ -201,7 +201,7 @@ public class ThEGuiHandler
|
||||
|
||||
/**
|
||||
* Returns true if the specified ID is within the base range.
|
||||
*
|
||||
*
|
||||
* @param BaseID
|
||||
* @param ID
|
||||
* @return
|
||||
@@ -214,7 +214,7 @@ public class ThEGuiHandler
|
||||
/**
|
||||
* Helper function to properly generate a GUI ID that
|
||||
* includes a forge direction.
|
||||
*
|
||||
*
|
||||
* @param ID
|
||||
* @param side
|
||||
* @return
|
||||
@@ -226,7 +226,7 @@ public class ThEGuiHandler
|
||||
|
||||
/**
|
||||
* Launches a non AE part gui.
|
||||
*
|
||||
*
|
||||
* @param ID
|
||||
* @param player
|
||||
* @param world
|
||||
@@ -241,7 +241,7 @@ public class ThEGuiHandler
|
||||
|
||||
/**
|
||||
* Launches a non AE part gui with the specified extra data.
|
||||
*
|
||||
*
|
||||
* @param ID
|
||||
* @param player
|
||||
* @param world
|
||||
@@ -250,7 +250,7 @@ public class ThEGuiHandler
|
||||
* @param z
|
||||
* @param extraData
|
||||
*/
|
||||
public static void launchGui( final int ID, final EntityPlayer player, final World world, final int x, final int y, final int z,
|
||||
public static void launchGui( final int ID, final EntityPlayer player, final World world, final int x, final int y, final int z,
|
||||
final Object[] extraData )
|
||||
{
|
||||
ThEGuiHandler.extraData = extraData;
|
||||
@@ -260,7 +260,7 @@ public class ThEGuiHandler
|
||||
|
||||
/**
|
||||
* Launches an AE part gui
|
||||
*
|
||||
*
|
||||
* @param part
|
||||
* @param player
|
||||
* @param world
|
||||
@@ -300,31 +300,31 @@ public class ThEGuiHandler
|
||||
case ThEGuiHandler.ESSENTIA_CELL_ID:
|
||||
return GuiEssentiaCellTerminal.NewEssentiaCellGui( player, world, x, y, z );
|
||||
|
||||
// Is this the cell workbench?
|
||||
// Is this the cell workbench?
|
||||
case ThEGuiHandler.CELL_WORKBENCH_ID:
|
||||
return new GuiEssentiaCellWorkbench( player, world, x, y, z );
|
||||
|
||||
// Is this the wireless gui?
|
||||
// Is this the wireless gui?
|
||||
case ThEGuiHandler.WIRELESS_TERMINAL_ID:
|
||||
return GuiEssentiaCellTerminal.NewWirelessEssentiaTerminalGui( player );
|
||||
|
||||
// Is this the arcane assembler?
|
||||
// Is this the arcane assembler?
|
||||
case ThEGuiHandler.ARCANE_ASSEMBLER_ID:
|
||||
return new GuiArcaneAssembler( player, world, x, y, z );
|
||||
|
||||
// Is this the knowledge inscriber?
|
||||
// Is this the knowledge inscriber?
|
||||
case ThEGuiHandler.KNOWLEDGE_INSCRIBER:
|
||||
return new GuiKnowledgeInscriber( player, world, x, y, z );
|
||||
|
||||
// Vibration chamber?
|
||||
// Vibration chamber?
|
||||
case ThEGuiHandler.ESSENTIA_VIBRATION_CHAMBER:
|
||||
return new GuiEssentiaVibrationChamber( player, world, x, y, z );
|
||||
|
||||
// Distillation encoder?
|
||||
// Distillation encoder?
|
||||
case ThEGuiHandler.DISTILLATION_ENCODER:
|
||||
return new GuiDistillationPatternEncoder( player, world, x, y, z );
|
||||
|
||||
// AE2 Autocrafting Amount?
|
||||
// AE2 Autocrafting Amount?
|
||||
case ThEGuiHandler.AUTO_CRAFTING_AMOUNT:
|
||||
ICraftingIssuerHost amountHost = ThEGuiHandler.getCraftingIssuerHost( player );
|
||||
if( amountHost != null )
|
||||
@@ -333,7 +333,7 @@ public class ThEGuiHandler
|
||||
}
|
||||
return null;
|
||||
|
||||
// AE2 Autocrafting Confirm?
|
||||
// AE2 Autocrafting Confirm?
|
||||
case ThEGuiHandler.AUTO_CRAFTING_CONFIRM:
|
||||
ICraftingIssuerHost confirmHost = ThEGuiHandler.getCraftingIssuerHost( player );
|
||||
if( confirmHost != null )
|
||||
@@ -387,32 +387,32 @@ public class ThEGuiHandler
|
||||
case ThEGuiHandler.ESSENTIA_CELL_ID:
|
||||
return new ContainerEssentiaCell( player, world, x, y, z );
|
||||
|
||||
// Is this the cell workbench?
|
||||
// Is this the cell workbench?
|
||||
case ThEGuiHandler.CELL_WORKBENCH_ID:
|
||||
return new ContainerEssentiaCellWorkbench( player, world, x, y, z );
|
||||
|
||||
// Is this the wireless gui?
|
||||
// Is this the wireless gui?
|
||||
case ThEGuiHandler.WIRELESS_TERMINAL_ID:
|
||||
HandlerWirelessEssentiaTerminal handler = (HandlerWirelessEssentiaTerminal)ThEGuiHandler.extraData[0];
|
||||
return new ContainerWirelessEssentiaTerminal( player, handler );
|
||||
|
||||
// Is this the arcane assembler?
|
||||
// Is this the arcane assembler?
|
||||
case ThEGuiHandler.ARCANE_ASSEMBLER_ID:
|
||||
return new ContainerArcaneAssembler( player, world, x, y, z );
|
||||
|
||||
// Is this the knowledge inscriber?
|
||||
// Is this the knowledge inscriber?
|
||||
case ThEGuiHandler.KNOWLEDGE_INSCRIBER:
|
||||
return new ContainerKnowledgeInscriber( player, world, x, y, z );
|
||||
|
||||
// Vibration chamber?
|
||||
// Vibration chamber?
|
||||
case ThEGuiHandler.ESSENTIA_VIBRATION_CHAMBER:
|
||||
return new ContainerEssentiaVibrationChamber( player, world, x, y, z );
|
||||
|
||||
// Distillation encoder?
|
||||
// Distillation encoder?
|
||||
case ThEGuiHandler.DISTILLATION_ENCODER:
|
||||
return new ContainerDistillationPatternEncoder( player, world, x, y, z );
|
||||
|
||||
// AE2 Autocrafting Amount?
|
||||
// AE2 Autocrafting Amount?
|
||||
case ThEGuiHandler.AUTO_CRAFTING_AMOUNT:
|
||||
ICraftingIssuerHost amountHost = ThEGuiHandler.getCraftingIssuerHost( player );
|
||||
if( amountHost != null )
|
||||
@@ -421,7 +421,7 @@ public class ThEGuiHandler
|
||||
}
|
||||
return null;
|
||||
|
||||
// AE2 Autocrafting Confirm?
|
||||
// AE2 Autocrafting Confirm?
|
||||
case ThEGuiHandler.AUTO_CRAFTING_CONFIRM:
|
||||
ICraftingIssuerHost confirmHost = ThEGuiHandler.getCraftingIssuerHost( player );
|
||||
if( confirmHost != null )
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package thaumicenergistics.common.blocks;
|
||||
|
||||
import appeng.util.Platform;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import appeng.util.Platform;
|
||||
|
||||
/**
|
||||
* Base class for wrenchable blocks.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public abstract class AbstractBlockAEWrenchable
|
||||
extends BlockContainer
|
||||
@@ -24,7 +24,7 @@ public abstract class AbstractBlockAEWrenchable
|
||||
|
||||
/**
|
||||
* Called when the block is right-clicked
|
||||
*
|
||||
*
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
@@ -48,7 +48,7 @@ public abstract class AbstractBlockAEWrenchable
|
||||
|
||||
/**
|
||||
* Returning false will cancel onBlockActivated.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean canPlayerInteract( final EntityPlayer player )
|
||||
@@ -60,7 +60,7 @@ public abstract class AbstractBlockAEWrenchable
|
||||
* The block was right-clicked
|
||||
*/
|
||||
@Override
|
||||
public final boolean onBlockActivated( final World world, final int x, final int y, final int z, final EntityPlayer player, final int side,
|
||||
public final boolean onBlockActivated( final World world, final int x, final int y, final int z, final EntityPlayer player, final int side,
|
||||
final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
// Can the player interact with the block?
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package thaumicenergistics.common.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -13,14 +15,12 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
import thaumicenergistics.api.ThEApi;
|
||||
import thaumicenergistics.common.ThaumicEnergistics;
|
||||
import thaumicenergistics.common.tiles.TileGearBox;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Base block of {@link BlockGearBox} and {@link BlockGolemGearBox}
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public abstract class AbstractBlockGearBoxBase
|
||||
extends AbstractBlockAEWrenchable
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package thaumicenergistics.common.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -15,8 +17,6 @@ import thaumicenergistics.common.ThaumicEnergistics;
|
||||
import thaumicenergistics.common.registries.EnumCache;
|
||||
import thaumicenergistics.common.registries.Renderers;
|
||||
import thaumicenergistics.common.tiles.abstraction.TileProviderBase;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public abstract class AbstractBlockProviderBase
|
||||
extends AbstractBlockAEWrenchable
|
||||
@@ -70,30 +70,30 @@ public abstract class AbstractBlockProviderBase
|
||||
{
|
||||
// Get tile entity
|
||||
TileEntity tileProvider = world.getTileEntity( x, y, z );
|
||||
|
||||
|
||||
// Is there still have a tile?
|
||||
if( tileProvider instanceof TileProviderBase )
|
||||
{
|
||||
|
||||
|
||||
float r = 0;
|
||||
float g = 0;
|
||||
float b = 0;
|
||||
|
||||
|
||||
if( ( (TileProviderBase)tileProvider ).isActive() )
|
||||
{
|
||||
int mv = ( (TileProviderBase)tileProvider ).getColor().mediumVariant;
|
||||
|
||||
|
||||
r = ( ( mv >> 16 ) & 0xff ) / 255.0F;
|
||||
g = ( ( mv >> 8 ) & 0xff ) / 255.0F;
|
||||
b = ( ( mv ) & 0xff ) / 255.0F;
|
||||
return CLApi.makeRGBLightValue( r, g, b );
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
return super.getLightValue( world, x, y, z );
|
||||
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -128,7 +128,7 @@ public abstract class AbstractBlockProviderBase
|
||||
|
||||
// Sets the metadata for the block based on which side of the neighbor block they clicked on.
|
||||
@Override
|
||||
public final int onBlockPlaced( final World world, final int x, final int y, final int z, final int side, final float hitX, final float hitY,
|
||||
public final int onBlockPlaced( final World world, final int x, final int y, final int z, final int side, final float hitX, final float hitY,
|
||||
final float hitZ, final int metaData )
|
||||
{
|
||||
// Get the opposite face and return it
|
||||
@@ -136,7 +136,7 @@ public abstract class AbstractBlockProviderBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onBlockPlacedBy( final World world, final int x, final int y, final int z, final EntityLivingBase entity,
|
||||
public final void onBlockPlacedBy( final World world, final int x, final int y, final int z, final EntityLivingBase entity,
|
||||
final ItemStack itemstack )
|
||||
{
|
||||
// Set the owner
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package thaumicenergistics.common.blocks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import appeng.api.implementations.items.IMemoryCard;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -19,15 +22,12 @@ import thaumicenergistics.common.ThEGuiHandler;
|
||||
import thaumicenergistics.common.ThaumicEnergistics;
|
||||
import thaumicenergistics.common.tiles.TileArcaneAssembler;
|
||||
import thaumicenergistics.common.utils.EffectiveSide;
|
||||
import appeng.api.implementations.items.IMemoryCard;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link TileArcaneAssembler} block.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class BlockArcaneAssembler
|
||||
extends AbstractBlockAEWrenchable
|
||||
@@ -37,7 +37,7 @@ public class BlockArcaneAssembler
|
||||
|
||||
public BlockArcaneAssembler()
|
||||
{
|
||||
// Call super with material machine (iron)
|
||||
// Call super with material machine (iron)
|
||||
super( Material.iron );
|
||||
|
||||
// Basic hardness
|
||||
@@ -52,7 +52,7 @@ public class BlockArcaneAssembler
|
||||
|
||||
/**
|
||||
* Called when the assembler is right-clicked
|
||||
*
|
||||
*
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package thaumicenergistics.common.blocks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -18,21 +20,19 @@ import thaumicenergistics.common.ThEGuiHandler;
|
||||
import thaumicenergistics.common.ThaumicEnergistics;
|
||||
import thaumicenergistics.common.tiles.TileDistillationPatternEncoder;
|
||||
import thaumicenergistics.common.utils.EffectiveSide;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link TileDistillationPatternEncoder} block.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class BlockDistillationEncoder
|
||||
extends AbstractBlockAEWrenchable
|
||||
{
|
||||
public BlockDistillationEncoder()
|
||||
{
|
||||
// Call super with material machine (iron)
|
||||
// Call super with material machine (iron)
|
||||
super( Material.iron );
|
||||
|
||||
// Basic hardness
|
||||
@@ -113,8 +113,7 @@ public class BlockDistillationEncoder
|
||||
}
|
||||
|
||||
// Top or bottom?
|
||||
if( ( ForgeDirection.VALID_DIRECTIONS[side] == ForgeDirection.UP )
|
||||
|| ( ForgeDirection.VALID_DIRECTIONS[side] == ForgeDirection.DOWN ) )
|
||||
if( ( ForgeDirection.VALID_DIRECTIONS[side] == ForgeDirection.UP ) || ( ForgeDirection.VALID_DIRECTIONS[side] == ForgeDirection.DOWN ) )
|
||||
{
|
||||
// Bottom texture
|
||||
return BlockTextureManager.DISTILLATION_ENCODER.getTextures()[2];
|
||||
|
||||
@@ -8,9 +8,9 @@ import thaumicenergistics.common.registries.ThEStrings;
|
||||
|
||||
/**
|
||||
* Enumeration of all ThE blocks.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public enum BlockEnum
|
||||
{
|
||||
@@ -25,6 +25,11 @@ public enum BlockEnum
|
||||
ItemBlockEssentiaVibrationChamber.class),
|
||||
DISTILLATION_ENCODER (ThEStrings.Block_DistillationEncoder, new BlockDistillationEncoder());
|
||||
|
||||
/**
|
||||
* Cache of the enum values
|
||||
*/
|
||||
public static final BlockEnum[] VALUES = BlockEnum.values();
|
||||
|
||||
/**
|
||||
* The block object.
|
||||
*/
|
||||
@@ -40,14 +45,9 @@ public enum BlockEnum
|
||||
*/
|
||||
public final Class<? extends ItemBlock> itemBlockClass;
|
||||
|
||||
/**
|
||||
* Cache of the enum values
|
||||
*/
|
||||
public static final BlockEnum[] VALUES = BlockEnum.values();
|
||||
|
||||
/**
|
||||
* Constructs the block with the default itemblock.
|
||||
*
|
||||
*
|
||||
* @param unlocalizedName
|
||||
* @param block
|
||||
*/
|
||||
@@ -58,7 +58,7 @@ public enum BlockEnum
|
||||
|
||||
/**
|
||||
* Constructs the block with the specified itemBlock.
|
||||
*
|
||||
*
|
||||
* @param unlocalizedName
|
||||
* @param block
|
||||
* @param itemBlockClass
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package thaumicenergistics.common.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -16,14 +18,12 @@ import thaumicenergistics.common.ThEGuiHandler;
|
||||
import thaumicenergistics.common.ThaumicEnergistics;
|
||||
import thaumicenergistics.common.tiles.TileEssentiaCellWorkbench;
|
||||
import thaumicenergistics.common.utils.EffectiveSide;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link TileEssentiaCellWorkbench} block.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class BlockEssentiaCellWorkbench
|
||||
extends AbstractBlockAEWrenchable
|
||||
@@ -35,7 +35,7 @@ public class BlockEssentiaCellWorkbench
|
||||
|
||||
public BlockEssentiaCellWorkbench()
|
||||
{
|
||||
// Call super with material machine (iron)
|
||||
// Call super with material machine (iron)
|
||||
super( Material.iron );
|
||||
|
||||
// Basic hardness
|
||||
@@ -50,7 +50,7 @@ public class BlockEssentiaCellWorkbench
|
||||
|
||||
/**
|
||||
* Called when the workbench is right-clicked
|
||||
*
|
||||
*
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package thaumicenergistics.common.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -8,14 +10,12 @@ import net.minecraft.world.World;
|
||||
import thaumicenergistics.client.textures.BlockTextureManager;
|
||||
import thaumicenergistics.common.registries.Renderers;
|
||||
import thaumicenergistics.common.tiles.TileEssentiaProvider;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link TileEssentiaProvider} block.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class BlockEssentiaProvider
|
||||
extends AbstractBlockProviderBase
|
||||
@@ -23,7 +23,7 @@ public class BlockEssentiaProvider
|
||||
|
||||
public BlockEssentiaProvider()
|
||||
{
|
||||
// Call super with material machine (iron)
|
||||
// Call super with material machine (iron)
|
||||
super( Material.iron );
|
||||
|
||||
// Basic hardness
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package thaumicenergistics.common.blocks;
|
||||
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -19,15 +22,12 @@ import thaumicenergistics.common.ThEGuiHandler;
|
||||
import thaumicenergistics.common.ThaumicEnergistics;
|
||||
import thaumicenergistics.common.tiles.TileEssentiaVibrationChamber;
|
||||
import thaumicenergistics.common.utils.EffectiveSide;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link TileEssentiaVibrationChamber} block.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class BlockEssentiaVibrationChamber
|
||||
extends AbstractBlockAEWrenchable
|
||||
@@ -35,7 +35,7 @@ public class BlockEssentiaVibrationChamber
|
||||
|
||||
public BlockEssentiaVibrationChamber()
|
||||
{
|
||||
// Call super with material machine (iron)
|
||||
// Call super with material machine (iron)
|
||||
super( Material.iron );
|
||||
|
||||
// Basic hardness
|
||||
@@ -50,7 +50,7 @@ public class BlockEssentiaVibrationChamber
|
||||
|
||||
/**
|
||||
* Returns the EVC tile entity, if found and is valid.
|
||||
*
|
||||
*
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
@@ -150,7 +150,7 @@ public class BlockEssentiaVibrationChamber
|
||||
|
||||
/**
|
||||
* Gets the world icons
|
||||
*
|
||||
*
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
@@ -171,7 +171,7 @@ public class BlockEssentiaVibrationChamber
|
||||
return this.getIcon( side, 0 );
|
||||
}
|
||||
|
||||
// Is this side the face?
|
||||
// Is this side the face?
|
||||
if( ( chamber.getForward() != null ) && ( side == chamber.getForward().ordinal() ) )
|
||||
{
|
||||
// Get the aspect in the chamber
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package thaumicenergistics.common.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.IIcon;
|
||||
import thaumicenergistics.client.textures.BlockTextureManager;
|
||||
import thaumicenergistics.common.tiles.TileGearBox;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link TileGearBox} block, iron form.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class BlockGearBox
|
||||
extends AbstractBlockGearBoxBase
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package thaumicenergistics.common.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.IIcon;
|
||||
import thaumicenergistics.client.textures.BlockTextureManager;
|
||||
import thaumicenergistics.common.tiles.TileGearBox;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* {@link TileGearBox} block, golem form.
|
||||
*
|
||||
*
|
||||
* @author Nividica
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class BlockGolemGearBox
|
||||
extends AbstractBlockGearBoxBase
|
||||
|
||||
Loaded 100 of 288 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user