Merge branch 'rv2' of https://github.com/AppliedEnergistics/Applied-Energistics-2 into rv2
This commit is contained in:
commit
7c2d3c3711
401 changed files with 3165 additions and 2911 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -16,9 +16,6 @@
|
|||
# include sourcecode
|
||||
!src/
|
||||
|
||||
# include special libs like BC
|
||||
!libs/
|
||||
|
||||
# include git important files
|
||||
!.gitmodules
|
||||
!.gitignore
|
||||
|
|
152
CONTRIBUTING.md
Normal file
152
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,152 @@
|
|||
# How to contribute
|
||||
|
||||
We want to keep it as easy as possible to contribute changes to support
|
||||
the growth and stability of AE2. There are a few guidelines that we
|
||||
need contributors to follow so that we can have a chance of keeping on
|
||||
top of things.
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Reporting an Issue
|
||||
|
||||
Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue now!
|
||||
|
||||
1. Make sure your issue hasn't already been answered or fixed. Also think about whether your issue is a valid one before submitting it.
|
||||
2. Go to [the issues page](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues)
|
||||
3. Click new issue
|
||||
4. Enter your Issue's title (something that summarizes your issue), and then create a detailed description of the issue.
|
||||
* To help in resolving your issues please try to include the follow if applicable:
|
||||
* The problem that is happening?
|
||||
* What was expected?
|
||||
* How to reproduce the problem?
|
||||
* Server or Single Player?
|
||||
* Mod Pack using and version?
|
||||
* Crash log (Please make sure to use [pastebin](http://pastebin.com/) for the log file)
|
||||
* Screen shots or Pictures of the problem
|
||||
5. Click `Submit New Issue`, and wait for feedback!
|
||||
|
||||
### Submitting Changes
|
||||
|
||||
* Submit an issue to the github project, assuming one does not already exist.
|
||||
* Clearly describe the issue including steps to reproduce when it is a bug.
|
||||
* Make sure you fill in the earliest version that you know has the issue.
|
||||
* Fork the repository on GitHub
|
||||
* Create a topic branch from where you want to base your work.
|
||||
* This is revison branch that is under active development.
|
||||
* Only target release branches if you are certain your fix must be on that
|
||||
branch.
|
||||
* To quickly create a topic branch based on the development branch; `git
|
||||
checkout -b fix/master/my_contribution branch`. Please avoid working
|
||||
directly on the `active development` branch.
|
||||
* Make commits of logical units.
|
||||
* Check for unnecessary whitespace with `git diff --check` before committing.
|
||||
* Make sure your commit messages are in the proper format.
|
||||
|
||||
````
|
||||
(#12345) Make the example in CONTRIBUTING imperative and concrete
|
||||
|
||||
Without this patch applied the example commit message in the CONTRIBUTING
|
||||
document is not a concrete example. This is a problem because the
|
||||
contributor is left to imagine what the commit message should look like
|
||||
based on a description rather than an example. This patch fixes the
|
||||
problem by making the example concrete and imperative.
|
||||
|
||||
The first line is a real life imperative statement with a ticket number
|
||||
from our issue tracker. The body describes the behavior without the patch,
|
||||
why this is a problem, and how the patch fixes the problem when applied.
|
||||
````
|
||||
* Always fully test your changes. If they are large engouh in scope, then fully
|
||||
test AE2.
|
||||
* Describing the process you used to test your changes in detail will help speed
|
||||
up this process.
|
||||
|
||||
## Making Trivial Changes
|
||||
|
||||
### Documentation
|
||||
|
||||
For changes of a trivial nature to comments and documentation, it is not
|
||||
always necessary to create a new issue. In this case, it is
|
||||
appropriate to start the first line of a commit with '(doc)' instead of
|
||||
a ticket number.
|
||||
|
||||
````
|
||||
(doc) Add documentation commit example to CONTRIBUTING
|
||||
|
||||
There is no example for contributing a documentation commit
|
||||
to the Puppet repository. This is a problem because the contributor
|
||||
is left to assume how a commit of this nature may appear.
|
||||
|
||||
The first line is a real life imperative statement with '(doc)' in
|
||||
place of what would have been the ticket number in a
|
||||
non-documentation related commit. The body describes the nature of
|
||||
the new documentation or comments added.
|
||||
````
|
||||
|
||||
### Semantic Changes
|
||||
|
||||
In order to keep the code in a state where PRs can be safely merged, it is important to
|
||||
avoid changes to syntax or changes that don't add any real value to the code base. PRs
|
||||
that make changes only to syntax or "clean up" the code will be rejected. Any code clean-up
|
||||
should be coordinated with the core team first.
|
||||
|
||||
|
||||
## Style Guidelines
|
||||
|
||||
Applied Energistics does not follow standard Java syntax. The guidelines below illustrate
|
||||
the styling guidelines used by AE.
|
||||
|
||||
PRs that do not conform to these standards will be rejected.
|
||||
|
||||
### Whitespace
|
||||
|
||||
#### Tabs or spaces
|
||||
Configure your IDE to use tabs as padding whitespace. Ensure that there is no extra whitespace
|
||||
at the end of lines, or on blank lines.
|
||||
|
||||
#### Pad parenthes with whitespace
|
||||
````
|
||||
if( item.equals( newItem )
|
||||
|
||||
public void DeleteItem( item )
|
||||
|
||||
catch( Throwable )
|
||||
````
|
||||
|
||||
### Braces
|
||||
|
||||
Place opening and closing braces on a new line. Always include open and close braces, even if
|
||||
the body is a single line.
|
||||
|
||||
````
|
||||
if( item.equals( newItem )
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void DeleteItem( item )
|
||||
{
|
||||
|
||||
}
|
||||
````
|
||||
|
||||
## Submitting Changes
|
||||
|
||||
* Push your changes to a topic branch in your fork of the repository.
|
||||
* Submit a pull request to the repository in the puppetlabs organization.
|
||||
* Update your issue to mark that you have submitted code and are ready for it to be reviewed.
|
||||
* Include a link to the pull request in the ticket.
|
||||
* The core team looks at Pull Requests on a regular basis.
|
||||
* There are many reasons why it will take a long time to pull your PR. Be patient, we'll
|
||||
get to it.
|
||||
* After feedback has been given we expect responses within two weeks. After two
|
||||
weeks will may close the pull request if it isn't showing any activity.
|
||||
|
||||
# Additional Resources
|
||||
|
||||
* [General GitHub documentation](http://help.github.com/)
|
||||
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
|
||||
* #AppliedEnergistics IRC channel on esper.net
|
35
README.md
35
README.md
|
@ -7,6 +7,7 @@
|
|||
* [License](#license)
|
||||
* [Downloads](#downloads)
|
||||
* [Installation](#installation)
|
||||
* [Issues](#issues)
|
||||
* [Building](#building)
|
||||
* [Contribution](#contribution)
|
||||
* [Credits](#credits)
|
||||
|
@ -23,7 +24,7 @@ A Mod about Matter, Energy and using them to conquer the world..
|
|||
|
||||
## License
|
||||
|
||||
Applied Energistics 2 is (c) 2013 - 2014 AlgorithmX2 and licensed under LGPL v3. See the LICENSE.txt for details or go to http://www.gnu.org/licenses/lgpl-3.0.txt for more information.
|
||||
Applied Energistics 2 is (c) 2013 - 2014 AlgorithmX2 and licensed under LGPL v3. See the LICENSE.txt for details or go to http://www.gnu.org/licenses/lgpl-3.0.txt for more information. Textures and Models are licensed under Creative Commons 3.
|
||||
|
||||
## Downloads
|
||||
|
||||
|
@ -33,6 +34,24 @@ Downloads can be found on [CurseForge](http://www.curse.com/mc-mods/minecraft/22
|
|||
|
||||
You install this mod by putting it into the `minecraft/mods/` folder. It has no additional hard dependencies.
|
||||
|
||||
## Issues
|
||||
|
||||
Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue now!
|
||||
|
||||
1. Make sure your issue hasn't already been answered or fixed. Also think about whether your issue is a valid one before submitting it.
|
||||
2. Go to [the issues page](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues)
|
||||
3. Click new issue
|
||||
4. Enter your Issue's title (something that summarizes your issue), and then create a detailed description of the issue.
|
||||
* To help in resolving your issues please try to include the follow if applicable:
|
||||
* The problem that is happening?
|
||||
* What was expected?
|
||||
* How to reproduce the problem?
|
||||
* Server or Single Player?
|
||||
* Mod Pack using and version?
|
||||
* Crash log (Please make sure to use [pastebin](http://pastebin.com/) for the log file)
|
||||
* Screen shots or Pictures of the problem
|
||||
5. Click `Submit New Issue`, and wait for feedback!
|
||||
|
||||
## Building
|
||||
|
||||
1. Clone this repository via
|
||||
|
@ -54,6 +73,18 @@ You install this mod by putting it into the `minecraft/mods/` folder. It has no
|
|||
Before you want to add major changes, you might want to discuss them with us first, before wasting your time.
|
||||
If you are still willing to contribute to this project, you can contribute via [Pull-Request](https://help.github.com/articles/creating-a-pull-request).
|
||||
|
||||
Here are a few things to keep in mind that will help get your PR approved.
|
||||
|
||||
* A PR should be focused on content. Any PRs where the changes are only syntax will be rejected.
|
||||
* Use the file you are editing as a style guide.
|
||||
* Consider your feature. [Suggestion Guidelines](http://ae-mod.info/Suggestion-Guidelines/)
|
||||
- Is your suggestion already possible using Vanilla + AE2?
|
||||
- Make sure your feature isn't already in the works, or hasn't been rejected previously.
|
||||
- Does your feature simplify another feature of AE2? These changes will not be accepted.
|
||||
- If your feature can be done by any popular mod, discuss with us first.
|
||||
|
||||
Getting Started
|
||||
|
||||
1. Fork this repository
|
||||
2. Clone the fork via
|
||||
* SSH `git clone git@github.com:<your username>/Applied-Energistics-2.git` or
|
||||
|
@ -64,7 +95,7 @@ If you are still willing to contribute to this project, you can contribute via [
|
|||
6. Push to your fork `git push`
|
||||
7. Create a Pull-Request on GitHub
|
||||
|
||||
If you are only doing single file pull requests, GitHub supports using a quick way without the need of cloning your fork.
|
||||
If you are only doing single file pull requests, GitHub supports using a quick way without the need of cloning your fork. Also read up about [synching](https://help.github.com/articles/syncing-a-fork) if you plan to contribute on regular basis.
|
||||
|
||||
## Credits
|
||||
|
||||
|
|
|
@ -29,12 +29,21 @@ configurations.all {
|
|||
resolutionStrategy.cacheDynamicVersionsFor 7200, 'hours'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_6
|
||||
targetCompatibility = JavaVersion.VERSION_1_6
|
||||
|
||||
version = config.version + "-" + config.aechannel + "-" + config.build
|
||||
group = config.group
|
||||
archivesBaseName = config.archivesBaseName
|
||||
|
||||
// If TeamCity is running this build, lets set the version info
|
||||
if (hasProperty("teamcity")) {
|
||||
version = teamcity["build.number"]
|
||||
|
||||
// Fix for main branch being built
|
||||
version = version.replaceAll("/", "-")
|
||||
}
|
||||
|
||||
// Add Coremod Manifest
|
||||
jar {
|
||||
manifest {
|
||||
|
|
|
@ -1,14 +1,41 @@
|
|||
version=rv2
|
||||
aechannel=alpha
|
||||
build=_
|
||||
build=0
|
||||
group=appeng
|
||||
archivesBaseName=appliedenergistics2
|
||||
|
||||
#########################################################
|
||||
# Versions #
|
||||
#########################################################
|
||||
minecraft_version=1.7.10
|
||||
forge_version=10.13.1.1217
|
||||
|
||||
#########################################################
|
||||
# APIs used for development #
|
||||
#########################################################
|
||||
cb_minecraft_version=1.7.10
|
||||
fmp_version=1.1.0.306
|
||||
fmp_version=1.1.0.308
|
||||
code_chicken_lib_version=1.1.1.104
|
||||
code_chicken_core_version=1.0.3.26
|
||||
nei_version=1.0.3.56
|
||||
ic2_version=2.2.643
|
||||
waila_version=1.5.3a_1.7.10
|
||||
waila_version=1.5.5_1.7.10
|
||||
|
||||
#########################################################
|
||||
# API Stubs #
|
||||
# Note: Do not edit these version numbers as they are #
|
||||
# not the version of the mod, but stub code for AE2 to #
|
||||
# compile #
|
||||
#########################################################
|
||||
api_betterstorage_version=1
|
||||
api_coloredlightscore_version=1
|
||||
api_craftguide_version=1
|
||||
api_ic2_version=1
|
||||
api_immibis_version=1
|
||||
api_invtweaks_version=1
|
||||
api_mekansim_version=1
|
||||
api_mfr_version=1
|
||||
api_railcraft_version=1
|
||||
api_rblocks_version=1
|
||||
api_rf_version=1
|
||||
api_rotarycraft_version=1
|
||||
dev_buildcraft_version=1
|
||||
|
|
|
@ -11,7 +11,7 @@ repositories {
|
|||
}
|
||||
|
||||
maven {
|
||||
name "FireBall API Depo"
|
||||
name "FireBall API Depot"
|
||||
url "http://dl.tsr.me/artifactory/libs-release-local"
|
||||
}
|
||||
}
|
||||
|
@ -25,19 +25,19 @@ dependencies {
|
|||
|
||||
compile "mcp.mobius.waila:Waila:${config.waila_version}"
|
||||
|
||||
compile(group: 'api', name: 'betterstorage', version: '1')
|
||||
compile(group: 'api', name: 'coloredlightscore', version: '1')
|
||||
compile(group: 'api', name: 'craftguide', version: '1')
|
||||
compile(group: 'api', name: 'ic2', version: '1')
|
||||
compile(group: 'api', name: 'immibis', version: '1')
|
||||
compile(group: 'api', name: 'invtweaks', version: '1')
|
||||
compile(group: 'api', name: 'mekansim', version: '1')
|
||||
compile(group: 'api', name: 'mfr', version: '1')
|
||||
compile(group: 'api', name: 'railcraft', version: '1')
|
||||
compile(group: 'api', name: 'rblocks', version: '1')
|
||||
compile(group: 'api', name: 'rf', version: '1')
|
||||
compile(group: 'api', name: 'rotarycraft', version: '1')
|
||||
compile(group: 'dev', name: 'buildcraft', version: '1')
|
||||
compile(group: 'api', name: 'betterstorage', version: "${config.api_betterstorage_version}")
|
||||
compile(group: 'api', name: 'coloredlightscore', version: "${config.api_coloredlightscore_version}")
|
||||
compile(group: 'api', name: 'craftguide', version: "${config.api_craftguide_version}")
|
||||
compile(group: 'api', name: 'ic2', version: "${config.api_ic2_version}")
|
||||
compile(group: 'api', name: 'immibis', version: "${config.api_immibis_version}")
|
||||
compile(group: 'api', name: 'invtweaks', version: "${config.api_invtweaks_version}")
|
||||
compile(group: 'api', name: 'mekansim', version: "${config.api_mekansim_version}")
|
||||
compile(group: 'api', name: 'mfr', version: "${config.api_mfr_version}")
|
||||
compile(group: 'api', name: 'railcraft', version: "${config.api_railcraft_version}")
|
||||
compile(group: 'api', name: 'rblocks', version: "${config.api_rblocks_version}")
|
||||
compile(group: 'api', name: 'rf', version: "${config.api_rf_version}")
|
||||
compile(group: 'api', name: 'rotarycraft', version: "${config.api_rotarycraft_version}")
|
||||
compile(group: 'dev', name: 'buildcraft', version: "${config.dev_buildcraft_version}")
|
||||
|
||||
// add hacked buildcraft jar to compile time (for facades)
|
||||
compile fileTree(dir: 'libs', include: '*.jar')
|
||||
|
|
0
gradlew
vendored
Normal file → Executable file
0
gradlew
vendored
Normal file → Executable file
|
@ -1 +1 @@
|
|||
Subproject commit 74e4e50c76e812cc227bea020f3c8646eacfedb1
|
||||
Subproject commit 65dfd7ace777c4972e920df715b34d84530ec637
|
|
@ -1,7 +1,6 @@
|
|||
package appeng.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -60,8 +59,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
{
|
||||
|
||||
private String FeatureFullname;
|
||||
private String FeatureSubname;
|
||||
private String featureFullName;
|
||||
private String featureSubName;
|
||||
private AEFeatureHandler feature;
|
||||
|
||||
private Class<? extends TileEntity> tileEntityType = null;
|
||||
|
@ -79,7 +78,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return FeatureFullname;
|
||||
return featureFullName;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
@ -107,8 +106,8 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||
try
|
||||
{
|
||||
ResourceLocation resLoc = new ResourceLocation( Name );
|
||||
resLoc = new ResourceLocation( resLoc.getResourceDomain(), String.format( "%s/%s%s", new Object[] { "textures/blocks",
|
||||
resLoc.getResourcePath(), ".png" } ) );
|
||||
resLoc = new ResourceLocation( resLoc.getResourceDomain(), String.format( "%s/%s%s", "textures/blocks",
|
||||
resLoc.getResourcePath(), ".png" ) );
|
||||
|
||||
IResource res = Minecraft.getMinecraft().getResourceManager().getResource( resLoc );
|
||||
if ( res != null )
|
||||
|
@ -178,14 +177,14 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||
protected void setTileEntity(Class<? extends TileEntity> c)
|
||||
{
|
||||
AEBaseTile.registerTileItem( c, new ItemStackSrc( this, 0 ) );
|
||||
GameRegistry.registerTileEntity( tileEntityType = c, FeatureFullname );
|
||||
GameRegistry.registerTileEntity( tileEntityType = c, featureFullName );
|
||||
isInventory = IInventory.class.isAssignableFrom( c );
|
||||
setTileProvider( hasBlockTileEntity() );
|
||||
}
|
||||
|
||||
protected void setFeature(EnumSet<AEFeature> f)
|
||||
{
|
||||
feature = new AEFeatureHandler( f, this, FeatureSubname );
|
||||
feature = new AEFeatureHandler( f, this, featureSubName );
|
||||
}
|
||||
|
||||
protected AEBaseBlock(Class<?> c, Material mat) {
|
||||
|
@ -203,7 +202,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||
ReflectionHelper.setPrivateValue( Block.class, this, b, "isTileProvider" );
|
||||
}
|
||||
|
||||
protected AEBaseBlock(Class<?> c, Material mat, String subname) {
|
||||
protected AEBaseBlock(Class<?> c, Material mat, String subName) {
|
||||
super( mat );
|
||||
|
||||
if ( mat == AEGlassMaterial.instance )
|
||||
|
@ -215,8 +214,8 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||
else
|
||||
setStepSound( Block.soundTypeMetal );
|
||||
|
||||
FeatureFullname = AEFeatureHandler.getName( c, subname );
|
||||
FeatureSubname = subname;
|
||||
featureFullName = AEFeatureHandler.getName( c, subName );
|
||||
featureSubName = subName;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -689,7 +688,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||
|
||||
if ( is.getItem() instanceof IMemoryCard && !(this instanceof BlockCableBus) )
|
||||
{
|
||||
IMemoryCard memc = (IMemoryCard) is.getItem();
|
||||
IMemoryCard memoryCard = (IMemoryCard) is.getItem();
|
||||
if ( player.isSneaking() )
|
||||
{
|
||||
AEBaseTile t = getTileEntity( w, x, y, z );
|
||||
|
@ -699,24 +698,24 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||
NBTTagCompound data = t.downloadSettings( SettingsFrom.MEMORY_CARD );
|
||||
if ( data != null )
|
||||
{
|
||||
memc.setMemoryCardContents( is, name, data );
|
||||
memc.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
|
||||
memoryCard.setMemoryCardContents( is, name, data );
|
||||
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
String name = memc.getSettingsName( is );
|
||||
NBTTagCompound data = memc.getData( is );
|
||||
String name = memoryCard.getSettingsName( is );
|
||||
NBTTagCompound data = memoryCard.getData( is );
|
||||
if ( getUnlocalizedName().equals( name ) )
|
||||
{
|
||||
AEBaseTile t = getTileEntity( w, x, y, z );
|
||||
t.uploadSettings( SettingsFrom.MEMORY_CARD, data );
|
||||
memc.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED );
|
||||
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED );
|
||||
}
|
||||
else
|
||||
memc.notifyUser( player, MemoryCardMessages.INVALID_MACHINE );
|
||||
memoryCard.notifyUser( player, MemoryCardMessages.INVALID_MACHINE );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -757,11 +756,13 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||
return hasSubtypes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasComparatorInputOverride()
|
||||
{
|
||||
return isInventory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(World w, int x, int y, int z, int s)
|
||||
{
|
||||
TileEntity te = getTileEntity( w, x, y, z );
|
||||
|
|
|
@ -84,7 +84,7 @@ public class AEBaseItemBlock extends ItemBlock
|
|||
{
|
||||
up = ForgeDirection.UP;
|
||||
|
||||
byte rotation = (byte) (MathHelper.floor_double( (double) ((player.rotationYaw * 4F) / 360F) + 2.5D ) & 3);
|
||||
byte rotation = (byte) (MathHelper.floor_double( (player.rotationYaw * 4F) / 360F + 2.5D ) & 3);
|
||||
|
||||
switch (rotation)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@ public class BlockCellWorkbench extends AEBaseBlock
|
|||
if ( tg != null )
|
||||
{
|
||||
if ( Platform.isServer() )
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CELLWORKBENCH );
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CELL_WORKBENCH );
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -7,7 +7,6 @@ import java.util.Random;
|
|||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
@ -89,7 +88,7 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
|
|||
if ( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
LightningFX fx = new LightningFX( w, xOff + 0.5 + x, yOff + 0.5 + y, zOff + 0.5 + z, 0.0D, 0.0D, 0.0D );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -148,9 +147,9 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
|
|||
break;
|
||||
}
|
||||
|
||||
return Arrays.asList( new AxisAlignedBB[] { bb } );
|
||||
return Arrays.asList( bb );
|
||||
}
|
||||
return Arrays.asList( new AxisAlignedBB[] { AxisAlignedBB.getBoundingBox( 0.0, 0, 0.0, 1.0, 1.0, 1.0 ) } );
|
||||
return Arrays.asList( AxisAlignedBB.getBoundingBox( 0.0, 0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -33,7 +33,7 @@ public class BlockLightDetector extends BlockQuartzTorch
|
|||
public int isProvidingWeakPower(IBlockAccess w, int x, int y, int z, int side)
|
||||
{
|
||||
if ( w instanceof World && ((TileLightDetector) getTileEntity( w, x, y, z )).isReady() )
|
||||
return (int) ((World) w).getBlockLightValue( x, y, z ) - 6;
|
||||
return ((World) w).getBlockLightValue( x, y, z ) - 6;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -72,16 +72,19 @@ public class BlockPaint extends AEBaseBlock
|
|||
tp.onNeighborBlockChange();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCollideCheck(int p_149678_1_, boolean p_149678_2_)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_,
|
||||
int p_149690_7_)
|
||||
{
|
||||
|
|
|
@ -5,7 +5,6 @@ import java.util.Random;
|
|||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
@ -52,15 +51,15 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
|
|||
if ( !AEConfig.instance.enableEffects )
|
||||
return;
|
||||
|
||||
TileQuartzGrowthAccelerator tqga = getTileEntity( w, x, y, z );
|
||||
TileQuartzGrowthAccelerator tileQuartzGrowthAccelerator = getTileEntity( w, x, y, z );
|
||||
|
||||
if ( tqga != null && tqga.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
if ( tileQuartzGrowthAccelerator != null && tileQuartzGrowthAccelerator.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
double d0 = (double) (r.nextFloat() - 0.5F);
|
||||
double d1 = (double) (r.nextFloat() - 0.5F);
|
||||
double d0 = r.nextFloat() - 0.5F;
|
||||
double d1 = r.nextFloat() - 0.5F;
|
||||
|
||||
ForgeDirection up = tqga.getUp();
|
||||
ForgeDirection forward = tqga.getForward();
|
||||
ForgeDirection up = tileQuartzGrowthAccelerator.getUp();
|
||||
ForgeDirection forward = tileQuartzGrowthAccelerator.getForward();
|
||||
ForgeDirection west = Platform.crossProduct( forward, up );
|
||||
|
||||
double rx = 0.5 + x;
|
||||
|
@ -113,7 +112,7 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
|
|||
rz += dz * forward.offsetZ;
|
||||
|
||||
LightningFX fx = new LightningFX( w, rx, ry, rz, 0.0D, 0.0D, 0.0D );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import java.util.Random;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
@ -97,7 +96,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
|||
double xOff = -0.3 * up.offsetX;
|
||||
double yOff = -0.3 * up.offsetY;
|
||||
double zOff = -0.3 * up.offsetZ;
|
||||
return Arrays.asList( new AxisAlignedBB[] { AxisAlignedBB.getBoundingBox( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) } );
|
||||
return Arrays.asList( AxisAlignedBB.getBoundingBox( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -129,7 +128,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
|||
{
|
||||
LightningFX fx = new LightningFX( w, xOff + 0.5 + x, yOff + 0.5 + y, zOff + 0.5 + z, 0.0D, 0.0D, 0.0D );
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -142,9 +142,9 @@ public class BlockSkyCompass extends AEBaseBlock implements ICustomCollision
|
|||
break;
|
||||
}
|
||||
|
||||
return Arrays.asList( new AxisAlignedBB[] { AxisAlignedBB.getBoundingBox( minX, minY, minZ, maxX, maxY, maxZ ) } );
|
||||
return Arrays.asList( AxisAlignedBB.getBoundingBox( minX, minY, minZ, maxX, maxY, maxZ ) );
|
||||
}
|
||||
return Arrays.asList( new AxisAlignedBB[] { AxisAlignedBB.getBoundingBox( 0.0, 0, 0.0, 1.0, 1.0, 1.0 ) } );
|
||||
return Arrays.asList( AxisAlignedBB.getBoundingBox( 0.0, 0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -127,19 +127,19 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
|||
{
|
||||
if ( !w.isRemote )
|
||||
{
|
||||
EntityTinyTNTPrimed entitytntprimed = new EntityTinyTNTPrimed( w, x + 0.5F, y + 0.5F, z + 0.5F, exp.getExplosivePlacedBy() );
|
||||
entitytntprimed.fuse = w.rand.nextInt( entitytntprimed.fuse / 4 ) + entitytntprimed.fuse / 8;
|
||||
w.spawnEntityInWorld( entitytntprimed );
|
||||
EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, x + 0.5F, y + 0.5F, z + 0.5F, exp.getExplosivePlacedBy() );
|
||||
primedTinyTNTEntity.fuse = w.rand.nextInt( primedTinyTNTEntity.fuse / 4 ) + primedTinyTNTEntity.fuse / 8;
|
||||
w.spawnEntityInWorld( primedTinyTNTEntity );
|
||||
}
|
||||
}
|
||||
|
||||
public void startFuse(World w, int x, int y, int z, EntityLivingBase ignitor)
|
||||
public void startFuse(World w, int x, int y, int z, EntityLivingBase igniter)
|
||||
{
|
||||
if ( !w.isRemote )
|
||||
{
|
||||
EntityTinyTNTPrimed entitytntprimed = new EntityTinyTNTPrimed( w, x + 0.5F, y + 0.5F, z + 0.5F, ignitor );
|
||||
w.spawnEntityInWorld( entitytntprimed );
|
||||
w.playSoundAtEntity( entitytntprimed, "game.tnt.primed", 1.0F, 1.0F );
|
||||
EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, x + 0.5F, y + 0.5F, z + 0.5F, igniter );
|
||||
w.spawnEntityInWorld( primedTinyTNTEntity );
|
||||
w.playSoundAtEntity( primedTinyTNTEntity, "game.tnt.primed", 1.0F, 1.0F );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
|||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
|
||||
{
|
||||
return Arrays.asList( new AxisAlignedBB[] { AxisAlignedBB.getBoundingBox( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) } );
|
||||
return Arrays.asList( AxisAlignedBB.getBoundingBox( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -39,7 +39,7 @@ public class BlockVibrationChamber extends AEBaseBlock
|
|||
TileVibrationChamber tc = getTileEntity( w, x, y, z );
|
||||
if ( tc != null && !player.isSneaking() )
|
||||
{
|
||||
Platform.openGUI( player, tc, ForgeDirection.getOrientation( side ), GuiBridge.GUI_VIBRATIONCHAMBER );
|
||||
Platform.openGUI( player, tc, ForgeDirection.getOrientation( side ), GuiBridge.GUI_VIBRATION_CHAMBER );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -73,9 +73,9 @@ public class BlockVibrationChamber extends AEBaseBlock
|
|||
TileVibrationChamber tc = (TileVibrationChamber) tile;
|
||||
if ( tc.isOn )
|
||||
{
|
||||
float f1 = (float) x + 0.5F;
|
||||
float f2 = (float) y + 0.5F;
|
||||
float f3 = (float) z + 0.5F;
|
||||
float f1 = x + 0.5F;
|
||||
float f2 = y + 0.5F;
|
||||
float f3 = z + 0.5F;
|
||||
|
||||
ForgeDirection forward = tc.getForward();
|
||||
ForgeDirection up = tc.getUp();
|
||||
|
@ -99,8 +99,8 @@ public class BlockVibrationChamber extends AEBaseBlock
|
|||
f2 += west_y * (0.3 * ox - 0.15);
|
||||
f3 += west_z * (0.3 * ox - 0.15);
|
||||
|
||||
w.spawnParticle( "smoke", (double) f1, (double) f2, (double) f3, 0.0D, 0.0D, 0.0D );
|
||||
w.spawnParticle( "flame", (double) f1, (double) f2, (double) f3, 0.0D, 0.0D, 0.0D );
|
||||
w.spawnParticle( "smoke", f1, f2, f3, 0.0D, 0.0D, 0.0D );
|
||||
w.spawnParticle( "flame", f1, f2, f3, 0.0D, 0.0D, 0.0D );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||
static public Class<? extends TileEntity> noTesrTile;
|
||||
static public Class<? extends TileEntity> tesrTile;
|
||||
|
||||
@Override
|
||||
public <T extends TileEntity> T getTileEntity(IBlockAccess w, int x, int y, int z)
|
||||
{
|
||||
TileEntity te = w.getTileEntity( x, y, z );
|
||||
|
@ -89,13 +90,14 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean addHitEffects(World world, MovingObjectPosition target, EffectRenderer effectRenderer)
|
||||
{
|
||||
Object pobj = cb( world, target.blockX, target.blockY, target.blockZ );
|
||||
if ( pobj instanceof IPartHost )
|
||||
Object object = cb( world, target.blockX, target.blockY, target.blockZ );
|
||||
if ( object instanceof IPartHost )
|
||||
{
|
||||
IPartHost host = (IPartHost) pobj;
|
||||
IPartHost host = (IPartHost) object;
|
||||
|
||||
for (ForgeDirection side : ForgeDirection.values())
|
||||
{
|
||||
|
@ -113,15 +115,15 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||
{
|
||||
for (int k1 = 0; k1 < b0; ++k1)
|
||||
{
|
||||
double d0 = (double) target.blockX + ((double) i1 + 0.5D) / (double) b0;
|
||||
double d1 = (double) target.blockY + ((double) j1 + 0.5D) / (double) b0;
|
||||
double d2 = (double) target.blockZ + ((double) k1 + 0.5D) / (double) b0;
|
||||
double d0 = target.blockX + (i1 + 0.5D) / b0;
|
||||
double d1 = target.blockY + (j1 + 0.5D) / b0;
|
||||
double d2 = target.blockZ + (k1 + 0.5D) / b0;
|
||||
|
||||
double dd0 = target.hitVec.xCoord;
|
||||
double dd1 = target.hitVec.yCoord;
|
||||
double dd2 = target.hitVec.zCoord;
|
||||
EntityDiggingFX fx = (new EntityDiggingFX( world, dd0, dd1, dd2, d0 - (double) target.blockX - 0.5D, d1 - (double) target.blockY
|
||||
- 0.5D, d2 - (double) target.blockZ - 0.5D, this, 0 )).applyColourMultiplier( target.blockX, target.blockY, target.blockZ );
|
||||
EntityDiggingFX fx = (new EntityDiggingFX( world, dd0, dd1, dd2, d0 - target.blockX - 0.5D, d1 - target.blockY
|
||||
- 0.5D, d2 - target.blockZ - 0.5D, this, 0 )).applyColourMultiplier( target.blockX, target.blockY, target.blockZ );
|
||||
|
||||
fx.setParticleIcon( ico );
|
||||
|
||||
|
@ -135,13 +137,14 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean addDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer)
|
||||
{
|
||||
Object pobj = cb( world, x, y, z );
|
||||
if ( pobj instanceof IPartHost )
|
||||
Object object = cb( world, x, y, z );
|
||||
if ( object instanceof IPartHost )
|
||||
{
|
||||
IPartHost host = (IPartHost) pobj;
|
||||
IPartHost host = (IPartHost) object;
|
||||
|
||||
for (ForgeDirection side : ForgeDirection.values())
|
||||
{
|
||||
|
@ -159,10 +162,10 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||
{
|
||||
for (int k1 = 0; k1 < b0; ++k1)
|
||||
{
|
||||
double d0 = (double) x + ((double) i1 + 0.5D) / (double) b0;
|
||||
double d1 = (double) y + ((double) j1 + 0.5D) / (double) b0;
|
||||
double d2 = (double) z + ((double) k1 + 0.5D) / (double) b0;
|
||||
EntityDiggingFX fx = (new EntityDiggingFX( world, d0, d1, d2, d0 - (double) x - 0.5D, d1 - (double) y - 0.5D, d2 - (double) z
|
||||
double d0 = x + (i1 + 0.5D) / b0;
|
||||
double d1 = y + (j1 + 0.5D) / b0;
|
||||
double d2 = z + (k1 + 0.5D) / b0;
|
||||
EntityDiggingFX fx = (new EntityDiggingFX( world, d0, d1, d2, d0 - x - 0.5D, d1 - y - 0.5D, d2 - z
|
||||
- 0.5D, this, meta )).applyColourMultiplier( x, y, z );
|
||||
|
||||
fx.setParticleIcon( ico );
|
||||
|
|
|
@ -101,9 +101,9 @@ public class BlockWireless extends AEBaseBlock implements ICustomCollision
|
|||
break;
|
||||
}
|
||||
|
||||
return Arrays.asList( new AxisAlignedBB[] { AxisAlignedBB.getBoundingBox( minX, minY, minZ, maxX, maxY, maxZ ) } );
|
||||
return Arrays.asList( AxisAlignedBB.getBoundingBox( minX, minY, minZ, maxX, maxY, maxZ ) );
|
||||
}
|
||||
return Arrays.asList( new AxisAlignedBB[] { AxisAlignedBB.getBoundingBox( 0.0, 0, 0.0, 1.0, 1.0, 1.0 ) } );
|
||||
return Arrays.asList( AxisAlignedBB.getBoundingBox( 0.0, 0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -54,7 +54,7 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World w, int x, int y, int z, Block pointlessnumber)
|
||||
public void onNeighborBlockChange(World w, int x, int y, int z, Block pointlessNumber)
|
||||
{
|
||||
TileQuantumBridge bridge = getTileEntity( w, x, y, z );
|
||||
if ( bridge != null )
|
||||
|
@ -97,7 +97,7 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
|
|||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
|
||||
{
|
||||
double OnePx = 2.0 / 16.0;
|
||||
return Arrays.asList( new AxisAlignedBB[] { AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) } );
|
||||
return Arrays.asList( AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -30,7 +30,7 @@ public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World w, int x, int y, int z, Block pointlessnumber)
|
||||
public void onNeighborBlockChange(World w, int x, int y, int z, Block pointlessNumber)
|
||||
{
|
||||
TileQuantumBridge bridge = getTileEntity( w, x, y, z );
|
||||
if ( bridge != null )
|
||||
|
@ -66,7 +66,7 @@ public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision
|
|||
{
|
||||
OnePx = 1.0 / 16.0;
|
||||
}
|
||||
return Arrays.asList( new AxisAlignedBB[] { AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) } );
|
||||
return Arrays.asList( AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -4,7 +4,6 @@ import java.util.EnumSet;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.world.World;
|
||||
import appeng.client.render.effects.VibrantFX;
|
||||
import appeng.core.AEConfig;
|
||||
|
@ -32,13 +31,13 @@ public class BlockQuartzLamp extends BlockQuartzGlass
|
|||
|
||||
if ( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
double d0 = (double) (r.nextFloat() - 0.5F) * 0.96D;
|
||||
double d1 = (double) (r.nextFloat() - 0.5F) * 0.96D;
|
||||
double d2 = (double) (r.nextFloat() - 0.5F) * 0.96D;
|
||||
double d0 = (r.nextFloat() - 0.5F) * 0.96D;
|
||||
double d1 = (r.nextFloat() - 0.5F) * 0.96D;
|
||||
double d2 = (r.nextFloat() - 0.5F) * 0.96D;
|
||||
|
||||
VibrantFX fx = new VibrantFX( w, 0.5 + x + d0, 0.5 + y + d1, 0.5 + z + d2, 0.0D, 0.0D, 0.0D );
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -113,11 +113,11 @@ public class OreQuartz extends AEBaseBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public void dropBlockAsItemWithChance(World w, int x, int y, int z, int blockid, float something, int meta)
|
||||
public void dropBlockAsItemWithChance(World w, int x, int y, int z, int blockID, float something, int meta)
|
||||
{
|
||||
super.dropBlockAsItemWithChance( w, x, y, z, blockid, something, meta );
|
||||
super.dropBlockAsItemWithChance( w, x, y, z, blockID, something, meta );
|
||||
|
||||
if ( getItemDropped( blockid, w.rand, meta ) != Item.getItemFromBlock( this ) )
|
||||
if ( getItemDropped( blockID, w.rand, meta ) != Item.getItemFromBlock( this ) )
|
||||
{
|
||||
int xp = MathHelper.getRandomIntegerInRange( w.rand, 2, 5 );
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ package appeng.block.solids;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import appeng.api.AEApi;
|
||||
|
@ -35,9 +34,9 @@ public class OreQuartzCharged extends OreQuartz
|
|||
if ( !AEConfig.instance.enableEffects )
|
||||
return;
|
||||
|
||||
double xOff = (double) (r.nextFloat());
|
||||
double yOff = (double) (r.nextFloat());
|
||||
double zOff = (double) (r.nextFloat());
|
||||
double xOff = (r.nextFloat());
|
||||
double yOff = (r.nextFloat());
|
||||
double zOff = (r.nextFloat());
|
||||
|
||||
switch (r.nextInt( 6 ))
|
||||
{
|
||||
|
@ -67,7 +66,7 @@ public class OreQuartzCharged extends OreQuartz
|
|||
if ( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
ChargedOreFX fx = new ChargedOreFX( w, x + xOff, y + yOff, z + zOff, 0.0f, 0.0f, 0.0f );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ public class BlockSpatialIOPort extends AEBaseBlock
|
|||
if ( tg != null )
|
||||
{
|
||||
if ( Platform.isServer() )
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SPATIALIOPORT );
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SPATIAL_IO_PORT );
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -110,9 +110,9 @@ public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
|
|||
double Y = o.offsetY == 0 ? 0.06 : 0.0;
|
||||
double Z = o.offsetZ == 0 ? 0.06 : 0.0;
|
||||
|
||||
return Arrays.asList( new AxisAlignedBB[] { AxisAlignedBB.getBoundingBox( Math.max( 0.0, X - o.offsetX * sc ), Math.max( 0.0, Y - o.offsetY * sc ),
|
||||
return Arrays.asList( AxisAlignedBB.getBoundingBox( Math.max( 0.0, X - o.offsetX * sc ), Math.max( 0.0, Y - o.offsetY * sc ),
|
||||
Math.max( 0.0, Z - o.offsetZ * sc ), Math.min( 1.0, (1.0 - X) - o.offsetX * sc ), Math.min( 1.0, (1.0 - Y) - o.offsetY * sc ),
|
||||
Math.min( 1.0, (1.0 - Z) - o.offsetZ * sc ) ) } );
|
||||
Math.min( 1.0, (1.0 - Z) - o.offsetZ * sc ) ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -11,7 +11,6 @@ import java.util.Random;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
|
@ -115,9 +114,9 @@ public class ClientHelper extends ServerHelper
|
|||
{
|
||||
AEColor col = player.myColor;
|
||||
|
||||
float r = (float) (0xff & (col.mediumVariant >> 16));
|
||||
float g = (float) (0xff & (col.mediumVariant >> 8));
|
||||
float b = (float) (0xff & (col.mediumVariant));
|
||||
float r = 0xff & (col.mediumVariant >> 16);
|
||||
float g = 0xff & (col.mediumVariant >> 8);
|
||||
float b = 0xff & (col.mediumVariant);
|
||||
GL11.glColor3f( r / 255.0f, g / 255.0f, b / 255.0f );
|
||||
}
|
||||
}
|
||||
|
@ -192,7 +191,7 @@ public class ClientHelper extends ServerHelper
|
|||
|
||||
RenderItem.renderInFrame = false;
|
||||
FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
|
||||
if ( !ForgeHooksClient.renderInventoryItem( blockRenderer, Minecraft.getMinecraft().renderEngine, itemstack, true, 0, (float) 0, (float) 0 ) )
|
||||
if ( !ForgeHooksClient.renderInventoryItem( blockRenderer, Minecraft.getMinecraft().renderEngine, itemstack, true, 0, 0, 0 ) )
|
||||
{
|
||||
itemRenderer.renderItemIntoGUI( fr, Minecraft.getMinecraft().renderEngine, itemstack, 0, 0, false );
|
||||
}
|
||||
|
@ -209,7 +208,7 @@ public class ClientHelper extends ServerHelper
|
|||
}
|
||||
|
||||
@Override
|
||||
public void postinit()
|
||||
public void postInit()
|
||||
{
|
||||
RenderingRegistry.registerBlockHandler( WorldRender.instance );
|
||||
RenderManager.instance.entityRenderMap.put( EntityTinyTNTPrimed.class, new RenderTinyTNTPrimed() );
|
||||
|
@ -281,7 +280,7 @@ public class ClientHelper extends ServerHelper
|
|||
{
|
||||
if ( Platform.isClient() )
|
||||
{
|
||||
List<EntityPlayer> o = new ArrayList();
|
||||
List<EntityPlayer> o = new ArrayList<EntityPlayer>();
|
||||
o.add( Minecraft.getMinecraft().thePlayer );
|
||||
return o;
|
||||
}
|
||||
|
@ -314,6 +313,7 @@ public class ClientHelper extends ServerHelper
|
|||
case LightningArc:
|
||||
spawnLightningArc( worldObj, posX, posY, posZ, (Vec3) o );
|
||||
return;
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -323,32 +323,32 @@ public class ClientHelper extends ServerHelper
|
|||
PacketAssemblerAnimation paa = (PacketAssemblerAnimation) o;
|
||||
|
||||
AssemblerFX fx = new AssemblerFX( Minecraft.getMinecraft().theWorld, posX, posY, posZ, 0.0D, 0.0D, 0.0D, paa.rate, paa.is );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
private void spawnVibrant(World w, double x, double y, double z)
|
||||
{
|
||||
if ( CommonHelper.proxy.shouldAddParticles( Platform.getRandom() ) )
|
||||
{
|
||||
double d0 = (double) (Platform.getRandomFloat() - 0.5F) * 0.26D;
|
||||
double d1 = (double) (Platform.getRandomFloat() - 0.5F) * 0.26D;
|
||||
double d2 = (double) (Platform.getRandomFloat() - 0.5F) * 0.26D;
|
||||
double d0 = (Platform.getRandomFloat() - 0.5F) * 0.26D;
|
||||
double d1 = (Platform.getRandomFloat() - 0.5F) * 0.26D;
|
||||
double d2 = (Platform.getRandomFloat() - 0.5F) * 0.26D;
|
||||
|
||||
VibrantFX fx = new VibrantFX( w, x + d0, y + d1, z + d2, 0.0D, 0.0D, 0.0D );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
}
|
||||
|
||||
private void spawnLightningArc(World worldObj, double posX, double posY, double posZ, Vec3 second)
|
||||
{
|
||||
LightningFX fx = new LightningArcFX( worldObj, posX, posY, posZ, second.xCoord, second.yCoord, second.zCoord, 0.0f, 0.0f, 0.0f );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
private void spawnLightning(World worldObj, double posX, double posY, double posZ)
|
||||
{
|
||||
LightningFX fx = new LightningFX( worldObj, posX, posY + 0.3f, posZ, 0.0f, 0.0f, 0.0f );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
private void spawnEnergy(World w, double posX, double posY, double posZ)
|
||||
|
@ -363,7 +363,7 @@ public class ClientHelper extends ServerHelper
|
|||
fx.motionY = -y * 0.1;
|
||||
fx.motionZ = -z * 0.1;
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
private void spawnCrafting(World w, double posX, double posY, double posZ)
|
||||
|
@ -378,7 +378,7 @@ public class ClientHelper extends ServerHelper
|
|||
fx.motionY = -y * 0.2;
|
||||
fx.motionZ = -z * 0.2;
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( (EntityFX) fx );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -127,7 +127,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
try
|
||||
{
|
||||
((AEBaseContainer) inventorySlots).setTargetStack( item );
|
||||
InventoryAction direction = wheel > 0 ? InventoryAction.ROLLDOWN : InventoryAction.ROLLUP;
|
||||
InventoryAction direction = wheel > 0 ? InventoryAction.ROLL_DOWN : InventoryAction.ROLL_UP;
|
||||
int times = Math.abs( wheel );
|
||||
for (int h = 0; h < times; h++)
|
||||
{
|
||||
|
@ -176,8 +176,8 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
ItemStack dbl_whichItem;
|
||||
Slot bl_clicked;
|
||||
|
||||
// dragy
|
||||
Set<Slot> drag_click = new HashSet();
|
||||
// drag y
|
||||
Set<Slot> drag_click = new HashSet<Slot>();
|
||||
|
||||
@Override
|
||||
protected void handleMouseClick(Slot slot, int slotIdx, int ctrlDown, int key)
|
||||
|
@ -187,7 +187,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
if ( slot instanceof SlotFake )
|
||||
{
|
||||
InventoryAction action = null;
|
||||
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN;
|
||||
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
|
||||
if ( drag_click.size() > 1 )
|
||||
return;
|
||||
|
@ -283,7 +283,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
switch (key)
|
||||
{
|
||||
case 0: // pickup / set-down.
|
||||
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN;
|
||||
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
break;
|
||||
case 1:
|
||||
action = ctrlDown == 1 ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
|
||||
|
@ -327,11 +327,11 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
switch (key)
|
||||
{
|
||||
case 0: // pickup / set-down.
|
||||
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACESINGLE : InventoryAction.PICKUP_OR_SETDOWN;
|
||||
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
stack = ((SlotME) slot).getAEStack();
|
||||
|
||||
if ( stack != null && action == InventoryAction.PICKUP_OR_SETDOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null )
|
||||
action = InventoryAction.AUTOCRAFT;
|
||||
if ( stack != null && action == InventoryAction.PICKUP_OR_SET_DOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null )
|
||||
action = InventoryAction.AUTO_CRAFT;
|
||||
|
||||
break;
|
||||
case 1:
|
||||
|
@ -343,7 +343,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
|
||||
stack = ((SlotME) slot).getAEStack();
|
||||
if ( stack != null && stack.isCraftable() )
|
||||
action = InventoryAction.AUTOCRAFT;
|
||||
action = InventoryAction.AUTO_CRAFT;
|
||||
|
||||
else if ( player.capabilities.isCreativeMode )
|
||||
{
|
||||
|
@ -394,11 +394,10 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
else if ( dbl_whichItem != null )
|
||||
{
|
||||
// a replica of the weird broken vanilla feature.
|
||||
Iterator iterator = this.inventorySlots.inventorySlots.iterator();
|
||||
|
||||
while (iterator.hasNext())
|
||||
for (Object inventorySlot : this.inventorySlots.inventorySlots)
|
||||
{
|
||||
Slot targetSlot = (Slot) iterator.next();
|
||||
Slot targetSlot = (Slot) inventorySlot;
|
||||
|
||||
if ( targetSlot != null && targetSlot.canTakeStack( this.mc.thePlayer ) && targetSlot.getHasStack()
|
||||
&& targetSlot.inventory == slot.inventory && Container.func_94527_a( targetSlot, dbl_whichItem, true ) )
|
||||
|
@ -414,6 +413,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
super.handleMouseClick( slot, slotIdx, ctrlDown, key );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClickMove(int x, int y, int c, long d)
|
||||
{
|
||||
Slot slot = this.getSlot( x, y );
|
||||
|
@ -428,7 +428,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
{
|
||||
for (Slot dr : drag_click)
|
||||
{
|
||||
PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SETDOWN : InventoryAction.PLACE_SINGLE,
|
||||
PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SET_DOWN : InventoryAction.PLACE_SINGLE,
|
||||
dr.slotNumber, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
|
@ -559,7 +559,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
|
||||
for (var6 = 0; var6 < var4.length; ++var6)
|
||||
{
|
||||
var7 = fontRendererObj.getStringWidth( (String) var4[var6] );
|
||||
var7 = fontRendererObj.getStringWidth( var4[var6] );
|
||||
|
||||
if ( var7 > var5 )
|
||||
{
|
||||
|
@ -601,7 +601,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
|
||||
for (int var13 = 0; var13 < var4.length; ++var13)
|
||||
{
|
||||
String var14 = (String) var4[var13];
|
||||
String var14 = var4[var13];
|
||||
|
||||
if ( var13 == 0 )
|
||||
{
|
||||
|
@ -724,14 +724,14 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
return false;
|
||||
}
|
||||
|
||||
protected Slot getSlot(int mousex, int mousey)
|
||||
protected Slot getSlot(int mouseX, int mouseY)
|
||||
{
|
||||
for (int j1 = 0; j1 < this.inventorySlots.inventorySlots.size(); ++j1)
|
||||
{
|
||||
Slot slot = (Slot) this.inventorySlots.inventorySlots.get( j1 );
|
||||
|
||||
// isPointInRegion
|
||||
if ( func_146978_c( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mousex, mousey ) )
|
||||
if ( func_146978_c( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mouseX, mouseY ) )
|
||||
{
|
||||
return slot;
|
||||
}
|
||||
|
@ -743,11 +743,11 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
protected static String join(Collection<?> s, String delimiter)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
Iterator iter = s.iterator();
|
||||
while (iter.hasNext())
|
||||
Iterator iterator = s.iterator();
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
builder.append( iter.next() );
|
||||
if ( !iter.hasNext() )
|
||||
builder.append( iterator.next() );
|
||||
if ( !iterator.hasNext() )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -758,16 +758,16 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
|
||||
boolean useNEI = false;
|
||||
|
||||
private RenderItem setItemRender(RenderItem aeri2)
|
||||
private RenderItem setItemRender(RenderItem item)
|
||||
{
|
||||
if ( AppEng.instance.isIntegrationEnabled( IntegrationType.NEI ) )
|
||||
{
|
||||
return ((INEI) AppEng.instance.getIntegration( IntegrationType.NEI )).setItemRender( aeri2 );
|
||||
return ((INEI) AppEng.instance.getIntegration( IntegrationType.NEI )).setItemRender( item );
|
||||
}
|
||||
else
|
||||
{
|
||||
RenderItem ri = itemRender;
|
||||
itemRender = aeri2;
|
||||
itemRender = item;
|
||||
return ri;
|
||||
}
|
||||
}
|
||||
|
@ -788,7 +788,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
}
|
||||
}
|
||||
|
||||
AppEngRenderItem aeri = new AppEngRenderItem();
|
||||
AppEngRenderItem aeRenderItem = new AppEngRenderItem();
|
||||
|
||||
protected boolean isPowered()
|
||||
{
|
||||
|
@ -809,7 +809,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
{
|
||||
if ( s instanceof SlotME )
|
||||
{
|
||||
RenderItem pIR = setItemRender( aeri );
|
||||
RenderItem pIR = setItemRender( aeRenderItem );
|
||||
try
|
||||
{
|
||||
this.zLevel = 100.0F;
|
||||
|
@ -826,9 +826,9 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
itemRender.zLevel = 0.0F;
|
||||
|
||||
if ( s instanceof SlotME )
|
||||
aeri.aestack = ((SlotME) s).getAEStack();
|
||||
aeRenderItem.aeStack = ((SlotME) s).getAEStack();
|
||||
else
|
||||
aeri.aestack = null;
|
||||
aeRenderItem.aeStack = null;
|
||||
|
||||
safeDrawSlot( s );
|
||||
}
|
||||
|
@ -876,14 +876,14 @@ public abstract class AEBaseGui extends GuiContainer
|
|||
float f1 = 0.00390625F;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA_F( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() );
|
||||
tessellator.addVertexWithUV( (double) (par1 + 0), (double) (par2 + par6), (double) this.zLevel, (double) ((float) (par3 + 0) * f),
|
||||
(double) ((float) (par4 + par6) * f1) );
|
||||
tessellator.addVertexWithUV( (double) (par1 + par5), (double) (par2 + par6), (double) this.zLevel,
|
||||
(double) ((float) (par3 + par5) * f), (double) ((float) (par4 + par6) * f1) );
|
||||
tessellator.addVertexWithUV( (double) (par1 + par5), (double) (par2 + 0), (double) this.zLevel,
|
||||
(double) ((float) (par3 + par5) * f), (double) ((float) (par4 + 0) * f1) );
|
||||
tessellator.addVertexWithUV( (double) (par1 + 0), (double) (par2 + 0), (double) this.zLevel, (double) ((float) (par3 + 0) * f),
|
||||
(double) ((float) (par4 + 0) * f1) );
|
||||
tessellator.addVertexWithUV( par1 + 0, par2 + par6, this.zLevel, (par3 + 0) * f,
|
||||
(par4 + par6) * f1 );
|
||||
tessellator.addVertexWithUV( par1 + par5, par2 + par6, this.zLevel,
|
||||
(par3 + par5) * f, (par4 + par6) * f1 );
|
||||
tessellator.addVertexWithUV( par1 + par5, par2 + 0, this.zLevel,
|
||||
(par3 + par5) * f, (par4 + 0) * f1 );
|
||||
tessellator.addVertexWithUV( par1 + 0, par2 + 0, this.zLevel, (par3 + 0) * f,
|
||||
(par4 + 0) * f1 );
|
||||
tessellator.setColorRGBA_F( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
tessellator.draw();
|
||||
}
|
||||
|
|
|
@ -18,11 +18,11 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
|||
super( container );
|
||||
}
|
||||
|
||||
public List<String> handleItemTooltip(ItemStack stack, int mousex, int mousey, List<String> currenttip)
|
||||
public List<String> handleItemTooltip(ItemStack stack, int mouseX, int mouseY, List<String> currentToolTip)
|
||||
{
|
||||
if ( stack != null )
|
||||
{
|
||||
Slot s = getSlot( mousex, mousey );
|
||||
Slot s = getSlot( mouseX, mouseY );
|
||||
if ( s instanceof SlotME )
|
||||
{
|
||||
int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999;
|
||||
|
@ -41,18 +41,18 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
|||
if ( myStack != null )
|
||||
{
|
||||
if ( myStack.getStackSize() > BigNumber || (myStack.getStackSize() > 1 && stack.isItemDamaged()) )
|
||||
currenttip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
|
||||
currentToolTip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
|
||||
|
||||
if ( myStack.getCountRequestable() > 0 )
|
||||
currenttip.add( "\u00a77Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
|
||||
currentToolTip.add( "\u00a77Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
|
||||
}
|
||||
else if ( stack.stackSize > BigNumber || (stack.stackSize > 1 && stack.isItemDamaged()) )
|
||||
{
|
||||
currenttip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) );
|
||||
currentToolTip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
return currenttip;
|
||||
return currentToolTip;
|
||||
}
|
||||
|
||||
// Vanilla version...
|
||||
|
@ -78,17 +78,17 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
|||
|
||||
if ( myStack != null )
|
||||
{
|
||||
List currenttip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||
List currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||
|
||||
if ( myStack.getStackSize() > BigNumber || (myStack.getStackSize() > 1 && stack.isItemDamaged()) )
|
||||
currenttip.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
|
||||
currentToolTip.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
|
||||
|
||||
if ( myStack.getCountRequestable() > 0 )
|
||||
currenttip.add( "Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
|
||||
currentToolTip.add( "Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
|
||||
|
||||
drawTooltip( x, y, 0, join( currenttip, "\n" ) );
|
||||
drawTooltip( x, y, 0, join( currentToolTip, "\n" ) );
|
||||
}
|
||||
else if ( stack != null && stack.stackSize > BigNumber )
|
||||
else if ( stack.stackSize > BigNumber )
|
||||
{
|
||||
List var4 = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||
var4.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) );
|
||||
|
|
|
@ -27,7 +27,7 @@ import appeng.util.Platform;
|
|||
public class GuiCellWorkbench extends GuiUpgradeable
|
||||
{
|
||||
|
||||
ContainerCellWorkbench ccwb;
|
||||
ContainerCellWorkbench workbench;
|
||||
TileCellWorkbench tcw;
|
||||
|
||||
GuiImgButton clear;
|
||||
|
@ -36,7 +36,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
|||
|
||||
public GuiCellWorkbench(InventoryPlayer inventoryPlayer, TileCellWorkbench te) {
|
||||
super( new ContainerCellWorkbench( inventoryPlayer, te ) );
|
||||
ccwb = (ContainerCellWorkbench) inventorySlots;
|
||||
workbench = (ContainerCellWorkbench) inventorySlots;
|
||||
ySize = 251;
|
||||
tcw = te;
|
||||
}
|
||||
|
@ -44,13 +44,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
|||
@Override
|
||||
protected boolean drawUpgrades()
|
||||
{
|
||||
return ccwb.availableUpgrades() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
super.initGui();
|
||||
return workbench.availableUpgrades() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -62,17 +56,17 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
|||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, ySize );
|
||||
if ( drawUpgrades() )
|
||||
{
|
||||
if ( ccwb.availableUpgrades() <= 8 )
|
||||
if ( workbench.availableUpgrades() <= 8 )
|
||||
{
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + ccwb.availableUpgrades() * 18 );
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY + (7 + (ccwb.availableUpgrades()) * 18), 177, 151, 35, 7 );
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + workbench.availableUpgrades() * 18 );
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY + (7 + (workbench.availableUpgrades()) * 18), 177, 151, 35, 7 );
|
||||
}
|
||||
else if ( ccwb.availableUpgrades() <= 16 )
|
||||
else if ( workbench.availableUpgrades() <= 16 )
|
||||
{
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + 8 * 18 );
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY + (7 + (8) * 18), 177, 151, 35, 7 );
|
||||
|
||||
int dx = ccwb.availableUpgrades() - 8;
|
||||
int dx = workbench.availableUpgrades() - 8;
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
|
||||
if ( dx == 8 )
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + (7 + (dx) * 18), 186, 151, 35 - 8, 7 );
|
||||
|
@ -88,7 +82,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
|||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + 8 * 18 );
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + (7 + (8) * 18), 186, 151, 35 - 8, 7 );
|
||||
|
||||
int dx = ccwb.availableUpgrades() - 16;
|
||||
int dx = workbench.availableUpgrades() - 16;
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
|
||||
if ( dx == 8 )
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY + (7 + (dx) * 18), 186, 151, 35 - 8, 7 );
|
||||
|
@ -148,12 +142,13 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
|||
buttonList.add( copyMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleButtonVisibility()
|
||||
{
|
||||
copyMode.setState( ccwb.copyMode == CopyMode.CLEAR_ON_REMOVE );
|
||||
copyMode.setState( workbench.copyMode == CopyMode.CLEAR_ON_REMOVE );
|
||||
|
||||
boolean hasFuzzy = false;
|
||||
IInventory inv = ccwb.getCellUpgradeInventory();
|
||||
IInventory inv = workbench.getCellUpgradeInventory();
|
||||
for (int x = 0; x < inv.getSizeInventory(); x++)
|
||||
{
|
||||
ItemStack is = inv.getStackInSlot( x );
|
||||
|
@ -166,11 +161,13 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
|||
fuzzyMode.setVisibility( hasFuzzy );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBackground()
|
||||
{
|
||||
return "guis/cellworkbench.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected GuiText getName()
|
||||
{
|
||||
return GuiText.CellWorkbench;
|
||||
|
|
|
@ -26,7 +26,8 @@ public class GuiCondenser extends AEBaseGui
|
|||
GuiProgressBar pb;
|
||||
GuiImgButton mode;
|
||||
|
||||
public GuiCondenser(InventoryPlayer inventoryPlayer, TileCondenser te) {
|
||||
public GuiCondenser(InventoryPlayer inventoryPlayer, TileCondenser te)
|
||||
{
|
||||
super( new ContainerCondenser( inventoryPlayer, te ) );
|
||||
cvc = (ContainerCondenser) inventorySlots;
|
||||
this.ySize = 197;
|
||||
|
@ -57,8 +58,7 @@ public class GuiCondenser extends AEBaseGui
|
|||
{
|
||||
super.initGui();
|
||||
|
||||
pb = new GuiProgressBar( "guis/condenser.png", 120 + guiLeft, 25 + guiTop, 178, 25, 6, 18, Direction.VERTICAL );
|
||||
pb.TitleName = GuiText.StoredEnergy.getLocal();
|
||||
pb = new GuiProgressBar( cvc, "guis/condenser.png", 120 + guiLeft, 25 + guiTop, 178, 25, 6, 18, Direction.VERTICAL, GuiText.StoredEnergy.getLocal() );
|
||||
|
||||
mode = new GuiImgButton( 128 + guiLeft, 52 + guiTop, Settings.CONDENSER_OUTPUT, cvc.output );
|
||||
|
||||
|
@ -83,8 +83,6 @@ public class GuiCondenser extends AEBaseGui
|
|||
mode.set( cvc.output );
|
||||
mode.FillVar = "" + cvc.output.requiredPower;
|
||||
|
||||
pb.max = (int) cvc.requiredEnergy;
|
||||
pb.current = (int) cvc.storedPower;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||
IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
|
||||
IItemList<IAEItemStack> missing = AEApi.instance().storage().createItemList();
|
||||
|
||||
List<IAEItemStack> visual = new ArrayList();
|
||||
List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
|
||||
|
||||
GuiBridge OriginalGui;
|
||||
|
||||
|
@ -84,7 +84,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||
|
||||
GuiButton cancel;
|
||||
GuiButton start;
|
||||
GuiButton selectcpu;
|
||||
GuiButton selectCPU;
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
|
@ -95,10 +95,10 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||
start.enabled = false;
|
||||
buttonList.add( start );
|
||||
|
||||
selectcpu = new GuiButton( 0, this.guiLeft + (219 - 180) / 2, this.guiTop + ySize - 68, 180, 20, GuiText.CraftingCPU.getLocal() + ": "
|
||||
selectCPU = new GuiButton( 0, this.guiLeft + (219 - 180) / 2, this.guiTop + ySize - 68, 180, 20, GuiText.CraftingCPU.getLocal() + ": "
|
||||
+ GuiText.Automatic );
|
||||
selectcpu.enabled = false;
|
||||
buttonList.add( selectcpu );
|
||||
selectCPU.enabled = false;
|
||||
buttonList.add( selectCPU );
|
||||
|
||||
if ( OriginalGui != null )
|
||||
cancel = new GuiButton( 0, this.guiLeft + 6, this.guiTop + ySize - 25, 50, 20, GuiText.Cancel.getLocal() );
|
||||
|
@ -123,7 +123,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||
if ( ccc.noCPU )
|
||||
btnTextText = GuiText.NoCraftingCPUs.getLocal();
|
||||
|
||||
selectcpu.displayString = btnTextText;
|
||||
selectCPU.displayString = btnTextText;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -133,7 +133,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if ( btn == selectcpu )
|
||||
if ( btn == selectCPU )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -251,12 +251,12 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||
|
||||
private IAEItemStack findVisualStack(IAEItemStack l)
|
||||
{
|
||||
Iterator<IAEItemStack> i = visual.iterator();
|
||||
while (i.hasNext())
|
||||
for (IAEItemStack o : visual)
|
||||
{
|
||||
IAEItemStack o = i.next();
|
||||
if ( o.equals( l ) )
|
||||
{
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
IAEItemStack stack = l.copy();
|
||||
|
@ -315,25 +315,25 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||
updateCPUButtonText();
|
||||
|
||||
start.enabled = ccc.noCPU || isSimulation() ? false : true;
|
||||
selectcpu.enabled = isSimulation() ? false : true;
|
||||
selectCPU.enabled = isSimulation() ? false : true;
|
||||
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
int gx = (width - xSize) / 2;
|
||||
int gy = (height - ySize) / 2;
|
||||
int yoff = 23;
|
||||
int offY = 23;
|
||||
|
||||
tooltip = -1;
|
||||
|
||||
for (int z = 0; z <= 4 * 5; z++)
|
||||
{
|
||||
int minX = gx + 9 + x * 67;
|
||||
int minY = gy + 22 + y * yoff;
|
||||
int minY = gy + 22 + y * offY;
|
||||
|
||||
if ( minX < mouse_x && minX + 67 > mouse_x )
|
||||
{
|
||||
if ( minY < mouse_y && minY + yoff - 2 > mouse_y )
|
||||
if ( minY < mouse_y && minY + offY - 2 > mouse_y )
|
||||
{
|
||||
tooltip = z;
|
||||
break;
|
||||
|
@ -382,7 +382,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||
int viewEnd = viewStart + 3 * rows;
|
||||
|
||||
String dspToolTip = "";
|
||||
List<String> lineList = new LinkedList();
|
||||
List<String> lineList = new LinkedList<String>();
|
||||
int toolPosX = 0;
|
||||
int toolPosY = 0;
|
||||
|
||||
|
@ -423,8 +423,8 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||
|
||||
str = GuiText.FromStorage.getLocal() + ": " + str;
|
||||
int w = 4 + fontRendererObj.getStringWidth( str );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - ((float) w * 0.5)) * 2), (int) ((y * offY + yo
|
||||
+ 6 - negY + downY) * 2), 4210752 );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
|
||||
+ 6 - negY + downY) * 2, 4210752 );
|
||||
|
||||
if ( tooltip == z - viewStart )
|
||||
lineList.add( GuiText.FromStorage.getLocal() + ": " + Long.toString( stored.getStackSize() ) );
|
||||
|
@ -442,8 +442,8 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||
|
||||
str = GuiText.Missing.getLocal() + ": " + str;
|
||||
int w = 4 + fontRendererObj.getStringWidth( str );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - ((float) w * 0.5)) * 2), (int) ((y * offY + yo
|
||||
+ 6 - negY + downY) * 2), 4210752 );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
|
||||
+ 6 - negY + downY) * 2, 4210752 );
|
||||
|
||||
if ( tooltip == z - viewStart )
|
||||
lineList.add( GuiText.Missing.getLocal() + ": " + Long.toString( missingStack.getStackSize() ) );
|
||||
|
@ -462,8 +462,8 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||
|
||||
str = GuiText.ToCraft.getLocal() + ": " + str;
|
||||
int w = 4 + fontRendererObj.getStringWidth( str );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - ((float) w * 0.5)) * 2), (int) ((y * offY + yo
|
||||
+ 6 - negY + downY) * 2), 4210752 );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
|
||||
+ 6 - negY + downY) * 2, 4210752 );
|
||||
|
||||
if ( tooltip == z - viewStart )
|
||||
lineList.add( GuiText.ToCraft.getLocal() + ": " + Long.toString( pendingStack.getStackSize() ) );
|
||||
|
|
|
@ -39,14 +39,14 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||
IItemList<IAEItemStack> active = AEApi.instance().storage().createItemList();
|
||||
IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
|
||||
|
||||
List<IAEItemStack> visual = new ArrayList();
|
||||
List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
|
||||
|
||||
public void clearItems()
|
||||
{
|
||||
storage = AEApi.instance().storage().createItemList();
|
||||
active = AEApi.instance().storage().createItemList();
|
||||
pending = AEApi.instance().storage().createItemList();
|
||||
visual = new ArrayList();
|
||||
visual = new ArrayList<IAEItemStack>();
|
||||
}
|
||||
|
||||
protected GuiCraftingCPU(ContainerCraftingCPU container) {
|
||||
|
@ -169,12 +169,12 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||
|
||||
private IAEItemStack findVisualStack(IAEItemStack l)
|
||||
{
|
||||
Iterator<IAEItemStack> i = visual.iterator();
|
||||
while (i.hasNext())
|
||||
for (IAEItemStack o : visual)
|
||||
{
|
||||
IAEItemStack o = i.next();
|
||||
if ( o.equals( l ) )
|
||||
{
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
IAEItemStack stack = l.copy();
|
||||
|
@ -223,18 +223,18 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||
|
||||
int gx = (width - xSize) / 2;
|
||||
int gy = (height - ySize) / 2;
|
||||
int yoff = 23;
|
||||
int offY = 23;
|
||||
|
||||
tooltip = -1;
|
||||
|
||||
for (int z = 0; z <= 4 * 5; z++)
|
||||
{
|
||||
int minX = gx + 9 + x * 67;
|
||||
int minY = gy + 22 + y * yoff;
|
||||
int minY = gy + 22 + y * offY;
|
||||
|
||||
if ( minX < mouse_x && minX + 67 > mouse_x )
|
||||
{
|
||||
if ( minY < mouse_y && minY + yoff - 2 > mouse_y )
|
||||
if ( minY < mouse_y && minY + offY - 2 > mouse_y )
|
||||
{
|
||||
tooltip = z;
|
||||
break;
|
||||
|
@ -269,7 +269,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||
int viewEnd = viewStart + 3 * 6;
|
||||
|
||||
String dspToolTip = "";
|
||||
List<String> lineList = new LinkedList();
|
||||
List<String> lineList = new LinkedList<String>();
|
||||
int toolPosX = 0;
|
||||
int toolPosY = 0;
|
||||
|
||||
|
@ -309,8 +309,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||
|
||||
str = GuiText.Stored.getLocal() + ": " + str;
|
||||
int w = 4 + fontRendererObj.getStringWidth( str );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - ((float) w * 0.5)) * 2), (int) ((y * offY + yo
|
||||
+ 6 - negY + downY) * 2), 4210752 );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
|
||||
+ 6 - negY + downY) * 2, 4210752 );
|
||||
|
||||
if ( tooltip == z - viewStart )
|
||||
lineList.add( GuiText.Stored.getLocal() + ": " + Long.toString( stored.getStackSize() ) );
|
||||
|
@ -328,8 +328,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||
|
||||
str = GuiText.Crafting.getLocal() + ": " + str;
|
||||
int w = 4 + fontRendererObj.getStringWidth( str );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - ((float) w * 0.5)) * 2), (int) ((y * offY + yo
|
||||
+ 6 - negY + downY) * 2), 4210752 );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
|
||||
+ 6 - negY + downY) * 2, 4210752 );
|
||||
|
||||
if ( tooltip == z - viewStart )
|
||||
lineList.add( GuiText.Crafting.getLocal() + ": " + Long.toString( activeStack.getStackSize() ) );
|
||||
|
@ -347,8 +347,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||
|
||||
str = GuiText.Scheduled.getLocal() + ": " + str;
|
||||
int w = 4 + fontRendererObj.getStringWidth( str );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - ((float) w * 0.5)) * 2), (int) ((y * offY + yo
|
||||
+ 6 - negY + downY) * 2), 4210752 );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
|
||||
+ 6 - negY + downY) * 2, 4210752 );
|
||||
|
||||
if ( tooltip == z - viewStart )
|
||||
lineList.add( GuiText.Scheduled.getLocal() + ": " + Long.toString( pendingStack.getStackSize() ) );
|
||||
|
|
|
@ -30,7 +30,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
|||
{
|
||||
|
||||
ContainerCraftingStatus ccc;
|
||||
GuiButton selectcpu;
|
||||
GuiButton selectCPU;
|
||||
|
||||
GuiTabButton originalGuiBtn;
|
||||
GuiBridge OriginalGui;
|
||||
|
@ -74,7 +74,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
|||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if ( btn == selectcpu )
|
||||
if ( btn == selectCPU )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -110,9 +110,9 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
|||
{
|
||||
super.initGui();
|
||||
|
||||
selectcpu = new GuiButton( 0, this.guiLeft + 8, this.guiTop + ySize - 25, 150, 20, GuiText.CraftingCPU.getLocal() + ": " + GuiText.NoCraftingCPUs );
|
||||
// selectcpu.enabled = false;
|
||||
buttonList.add( selectcpu );
|
||||
selectCPU = new GuiButton( 0, this.guiLeft + 8, this.guiTop + ySize - 25, 150, 20, GuiText.CraftingCPU.getLocal() + ": " + GuiText.NoCraftingCPUs );
|
||||
// selectCPU.enabled = false;
|
||||
buttonList.add( selectCPU );
|
||||
|
||||
if ( myIcon != null )
|
||||
{
|
||||
|
@ -139,7 +139,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
|||
if ( ccc.noCPU )
|
||||
btnTextText = GuiText.NoCraftingJobs.getLocal();
|
||||
|
||||
selectcpu.displayString = btnTextText;
|
||||
selectCPU.displayString = btnTextText;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -67,6 +67,7 @@ public class GuiCraftingTerm extends GuiMEMonitorable
|
|||
reservedSpace = 73;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBackground()
|
||||
{
|
||||
return "guis/crafting.png";
|
||||
|
|
|
@ -26,12 +26,6 @@ public class GuiFormationPlane extends GuiUpgradeable
|
|||
this.ySize = 251;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
super.drawBG( offsetX, offsetY, mouseX, mouseY );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
|
@ -70,6 +64,7 @@ public class GuiFormationPlane extends GuiUpgradeable
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBackground()
|
||||
{
|
||||
return "guis/storagebus.png";
|
||||
|
|
|
@ -88,6 +88,7 @@ public class GuiIOPort extends GuiUpgradeable
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBackground()
|
||||
{
|
||||
return "guis/ioport.png";
|
||||
|
|
|
@ -15,7 +15,8 @@ public class GuiInscriber extends AEBaseGui
|
|||
ContainerInscriber cvc;
|
||||
GuiProgressBar pb;
|
||||
|
||||
public GuiInscriber(InventoryPlayer inventoryPlayer, TileInscriber te) {
|
||||
public GuiInscriber(InventoryPlayer inventoryPlayer, TileInscriber te)
|
||||
{
|
||||
super( new ContainerInscriber( inventoryPlayer, te ) );
|
||||
cvc = (ContainerInscriber) inventorySlots;
|
||||
this.ySize = 176;
|
||||
|
@ -27,7 +28,7 @@ public class GuiInscriber extends AEBaseGui
|
|||
{
|
||||
super.initGui();
|
||||
|
||||
pb = new GuiProgressBar( "guis/inscriber.png", 135, 39, 135, 177, 6, 18, Direction.VERTICAL );
|
||||
pb = new GuiProgressBar( cvc, "guis/inscriber.png", 135, 39, 135, 177, 6, 18, Direction.VERTICAL );
|
||||
this.buttonList.add( pb );
|
||||
}
|
||||
|
||||
|
@ -49,9 +50,7 @@ public class GuiInscriber extends AEBaseGui
|
|||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
pb.max = cvc.maxProcessingTime;
|
||||
pb.current = cvc.processingTime;
|
||||
pb.FullMsg = (pb.current * 100 / pb.max) + "%";
|
||||
pb.setFullMsg( cvc.getCurrentProgress() * 100 / cvc.getMaxProgress() + "%" );
|
||||
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.Inscriber.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
|
|
|
@ -81,6 +81,7 @@ public class GuiInterface extends GuiUpgradeable
|
|||
buttonList.add( interfaceMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBackground()
|
||||
{
|
||||
return "guis/interface.png";
|
||||
|
|
|
@ -25,11 +25,11 @@ import com.google.common.collect.HashMultimap;
|
|||
public class GuiInterfaceTerminal extends AEBaseGui
|
||||
{
|
||||
|
||||
HashMap<Long, ClientDCInternalInv> byId = new HashMap();
|
||||
HashMap<Long, ClientDCInternalInv> byId = new HashMap<Long, ClientDCInternalInv>();
|
||||
HashMultimap<String, ClientDCInternalInv> byName = HashMultimap.create();
|
||||
ArrayList<String> names = new ArrayList();
|
||||
ArrayList<String> names = new ArrayList<String>();
|
||||
|
||||
ArrayList<Object> lines = new ArrayList();
|
||||
ArrayList<Object> lines = new ArrayList<Object>();
|
||||
|
||||
private int getTotalRows()
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||
ySize = 222;
|
||||
}
|
||||
|
||||
LinkedList<SlotDisconnected> dcSlots = new LinkedList();
|
||||
LinkedList<SlotDisconnected> dcSlots = new LinkedList<SlotDisconnected>();
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
|
@ -178,17 +178,17 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||
|
||||
Collections.sort( names );
|
||||
|
||||
lines = new ArrayList( getTotalRows() );
|
||||
lines = new ArrayList<Object>( getTotalRows() );
|
||||
for (String n : names)
|
||||
{
|
||||
lines.add( n );
|
||||
|
||||
ArrayList<ClientDCInternalInv> lset = new ArrayList();
|
||||
lset.addAll( byName.get( n ) );
|
||||
ArrayList<ClientDCInternalInv> clientInventories = new ArrayList<ClientDCInternalInv>();
|
||||
clientInventories.addAll( byName.get( n ) );
|
||||
|
||||
Collections.sort( lset );
|
||||
Collections.sort( clientInventories );
|
||||
|
||||
for (ClientDCInternalInv i : lset)
|
||||
for (ClientDCInternalInv i : clientInventories)
|
||||
{
|
||||
lines.add( i );
|
||||
}
|
||||
|
|
|
@ -148,6 +148,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleButtonVisibility()
|
||||
{
|
||||
craftingMode.setVisibility( bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 );
|
||||
|
@ -226,11 +227,13 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
|||
level.drawTextBox();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBackground()
|
||||
{
|
||||
return "guis/lvlemitter.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected GuiText getName()
|
||||
{
|
||||
return GuiText.LevelEmitter;
|
||||
|
|
|
@ -13,7 +13,7 @@ import appeng.tile.crafting.TileMolecularAssembler;
|
|||
public class GuiMAC extends GuiUpgradeable
|
||||
{
|
||||
|
||||
ContainerMAC cmac;
|
||||
ContainerMAC container;
|
||||
GuiProgressBar pb;
|
||||
|
||||
@Override
|
||||
|
@ -21,7 +21,7 @@ public class GuiMAC extends GuiUpgradeable
|
|||
{
|
||||
super.initGui();
|
||||
|
||||
pb = new GuiProgressBar( "guis/mac.png", 139, 36, 148, 201, 6, 18, Direction.VERTICAL );
|
||||
pb = new GuiProgressBar( container, "guis/mac.png", 139, 36, 148, 201, 6, 18, Direction.VERTICAL );
|
||||
this.buttonList.add( pb );
|
||||
}
|
||||
|
||||
|
@ -36,10 +36,7 @@ public class GuiMAC extends GuiUpgradeable
|
|||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
pb.max = 100;
|
||||
pb.current = cmac.craftProgress;
|
||||
pb.FullMsg = pb.current + "%";
|
||||
|
||||
pb.setFullMsg( container.getCurrentProgress() + "%" );
|
||||
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
||||
}
|
||||
|
||||
|
@ -50,17 +47,20 @@ public class GuiMAC extends GuiUpgradeable
|
|||
buttonList.add( redstoneMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBackground()
|
||||
{
|
||||
return "guis/mac.png";
|
||||
}
|
||||
|
||||
public GuiMAC(InventoryPlayer inventoryPlayer, TileMolecularAssembler te) {
|
||||
public GuiMAC(InventoryPlayer inventoryPlayer, TileMolecularAssembler te)
|
||||
{
|
||||
super( new ContainerMAC( inventoryPlayer, te ) );
|
||||
this.ySize = 197;
|
||||
this.cmac = (ContainerMAC) this.inventorySlots;
|
||||
this.container = (ContainerMAC) this.inventorySlots;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected GuiText getName()
|
||||
{
|
||||
return GuiText.MolecularAssembler;
|
||||
|
|
|
@ -62,7 +62,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||
|
||||
GuiText myName;
|
||||
|
||||
int xoffset = 9;
|
||||
int offsetX = 9;
|
||||
int perRow = 9;
|
||||
int reservedSpace = 0;
|
||||
int lowerTextureOffset = 0;
|
||||
|
@ -83,7 +83,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||
boolean viewCell;
|
||||
|
||||
ItemStack myCurrentViewCells[] = new ItemStack[5];
|
||||
ContainerMEMonitorable mecontainer;
|
||||
ContainerMEMonitorable monitorableContainer;
|
||||
|
||||
public GuiMEMonitorable(InventoryPlayer inventoryPlayer, ITerminalHost te) {
|
||||
this( inventoryPlayer, te, new ContainerMEMonitorable( inventoryPlayer, te ) );
|
||||
|
@ -104,7 +104,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||
standardSize = xSize;
|
||||
|
||||
configSrc = ((IConfigurableObject) inventorySlots).getConfigManager();
|
||||
(mecontainer = (ContainerMEMonitorable) inventorySlots).gui = this;
|
||||
(monitorableContainer = (ContainerMEMonitorable) inventorySlots).gui = this;
|
||||
|
||||
viewCell = te instanceof IViewCellStorage;
|
||||
|
||||
|
@ -180,7 +180,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||
{
|
||||
for (int x = 0; x < perRow; x++)
|
||||
{
|
||||
meSlots.add( new InternalSlotME( repo, x + y * perRow, xoffset + x * 18, 18 + y * 18 ) );
|
||||
meSlots.add( new InternalSlotME( repo, x + y * perRow, offsetX + x * 18, 18 + y * 18 ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||
this.ySize = magicNumber + rows * 18 + reservedSpace;
|
||||
// this.guiTop = top;
|
||||
int unusedSpace = height - ySize;
|
||||
guiTop = (int) Math.floor( (float) unusedSpace / (unusedSpace < 0 ? 3.8f : 2.0f) );
|
||||
guiTop = (int) Math.floor( unusedSpace / (unusedSpace < 0 ? 3.8f : 2.0f) );
|
||||
|
||||
int offset = guiTop + 8;
|
||||
|
||||
|
@ -226,7 +226,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||
.getSetting( Settings.TERMINAL_STYLE ) ) );
|
||||
}
|
||||
|
||||
searchField = new MEGuiTextField( fontRendererObj, this.guiLeft + Math.max( 82, xoffset ), this.guiTop + 6, 89, fontRendererObj.FONT_HEIGHT );
|
||||
searchField = new MEGuiTextField( fontRendererObj, this.guiLeft + Math.max( 82, offsetX ), this.guiTop + 6, 89, fontRendererObj.FONT_HEIGHT );
|
||||
searchField.setEnableBackgroundDrawing( false );
|
||||
searchField.setMaxStringLength( 25 );
|
||||
searchField.setTextColor( 0xFFFFFF );
|
||||
|
@ -373,7 +373,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||
@Override
|
||||
public void updateScreen()
|
||||
{
|
||||
repo.setPower( mecontainer.hasPower );
|
||||
repo.setPower( monitorableContainer.hasPower );
|
||||
super.updateScreen();
|
||||
}
|
||||
|
||||
|
@ -399,10 +399,10 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
if ( myCurrentViewCells[i] != mecontainer.cellView[i].getStack() )
|
||||
if ( myCurrentViewCells[i] != monitorableContainer.cellView[i].getStack() )
|
||||
{
|
||||
update = true;
|
||||
myCurrentViewCells[i] = mecontainer.cellView[i].getStack();
|
||||
myCurrentViewCells[i] = monitorableContainer.cellView[i].getStack();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -459,6 +459,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||
repo.updateView();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isPowered()
|
||||
{
|
||||
return repo.hasPower();
|
||||
|
|
|
@ -171,7 +171,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
|||
str = Long.toString( refStack.getStackSize() / 1000 ) + "k";
|
||||
|
||||
int w = fontRendererObj.getStringWidth( str );
|
||||
fontRendererObj.drawString( str, (int) ((x * sectionLength + xo + sectionLength - 19 - ((float) w * 0.5)) * 2), (int) ((y * 18 + yo + 6) * 2),
|
||||
fontRendererObj.drawString( str, (int) ((x * sectionLength + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * 18 + yo + 6) * 2,
|
||||
4210752 );
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
@ -213,11 +213,11 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
|||
}
|
||||
|
||||
// @Override - NEI
|
||||
public List<String> handleItemTooltip(ItemStack stack, int mousex, int mousey, List<String> currenttip)
|
||||
public List<String> handleItemTooltip(ItemStack stack, int mouseX, int mouseY, List<String> currentToolTip)
|
||||
{
|
||||
if ( stack != null )
|
||||
{
|
||||
Slot s = getSlot( mousex, mousey );
|
||||
Slot s = getSlot( mouseX, mouseY );
|
||||
if ( s instanceof SlotME )
|
||||
{
|
||||
IAEItemStack myStack = null;
|
||||
|
@ -233,13 +233,13 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
|||
|
||||
if ( myStack != null )
|
||||
{
|
||||
while (currenttip.size() > 1)
|
||||
currenttip.remove( 1 );
|
||||
while (currentToolTip.size() > 1)
|
||||
currentToolTip.remove( 1 );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return currenttip;
|
||||
return currentToolTip;
|
||||
}
|
||||
|
||||
// Vanilla version...
|
||||
|
@ -261,15 +261,15 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
|||
|
||||
if ( myStack != null )
|
||||
{
|
||||
List currenttip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||
List currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||
|
||||
while (currenttip.size() > 1)
|
||||
currenttip.remove( 1 );
|
||||
while (currentToolTip.size() > 1)
|
||||
currentToolTip.remove( 1 );
|
||||
|
||||
currenttip.add( GuiText.Installed.getLocal() + ": " + (myStack.getStackSize()) );
|
||||
currenttip.add( GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( myStack.getCountRequestable(), true ) );
|
||||
currentToolTip.add( GuiText.Installed.getLocal() + ": " + (myStack.getStackSize()) );
|
||||
currentToolTip.add( GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( myStack.getCountRequestable(), true ) );
|
||||
|
||||
drawTooltip( x, y, 0, join( currenttip, "\n" ) );
|
||||
drawTooltip( x, y, 0, join( currentToolTip, "\n" ) );
|
||||
}
|
||||
}
|
||||
// super.drawItemStackTooltip( stack, x, y );
|
||||
|
|
|
@ -83,6 +83,7 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
|||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void repositionSlot(AppEngSlot s)
|
||||
{
|
||||
if ( s.isPlayerSide() )
|
||||
|
@ -97,6 +98,7 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
|||
reservedSpace = 81;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBackground()
|
||||
{
|
||||
if ( container.craftingMode )
|
||||
|
|
|
@ -73,7 +73,7 @@ public class GuiPriority extends AEBaseGui
|
|||
if ( target instanceof PartFormationPlane )
|
||||
{
|
||||
myIcon = AEApi.instance().parts().partFormationPlane.stack( 1 );
|
||||
OriginalGui = GuiBridge.GUI_FPLANE;
|
||||
OriginalGui = GuiBridge.GUI_FORMATION_PLANE;
|
||||
}
|
||||
|
||||
if ( target instanceof TileDrive )
|
||||
|
|
|
@ -50,6 +50,7 @@ public class GuiSecurity extends GuiMEMonitorable
|
|||
.getUnlocalizedName(), SecurityPermissions.SECURITY.getUnlocalizedTip() ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(net.minecraft.client.gui.GuiButton btn)
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
@ -79,8 +80,9 @@ public class GuiSecurity extends GuiMEMonitorable
|
|||
}
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBackground()
|
||||
{
|
||||
ContainerSecurity cs = (ContainerSecurity) inventorySlots;
|
||||
|
|
|
@ -17,13 +17,13 @@ import appeng.util.Platform;
|
|||
public class GuiSpatialIOPort extends AEBaseGui
|
||||
{
|
||||
|
||||
ContainerSpatialIOPort csiop;
|
||||
ContainerSpatialIOPort container;
|
||||
GuiImgButton units;
|
||||
|
||||
public GuiSpatialIOPort(InventoryPlayer inventoryPlayer, TileSpatialIOPort te) {
|
||||
super( new ContainerSpatialIOPort( inventoryPlayer, te ) );
|
||||
this.ySize = 199;
|
||||
csiop = (ContainerSpatialIOPort) inventorySlots;
|
||||
container = (ContainerSpatialIOPort) inventorySlots;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -59,10 +59,10 @@ public class GuiSpatialIOPort extends AEBaseGui
|
|||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( csiop.currentPower, false ), 13, 21, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( csiop.maxPower, false ), 13, 31, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.RequiredPower.getLocal() + ": " + Platform.formatPowerLong( csiop.reqPower, false ), 13, 78, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.Efficiency.getLocal() + ": " + (((float) csiop.eff) / 100) + "%", 13, 88, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( container.currentPower, false ), 13, 21, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( container.maxPower, false ), 13, 31, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.RequiredPower.getLocal() + ": " + Platform.formatPowerLong( container.reqPower, false ), 13, 78, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.Efficiency.getLocal() + ": " + (((float) container.eff) / 100) + "%", 13, 88, 4210752 );
|
||||
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.SpatialIOPort.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96, 4210752 );
|
||||
|
|
|
@ -38,12 +38,6 @@ public class GuiStorageBus extends GuiUpgradeable
|
|||
this.ySize = 251;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
super.drawBG( offsetX, offsetY, mouseX, mouseY );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
|
@ -96,9 +90,6 @@ public class GuiStorageBus extends GuiUpgradeable
|
|||
else if ( btn == priority )
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||
|
||||
else if ( btn == fuzzyMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( fuzzyMode.getSetting(), backwards ) );
|
||||
|
||||
else if ( btn == rwMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( rwMode.getSetting(), backwards ) );
|
||||
|
||||
|
@ -112,6 +103,7 @@ public class GuiStorageBus extends GuiUpgradeable
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBackground()
|
||||
{
|
||||
return "guis/storagebus.png";
|
||||
|
|
|
@ -38,7 +38,7 @@ public class GuiUpgradeable extends AEBaseGui
|
|||
|
||||
public GuiUpgradeable(ContainerUpgradeable te) {
|
||||
super( te );
|
||||
cvb = (ContainerUpgradeable) te;
|
||||
cvb = te;
|
||||
|
||||
bc = (IUpgradeableHost) te.getTarget();
|
||||
this.xSize = hasToolbox() ? 246 : 211;
|
||||
|
|
|
@ -17,7 +17,8 @@ public class GuiVibrationChamber extends AEBaseGui
|
|||
ContainerVibrationChamber cvc;
|
||||
GuiProgressBar pb;
|
||||
|
||||
public GuiVibrationChamber(InventoryPlayer inventoryPlayer, TileVibrationChamber te) {
|
||||
public GuiVibrationChamber(InventoryPlayer inventoryPlayer, TileVibrationChamber te)
|
||||
{
|
||||
super( new ContainerVibrationChamber( inventoryPlayer, te ) );
|
||||
cvc = (ContainerVibrationChamber) inventorySlots;
|
||||
this.ySize = 166;
|
||||
|
@ -28,7 +29,7 @@ public class GuiVibrationChamber extends AEBaseGui
|
|||
{
|
||||
super.initGui();
|
||||
|
||||
pb = new GuiProgressBar( "guis/vibchamber.png", 99, 36, 176, 14, 6, 18, Direction.VERTICAL );
|
||||
pb = new GuiProgressBar( cvc, "guis/vibchamber.png", 99, 36, 176, 14, 6, 18, Direction.VERTICAL );
|
||||
this.buttonList.add( pb );
|
||||
}
|
||||
|
||||
|
@ -50,13 +51,11 @@ public class GuiVibrationChamber extends AEBaseGui
|
|||
int k = 25;
|
||||
int l = -15;
|
||||
|
||||
pb.max = 200;
|
||||
pb.current = cvc.burnProgress > 0 ? cvc.burnSpeed : 0;
|
||||
pb.FullMsg = (cvc.aePerTick * pb.current / 100) + " ae/t";
|
||||
pb.setFullMsg( cvc.aePerTick * cvc.getCurrentProgress() / 100 + " ae/t" );
|
||||
|
||||
if ( cvc.burnProgress > 0 )
|
||||
if ( cvc.getCurrentProgress() > 0 )
|
||||
{
|
||||
int i1 = cvc.burnProgress;
|
||||
int i1 = cvc.getCurrentProgress();
|
||||
bindTexture( "guis/vibchamber.png" );
|
||||
GL11.glColor3f( 1, 1, 1 );
|
||||
this.drawTexturedModalRect( k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2 );
|
||||
|
|
|
@ -64,13 +64,13 @@ public class GuiWireless extends AEBaseGui
|
|||
|
||||
if ( cw.range > 0 )
|
||||
{
|
||||
String msga = GuiText.Range.getLocal() + ": " + ((double) cw.range / 10.0) + " m";
|
||||
String msgb = GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( cw.drain, true );
|
||||
String firstMessage = GuiText.Range.getLocal() + ": " + (cw.range / 10.0) + " m";
|
||||
String secondMessage = GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( cw.drain, true );
|
||||
|
||||
int strWidth = Math.max( fontRendererObj.getStringWidth( msga ), fontRendererObj.getStringWidth( msgb ) );
|
||||
int strWidth = Math.max( fontRendererObj.getStringWidth( firstMessage ), fontRendererObj.getStringWidth( secondMessage ) );
|
||||
int cOffset = (this.xSize / 2) - (strWidth / 2);
|
||||
fontRendererObj.drawString( msga, cOffset, 20, 4210752 );
|
||||
fontRendererObj.drawString( msgb, cOffset, 20 + 12, 4210752 );
|
||||
fontRendererObj.drawString( firstMessage, cOffset, 20, 4210752 );
|
||||
fontRendererObj.drawString( secondMessage, cOffset, 20 + 12, 4210752 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,11 +53,15 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
EnumPair d = (EnumPair) obj;
|
||||
return d.setting.equals( setting ) && d.value.equals( value );
|
||||
if ( obj == null )
|
||||
return false;
|
||||
if ( getClass() != obj.getClass() )
|
||||
return false;
|
||||
EnumPair other = (EnumPair) obj;
|
||||
return other.setting.equals( setting ) && other.value.equals( value );
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
class BtnAppearance
|
||||
{
|
||||
|
@ -65,7 +69,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||
public int index;
|
||||
public String DisplayName;
|
||||
public String DisplayValue;
|
||||
};
|
||||
}
|
||||
|
||||
public boolean halfSize = false;
|
||||
public String FillVar;
|
||||
|
@ -101,7 +105,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||
|
||||
if ( Appearances == null )
|
||||
{
|
||||
Appearances = new HashMap();
|
||||
Appearances = new HashMap<EnumPair, BtnAppearance>();
|
||||
registerApp( 16 * 7 + 0, Settings.CONDENSER_OUTPUT, CondenserOutput.TRASH, ButtonToolTips.CondenserOutput, ButtonToolTips.Trash );
|
||||
registerApp( 16 * 7 + 1, Settings.CONDENSER_OUTPUT, CondenserOutput.MATTER_BALLS, ButtonToolTips.CondenserOutput, ButtonToolTips.MatterBalls );
|
||||
registerApp( 16 * 7 + 2, Settings.CONDENSER_OUTPUT, CondenserOutput.SINGULARITY, ButtonToolTips.CondenserOutput, ButtonToolTips.Singularity );
|
||||
|
|
|
@ -3,6 +3,7 @@ package appeng.client.gui.widgets;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import appeng.container.interfaces.IProgressProvider;
|
||||
import appeng.core.localization.GuiText;
|
||||
|
||||
public class GuiProgressBar extends GuiButton implements ITooltip
|
||||
|
@ -11,31 +12,35 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
|||
public enum Direction
|
||||
{
|
||||
HORIZONTAL, VERTICAL
|
||||
};
|
||||
}
|
||||
|
||||
private IProgressProvider source;
|
||||
private ResourceLocation texture;
|
||||
private int fill_u;
|
||||
private int fill_v;
|
||||
private Direction layout;
|
||||
|
||||
public String FullMsg;
|
||||
private String fullMsg;
|
||||
private final String titleName;
|
||||
|
||||
public String TitleName;
|
||||
public int current;
|
||||
public int max;
|
||||
public GuiProgressBar(IProgressProvider source, String texture, int posX, int posY, int u, int y, int _width, int _height, Direction dir)
|
||||
{
|
||||
this( source, texture, posX, posY, u, y, _width, _height, dir, null );
|
||||
}
|
||||
|
||||
public GuiProgressBar(String string, int posX, int posY, int u, int y, int _width, int _height, Direction dir) {
|
||||
public GuiProgressBar(IProgressProvider source, String texture, int posX, int posY, int u, int y, int _width, int _height, Direction dir, String title)
|
||||
{
|
||||
super( posX, posY, _width, "" );
|
||||
this.source = source;
|
||||
this.xPosition = posX;
|
||||
this.yPosition = posY;
|
||||
texture = new ResourceLocation( "appliedenergistics2", "textures/" + string );
|
||||
this.texture = new ResourceLocation( "appliedenergistics2", "textures/" + texture );
|
||||
width = _width;
|
||||
height = _height;
|
||||
fill_u = u;
|
||||
fill_v = y;
|
||||
current = 0;
|
||||
max = 100;
|
||||
layout = dir;
|
||||
titleName = title;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -44,6 +49,8 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
|||
if ( this.visible )
|
||||
{
|
||||
par1Minecraft.getTextureManager().bindTexture( texture );
|
||||
int max = source.getMaxProgress();
|
||||
int current = source.getCurrentProgress();
|
||||
|
||||
if ( layout == Direction.VERTICAL )
|
||||
{
|
||||
|
@ -60,13 +67,18 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
|||
}
|
||||
}
|
||||
|
||||
public void setFullMsg(String msg)
|
||||
{
|
||||
this.fullMsg = msg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMsg()
|
||||
{
|
||||
if ( FullMsg != null )
|
||||
return FullMsg;
|
||||
if ( fullMsg != null )
|
||||
return fullMsg;
|
||||
|
||||
return (TitleName != null ? TitleName : "") + "\n" + current + " " + GuiText.Of.getLocal() + " " + max;
|
||||
return (titleName != null ? titleName : "") + "\n" + source.getCurrentProgress() + " " + GuiText.Of.getLocal() + " " + source.getMaxProgress();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -122,9 +122,9 @@ public class ItemRepo
|
|||
view.ensureCapacity( list.size() );
|
||||
dsp.ensureCapacity( list.size() );
|
||||
|
||||
Enum vmode = sortSrc.getSortDisplay();
|
||||
Enum mode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||
if ( mode == SearchBoxMode.NEI_AUTOSEARCH || mode == SearchBoxMode.NEI_MANUAL_SEARCH )
|
||||
Enum viewMode = sortSrc.getSortDisplay();
|
||||
Enum searchMode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||
if ( searchMode == SearchBoxMode.NEI_AUTOSEARCH || searchMode == SearchBoxMode.NEI_MANUAL_SEARCH )
|
||||
updateNEI( searchString );
|
||||
|
||||
innerSearch = searchString;
|
||||
|
@ -164,16 +164,16 @@ public class ItemRepo
|
|||
continue;
|
||||
}
|
||||
|
||||
if ( vmode == ViewItems.CRAFTABLE && !is.isCraftable() )
|
||||
if ( viewMode == ViewItems.CRAFTABLE && !is.isCraftable() )
|
||||
continue;
|
||||
|
||||
if ( vmode == ViewItems.CRAFTABLE )
|
||||
if ( viewMode == ViewItems.CRAFTABLE )
|
||||
{
|
||||
is = is.copy();
|
||||
is.setStackSize( 0 );
|
||||
}
|
||||
|
||||
if ( vmode == ViewItems.STORED && is.getStackSize() == 0 )
|
||||
if ( viewMode == ViewItems.STORED && is.getStackSize() == 0 )
|
||||
continue;
|
||||
|
||||
String dspName = searchMod ? Platform.getModId( is ) : Platform.getItemDisplayName( is );
|
||||
|
|
|
@ -14,7 +14,7 @@ import appeng.core.AEConfig;
|
|||
public class AppEngRenderItem extends RenderItem
|
||||
{
|
||||
|
||||
public IAEItemStack aestack;
|
||||
public IAEItemStack aeStack;
|
||||
|
||||
private void renderQuad(Tessellator par1Tessellator, int par2, int par3, int par4, int par5, int par6)
|
||||
{
|
||||
|
@ -30,7 +30,7 @@ public class AppEngRenderItem extends RenderItem
|
|||
@Override
|
||||
public void renderItemOverlayIntoGUI(FontRenderer par1FontRenderer, TextureManager par2RenderEngine, ItemStack par3ItemStack, int par4, int par5)
|
||||
{
|
||||
this.renderItemOverlayIntoGUI( par1FontRenderer, par2RenderEngine, par3ItemStack, par4, par5, (String) null );
|
||||
this.renderItemOverlayIntoGUI( par1FontRenderer, par2RenderEngine, par3ItemStack, par4, par5, null );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -83,7 +83,7 @@ public class AppEngRenderItem extends RenderItem
|
|||
GL11.glEnable( GL11.GL_DEPTH_TEST );
|
||||
}
|
||||
|
||||
long amount = aestack != null ? aestack.getStackSize() : is.stackSize;
|
||||
long amount = aeStack != null ? aeStack.getStackSize() : is.stackSize;
|
||||
if ( amount > 999999999999L )
|
||||
amount = 999999999999L;
|
||||
|
||||
|
|
|
@ -255,9 +255,9 @@ public class BaseBlockRender
|
|||
this( false, 20 );
|
||||
}
|
||||
|
||||
public BaseBlockRender(boolean enableTESR, double TESRrange) {
|
||||
public BaseBlockRender(boolean enableTESR, double tileEntitySpecialRendererRange) {
|
||||
hasTESR = enableTESR;
|
||||
MAX_DISTANCE = TESRrange;
|
||||
MAX_DISTANCE = tileEntitySpecialRendererRange;
|
||||
setOriMap();
|
||||
}
|
||||
|
||||
|
@ -587,52 +587,52 @@ public class BaseBlockRender
|
|||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
double offsetX = 0.0, offsetY = 0.0, offsetZ = 0.0;
|
||||
double layaX = 0.0, layaY = 0.0, layaZ = 0.0;
|
||||
double laybX = 0.0, laybY = 0.0, laybZ = 0.0;
|
||||
double layerAX = 0.0, layerAY = 0.0, layerAZ = 0.0;
|
||||
double layerBX = 0.0, layerBY = 0.0, layerBZ = 0.0;
|
||||
|
||||
boolean flip = false;
|
||||
switch (orientation)
|
||||
{
|
||||
case NORTH:
|
||||
|
||||
layaX = 1.0;
|
||||
laybY = 1.0;
|
||||
layerAX = 1.0;
|
||||
layerBY = 1.0;
|
||||
flip = true;
|
||||
|
||||
break;
|
||||
case SOUTH:
|
||||
|
||||
layaX = 1.0;
|
||||
laybY = 1.0;
|
||||
layerAX = 1.0;
|
||||
layerBY = 1.0;
|
||||
offsetZ = 1.0;
|
||||
|
||||
break;
|
||||
case EAST:
|
||||
|
||||
flip = true;
|
||||
layaZ = 1.0;
|
||||
laybY = 1.0;
|
||||
layerAZ = 1.0;
|
||||
layerBY = 1.0;
|
||||
offsetX = 1.0;
|
||||
|
||||
break;
|
||||
case WEST:
|
||||
|
||||
layaZ = 1.0;
|
||||
laybY = 1.0;
|
||||
layerAZ = 1.0;
|
||||
layerBY = 1.0;
|
||||
|
||||
break;
|
||||
case UP:
|
||||
|
||||
flip = true;
|
||||
layaX = 1.0;
|
||||
laybZ = 1.0;
|
||||
layerAX = 1.0;
|
||||
layerBZ = 1.0;
|
||||
offsetY = 1.0;
|
||||
|
||||
break;
|
||||
case DOWN:
|
||||
|
||||
layaX = 1.0;
|
||||
laybZ = 1.0;
|
||||
layerAX = 1.0;
|
||||
layerBZ = 1.0;
|
||||
|
||||
break;
|
||||
default:
|
||||
|
@ -643,25 +643,25 @@ public class BaseBlockRender
|
|||
offsetY += y;
|
||||
offsetZ += z;
|
||||
|
||||
renderFace( tess, offsetX, offsetY, offsetZ, layaX, layaY, layaZ, laybX, laybY, laybZ,
|
||||
renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||
// u -> u
|
||||
0, 1.0,
|
||||
// v -> v
|
||||
0, edgeThickness, ico, flip );
|
||||
|
||||
renderFace( tess, offsetX, offsetY, offsetZ, layaX, layaY, layaZ, laybX, laybY, laybZ,
|
||||
renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||
// u -> u
|
||||
0.0, edgeThickness,
|
||||
// v -> v
|
||||
edgeThickness, 1.0 - edgeThickness, ico, flip );
|
||||
|
||||
renderFace( tess, offsetX, offsetY, offsetZ, layaX, layaY, layaZ, laybX, laybY, laybZ,
|
||||
renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||
// u -> u
|
||||
1.0 - edgeThickness, 1.0,
|
||||
// v -> v
|
||||
edgeThickness, 1.0 - edgeThickness, ico, flip );
|
||||
|
||||
renderFace( tess, offsetX, offsetY, offsetZ, layaX, layaY, layaZ, laybX, laybY, laybZ,
|
||||
renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||
// u -> u
|
||||
0, 1.0,
|
||||
// v -> v
|
||||
|
@ -725,9 +725,9 @@ public class BaseBlockRender
|
|||
return 0;
|
||||
|
||||
if ( offset > 0 )
|
||||
return (double) uv / 16.0;
|
||||
return uv / 16.0;
|
||||
|
||||
return (16.0 - (double) uv) / 16.0;
|
||||
return (16.0 - uv) / 16.0;
|
||||
}
|
||||
|
||||
public void renderTile(AEBaseBlock block, AEBaseTile tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderer)
|
||||
|
|
|
@ -102,7 +102,7 @@ public class BusRenderHelper implements IPartRenderHelper
|
|||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
BoundBoxCalculator bbc = new BoundBoxCalculator();
|
||||
|
||||
|
@ -209,14 +209,14 @@ public class BusRenderHelper implements IPartRenderHelper
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setBounds(float minx, float miny, float minz, float maxx, float maxy, float maxz)
|
||||
public void setBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
|
||||
{
|
||||
minX = minx;
|
||||
minY = miny;
|
||||
minZ = minz;
|
||||
maxX = maxx;
|
||||
maxY = maxy;
|
||||
maxZ = maxz;
|
||||
this.minX = minX;
|
||||
this.minY = minY;
|
||||
this.minZ = minZ;
|
||||
this.maxX = maxX;
|
||||
this.maxY = maxY;
|
||||
this.maxZ = maxZ;
|
||||
}
|
||||
|
||||
public double getBound(ForgeDirection side)
|
||||
|
@ -370,6 +370,7 @@ public class BusRenderHelper implements IPartRenderHelper
|
|||
BusRenderer.instance.renderer.renderFaces = faces;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderBlockCurrentBounds(int x, int y, int z, RenderBlocks renderer)
|
||||
{
|
||||
if ( !renderThis() )
|
||||
|
|
|
@ -29,7 +29,7 @@ public class BusRenderer implements IItemRenderer
|
|||
public static final BusRenderer instance = new BusRenderer();
|
||||
|
||||
public RenderBlocksWorkaround renderer = new RenderBlocksWorkaround();
|
||||
public static final HashMap<Integer, IPart> renderPart = new HashMap();
|
||||
public static final HashMap<Integer, IPart> renderPart = new HashMap<Integer, IPart>();
|
||||
|
||||
public IPart getRenderer(ItemStack is, IPartItem c)
|
||||
{
|
||||
|
|
|
@ -106,7 +106,7 @@ public class CableRenderHelper
|
|||
/**
|
||||
* snag list of boxes...
|
||||
*/
|
||||
List<AxisAlignedBB> boxes = new ArrayList();
|
||||
List<AxisAlignedBB> boxes = new ArrayList<AxisAlignedBB>();
|
||||
for (ForgeDirection s : ForgeDirection.values())
|
||||
{
|
||||
IPart part = cableBusContainer.getPart( s );
|
||||
|
|
|
@ -126,7 +126,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
|||
lightHash = 0;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
private LightingCache lightState = new LightingCache();
|
||||
|
||||
|
@ -310,10 +310,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
|||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
double d3 = (double) par8Icon.getInterpolatedU( this.renderMinZ * 16.0D );
|
||||
double d4 = (double) par8Icon.getInterpolatedU( this.renderMaxZ * 16.0D );
|
||||
double d5 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
|
||||
double d6 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
|
||||
double d3 = par8Icon.getInterpolatedU( this.renderMinZ * 16.0D );
|
||||
double d4 = par8Icon.getInterpolatedU( this.renderMaxZ * 16.0D );
|
||||
double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
|
||||
double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
|
||||
|
||||
double d11 = par2 + this.renderMinX;
|
||||
double d12 = par4 + this.renderMinY;
|
||||
|
@ -364,10 +364,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
|||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
double d3 = (double) par8Icon.getInterpolatedU( 16.0D - this.renderMinZ * 16.0D );
|
||||
double d4 = (double) par8Icon.getInterpolatedU( 16.0D - this.renderMaxZ * 16.0D );
|
||||
double d5 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
|
||||
double d6 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
|
||||
double d3 = par8Icon.getInterpolatedU( 16.0D - this.renderMinZ * 16.0D );
|
||||
double d4 = par8Icon.getInterpolatedU( 16.0D - this.renderMaxZ * 16.0D );
|
||||
double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
|
||||
double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
|
||||
|
||||
double d11 = par2 + this.renderMaxX;
|
||||
double d12 = par4 + this.renderMinY;
|
||||
|
@ -446,10 +446,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
|||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
double d3 = (double) par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
|
||||
double d4 = (double) par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
|
||||
double d5 = (double) par8Icon.getInterpolatedV( this.renderMinZ * 16.0D );
|
||||
double d6 = (double) par8Icon.getInterpolatedV( this.renderMaxZ * 16.0D );
|
||||
double d3 = par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
|
||||
double d4 = par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
|
||||
double d5 = par8Icon.getInterpolatedV( this.renderMinZ * 16.0D );
|
||||
double d6 = par8Icon.getInterpolatedV( this.renderMaxZ * 16.0D );
|
||||
|
||||
double d11 = par2 + this.renderMinX;
|
||||
double d12 = par2 + this.renderMaxX;
|
||||
|
@ -500,10 +500,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
|||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
double d3 = (double) par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
|
||||
double d4 = (double) par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
|
||||
double d5 = (double) par8Icon.getInterpolatedV( this.renderMinZ * 16.0D );
|
||||
double d6 = (double) par8Icon.getInterpolatedV( this.renderMaxZ * 16.0D );
|
||||
double d3 = par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
|
||||
double d4 = par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
|
||||
double d5 = par8Icon.getInterpolatedV( this.renderMinZ * 16.0D );
|
||||
double d6 = par8Icon.getInterpolatedV( this.renderMaxZ * 16.0D );
|
||||
|
||||
double d11 = par2 + this.renderMinX;
|
||||
double d12 = par2 + this.renderMaxX;
|
||||
|
@ -554,10 +554,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
|||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
double d3 = (double) par8Icon.getInterpolatedU( 16.0D - this.renderMinX * 16.0D );
|
||||
double d4 = (double) par8Icon.getInterpolatedU( 16.0D - this.renderMaxX * 16.0D );
|
||||
double d5 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
|
||||
double d6 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
|
||||
double d3 = par8Icon.getInterpolatedU( 16.0D - this.renderMinX * 16.0D );
|
||||
double d4 = par8Icon.getInterpolatedU( 16.0D - this.renderMaxX * 16.0D );
|
||||
double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
|
||||
double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
|
||||
|
||||
double d11 = par2 + this.renderMinX;
|
||||
double d12 = par2 + this.renderMaxX;
|
||||
|
@ -608,10 +608,10 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
|||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
double d3 = (double) par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
|
||||
double d4 = (double) par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
|
||||
double d5 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
|
||||
double d6 = (double) par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
|
||||
double d3 = par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
|
||||
double d4 = par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
|
||||
double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
|
||||
double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
|
||||
|
||||
double d11 = par2 + this.renderMinX;
|
||||
double d12 = par2 + this.renderMaxX;
|
||||
|
|
|
@ -121,10 +121,10 @@ public class SpatialSkyRender extends IRenderHandler
|
|||
|
||||
for (int i = 0; i < 50; ++i)
|
||||
{
|
||||
double iX = (double) (random.nextFloat() * 2.0F - 1.0F);
|
||||
double iY = (double) (random.nextFloat() * 2.0F - 1.0F);
|
||||
double iZ = (double) (random.nextFloat() * 2.0F - 1.0F);
|
||||
double d3 = (double) (0.05F + random.nextFloat() * 0.1F);
|
||||
double iX = random.nextFloat() * 2.0F - 1.0F;
|
||||
double iY = random.nextFloat() * 2.0F - 1.0F;
|
||||
double iZ = random.nextFloat() * 2.0F - 1.0F;
|
||||
double d3 = 0.05F + random.nextFloat() * 0.1F;
|
||||
double dist = iX * iX + iY * iY + iZ * iZ;
|
||||
|
||||
if ( dist < 1.0D && dist > 0.01D )
|
||||
|
@ -149,8 +149,8 @@ public class SpatialSkyRender extends IRenderHandler
|
|||
for (int j = 0; j < 4; ++j)
|
||||
{
|
||||
double d17 = 0.0D;
|
||||
double d18 = (double) ((j & 2) - 1) * d3;
|
||||
double d19 = (double) ((j + 1 & 2) - 1) * d3;
|
||||
double d18 = ((j & 2) - 1) * d3;
|
||||
double d19 = ((j + 1 & 2) - 1) * d3;
|
||||
double d20 = d18 * d16 - d19 * d15;
|
||||
double d21 = d19 * d16 + d18 * d15;
|
||||
double d22 = d20 * d12 + d17 * d13;
|
||||
|
|
|
@ -19,7 +19,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
public class TESRWrapper extends TileEntitySpecialRenderer
|
||||
{
|
||||
|
||||
final public RenderBlocks rbinstance = new RenderBlocks();
|
||||
final public RenderBlocks renderBlocksInstance = new RenderBlocks();
|
||||
|
||||
final BaseBlockRender blkRender;
|
||||
final double MAX_DISTANCE;
|
||||
|
@ -51,8 +51,8 @@ public class TESRWrapper extends TileEntitySpecialRenderer
|
|||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
|
||||
rbinstance.blockAccess = te.getWorldObj();
|
||||
blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess, x, y, z, f, rbinstance );
|
||||
renderBlocksInstance.blockAccess = te.getWorldObj();
|
||||
blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess, x, y, z, f, renderBlocksInstance );
|
||||
|
||||
if ( Platform.isDrawing( tess ) )
|
||||
throw new RuntimeException( "Error during rendering." );
|
||||
|
|
|
@ -23,7 +23,7 @@ public class WorldRender implements ISimpleBlockRenderingHandler
|
|||
public static final WorldRender instance = new WorldRender();
|
||||
boolean hasError = false;
|
||||
|
||||
public HashMap<AEBaseBlock, BaseBlockRender> blockRenders = new HashMap();
|
||||
public HashMap<AEBaseBlock, BaseBlockRender> blockRenders = new HashMap<AEBaseBlock, BaseBlockRender>();
|
||||
|
||||
void setRender(AEBaseBlock in, BaseBlockRender r)
|
||||
{
|
||||
|
|
|
@ -36,7 +36,7 @@ public class RenderBlockAssembler extends BaseBlockRender implements IBoxProvide
|
|||
if ( ne instanceof IGridHost && ne instanceof IPartHost )
|
||||
{
|
||||
IPartHost ph = (IPartHost) ne;
|
||||
IPart pcx = (IPart) ph.getPart( ForgeDirection.UNKNOWN );
|
||||
IPart pcx = ph.getPart( ForgeDirection.UNKNOWN );
|
||||
if ( pcx instanceof PartCable )
|
||||
{
|
||||
PartCable pc = (PartCable) pcx;
|
||||
|
|
|
@ -36,7 +36,7 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU
|
|||
if ( tile instanceof TileCraftingMonitorTile )
|
||||
{
|
||||
TileCraftingMonitorTile cmt = (TileCraftingMonitorTile) tile;
|
||||
IAEItemStack ais = (IAEItemStack) cmt.getJobProgress();
|
||||
IAEItemStack ais = cmt.getJobProgress();
|
||||
|
||||
if ( cmt.dspList == null )
|
||||
{
|
||||
|
@ -89,14 +89,14 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU
|
|||
{
|
||||
GL11.glScalef( 1.0f, -1.0f, 1.0f );
|
||||
GL11.glRotatef( 90.0f, 1.0f, 0.0f, 0.0f );
|
||||
GL11.glRotatef( (float) spin * 90.0F, 0, 0, 1 );
|
||||
GL11.glRotatef( spin * 90.0F, 0, 0, 1 );
|
||||
}
|
||||
|
||||
if ( d == ForgeDirection.DOWN )
|
||||
{
|
||||
GL11.glScalef( 1.0f, -1.0f, 1.0f );
|
||||
GL11.glRotatef( -90.0f, 1.0f, 0.0f, 0.0f );
|
||||
GL11.glRotatef( (float) spin * -90.0F, 0, 0, 1 );
|
||||
GL11.glRotatef( spin * -90.0F, 0, 0, 1 );
|
||||
}
|
||||
|
||||
if ( d == ForgeDirection.EAST )
|
||||
|
|
|
@ -45,7 +45,7 @@ public class RenderBlockCrank extends BaseBlockRender
|
|||
}
|
||||
|
||||
@Override
|
||||
public void renderTile(AEBaseBlock blk, AEBaseTile tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks rbinstance)
|
||||
public void renderTile(AEBaseBlock blk, AEBaseTile tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderBlocks)
|
||||
{
|
||||
TileCrank tc = (TileCrank) tile;
|
||||
if ( tc.getUp() == null || tc.getUp() == ForgeDirection.UNKNOWN )
|
||||
|
@ -69,16 +69,16 @@ public class RenderBlockCrank extends BaseBlockRender
|
|||
|
||||
tess.setTranslation( -tc.xCoord, -tc.yCoord, -tc.zCoord );
|
||||
tess.startDrawingQuads();
|
||||
rbinstance.renderAllFaces = true;
|
||||
rbinstance.blockAccess = tc.getWorldObj();
|
||||
renderBlocks.renderAllFaces = true;
|
||||
renderBlocks.blockAccess = tc.getWorldObj();
|
||||
|
||||
rbinstance.setRenderBounds( 0.5D - 0.05, 0.5D - 0.5, 0.5D - 0.05, 0.5D + 0.05, 0.5D + 0.1, 0.5D + 0.05 );
|
||||
renderBlocks.setRenderBounds( 0.5D - 0.05, 0.5D - 0.5, 0.5D - 0.05, 0.5D + 0.05, 0.5D + 0.1, 0.5D + 0.05 );
|
||||
|
||||
rbinstance.renderStandardBlock( blk, tc.xCoord, tc.yCoord, tc.zCoord );
|
||||
renderBlocks.renderStandardBlock( blk, tc.xCoord, tc.yCoord, tc.zCoord );
|
||||
|
||||
rbinstance.setRenderBounds( 0.70D - 0.15, 0.55D - 0.05, 0.5D - 0.05, 0.70D + 0.15, 0.55D + 0.05, 0.5D + 0.05 );
|
||||
renderBlocks.setRenderBounds( 0.70D - 0.15, 0.55D - 0.05, 0.5D - 0.05, 0.70D + 0.15, 0.55D + 0.05, 0.5D + 0.05 );
|
||||
|
||||
rbinstance.renderStandardBlock( blk, tc.xCoord, tc.yCoord, tc.zCoord );
|
||||
renderBlocks.renderStandardBlock( blk, tc.xCoord, tc.yCoord, tc.zCoord );
|
||||
|
||||
tess.draw();
|
||||
tess.setTranslation( 0, 0, 0 );
|
||||
|
|
|
@ -144,17 +144,17 @@ public class RenderBlockInscriber extends BaseBlockRender
|
|||
float press = 0.2f;
|
||||
float base = 0.4f;
|
||||
|
||||
long lprogress = 0;
|
||||
long absoluteProgress = 0;
|
||||
if ( inv.smash )
|
||||
{
|
||||
long currentTime = System.currentTimeMillis();
|
||||
lprogress = currentTime - inv.clientStart;
|
||||
if ( lprogress > 800 )
|
||||
absoluteProgress = currentTime - inv.clientStart;
|
||||
if ( absoluteProgress > 800 )
|
||||
inv.smash = false;
|
||||
}
|
||||
|
||||
float rprogress = (float) (lprogress % 800) / 400.0f;
|
||||
float progress = rprogress;
|
||||
float relativeProgress = absoluteProgress % 800 / 400.0f;
|
||||
float progress = relativeProgress;
|
||||
|
||||
if ( progress > 1.0f )
|
||||
progress = 1.0f - (progress - 1.0f);
|
||||
|
@ -197,7 +197,7 @@ public class RenderBlockInscriber extends BaseBlockRender
|
|||
if ( inv.getStackInSlot( 2 ) != null )
|
||||
items++;
|
||||
|
||||
if ( rprogress > 1.0f || items == 0 )
|
||||
if ( relativeProgress > 1.0f || items == 0 )
|
||||
{
|
||||
ItemStack is = inv.getStackInSlot( 3 );
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package appeng.client.render.blocks;
|
|||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import appeng.helpers.Splotch;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -12,7 +13,6 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
import appeng.block.AEBaseBlock;
|
||||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
import appeng.helpers.Splot;
|
||||
import appeng.tile.misc.TilePaint;
|
||||
|
||||
public class RenderBlockPaint extends BaseBlockRender
|
||||
|
@ -42,9 +42,9 @@ public class RenderBlockPaint extends BaseBlockRender
|
|||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
int lumen = 14 << 20 | 14 << 4;
|
||||
int worldb = imb.getMixedBrightnessForBlock( world, x, y, z );
|
||||
int brightness = imb.getMixedBrightnessForBlock( world, x, y, z );
|
||||
|
||||
double offoff = 0.001;
|
||||
double offsetConstant = 0.001;
|
||||
|
||||
EnumSet<ForgeDirection> validSides = EnumSet.noneOf( ForgeDirection.class );
|
||||
|
||||
|
@ -54,7 +54,7 @@ public class RenderBlockPaint extends BaseBlockRender
|
|||
validSides.add( side );
|
||||
}
|
||||
|
||||
for (Splot s : tp.getDots())
|
||||
for (Splotch s : tp.getDots())
|
||||
{
|
||||
if ( !validSides.contains( s.side ) )
|
||||
continue;
|
||||
|
@ -67,11 +67,11 @@ public class RenderBlockPaint extends BaseBlockRender
|
|||
else
|
||||
{
|
||||
tess.setColorOpaque_I( s.color.mediumVariant );
|
||||
tess.setBrightness( worldb );
|
||||
tess.setBrightness( brightness );
|
||||
}
|
||||
|
||||
double offset = offoff;
|
||||
offoff += 0.001;
|
||||
double offset = offsetConstant;
|
||||
offsetConstant += 0.001;
|
||||
|
||||
double H = 0.1;
|
||||
|
||||
|
|
|
@ -39,13 +39,13 @@ public class RenderBlockSkyChest extends BaseBlockRender
|
|||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture( loc );
|
||||
|
||||
float lidangle = 0.0f;
|
||||
float lidAngle = 0.0f;
|
||||
|
||||
GL11.glScalef( 1.0F, -1F, -1F );
|
||||
GL11.glTranslatef( -0.0F, -1.0F, -1.0F );
|
||||
|
||||
model.chestLid.offsetY = -(0.9f / 16.0f);
|
||||
model.chestLid.rotateAngleX = -((lidangle * 3.141593F) / 2.0F);
|
||||
model.chestLid.rotateAngleX = -((lidAngle * 3.141593F) / 2.0F);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
|
||||
|
@ -100,12 +100,12 @@ public class RenderBlockSkyChest extends BaseBlockRender
|
|||
if ( skyChest.lidAngle < 0.0f )
|
||||
skyChest.lidAngle = 0.0f;
|
||||
|
||||
float lidangle = skyChest.lidAngle;
|
||||
lidangle = 1.0F - lidangle;
|
||||
lidangle = 1.0F - lidangle * lidangle * lidangle;
|
||||
float lidAngle = skyChest.lidAngle;
|
||||
lidAngle = 1.0F - lidAngle;
|
||||
lidAngle = 1.0F - lidAngle * lidAngle * lidAngle;
|
||||
|
||||
model.chestLid.offsetY = -(1.01f / 16.0f);
|
||||
model.chestLid.rotateAngleX = -((lidangle * 3.141593F) / 2.0F);
|
||||
model.chestLid.rotateAngleX = -((lidAngle * 3.141593F) / 2.0F);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
|
||||
|
|
|
@ -101,7 +101,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender
|
|||
if ( cr.spin )
|
||||
{
|
||||
now = now % 100000;
|
||||
model.renderAll( ((float) now / 50000.0f) * (float) Math.PI * 500.0f );
|
||||
model.renderAll( (now / 50000.0f) * (float) Math.PI * 500.0f );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -122,14 +122,14 @@ public class RenderBlockSkyCompass extends BaseBlockRender
|
|||
else
|
||||
{
|
||||
now = now % 1000000;
|
||||
model.renderAll( ((float) now / 500000.0f) * (float) Math.PI * 500.0f );
|
||||
model.renderAll( (now / 500000.0f) * (float) Math.PI * 500.0f );
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
now = now % 100000;
|
||||
model.renderAll( ((float) now / 50000.0f) * (float) Math.PI * 500.0f );
|
||||
model.renderAll( (now / 50000.0f) * (float) Math.PI * 500.0f );
|
||||
}
|
||||
|
||||
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
|
||||
|
@ -178,7 +178,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender
|
|||
if ( cr.spin )
|
||||
{
|
||||
now = now % 100000;
|
||||
model.renderAll( ((float) now / 50000.0f) * (float) Math.PI * 500.0f );
|
||||
model.renderAll( (now / 50000.0f) * (float) Math.PI * 500.0f );
|
||||
}
|
||||
else
|
||||
model.renderAll( (float) (skyCompass.getForward() == ForgeDirection.DOWN ? flipidiy( cr.rad ) : cr.rad) );
|
||||
|
@ -187,7 +187,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender
|
|||
else
|
||||
{
|
||||
now = now % 1000000;
|
||||
model.renderAll( ((float) now / 500000.0f) * (float) Math.PI * 500.0f );
|
||||
model.renderAll( (now / 500000.0f) * (float) Math.PI * 500.0f );
|
||||
}
|
||||
|
||||
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
|
||||
|
|
|
@ -30,9 +30,9 @@ public class RenderBlockWireless extends BaseBlockRender
|
|||
public void renderInventory(AEBaseBlock blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj)
|
||||
{
|
||||
this.blk = blk;
|
||||
cenx = 0;
|
||||
ceny = 0;
|
||||
cenz = 0;
|
||||
centerX = 0;
|
||||
centerY = 0;
|
||||
centerZ = 0;
|
||||
hasChan = false;
|
||||
hasPower = false;
|
||||
BlockRenderInfo ri = blk.getRendererInstance();
|
||||
|
@ -83,9 +83,9 @@ public class RenderBlockWireless extends BaseBlockRender
|
|||
}
|
||||
}
|
||||
|
||||
int cenx = 0;
|
||||
int ceny = 0;
|
||||
int cenz = 0;
|
||||
int centerX = 0;
|
||||
int centerY = 0;
|
||||
int centerZ = 0;
|
||||
AEBaseBlock blk;
|
||||
boolean hasChan = false;
|
||||
boolean hasPower = false;
|
||||
|
@ -118,9 +118,9 @@ public class RenderBlockWireless extends BaseBlockRender
|
|||
renderBlockBounds( renderer, 5, 5, 1, 11, 11, 2, fdx, fdy, fdz );
|
||||
super.renderInWorld( blk, world, x, y, z, renderer );
|
||||
|
||||
cenx = x;
|
||||
ceny = y;
|
||||
cenz = z;
|
||||
centerX = x;
|
||||
centerY = y;
|
||||
centerZ = z;
|
||||
ri.setTemporaryRenderIcon( null );
|
||||
|
||||
renderTorchAtAngle( renderer, fdx, fdy, fdz );
|
||||
|
@ -235,14 +235,14 @@ public class RenderBlockWireless extends BaseBlockRender
|
|||
|
||||
Tessellator.instance.setColorOpaque_I( 0xffffff );
|
||||
renderBlockBounds( renderer, 0, 7, 1, 16, 9, 16, x, y, z );
|
||||
renderFace( cenx, ceny, cenz, blk, sides, renderer, y );
|
||||
renderFace( cenx, ceny, cenz, blk, sides, renderer, y.getOpposite() );
|
||||
renderFace( centerX, centerY, centerZ, blk, sides, renderer, y );
|
||||
renderFace( centerX, centerY, centerZ, blk, sides, renderer, y.getOpposite() );
|
||||
|
||||
renderBlockBounds( renderer, 7, 0, 1, 9, 16, 16, x, y, z );
|
||||
renderFace( cenx, ceny, cenz, blk, sides, renderer, x );
|
||||
renderFace( cenx, ceny, cenz, blk, sides, renderer, x.getOpposite() );
|
||||
renderFace( centerX, centerY, centerZ, blk, sides, renderer, x );
|
||||
renderFace( centerX, centerY, centerZ, blk, sides, renderer, x.getOpposite() );
|
||||
|
||||
renderBlockBounds( renderer, 7, 7, 1, 9, 9, 10.6, x, y, z );
|
||||
renderFace( cenx, ceny, cenz, blk, r, renderer, z );
|
||||
renderFace( centerX, centerY, centerZ, blk, r, renderer, z );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -237,16 +237,16 @@ public class RenderDrive extends BaseBlockRender
|
|||
|
||||
if ( stat != 0 )
|
||||
{
|
||||
IIcon wico = ExtraBlockTextures.White.getIcon();
|
||||
u1 = wico.getInterpolatedU( (spin % 4 < 2) ? 1 : 6 );
|
||||
u2 = wico.getInterpolatedU( ((spin + 1) % 4 < 2) ? 1 : 6 );
|
||||
u3 = wico.getInterpolatedU( ((spin + 2) % 4 < 2) ? 1 : 6 );
|
||||
u4 = wico.getInterpolatedU( ((spin + 3) % 4 < 2) ? 1 : 6 );
|
||||
IIcon whiteIcon = ExtraBlockTextures.White.getIcon();
|
||||
u1 = whiteIcon.getInterpolatedU( (spin % 4 < 2) ? 1 : 6 );
|
||||
u2 = whiteIcon.getInterpolatedU( ((spin + 1) % 4 < 2) ? 1 : 6 );
|
||||
u3 = whiteIcon.getInterpolatedU( ((spin + 2) % 4 < 2) ? 1 : 6 );
|
||||
u4 = whiteIcon.getInterpolatedU( ((spin + 3) % 4 < 2) ? 1 : 6 );
|
||||
|
||||
v1 = wico.getInterpolatedV( ((spin + 1) % 4 < 2) ? 1 : 3 );
|
||||
v2 = wico.getInterpolatedV( ((spin + 2) % 4 < 2) ? 1 : 3 );
|
||||
v3 = wico.getInterpolatedV( ((spin + 3) % 4 < 2) ? 1 : 3 );
|
||||
v4 = wico.getInterpolatedV( ((spin + 0) % 4 < 2) ? 1 : 3 );
|
||||
v1 = whiteIcon.getInterpolatedV( ((spin + 1) % 4 < 2) ? 1 : 3 );
|
||||
v2 = whiteIcon.getInterpolatedV( ((spin + 2) % 4 < 2) ? 1 : 3 );
|
||||
v3 = whiteIcon.getInterpolatedV( ((spin + 3) % 4 < 2) ? 1 : 3 );
|
||||
v4 = whiteIcon.getInterpolatedV( ((spin + 0) % 4 < 2) ? 1 : 3 );
|
||||
|
||||
if ( sp.isPowered() )
|
||||
tess.setBrightness( 15 << 20 | 15 << 4 );
|
||||
|
|
|
@ -68,26 +68,26 @@ public class RenderMEChest extends BaseBlockRender
|
|||
Tessellator.instance.setBrightness( b );
|
||||
Tessellator.instance.setColorOpaque_I( 0xffffff );
|
||||
|
||||
FlippableIcon fico = new FlippableIcon( new OffsetIcon( ExtraBlockTextures.MEStorageCellTextures.getIcon(), offsetU, offsetV ) );
|
||||
FlippableIcon flippableIcon = new FlippableIcon( new OffsetIcon( ExtraBlockTextures.MEStorageCellTextures.getIcon(), offsetU, offsetV ) );
|
||||
if ( forward == ForgeDirection.EAST && (up == ForgeDirection.NORTH || up == ForgeDirection.SOUTH) )
|
||||
fico.setFlip( true, false );
|
||||
flippableIcon.setFlip( true, false );
|
||||
else if ( forward == ForgeDirection.NORTH && up == ForgeDirection.EAST )
|
||||
fico.setFlip( false, true );
|
||||
flippableIcon.setFlip( false, true );
|
||||
else if ( forward == ForgeDirection.NORTH && up == ForgeDirection.WEST )
|
||||
fico.setFlip( true, false );
|
||||
flippableIcon.setFlip( true, false );
|
||||
else if ( forward == ForgeDirection.DOWN && up == ForgeDirection.EAST )
|
||||
fico.setFlip( false, true );
|
||||
flippableIcon.setFlip( false, true );
|
||||
else if ( forward == ForgeDirection.DOWN )
|
||||
fico.setFlip( true, false );
|
||||
flippableIcon.setFlip( true, false );
|
||||
|
||||
/*
|
||||
* 1.7.2
|
||||
*
|
||||
* else if ( forward == ForgeDirection.EAST && up == ForgeDirection.UP ) fico.setFlip( true, false ); else if (
|
||||
* forward == ForgeDirection.NORTH && up == ForgeDirection.UP ) fico.setFlip( true, false );
|
||||
* else if ( forward == ForgeDirection.EAST && up == ForgeDirection.UP ) flippableIcon.setFlip( true, false ); else if (
|
||||
* forward == ForgeDirection.NORTH && up == ForgeDirection.UP ) flippableIcon.setFlip( true, false );
|
||||
*/
|
||||
|
||||
renderFace( x, y, z, imb, fico, renderer, forward );
|
||||
renderFace( x, y, z, imb, flippableIcon, renderer, forward );
|
||||
|
||||
if ( stat != 0 )
|
||||
{
|
||||
|
|
|
@ -74,9 +74,9 @@ public class RenderQNB extends BaseBlockRender
|
|||
@Override
|
||||
public void renderInventory(AEBaseBlock block, ItemStack item, RenderBlocks renderer, ItemRenderType type, Object[] obj)
|
||||
{
|
||||
float px = 2.0f / 16.0f;
|
||||
float maxpx = 14.0f / 16.0f;
|
||||
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
|
||||
float minPx = 2.0f / 16.0f;
|
||||
float maxPx = 14.0f / 16.0f;
|
||||
renderer.setRenderBounds( minPx, minPx, minPx, maxPx, maxPx, maxPx );
|
||||
|
||||
super.renderInventory( block, item, renderer, type, obj );
|
||||
}
|
||||
|
@ -94,20 +94,20 @@ public class RenderQNB extends BaseBlockRender
|
|||
{
|
||||
if ( tqb.isFormed() )
|
||||
{
|
||||
AEColoredItemDefinition cabldef = AEApi.instance().parts().partCableGlass;
|
||||
Item cable = cabldef.item( AEColor.Transparent );
|
||||
AEColoredItemDefinition glassCableDefinition = AEApi.instance().parts().partCableGlass;
|
||||
Item transparentGlassCable = glassCableDefinition.item( AEColor.Transparent );
|
||||
|
||||
AEColoredItemDefinition ccabldef = AEApi.instance().parts().partCableCovered;
|
||||
Item ccable = ccabldef.item( AEColor.Transparent );
|
||||
AEColoredItemDefinition coveredCableDefinition = AEApi.instance().parts().partCableCovered;
|
||||
Item transparentCoveredCable = coveredCableDefinition.item( AEColor.Transparent );
|
||||
|
||||
EnumSet<ForgeDirection> sides = tqb.getConnections();
|
||||
renderCableAt( 0.11D, world, x, y, z, block, renderer, cable.getIconIndex( cabldef.stack( AEColor.Transparent, 1 ) ), 0.141D, sides );
|
||||
renderCableAt( 0.188D, world, x, y, z, block, renderer, ccable.getIconIndex( ccabldef.stack( AEColor.Transparent, 1 ) ), 0.1875D, sides );
|
||||
renderCableAt( 0.11D, world, x, y, z, block, renderer, transparentGlassCable.getIconIndex( glassCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.141D, sides );
|
||||
renderCableAt( 0.188D, world, x, y, z, block, renderer, transparentCoveredCable.getIconIndex( coveredCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.1875D, sides );
|
||||
}
|
||||
|
||||
float px = 2.0f / 16.0f;
|
||||
float maxpx = 14.0f / 16.0f;
|
||||
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
|
||||
float renderMin = 2.0f / 16.0f;
|
||||
float renderMax = 14.0f / 16.0f;
|
||||
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
|
||||
renderer.renderStandardBlock( block, x, y, z );
|
||||
// super.renderWorldBlock(world, x, y, z, block, modelId, renderer);
|
||||
}
|
||||
|
@ -115,9 +115,9 @@ public class RenderQNB extends BaseBlockRender
|
|||
{
|
||||
if ( !tqb.isFormed() )
|
||||
{
|
||||
float px = 2.0f / 16.0f;
|
||||
float maxpx = 14.0f / 16.0f;
|
||||
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
|
||||
float renderMin = 2.0f / 16.0f;
|
||||
float renderMax = 14.0f / 16.0f;
|
||||
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
|
||||
renderer.renderStandardBlock( block, x, y, z );
|
||||
}
|
||||
else if ( tqb.isCorner() )
|
||||
|
@ -125,24 +125,24 @@ public class RenderQNB extends BaseBlockRender
|
|||
// renderCableAt(0.11D, world, x, y, z, block, modelId,
|
||||
// renderer,
|
||||
// AppEngTextureRegistry.Blocks.MECable.get(), true, 0.0D);
|
||||
AEColoredItemDefinition ccabldef = AEApi.instance().parts().partCableCovered;
|
||||
Item ccable = ccabldef.item( AEColor.Transparent );
|
||||
AEColoredItemDefinition coveredCableDefinition = AEApi.instance().parts().partCableCovered;
|
||||
Item transparentCoveredCable = coveredCableDefinition.item( AEColor.Transparent );
|
||||
|
||||
renderCableAt( 0.188D, world, x, y, z, block, renderer, ccable.getIconIndex( ccabldef.stack( AEColor.Transparent, 1 ) ), 0.05D,
|
||||
renderCableAt( 0.188D, world, x, y, z, block, renderer, transparentCoveredCable.getIconIndex( coveredCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.05D,
|
||||
tqb.getConnections() );
|
||||
|
||||
float px = 4.0f / 16.0f;
|
||||
float maxpx = 12.0f / 16.0f;
|
||||
float renderMin = 4.0f / 16.0f;
|
||||
float renderMax = 12.0f / 16.0f;
|
||||
|
||||
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
|
||||
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
|
||||
renderer.renderStandardBlock( block, x, y, z );
|
||||
|
||||
if ( tqb.isPowered() )
|
||||
{
|
||||
|
||||
px = 3.9f / 16.0f;
|
||||
maxpx = 12.1f / 16.0f;
|
||||
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
|
||||
renderMin = 3.9f / 16.0f;
|
||||
renderMax = 12.1f / 16.0f;
|
||||
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
|
||||
|
||||
int bn = 15;
|
||||
Tessellator.instance.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
|
||||
|
@ -154,22 +154,22 @@ public class RenderQNB extends BaseBlockRender
|
|||
}
|
||||
else
|
||||
{
|
||||
float px = 2.0f / 16.0f;
|
||||
float maxpx = 14.0f / 16.0f;
|
||||
renderer.setRenderBounds( 0, px, px, 1, maxpx, maxpx );
|
||||
float renderMin = 2.0f / 16.0f;
|
||||
float renderMax = 14.0f / 16.0f;
|
||||
renderer.setRenderBounds( 0, renderMin, renderMin, 1, renderMax, renderMax );
|
||||
renderer.renderStandardBlock( block, x, y, z );
|
||||
|
||||
renderer.setRenderBounds( px, 0, px, maxpx, 1, maxpx );
|
||||
renderer.setRenderBounds( renderMin, 0, renderMin, renderMax, 1, renderMax );
|
||||
renderer.renderStandardBlock( block, x, y, z );
|
||||
|
||||
renderer.setRenderBounds( px, px, 0, maxpx, maxpx, 1 );
|
||||
renderer.setRenderBounds( renderMin, renderMin, 0, renderMax, renderMax, 1 );
|
||||
renderer.renderStandardBlock( block, x, y, z );
|
||||
|
||||
if ( tqb.isPowered() )
|
||||
{
|
||||
px = -0.01f / 16.0f;
|
||||
maxpx = 16.01f / 16.0f;
|
||||
renderer.setRenderBounds( px, px, px, maxpx, maxpx, maxpx );
|
||||
renderMin = -0.01f / 16.0f;
|
||||
renderMax = 16.01f / 16.0f;
|
||||
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
|
||||
|
||||
int bn = 15;
|
||||
Tessellator.instance.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
|
||||
|
|
|
@ -32,9 +32,9 @@ public class RenderQuartzTorch extends BaseBlockRender
|
|||
float Point13 = 10.0f / 16.0f;
|
||||
float Point12 = 9.0f / 16.0f;
|
||||
|
||||
float Onepx = 1.0f / 16.0f;
|
||||
float rbottom = 5.0f / 16.0f;
|
||||
float rtop = 10.0f / 16.0f;
|
||||
float singlePixel = 1.0f / 16.0f;
|
||||
float renderBottom = 5.0f / 16.0f;
|
||||
float renderTop = 10.0f / 16.0f;
|
||||
|
||||
float bottom = 7.0f / 16.0f;
|
||||
float top = 8.0f / 16.0f;
|
||||
|
@ -43,13 +43,13 @@ public class RenderQuartzTorch extends BaseBlockRender
|
|||
float yOff = 0.0f;
|
||||
float zOff = 0.0f;
|
||||
|
||||
renderer.setRenderBounds( Point3 + xOff, rbottom + yOff, Point3 + zOff, Point12 + xOff, rtop + yOff, Point12 + zOff );
|
||||
renderer.setRenderBounds( Point3 + xOff, renderBottom + yOff, Point3 + zOff, Point12 + xOff, renderTop + yOff, Point12 + zOff );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
renderer.setRenderBounds( Point3 + xOff, rtop + yOff, Point3 + zOff, Point3 + Onepx + xOff, rtop + Onepx + yOff, Point3 + Onepx + zOff );
|
||||
renderer.setRenderBounds( Point3 + xOff, renderTop + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderTop + singlePixel + yOff, Point3 + singlePixel + zOff );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
renderer.setRenderBounds( Point12 - Onepx + xOff, rbottom - Onepx + yOff, Point12 - Onepx + zOff, Point12 + xOff, rbottom + yOff, Point12 + zOff );
|
||||
renderer.setRenderBounds( Point12 - singlePixel + xOff, renderBottom - singlePixel + yOff, Point12 - singlePixel + zOff, Point12 + xOff, renderBottom + yOff, Point12 + zOff );
|
||||
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
|
@ -86,9 +86,9 @@ public class RenderQuartzTorch extends BaseBlockRender
|
|||
float Point13 = 10.0f / 16.0f;
|
||||
float Point12 = 9.0f / 16.0f;
|
||||
|
||||
float Onepx = 1.0f / 16.0f;
|
||||
float rbottom = 5.0f / 16.0f;
|
||||
float rtop = 10.0f / 16.0f;
|
||||
float singlePixel = 1.0f / 16.0f;
|
||||
float renderBottom = 5.0f / 16.0f;
|
||||
float renderTop = 10.0f / 16.0f;
|
||||
|
||||
float bottom = 7.0f / 16.0f;
|
||||
float top = 8.0f / 16.0f;
|
||||
|
@ -106,24 +106,24 @@ public class RenderQuartzTorch extends BaseBlockRender
|
|||
zOff = forward.offsetZ * -(4.0f / 16.0f);
|
||||
}
|
||||
|
||||
renderer.setRenderBounds( Point3 + xOff, rbottom + yOff, Point3 + zOff, Point12 + xOff, rtop + yOff, Point12 + zOff );
|
||||
renderer.setRenderBounds( Point3 + xOff, renderBottom + yOff, Point3 + zOff, Point12 + xOff, renderTop + yOff, Point12 + zOff );
|
||||
super.renderInWorld( block, world, x, y, z, renderer );
|
||||
|
||||
int r = (x + y + z) % 2;
|
||||
if ( r == 0 )
|
||||
{
|
||||
renderer.setRenderBounds( Point3 + xOff, rtop + yOff, Point3 + zOff, Point3 + Onepx + xOff, rtop + Onepx + yOff, Point3 + Onepx + zOff );
|
||||
renderer.setRenderBounds( Point3 + xOff, renderTop + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderTop + singlePixel + yOff, Point3 + singlePixel + zOff );
|
||||
super.renderInWorld( block, world, x, y, z, renderer );
|
||||
|
||||
renderer.setRenderBounds( Point12 - Onepx + xOff, rbottom - Onepx + yOff, Point12 - Onepx + zOff, Point12 + xOff, rbottom + yOff, Point12 + zOff );
|
||||
renderer.setRenderBounds( Point12 - singlePixel + xOff, renderBottom - singlePixel + yOff, Point12 - singlePixel + zOff, Point12 + xOff, renderBottom + yOff, Point12 + zOff );
|
||||
super.renderInWorld( block, world, x, y, z, renderer );
|
||||
}
|
||||
else
|
||||
{
|
||||
renderer.setRenderBounds( Point3 + xOff, rbottom - Onepx + yOff, Point3 + zOff, Point3 + Onepx + xOff, rbottom + yOff, Point3 + Onepx + zOff );
|
||||
renderer.setRenderBounds( Point3 + xOff, renderBottom - singlePixel + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderBottom + yOff, Point3 + singlePixel + zOff );
|
||||
super.renderInWorld( block, world, x, y, z, renderer );
|
||||
|
||||
renderer.setRenderBounds( Point12 - Onepx + xOff, rtop + yOff, Point12 - Onepx + zOff, Point12 + xOff, rtop + Onepx + yOff, Point12 + zOff );
|
||||
renderer.setRenderBounds( Point12 - singlePixel + xOff, renderTop + yOff, Point12 - singlePixel + zOff, Point12 + xOff, renderTop + singlePixel + yOff, Point12 + zOff );
|
||||
super.renderInWorld( block, world, x, y, z, renderer );
|
||||
}
|
||||
|
||||
|
|
|
@ -44,14 +44,14 @@ public class RenderSpatialPylon extends BaseBlockRender
|
|||
if ( (displayBits & sp.DISPLAY_Z) == sp.DISPLAY_X )
|
||||
{
|
||||
ori = ForgeDirection.EAST;
|
||||
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX )
|
||||
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX )
|
||||
{
|
||||
renderer.uvRotateEast = 1;
|
||||
renderer.uvRotateWest = 2;
|
||||
renderer.uvRotateTop = 2;
|
||||
renderer.uvRotateBottom = 1;
|
||||
}
|
||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMIN )
|
||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MIN )
|
||||
{
|
||||
renderer.uvRotateEast = 2;
|
||||
renderer.uvRotateWest = 1;
|
||||
|
@ -70,7 +70,7 @@ public class RenderSpatialPylon extends BaseBlockRender
|
|||
else if ( (displayBits & sp.DISPLAY_Z) == sp.DISPLAY_Y )
|
||||
{
|
||||
ori = ForgeDirection.UP;
|
||||
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX )
|
||||
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX )
|
||||
{
|
||||
renderer.uvRotateNorth = 3;
|
||||
renderer.uvRotateSouth = 3;
|
||||
|
@ -82,12 +82,12 @@ public class RenderSpatialPylon extends BaseBlockRender
|
|||
else if ( (displayBits & sp.DISPLAY_Z) == sp.DISPLAY_Z )
|
||||
{
|
||||
ori = ForgeDirection.NORTH;
|
||||
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX )
|
||||
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX )
|
||||
{
|
||||
renderer.uvRotateSouth = 1;
|
||||
renderer.uvRotateNorth = 2;
|
||||
}
|
||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMIN )
|
||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MIN )
|
||||
{
|
||||
renderer.uvRotateNorth = 1;
|
||||
renderer.uvRotateSouth = 2;
|
||||
|
@ -112,7 +112,7 @@ public class RenderSpatialPylon extends BaseBlockRender
|
|||
|
||||
boolean r = renderer.renderStandardBlock( imb, x, y, z );
|
||||
|
||||
if ( (displayBits & sp.DISPLAY_POWEREDENABLED) == sp.DISPLAY_POWEREDENABLED )
|
||||
if ( (displayBits & sp.DISPLAY_POWERED_ENABLED) == sp.DISPLAY_POWERED_ENABLED )
|
||||
{
|
||||
int bn = 15;
|
||||
Tessellator.instance.setBrightness( bn << 20 | bn << 4 );
|
||||
|
@ -159,10 +159,10 @@ public class RenderSpatialPylon extends BaseBlockRender
|
|||
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_MIDDLE )
|
||||
return ExtraBlockTextures.BlockSpatialPylonC.getIcon();
|
||||
|
||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMIN )
|
||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MIN )
|
||||
return ExtraBlockTextures.BlockSpatialPylonE.getIcon();
|
||||
|
||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX )
|
||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX )
|
||||
return ExtraBlockTextures.BlockSpatialPylonE.getIcon();
|
||||
|
||||
return blk.getIcon( 0, 0 );
|
||||
|
@ -178,10 +178,10 @@ public class RenderSpatialPylon extends BaseBlockRender
|
|||
if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_MIDDLE )
|
||||
return good ? ExtraBlockTextures.BlockSpatialPylonC_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylonC_red.getIcon();
|
||||
|
||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMIN )
|
||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MIN )
|
||||
return good ? ExtraBlockTextures.BlockSpatialPylonE_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylonE_red.getIcon();
|
||||
|
||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_ENDMAX )
|
||||
else if ( (displayBits & sp.DISPLAY_MIDDLE) == sp.DISPLAY_END_MAX )
|
||||
return good ? ExtraBlockTextures.BlockSpatialPylonE_dim.getIcon() : ExtraBlockTextures.BlockSpatialPylonE_red.getIcon();
|
||||
|
||||
return blk.getIcon( 0, 0 );
|
||||
|
|
|
@ -21,6 +21,7 @@ public class CraftingFx extends EntityBreakingFX
|
|||
private int startBlkY;
|
||||
private int startBlkZ;
|
||||
|
||||
@Override
|
||||
public int getFXLayer()
|
||||
{
|
||||
return 1;
|
||||
|
@ -50,6 +51,7 @@ public class CraftingFx extends EntityBreakingFX
|
|||
this.particleScale *= 0.8f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
super.onUpdate();
|
||||
|
@ -57,6 +59,7 @@ public class CraftingFx extends EntityBreakingFX
|
|||
this.particleAlpha *= 0.51f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(Tessellator par1Tessellator, float partialTick, float x, float y, float z, float rx, float rz)
|
||||
{
|
||||
if ( partialTick < 0 || partialTick > 1 )
|
||||
|
@ -68,30 +71,30 @@ public class CraftingFx extends EntityBreakingFX
|
|||
float f9 = this.particleTextureIndex.getMaxV();
|
||||
float scale = 0.1F * this.particleScale;
|
||||
|
||||
float offx = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) partialTick);
|
||||
float offy = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) partialTick);
|
||||
float offz = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) partialTick);
|
||||
float offX = (float) (this.prevPosX + (this.posX - this.prevPosX) * partialTick);
|
||||
float offY = (float) (this.prevPosY + (this.posY - this.prevPosY) * partialTick);
|
||||
float offZ = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * partialTick);
|
||||
float f14 = 1.0F;
|
||||
|
||||
int blkX = MathHelper.floor_double( offx );
|
||||
int blkY = MathHelper.floor_double( offy );
|
||||
int blkZ = MathHelper.floor_double( offz );
|
||||
int blkX = MathHelper.floor_double( offX );
|
||||
int blkY = MathHelper.floor_double( offY );
|
||||
int blkZ = MathHelper.floor_double( offZ );
|
||||
if ( blkX == startBlkX && blkY == startBlkY && blkZ == startBlkZ )
|
||||
{
|
||||
offx -= interpPosX;
|
||||
offy -= interpPosY;
|
||||
offz -= interpPosZ;
|
||||
offX -= interpPosX;
|
||||
offY -= interpPosY;
|
||||
offZ -= interpPosZ;
|
||||
|
||||
// AELog.info( "" + partialTick );
|
||||
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
|
||||
par1Tessellator.addVertexWithUV( (double) (offx - x * scale - rx * scale), (double) (offy - y * scale), (double) (offz - z * scale - rz * scale),
|
||||
(double) f7, (double) f9 );
|
||||
par1Tessellator.addVertexWithUV( (double) (offx - x * scale + rx * scale), (double) (offy + y * scale), (double) (offz - z * scale + rz * scale),
|
||||
(double) f7, (double) f8 );
|
||||
par1Tessellator.addVertexWithUV( (double) (offx + x * scale + rx * scale), (double) (offy + y * scale), (double) (offz + z * scale + rz * scale),
|
||||
(double) f6, (double) f8 );
|
||||
par1Tessellator.addVertexWithUV( (double) (offx + x * scale - rx * scale), (double) (offy - y * scale), (double) (offz + z * scale - rz * scale),
|
||||
(double) f6, (double) f9 );
|
||||
par1Tessellator.addVertexWithUV( offX - x * scale - rx * scale, offY - y * scale, offZ - z * scale - rz * scale,
|
||||
f7, f9 );
|
||||
par1Tessellator.addVertexWithUV( offX - x * scale + rx * scale, offY + y * scale, offZ - z * scale + rz * scale,
|
||||
f7, f8 );
|
||||
par1Tessellator.addVertexWithUV( offX + x * scale + rx * scale, offY + y * scale, offZ + z * scale + rz * scale,
|
||||
f6, f8 );
|
||||
par1Tessellator.addVertexWithUV( offX + x * scale - rx * scale, offY - y * scale, offZ + z * scale - rz * scale,
|
||||
f6, f9 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ public class EnergyFx extends EntityBreakingFX
|
|||
private int startBlkY;
|
||||
private int startBlkZ;
|
||||
|
||||
@Override
|
||||
public int getFXLayer()
|
||||
{
|
||||
return 1;
|
||||
|
@ -49,6 +50,7 @@ public class EnergyFx extends EntityBreakingFX
|
|||
this.particleScale *= 0.8f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
super.onUpdate();
|
||||
|
@ -56,6 +58,7 @@ public class EnergyFx extends EntityBreakingFX
|
|||
this.particleAlpha *= 0.89f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
float f6 = this.particleTextureIndex.getMinU();
|
||||
|
@ -64,9 +67,9 @@ public class EnergyFx extends EntityBreakingFX
|
|||
float f9 = this.particleTextureIndex.getMaxV();
|
||||
float f10 = 0.1F * this.particleScale;
|
||||
|
||||
float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX);
|
||||
float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY);
|
||||
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ);
|
||||
float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX);
|
||||
float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY);
|
||||
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ);
|
||||
float f14 = 1.0F;
|
||||
|
||||
int blkX = MathHelper.floor_double( posX );
|
||||
|
@ -76,14 +79,14 @@ public class EnergyFx extends EntityBreakingFX
|
|||
if ( blkX == startBlkX && blkY == startBlkY && blkZ == startBlkZ )
|
||||
{
|
||||
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
|
||||
par1Tessellator.addVertexWithUV( (double) (f11 - par3 * f10 - par6 * f10), (double) (f12 - par4 * f10), (double) (f13 - par5 * f10 - par7 * f10),
|
||||
(double) f7, (double) f9 );
|
||||
par1Tessellator.addVertexWithUV( (double) (f11 - par3 * f10 + par6 * f10), (double) (f12 + par4 * f10), (double) (f13 - par5 * f10 + par7 * f10),
|
||||
(double) f7, (double) f8 );
|
||||
par1Tessellator.addVertexWithUV( (double) (f11 + par3 * f10 + par6 * f10), (double) (f12 + par4 * f10), (double) (f13 + par5 * f10 + par7 * f10),
|
||||
(double) f6, (double) f8 );
|
||||
par1Tessellator.addVertexWithUV( (double) (f11 + par3 * f10 - par6 * f10), (double) (f12 - par4 * f10), (double) (f13 + par5 * f10 - par7 * f10),
|
||||
(double) f6, (double) f9 );
|
||||
par1Tessellator.addVertexWithUV( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10,
|
||||
f7, f9 );
|
||||
par1Tessellator.addVertexWithUV( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10,
|
||||
f7, f8 );
|
||||
par1Tessellator.addVertexWithUV( f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10,
|
||||
f6, f8 );
|
||||
par1Tessellator.addVertexWithUV( f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10,
|
||||
f6, f9 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -111,9 +111,9 @@ public class LightningFX extends EntityFX
|
|||
{
|
||||
clear();
|
||||
|
||||
double x = (this.prevPosX + (this.posX - this.prevPosX) * (double) l - interpPosX) - offX;
|
||||
double y = (this.prevPosY + (this.posY - this.prevPosY) * (double) l - interpPosY) - offY;
|
||||
double z = (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) l - interpPosZ) - offZ;
|
||||
double x = (this.prevPosX + (this.posX - this.prevPosX) * l - interpPosX) - offX;
|
||||
double y = (this.prevPosY + (this.posY - this.prevPosY) * l - interpPosY) - offY;
|
||||
double z = (this.prevPosZ + (this.posZ - this.prevPosZ) * l - interpPosZ) - offZ;
|
||||
|
||||
for (int s = 0; s < steps; s++)
|
||||
{
|
||||
|
@ -144,7 +144,7 @@ public class LightningFX extends EntityFX
|
|||
oz = (xD * 0) - (1 * yD);
|
||||
}
|
||||
|
||||
double ss = Math.sqrt( ox * ox + oy * oy + oz * oz ) / ((((double) steps - (double) s) / (double) steps) * scale);
|
||||
double ss = Math.sqrt( ox * ox + oy * oy + oz * oz ) / ((((double) steps - (double) s) / steps) * scale);
|
||||
ox /= ss;
|
||||
oy /= ss;
|
||||
oz /= ss;
|
||||
|
|
|
@ -55,20 +55,20 @@ public class MatterCannonFX extends EntityBreakingFX
|
|||
float f9 = this.particleTextureIndex.getMaxV();
|
||||
float f10 = 0.05F * this.particleScale;
|
||||
|
||||
float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX);
|
||||
float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY);
|
||||
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ);
|
||||
float f11 = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX);
|
||||
float f12 = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY);
|
||||
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ);
|
||||
float f14 = 1.0F;
|
||||
|
||||
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
|
||||
par1Tessellator.addVertexWithUV( (double) (f11 - par3 * f10 - par6 * f10), (double) (f12 - par4 * f10), (double) (f13 - par5 * f10 - par7 * f10),
|
||||
(double) f7, (double) f9 );
|
||||
par1Tessellator.addVertexWithUV( (double) (f11 - par3 * f10 + par6 * f10), (double) (f12 + par4 * f10), (double) (f13 - par5 * f10 + par7 * f10),
|
||||
(double) f7, (double) f8 );
|
||||
par1Tessellator.addVertexWithUV( (double) (f11 + par3 * f10 + par6 * f10), (double) (f12 + par4 * f10), (double) (f13 + par5 * f10 + par7 * f10),
|
||||
(double) f6, (double) f8 );
|
||||
par1Tessellator.addVertexWithUV( (double) (f11 + par3 * f10 - par6 * f10), (double) (f12 - par4 * f10), (double) (f13 + par5 * f10 - par7 * f10),
|
||||
(double) f6, (double) f9 );
|
||||
par1Tessellator.addVertexWithUV( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10,
|
||||
f7, f9 );
|
||||
par1Tessellator.addVertexWithUV( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10,
|
||||
f7, f8 );
|
||||
par1Tessellator.addVertexWithUV( f11 + par3 * f10 + par6 * f10, f12 + par4 * f10, f13 + par5 * f10 + par7 * f10,
|
||||
f6, f8 );
|
||||
par1Tessellator.addVertexWithUV( f11 + par3 * f10 - par6 * f10, f12 - par4 * f10, f13 + par5 * f10 - par7 * f10,
|
||||
f6, f9 );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,10 +34,10 @@ public class PaintBallRender implements IItemRenderer
|
|||
if ( item.getItemDamage() >= 20 )
|
||||
par2Icon = ExtraItemTextures.ItemPaintBallShimmer.getIcon();
|
||||
|
||||
float f4 = ((IIcon) par2Icon).getMinU();
|
||||
float f5 = ((IIcon) par2Icon).getMaxU();
|
||||
float f6 = ((IIcon) par2Icon).getMinV();
|
||||
float f7 = ((IIcon) par2Icon).getMaxV();
|
||||
float f4 = par2Icon.getMinU();
|
||||
float f5 = par2Icon.getMaxU();
|
||||
float f6 = par2Icon.getMinV();
|
||||
float f7 = par2Icon.getMaxV();
|
||||
float f12 = 0.0625F;
|
||||
|
||||
ItemPaintBall ipb = (ItemPaintBall) item.getItem();
|
||||
|
@ -70,10 +70,10 @@ public class PaintBallRender implements IItemRenderer
|
|||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal( 0.0F, 1.0F, 0.0F );
|
||||
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 );
|
||||
tessellator.addVertexWithUV( 1, 0, 0, (double) f5, (double) f7 );
|
||||
tessellator.addVertexWithUV( 1, 1, 0, (double) f5, (double) f6 );
|
||||
tessellator.addVertexWithUV( 0, 1, 0, (double) f4, (double) f6 );
|
||||
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
|
||||
tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
|
||||
tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
|
||||
tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
|
||||
tessellator.draw();
|
||||
}
|
||||
else
|
||||
|
@ -82,7 +82,7 @@ public class PaintBallRender implements IItemRenderer
|
|||
GL11.glTranslatef( 0.0F, 0.0F, 0.0F );
|
||||
else
|
||||
GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
|
||||
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, ((IIcon) par2Icon).getIconWidth(), ((IIcon) par2Icon).getIconHeight(), f12 );
|
||||
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12 );
|
||||
|
||||
GL11.glDisable( GL11.GL_CULL_FACE );
|
||||
GL11.glColor4f( 1, 1, 1, 1.0F );
|
||||
|
|
|
@ -34,10 +34,10 @@ public class ToolBiometricCardRender implements IItemRenderer
|
|||
{
|
||||
IIcon par2Icon = item.getIconIndex();
|
||||
|
||||
float f4 = ((IIcon) par2Icon).getMinU();
|
||||
float f5 = ((IIcon) par2Icon).getMaxU();
|
||||
float f6 = ((IIcon) par2Icon).getMinV();
|
||||
float f7 = ((IIcon) par2Icon).getMaxV();
|
||||
float f4 = par2Icon.getMinU();
|
||||
float f5 = par2Icon.getMaxU();
|
||||
float f6 = par2Icon.getMinV();
|
||||
float f7 = par2Icon.getMaxV();
|
||||
float f12 = 0.0625F;
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
@ -54,16 +54,16 @@ public class ToolBiometricCardRender implements IItemRenderer
|
|||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal( 0.0F, 1.0F, 0.0F );
|
||||
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 );
|
||||
tessellator.addVertexWithUV( 1, 0, 0, (double) f5, (double) f7 );
|
||||
tessellator.addVertexWithUV( 1, 1, 0, (double) f5, (double) f6 );
|
||||
tessellator.addVertexWithUV( 0, 1, 0, (double) f4, (double) f6 );
|
||||
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
|
||||
tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
|
||||
tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
|
||||
tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
|
||||
tessellator.draw();
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
|
||||
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, ((IIcon) par2Icon).getIconWidth(), ((IIcon) par2Icon).getIconHeight(), f12 );
|
||||
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12 );
|
||||
|
||||
GL11.glDisable( GL11.GL_CULL_FACE );
|
||||
GL11.glColor4f( 1, 1, 1, 1.0F );
|
||||
|
@ -113,10 +113,10 @@ public class ToolBiometricCardRender implements IItemRenderer
|
|||
tessellator.setColorOpaque_F( ((col.blackVariant >> 16) & 0xff) * scale, ((col.blackVariant >> 8) & 0xff) * scale,
|
||||
(col.blackVariant & 0xff) * scale );
|
||||
|
||||
tessellator.addVertexWithUV( x, y, z, (double) u, (double) v );
|
||||
tessellator.addVertexWithUV( x + 1, y, z, (double) u, (double) v );
|
||||
tessellator.addVertexWithUV( x + 1, y + 1, z, (double) u, (double) v );
|
||||
tessellator.addVertexWithUV( x, y + 1, z, (double) u, (double) v );
|
||||
tessellator.addVertexWithUV( x, y, z, u, v );
|
||||
tessellator.addVertexWithUV( x + 1, y, z, u, v );
|
||||
tessellator.addVertexWithUV( x + 1, y + 1, z, u, v );
|
||||
tessellator.addVertexWithUV( x, y + 1, z, u, v );
|
||||
}
|
||||
}
|
||||
tessellator.draw();
|
||||
|
|
|
@ -32,10 +32,10 @@ public class ToolColorApplicatorRender implements IItemRenderer
|
|||
{
|
||||
IIcon par2Icon = item.getIconIndex();
|
||||
|
||||
float f4 = ((IIcon) par2Icon).getMinU();
|
||||
float f5 = ((IIcon) par2Icon).getMaxU();
|
||||
float f6 = ((IIcon) par2Icon).getMinV();
|
||||
float f7 = ((IIcon) par2Icon).getMaxV();
|
||||
float f4 = par2Icon.getMinU();
|
||||
float f5 = par2Icon.getMaxU();
|
||||
float f6 = par2Icon.getMinV();
|
||||
float f7 = par2Icon.getMaxV();
|
||||
float f12 = 0.0625F;
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
@ -52,10 +52,10 @@ public class ToolColorApplicatorRender implements IItemRenderer
|
|||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal( 0.0F, 1.0F, 0.0F );
|
||||
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 );
|
||||
tessellator.addVertexWithUV( 1, 0, 0, (double) f5, (double) f7 );
|
||||
tessellator.addVertexWithUV( 1, 1, 0, (double) f5, (double) f6 );
|
||||
tessellator.addVertexWithUV( 0, 1, 0, (double) f4, (double) f6 );
|
||||
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
|
||||
tessellator.addVertexWithUV( 1, 0, 0, f5, f7 );
|
||||
tessellator.addVertexWithUV( 1, 1, 0, f5, f6 );
|
||||
tessellator.addVertexWithUV( 0, 1, 0, f4, f6 );
|
||||
tessellator.draw();
|
||||
}
|
||||
else
|
||||
|
@ -66,7 +66,7 @@ public class ToolColorApplicatorRender implements IItemRenderer
|
|||
GL11.glTranslatef( 0.0F, 0.0F, 0.0F );
|
||||
else
|
||||
GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
|
||||
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, ((IIcon) par2Icon).getIconWidth(), ((IIcon) par2Icon).getIconHeight(), f12 );
|
||||
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12 );
|
||||
|
||||
GL11.glDisable( GL11.GL_CULL_FACE );
|
||||
GL11.glColor4f( 1, 1, 1, 1.0F );
|
||||
|
@ -92,38 +92,38 @@ public class ToolColorApplicatorRender implements IItemRenderer
|
|||
{
|
||||
tessellator.startDrawingQuads();
|
||||
|
||||
f4 = ((IIcon) dark).getMinU();
|
||||
f5 = ((IIcon) dark).getMaxU();
|
||||
f6 = ((IIcon) dark).getMinV();
|
||||
f7 = ((IIcon) dark).getMaxV();
|
||||
f4 = dark.getMinU();
|
||||
f5 = dark.getMaxU();
|
||||
f6 = dark.getMinV();
|
||||
f7 = dark.getMaxV();
|
||||
|
||||
tessellator.setColorOpaque_I( col.blackVariant );
|
||||
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 );
|
||||
tessellator.addVertexWithUV( 16, 0, 0, (double) f5, (double) f7 );
|
||||
tessellator.addVertexWithUV( 16, 16, 0, (double) f5, (double) f6 );
|
||||
tessellator.addVertexWithUV( 0, 16, 0, (double) f4, (double) f6 );
|
||||
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
|
||||
tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
|
||||
tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
|
||||
tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
|
||||
|
||||
f4 = ((IIcon) light).getMinU();
|
||||
f5 = ((IIcon) light).getMaxU();
|
||||
f6 = ((IIcon) light).getMinV();
|
||||
f7 = ((IIcon) light).getMaxV();
|
||||
f4 = light.getMinU();
|
||||
f5 = light.getMaxU();
|
||||
f6 = light.getMinV();
|
||||
f7 = light.getMaxV();
|
||||
|
||||
tessellator.setColorOpaque_I( col.whiteVariant );
|
||||
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 );
|
||||
tessellator.addVertexWithUV( 16, 0, 0, (double) f5, (double) f7 );
|
||||
tessellator.addVertexWithUV( 16, 16, 0, (double) f5, (double) f6 );
|
||||
tessellator.addVertexWithUV( 0, 16, 0, (double) f4, (double) f6 );
|
||||
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
|
||||
tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
|
||||
tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
|
||||
tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
|
||||
|
||||
f4 = ((IIcon) med).getMinU();
|
||||
f5 = ((IIcon) med).getMaxU();
|
||||
f6 = ((IIcon) med).getMinV();
|
||||
f7 = ((IIcon) med).getMaxV();
|
||||
f4 = med.getMinU();
|
||||
f5 = med.getMaxU();
|
||||
f6 = med.getMinV();
|
||||
f7 = med.getMaxV();
|
||||
|
||||
tessellator.setColorOpaque_I( col.mediumVariant );
|
||||
tessellator.addVertexWithUV( 0, 0, 0, (double) f4, (double) f7 );
|
||||
tessellator.addVertexWithUV( 16, 0, 0, (double) f5, (double) f7 );
|
||||
tessellator.addVertexWithUV( 16, 16, 0, (double) f5, (double) f6 );
|
||||
tessellator.addVertexWithUV( 0, 16, 0, (double) f4, (double) f6 );
|
||||
tessellator.addVertexWithUV( 0, 0, 0, f4, f7 );
|
||||
tessellator.addVertexWithUV( 16, 0, 0, f5, f7 );
|
||||
tessellator.addVertexWithUV( 16, 16, 0, f5, f6 );
|
||||
tessellator.addVertexWithUV( 0, 16, 0, f4, f6 );
|
||||
|
||||
tessellator.draw();
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ public enum CableBusTextures
|
|||
|
||||
PartPatternTerm_Bright("PartPatternTerm_Bright"), PartPatternTerm_Colored("PartPatternTerm_Colored"), PartPatternTerm_Dark("PartPatternTerm_Dark"),
|
||||
|
||||
PartConvMonitor_Bright("PartConvMonitor_Bright"), PartConvMonitor_Colored("PartConvMonitor_Colored"), PartConvMonitor_Dark("PartConvMonitor_Dark"),
|
||||
PartConversionMonitor_Bright("PartConversionMonitor_Bright"), PartConversionMonitor_Colored("PartConversionMonitor_Colored"), PartConversionMonitor_Dark("PartConversionMonitor_Dark"),
|
||||
|
||||
PartInterfaceTerm_Bright("PartInterfaceTerm_Bright"), PartInterfaceTerm_Colored("PartInterfaceTerm_Colored"), PartInterfaceTerm_Dark(
|
||||
"PartInterfaceTerm_Dark"),
|
||||
|
|
|
@ -41,7 +41,7 @@ import appeng.api.storage.data.IAEItemStack;
|
|||
import appeng.client.me.InternalSlotME;
|
||||
import appeng.client.me.SlotME;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
import appeng.container.guisync.SyncDat;
|
||||
import appeng.container.guisync.SyncData;
|
||||
import appeng.container.slot.SlotInaccessible;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
|
@ -72,7 +72,7 @@ public abstract class AEBaseContainer extends Container
|
|||
int ticksSinceCheck = 900;
|
||||
|
||||
IAEItemStack clientRequestedTargetItem = null;
|
||||
List<PacketPartialItem> dataChunks = new LinkedList();
|
||||
List<PacketPartialItem> dataChunks = new LinkedList<PacketPartialItem>();
|
||||
|
||||
public void postPartial(PacketPartialItem packetPartialItem)
|
||||
{
|
||||
|
@ -129,7 +129,7 @@ public abstract class AEBaseContainer extends Container
|
|||
CompressedStreamTools.writeCompressed( item, stream );
|
||||
|
||||
int maxChunkSize = 30000;
|
||||
List<byte[]> miniPackets = new LinkedList();
|
||||
List<byte[]> miniPackets = new LinkedList<byte[]>();
|
||||
|
||||
byte[] data = stream.toByteArray();
|
||||
|
||||
|
@ -216,7 +216,7 @@ public abstract class AEBaseContainer extends Container
|
|||
public ContainerOpenContext openContext;
|
||||
|
||||
protected IMEInventoryHandler<IAEItemStack> cellInv;
|
||||
protected HashSet<Integer> locked = new HashSet();
|
||||
protected HashSet<Integer> locked = new HashSet<Integer>();
|
||||
protected IEnergySource powerSrc;
|
||||
|
||||
public void lockPlayerInventorySlot(int idx)
|
||||
|
@ -276,6 +276,7 @@ public abstract class AEBaseContainer extends Container
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDragIntoSlot(Slot s)
|
||||
{
|
||||
return ((AppEngSlot) s).isDraggable;
|
||||
|
@ -359,28 +360,32 @@ public abstract class AEBaseContainer extends Container
|
|||
tis = shiftStoreItem( tis );
|
||||
|
||||
// target slots in the container...
|
||||
for (int x = 0; x < this.inventorySlots.size(); x++)
|
||||
for (Object inventorySlot : this.inventorySlots)
|
||||
{
|
||||
AppEngSlot cs = (AppEngSlot) this.inventorySlots.get( x );
|
||||
AppEngSlot cs = (AppEngSlot) inventorySlot;
|
||||
|
||||
if ( !(cs.isPlayerSide()) && !(cs instanceof SlotFake) && !(cs instanceof SlotCraftingMatrix) )
|
||||
{
|
||||
if ( cs.isItemValid( tis ) )
|
||||
{
|
||||
selectedSlots.add( cs );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// target slots in the container...
|
||||
for (int x = 0; x < this.inventorySlots.size(); x++)
|
||||
for (Object inventorySlot : this.inventorySlots)
|
||||
{
|
||||
AppEngSlot cs = (AppEngSlot) this.inventorySlots.get( x );
|
||||
AppEngSlot cs = (AppEngSlot) inventorySlot;
|
||||
|
||||
if ( (cs.isPlayerSide()) && !(cs instanceof SlotFake) && !(cs instanceof SlotCraftingMatrix) )
|
||||
{
|
||||
if ( cs.isItemValid( tis ) )
|
||||
{
|
||||
selectedSlots.add( cs );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -393,18 +398,20 @@ public abstract class AEBaseContainer extends Container
|
|||
if ( tis != null )
|
||||
{
|
||||
// target slots in the container...
|
||||
for (int x = 0; x < this.inventorySlots.size(); x++)
|
||||
for (Object inventorySlot : this.inventorySlots)
|
||||
{
|
||||
AppEngSlot cs = (AppEngSlot) this.inventorySlots.get( x );
|
||||
AppEngSlot cs = (AppEngSlot) inventorySlot;
|
||||
ItemStack dest = cs.getStack();
|
||||
|
||||
if ( !(cs.isPlayerSide()) && cs instanceof SlotFake )
|
||||
{
|
||||
if ( Platform.isSameItemPrecise( dest, tis ) )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else if ( dest == null )
|
||||
{
|
||||
cs.putStack( tis != null ? tis.copy() : null );
|
||||
cs.putStack( tis.copy() );
|
||||
cs.onSlotChanged();
|
||||
updateSlot( cs );
|
||||
return null;
|
||||
|
@ -422,13 +429,13 @@ public abstract class AEBaseContainer extends Container
|
|||
if ( d instanceof SlotDisabled || d instanceof SlotME )
|
||||
continue;
|
||||
|
||||
if ( d.isItemValid( tis ) && tis != null )
|
||||
if ( d.isItemValid( tis ) )
|
||||
{
|
||||
if ( d.getHasStack() )
|
||||
{
|
||||
ItemStack t = d.getStack();
|
||||
|
||||
if ( tis != null && Platform.isSameItemPrecise( tis, t ) ) // t.isItemEqual(tis))
|
||||
if ( Platform.isSameItemPrecise( tis, t ) ) // t.isItemEqual(tis))
|
||||
{
|
||||
int maxSize = t.getMaxStackSize();
|
||||
if ( maxSize > d.getSlotStackLimit() )
|
||||
|
@ -468,13 +475,13 @@ public abstract class AEBaseContainer extends Container
|
|||
if ( d instanceof SlotDisabled || d instanceof SlotME )
|
||||
continue;
|
||||
|
||||
if ( d.isItemValid( tis ) && tis != null )
|
||||
if ( d.isItemValid( tis ) )
|
||||
{
|
||||
if ( d.getHasStack() )
|
||||
{
|
||||
ItemStack t = d.getStack();
|
||||
|
||||
if ( tis != null && Platform.isSameItemPrecise( t, tis ) )
|
||||
if ( Platform.isSameItemPrecise( t, tis ) )
|
||||
{
|
||||
int maxSize = t.getMaxStackSize();
|
||||
if ( d.getSlotStackLimit() < maxSize )
|
||||
|
@ -553,7 +560,7 @@ public abstract class AEBaseContainer extends Container
|
|||
detectAndSendChanges();
|
||||
}
|
||||
|
||||
HashMap<Integer, SyncDat> syncData = new HashMap<Integer, SyncDat>();
|
||||
HashMap<Integer, SyncData> syncData = new HashMap<Integer, SyncData>();
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
|
@ -562,11 +569,11 @@ public abstract class AEBaseContainer extends Container
|
|||
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
for (int i = 0; i < this.crafters.size(); ++i)
|
||||
for (Object crafter : this.crafters)
|
||||
{
|
||||
ICrafting icrafting = (ICrafting) this.crafters.get( i );
|
||||
ICrafting icrafting = (ICrafting) crafter;
|
||||
|
||||
for (SyncDat sd : syncData.values())
|
||||
for (SyncData sd : syncData.values())
|
||||
sd.tick( icrafting );
|
||||
}
|
||||
}
|
||||
|
@ -574,21 +581,20 @@ public abstract class AEBaseContainer extends Container
|
|||
super.detectAndSendChanges();
|
||||
}
|
||||
|
||||
@Override
|
||||
final public void updateProgressBar(int idx, int value)
|
||||
{
|
||||
if ( syncData.containsKey( idx ) )
|
||||
{
|
||||
syncData.get( idx ).update( (long) value );
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
final public void updateFullProgressBar(int idx, long value)
|
||||
{
|
||||
if ( syncData.containsKey( idx ) )
|
||||
{
|
||||
syncData.get( idx ).update( (long) value );
|
||||
syncData.get( idx ).update( value );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -600,7 +606,6 @@ public abstract class AEBaseContainer extends Container
|
|||
if ( syncData.containsKey( idx ) )
|
||||
{
|
||||
syncData.get( idx ).update( value );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -610,11 +615,11 @@ public abstract class AEBaseContainer extends Container
|
|||
{
|
||||
if ( f.isAnnotationPresent( GuiSync.class ) )
|
||||
{
|
||||
GuiSync anno = f.getAnnotation( GuiSync.class );
|
||||
if ( syncData.containsKey( anno.value() ) )
|
||||
AELog.warning( "Channel already in use: " + anno.value() + " for " + f.getName() );
|
||||
GuiSync annotation = f.getAnnotation( GuiSync.class );
|
||||
if ( syncData.containsKey( annotation.value() ) )
|
||||
AELog.warning( "Channel already in use: " + annotation.value() + " for " + f.getName() );
|
||||
else
|
||||
syncData.put( anno.value(), new SyncDat( this, f, anno ) );
|
||||
syncData.put( annotation.value(), new SyncData( this, f, annotation ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -718,7 +723,7 @@ public abstract class AEBaseContainer extends Container
|
|||
|
||||
switch (action)
|
||||
{
|
||||
case PICKUP_OR_SETDOWN:
|
||||
case PICKUP_OR_SET_DOWN:
|
||||
|
||||
if ( hand == null )
|
||||
s.putStack( null );
|
||||
|
@ -736,7 +741,7 @@ public abstract class AEBaseContainer extends Container
|
|||
}
|
||||
|
||||
break;
|
||||
case SPLIT_OR_PLACESINGLE:
|
||||
case SPLIT_OR_PLACE_SINGLE:
|
||||
|
||||
ItemStack is = s.getStack();
|
||||
if ( is != null )
|
||||
|
@ -772,7 +777,7 @@ public abstract class AEBaseContainer extends Container
|
|||
|
||||
if ( action == InventoryAction.MOVE_REGION )
|
||||
{
|
||||
List<Slot> from = new LinkedList();
|
||||
List<Slot> from = new LinkedList<Slot>();
|
||||
|
||||
for (Object j : inventorySlots)
|
||||
{
|
||||
|
@ -815,7 +820,7 @@ public abstract class AEBaseContainer extends Container
|
|||
adp.addItems( ais.getItemStack() );
|
||||
}
|
||||
break;
|
||||
case ROLLDOWN:
|
||||
case ROLL_DOWN:
|
||||
if ( powerSrc == null || cellInv == null )
|
||||
return;
|
||||
|
||||
|
@ -842,7 +847,7 @@ public abstract class AEBaseContainer extends Container
|
|||
}
|
||||
|
||||
break;
|
||||
case ROLLUP:
|
||||
case ROLL_UP:
|
||||
case PICKUP_SINGLE:
|
||||
if ( powerSrc == null || cellInv == null )
|
||||
return;
|
||||
|
@ -850,13 +855,13 @@ public abstract class AEBaseContainer extends Container
|
|||
if ( slotItem != null )
|
||||
{
|
||||
int liftQty = 1;
|
||||
ItemStack isgg = player.inventory.getItemStack();
|
||||
ItemStack item = player.inventory.getItemStack();
|
||||
|
||||
if ( isgg != null )
|
||||
if ( item != null )
|
||||
{
|
||||
if ( isgg.stackSize >= isgg.getMaxStackSize() )
|
||||
if ( item.stackSize >= item.getMaxStackSize() )
|
||||
liftQty = 0;
|
||||
if ( !Platform.isSameItemPrecise( slotItem.getItemStack(), isgg ) )
|
||||
if ( !Platform.isSameItemPrecise( slotItem.getItemStack(), item ) )
|
||||
liftQty = 0;
|
||||
}
|
||||
|
||||
|
@ -878,7 +883,7 @@ public abstract class AEBaseContainer extends Container
|
|||
}
|
||||
}
|
||||
break;
|
||||
case PICKUP_OR_SETDOWN:
|
||||
case PICKUP_OR_SET_DOWN:
|
||||
if ( powerSrc == null || cellInv == null )
|
||||
return;
|
||||
|
||||
|
@ -908,7 +913,7 @@ public abstract class AEBaseContainer extends Container
|
|||
}
|
||||
|
||||
break;
|
||||
case SPLIT_OR_PLACESINGLE:
|
||||
case SPLIT_OR_PLACE_SINGLE:
|
||||
if ( powerSrc == null || cellInv == null )
|
||||
return;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.inventory.Container;
|
||||
|
||||
/*
|
||||
* Totaly useless container that does nothing.
|
||||
* Totally useless container that does nothing.
|
||||
*/
|
||||
public class ContainerNull extends Container
|
||||
{
|
||||
|
|
|
@ -12,7 +12,7 @@ import appeng.core.sync.network.NetworkHandler;
|
|||
import appeng.core.sync.packets.PacketProgressBar;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
|
||||
public class SyncDat
|
||||
public class SyncData
|
||||
{
|
||||
|
||||
private Object clientVersion;
|
||||
|
@ -22,11 +22,11 @@ public class SyncDat
|
|||
|
||||
private int channel;
|
||||
|
||||
public SyncDat(AEBaseContainer container, Field field, GuiSync anno) {
|
||||
public SyncData(AEBaseContainer container, Field field, GuiSync annotation) {
|
||||
clientVersion = null;
|
||||
this.source = container;
|
||||
this.field = field;
|
||||
channel = anno.value();
|
||||
channel = annotation.value();
|
||||
}
|
||||
|
||||
public int getChannel()
|
||||
|
@ -39,9 +39,7 @@ public class SyncDat
|
|||
try
|
||||
{
|
||||
Object val = field.get( source );
|
||||
if ( val == clientVersion )
|
||||
return;
|
||||
else if ( val != null && clientVersion == null )
|
||||
if ( val != null && clientVersion == null )
|
||||
send( c, val );
|
||||
else if ( !val.equals( clientVersion ) )
|
||||
send( c, val );
|
||||
|
@ -118,15 +116,15 @@ public class SyncDat
|
|||
if ( field.getType().equals( int.class ) )
|
||||
field.set( source, (int) val );
|
||||
else if ( field.getType().equals( long.class ) )
|
||||
field.set( source, (long) val );
|
||||
field.set( source, val );
|
||||
else if ( field.getType().equals( boolean.class ) )
|
||||
field.set( source, val == 1 );
|
||||
else if ( field.getType().equals( Integer.class ) )
|
||||
field.set( source, (Integer) (int) val );
|
||||
field.set( source, (int) val );
|
||||
else if ( field.getType().equals( Long.class ) )
|
||||
field.set( source, (Long) val );
|
||||
field.set( source, val );
|
||||
else if ( field.getType().equals( Boolean.class ) )
|
||||
field.set( source, (Boolean) (val == 1) );
|
||||
field.set( source, val == 1 );
|
||||
}
|
||||
|
||||
source.onUpdate( field.getName(), oldValue, field.get( source ) );
|
|
@ -149,7 +149,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
|||
{
|
||||
return getCellUpgradeInventory().isItemValidForSlot( i, itemstack );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
IInventory UpgradeInventoryWrapper;
|
||||
|
||||
|
@ -195,10 +195,10 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
|||
int y = 29;
|
||||
int offset = 0;
|
||||
|
||||
IInventory cell = myte.getInventoryByName( "cell" );
|
||||
IInventory cell = upgradeable.getInventoryByName( "cell" );
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.WORKBENCH_CELL, cell, 0, 152, 8, invPlayer ) );
|
||||
|
||||
IInventory inv = myte.getInventoryByName( "config" );
|
||||
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||
UpgradeInventoryWrapper = new Upgrades();// Platform.isServer() ? new Upgrades() : new AppEngInternalInventory(
|
||||
// null, 3 * 8 );
|
||||
|
||||
|
@ -242,9 +242,9 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
|||
ItemStack is = workBench.getInventoryByName( "cell" ).getStackInSlot( 0 );
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
for (int i = 0; i < this.crafters.size(); ++i)
|
||||
for (Object crafter : this.crafters)
|
||||
{
|
||||
ICrafting icrafting = (ICrafting) this.crafters.get( i );
|
||||
ICrafting icrafting = (ICrafting) crafter;
|
||||
|
||||
if ( prevStack != is )
|
||||
{
|
||||
|
@ -262,7 +262,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
|||
}
|
||||
|
||||
this.copyMode = getCopyMode();
|
||||
this.fzMode = (FuzzyMode) getFuzzyMode();
|
||||
this.fzMode = getFuzzyMode();
|
||||
}
|
||||
|
||||
prevStack = is;
|
||||
|
@ -271,7 +271,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
|||
|
||||
public void clear()
|
||||
{
|
||||
IInventory inv = myte.getInventoryByName( "config" );
|
||||
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||
for (int x = 0; x < inv.getSizeInventory(); x++)
|
||||
inv.setInventorySlotContents( x, null );
|
||||
detectAndSendChanges();
|
||||
|
@ -279,10 +279,10 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
|||
|
||||
public void partition()
|
||||
{
|
||||
IInventory inv = myte.getInventoryByName( "config" );
|
||||
IInventory inv = upgradeable.getInventoryByName( "config" );
|
||||
|
||||
IMEInventory<IAEItemStack> cellInv = AEApi.instance().registries().cell()
|
||||
.getCellInventory( myte.getInventoryByName( "cell" ).getStackInSlot( 0 ), null, StorageChannel.ITEMS );
|
||||
.getCellInventory( upgradeable.getInventoryByName( "cell" ).getStackInSlot( 0 ), null, StorageChannel.ITEMS );
|
||||
|
||||
Iterator<IAEItemStack> i = new NullIterator<IAEItemStack>();
|
||||
if ( cellInv != null )
|
||||
|
|
|
@ -8,15 +8,15 @@ import appeng.tile.storage.TileChest;
|
|||
public class ContainerChest extends AEBaseContainer
|
||||
{
|
||||
|
||||
TileChest myte;
|
||||
TileChest chest;
|
||||
|
||||
public ContainerChest(InventoryPlayer ip, TileChest te) {
|
||||
super( ip, te, null );
|
||||
myte = te;
|
||||
public ContainerChest(InventoryPlayer ip, TileChest chest) {
|
||||
super( ip, chest, null );
|
||||
this.chest = chest;
|
||||
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, myte, 1, 80, 37, invPlayer ) );
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, this.chest, 1, 80, 37, invPlayer ) );
|
||||
|
||||
bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 );
|
||||
bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,25 +5,26 @@ import appeng.api.config.CondenserOutput;
|
|||
import appeng.api.config.Settings;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
import appeng.container.interfaces.IProgressProvider;
|
||||
import appeng.container.slot.SlotOutput;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
import appeng.tile.misc.TileCondenser;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ContainerCondenser extends AEBaseContainer
|
||||
public class ContainerCondenser extends AEBaseContainer implements IProgressProvider
|
||||
{
|
||||
|
||||
TileCondenser myte;
|
||||
TileCondenser condenser;
|
||||
|
||||
public ContainerCondenser(InventoryPlayer ip, TileCondenser te) {
|
||||
super( ip, te, null );
|
||||
myte = te;
|
||||
public ContainerCondenser(InventoryPlayer ip, TileCondenser condenser) {
|
||||
super( ip, condenser, null );
|
||||
this.condenser = condenser;
|
||||
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.TRASH, te, 0, 51, 52, ip ) );
|
||||
addSlotToContainer( new SlotOutput( te, 1, 105, 52, -1 ) );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_COMPONENT, te.getInternalInventory(), 2, 101, 26, ip )).setStackLimit( 1 ) );
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.TRASH, condenser, 0, 51, 52, ip ) );
|
||||
addSlotToContainer( new SlotOutput( condenser, 1, 105, 52, -1 ) );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_COMPONENT, condenser.getInternalInventory(), 2, 101, 26, ip )).setStackLimit( 1 ) );
|
||||
|
||||
bindPlayerInventory( ip, 0, 197 - /* height of playerinventory */82 );
|
||||
bindPlayerInventory( ip, 0, 197 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -31,13 +32,13 @@ public class ContainerCondenser extends AEBaseContainer
|
|||
{
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
double maxStorage = this.myte.getStorage();
|
||||
double requiredEnergy = this.myte.getRequiredPower();
|
||||
double maxStorage = this.condenser.getStorage();
|
||||
double requiredEnergy = this.condenser.getRequiredPower();
|
||||
int maxDisplay = requiredEnergy == 0 ? (int) maxStorage : (int) Math.min( requiredEnergy, maxStorage );
|
||||
|
||||
this.requiredEnergy = (int) maxDisplay;
|
||||
this.storedPower = (int) this.myte.storedPower;
|
||||
this.output = (CondenserOutput) this.myte.getConfigManager().getSetting( Settings.CONDENSER_OUTPUT );
|
||||
this.requiredEnergy = maxDisplay;
|
||||
this.storedPower = (int) this.condenser.storedPower;
|
||||
this.output = (CondenserOutput) this.condenser.getConfigManager().getSetting( Settings.CONDENSER_OUTPUT );
|
||||
}
|
||||
|
||||
super.detectAndSendChanges();
|
||||
|
@ -52,4 +53,16 @@ public class ContainerCondenser extends AEBaseContainer
|
|||
@GuiSync(2)
|
||||
public CondenserOutput output = CondenserOutput.TRASH;
|
||||
|
||||
@Override
|
||||
public int getCurrentProgress()
|
||||
{
|
||||
return (int) storedPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxProgress()
|
||||
{
|
||||
return (int) requiredEnergy;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
|||
|
||||
protected long cpuIdx = Long.MIN_VALUE;
|
||||
|
||||
public ArrayList<CraftingCPURecord> cpus = new ArrayList();
|
||||
public ArrayList<CraftingCPURecord> cpus = new ArrayList<CraftingCPURecord>();
|
||||
|
||||
public ContainerCraftConfirm(InventoryPlayer ip, ITerminalHost te) {
|
||||
super( ip, te );
|
||||
|
|
|
@ -80,7 +80,7 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
|||
|
||||
if ( c instanceof CraftingCPUCluster )
|
||||
{
|
||||
cpuName = ((CraftingCPUCluster) c).getName();
|
||||
cpuName = c.getName();
|
||||
|
||||
monitor = (CraftingCPUCluster) c;
|
||||
if ( monitor != null )
|
||||
|
|
|
@ -23,7 +23,7 @@ public class ContainerCraftingStatus extends ContainerCraftingCPU
|
|||
@GuiSync(7)
|
||||
public String myName = "";
|
||||
|
||||
public ArrayList<CraftingCPURecord> cpus = new ArrayList();
|
||||
public ArrayList<CraftingCPURecord> cpus = new ArrayList<CraftingCPURecord>();
|
||||
|
||||
private void sendCPUs()
|
||||
{
|
||||
|
|
|
@ -28,6 +28,7 @@ public class ContainerCraftingTerm extends ContainerMEMonitorable implements IAE
|
|||
/**
|
||||
* Callback for when the crafting matrix is changed.
|
||||
*/
|
||||
@Override
|
||||
public void onCraftMatrixChanged(IInventory par1IInventory)
|
||||
{
|
||||
ContainerNull cn = new ContainerNull();
|
||||
|
|
|
@ -8,19 +8,19 @@ import appeng.tile.storage.TileDrive;
|
|||
public class ContainerDrive extends AEBaseContainer
|
||||
{
|
||||
|
||||
TileDrive myte;
|
||||
TileDrive drive;
|
||||
|
||||
public ContainerDrive(InventoryPlayer ip, TileDrive te) {
|
||||
super( ip, te, null );
|
||||
myte = te;
|
||||
public ContainerDrive(InventoryPlayer ip, TileDrive drive) {
|
||||
super( ip, drive, null );
|
||||
this.drive = drive;
|
||||
|
||||
for (int y = 0; y < 5; y++)
|
||||
for (int x = 0; x < 2; x++)
|
||||
{
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, te, x + y * 2, 71 + x * 18, 14 + y * 18, invPlayer ) );
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, drive, x + y * 2, 71 + x * 18, 14 + y * 18, invPlayer ) );
|
||||
}
|
||||
|
||||
bindPlayerInventory( ip, 0, 199 - /* height of playerinventory */82 );
|
||||
bindPlayerInventory( ip, 0, 199 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
|||
@Override
|
||||
public boolean isSlotEnabled(int idx)
|
||||
{
|
||||
int upgrades = myte.getInstalledUpgrades( Upgrades.CAPACITY );
|
||||
int upgrades = upgradeable.getInstalledUpgrades( Upgrades.CAPACITY );
|
||||
|
||||
return upgrades > idx;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
|||
int xo = 8;
|
||||
int yo = 23 + 6;
|
||||
|
||||
IInventory config = myte.getInventoryByName( "config" );
|
||||
IInventory config = upgradeable.getInventoryByName( "config" );
|
||||
for (int y = 0; y < 7; y++)
|
||||
{
|
||||
for (int x = 0; x < 9; x++)
|
||||
|
@ -66,7 +66,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
|||
}
|
||||
}
|
||||
|
||||
IInventory upgrades = myte.getInventoryByName( "upgrades" );
|
||||
IInventory upgrades = upgradeable.getInventoryByName( "upgrades" );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8 + 18 * 0, invPlayer )).setNotDraggable() );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18 * 1, invPlayer )).setNotDraggable() );
|
||||
addSlotToContainer( (new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, invPlayer )).setNotDraggable() );
|
||||
|
@ -81,7 +81,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
|||
|
||||
if ( Platform.isServer() )
|
||||
{
|
||||
this.fzMode = (FuzzyMode) this.myte.getConfigManager().getSetting( Settings.FUZZY_MODE );
|
||||
this.fzMode = (FuzzyMode) this.upgradeable.getConfigManager().getSetting( Settings.FUZZY_MODE );
|
||||
}
|
||||
|
||||
standardDetectAndSendChanges();
|
||||
|
|
|
@ -10,23 +10,23 @@ import appeng.tile.grindstone.TileGrinder;
|
|||
public class ContainerGrinder extends AEBaseContainer
|
||||
{
|
||||
|
||||
TileGrinder myte;
|
||||
TileGrinder grinder;
|
||||
|
||||
public ContainerGrinder(InventoryPlayer ip, TileGrinder te) {
|
||||
super( ip, te, null );
|
||||
myte = te;
|
||||
public ContainerGrinder(InventoryPlayer ip, TileGrinder grinder) {
|
||||
super( ip, grinder, null );
|
||||
this.grinder = grinder;
|
||||
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 0, 12, 17, invPlayer ) );
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 1, 12 + 18, 17, invPlayer ) );
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, te, 2, 12 + 36, 17, invPlayer ) );
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 0, 12, 17, invPlayer ) );
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 1, 12 + 18, 17, invPlayer ) );
|
||||
addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, grinder, 2, 12 + 36, 17, invPlayer ) );
|
||||
|
||||
addSlotToContainer( new SlotInaccessible( te, 6, 80, 40 ) );
|
||||
addSlotToContainer( new SlotInaccessible( grinder, 6, 80, 40 ) );
|
||||
|
||||
addSlotToContainer( new SlotOutput( te, 3, 112, 63, 2 * 16 + 15 ) );
|
||||
addSlotToContainer( new SlotOutput( te, 4, 112 + 18, 63, 2 * 16 + 15 ) );
|
||||
addSlotToContainer( new SlotOutput( te, 5, 112 + 36, 63, 2 * 16 + 15 ) );
|
||||
addSlotToContainer( new SlotOutput( grinder, 3, 112, 63, 2 * 16 + 15 ) );
|
||||
addSlotToContainer( new SlotOutput( grinder, 4, 112 + 18, 63, 2 * 16 + 15 ) );
|
||||
addSlotToContainer( new SlotOutput( grinder, 5, 112 + 36, 63, 2 * 16 + 15 ) );
|
||||
|
||||
bindPlayerInventory( ip, 0, 176 - /* height of playerinventory */82 );
|
||||
bindPlayerInventory( ip, 0, 176 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue