Compare commits
47 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c91e852ec | |||
| 52f516299b | |||
| c74166b02a | |||
| 26e86a114c | |||
| fc834036a0 | |||
| f96f7d82c5 | |||
| c592f54a77 | |||
| 89609a83ea | |||
| e67969f52f | |||
| 32a0496bc2 | |||
| 6df311c11a | |||
| 2e23b92763 | |||
| 41a029ffb4 | |||
| 9c8f914f42 | |||
| d75cdc9696 | |||
| 77bb28ded6 | |||
| 0e7981d717 | |||
| fbb0c05c7f | |||
| efa0ab7e4e | |||
| 70fe5189e0 | |||
| 3a8d6d0bcd | |||
| 7ac817e9ae | |||
| 0ceb4765a2 | |||
| 7ce9654402 | |||
| 5328627d7a | |||
| fe1a67ffaa | |||
| 4253d659f1 | |||
| b3560aaa00 | |||
| 005392911d | |||
| 7f02562e0c | |||
| 84bc00fa20 | |||
| c1483d87c7 | |||
| f5e4a202cb | |||
| 6f15c2921a | |||
| d891e5da15 | |||
| 6607c8cd2f | |||
| 1e20086799 | |||
| f85ab7ddc2 | |||
| c3700737c3 | |||
| 2f8013a49b | |||
| af54883fd3 | |||
| 223a210d49 | |||
| c133e4f0ef | |||
| 424d27b71c | |||
| 2fe5a3cef8 | |||
| a3c33d5323 | |||
| e927c27b85 |
+4
-1
@@ -25,4 +25,7 @@
|
|||||||
!codeformat/
|
!codeformat/
|
||||||
|
|
||||||
# Github specific files and directories
|
# Github specific files and directories
|
||||||
!.github/
|
!.github/
|
||||||
|
|
||||||
|
# Explicit ignores
|
||||||
|
Thumbs.db
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
[](https://travis-ci.org/AppliedEnergistics/Applied-Energistics-2)
|
[](https://travis-ci.org/AppliedEnergistics/Applied-Energistics-2)
|
||||||
[](https://github.com/AppliedEnergistics/Applied-Energistics-2/tags)
|
|
||||||
[](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases)
|
[](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases)
|
||||||
|
|
||||||
# Applied Energistics 2
|
# Applied Energistics 2
|
||||||
|
|||||||
+16
-19
@@ -40,7 +40,6 @@ repositories {
|
|||||||
|
|
||||||
apply from: 'gradle/scripts/dependencies.gradle'
|
apply from: 'gradle/scripts/dependencies.gradle'
|
||||||
apply from: 'gradle/scripts/artifacts.gradle'
|
apply from: 'gradle/scripts/artifacts.gradle'
|
||||||
apply from: 'gradle/scripts/integration.gradle'
|
|
||||||
apply from: 'gradle/scripts/optional.gradle'
|
apply from: 'gradle/scripts/optional.gradle'
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
@@ -56,6 +55,9 @@ jar {
|
|||||||
attributes 'FMLCorePluginContainsFMLMod': 'true'
|
attributes 'FMLCorePluginContainsFMLMod': 'true'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
from sourceSets.api.output
|
||||||
|
dependsOn apiClasses
|
||||||
|
|
||||||
// specify which files are really included, can control which APIs should be in
|
// specify which files are really included, can control which APIs should be in
|
||||||
include "appeng/**"
|
include "appeng/**"
|
||||||
include "assets/**"
|
include "assets/**"
|
||||||
@@ -82,26 +84,21 @@ minecraft {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
|
||||||
java {
|
|
||||||
srcDirs += 'src/api/java'
|
|
||||||
srcDirs += 'src/main/java/'
|
|
||||||
}
|
|
||||||
|
|
||||||
resources {
|
api
|
||||||
srcDir "src/main/resources/"
|
|
||||||
include "assets/appliedenergistics2/recipes/**/*.recipe",
|
// This source set will contain third party API code that we need to compile, but which is not shipped with the jar
|
||||||
"assets/appliedenergistics2/recipes/README.html",
|
thirdparty {
|
||||||
"assets/appliedenergistics2/lang/*.lang",
|
// Third Party APIs often need access to Minecraft classes (i.e. EnumFacing), so set this up here
|
||||||
"assets/appliedenergistics2/blockstates/**/*.json",
|
compileClasspath += configurations.forgeGradleMc + configurations.forgeGradleMcDeps
|
||||||
"assets/appliedenergistics2/models/**/*.json",
|
|
||||||
"assets/appliedenergistics2/textures/**/*.png",
|
|
||||||
"assets/appliedenergistics2/textures/**/*.mcmeta",
|
|
||||||
"assets/appliedenergistics2/meta/*",
|
|
||||||
"mcmod.info",
|
|
||||||
"pack.mcmeta"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
main
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile sourceSets.thirdparty.output
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources
|
processResources
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ task apiJar(type: Jar) {
|
|||||||
from sourceSets.api.java
|
from sourceSets.api.java
|
||||||
include "appeng/api/**"
|
include "appeng/api/**"
|
||||||
|
|
||||||
from sourceSets.main.output
|
from sourceSets.api.output
|
||||||
include "appeng/api/**"
|
include "appeng/api/**"
|
||||||
|
|
||||||
classifier = 'api'
|
classifier = 'api'
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Should be provided by ForgeGradle, some idea user should confirm it.
|
|
||||||
apply plugin: 'idea'
|
|
||||||
|
|
||||||
idea {
|
|
||||||
module {
|
|
||||||
inheritOutputDirs = true
|
|
||||||
|
|
||||||
// excludes integration due to not being available upon port
|
|
||||||
excludeDirs += file('src/main/java/appeng/parts/layers/')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -78,7 +78,7 @@ public interface IParts
|
|||||||
|
|
||||||
IItemDefinition p2PTunnelLiquids();
|
IItemDefinition p2PTunnelLiquids();
|
||||||
|
|
||||||
// IItemDefinition p2PTunnelEU();
|
IItemDefinition p2PTunnelEU();
|
||||||
|
|
||||||
// IItemDefinition p2PTunnelRF();
|
// IItemDefinition p2PTunnelRF();
|
||||||
|
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements ITileEntity
|
|||||||
|
|
||||||
for( final ItemStack ol : itemDropCandidates )
|
for( final ItemStack ol : itemDropCandidates )
|
||||||
{
|
{
|
||||||
if( Platform.isSameItemType( ol, op ) )
|
if( Platform.itemComparisons().isEqualItemType( ol, op ) )
|
||||||
{
|
{
|
||||||
final NBTTagCompound tag = tile.downloadSettings( SettingsFrom.DISMANTLE_ITEM );
|
final NBTTagCompound tag = tile.downloadSettings( SettingsFrom.DISMANTLE_ITEM );
|
||||||
if( tag != null )
|
if( tag != null )
|
||||||
|
|||||||
@@ -75,10 +75,22 @@ public class BlockMolecularAssembler extends AEBaseTileBlock
|
|||||||
return super.getActualState( state, worldIn, pos ).withProperty( POWERED, powered );
|
return super.getActualState( state, worldIn, pos ).withProperty( POWERED, powered );
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly( Side.CLIENT)
|
/**
|
||||||
|
* NOTE: This is only used to determine how to render an item being held in hand.
|
||||||
|
* For determining block rendering, the method below is used (canRenderInLayer).
|
||||||
|
*/
|
||||||
|
@SideOnly( Side.CLIENT )
|
||||||
|
@Override
|
||||||
public BlockRenderLayer getBlockLayer()
|
public BlockRenderLayer getBlockLayer()
|
||||||
{
|
{
|
||||||
return BlockRenderLayer.TRANSLUCENT;
|
return BlockRenderLayer.CUTOUT;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly( Side.CLIENT )
|
||||||
|
@Override
|
||||||
|
public boolean canRenderInLayer( BlockRenderLayer layer )
|
||||||
|
{
|
||||||
|
return layer == BlockRenderLayer.TRANSLUCENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFullCube(IBlockState state)
|
public boolean isFullCube(IBlockState state)
|
||||||
|
|||||||
@@ -69,9 +69,6 @@ import appeng.client.render.cablebus.CableBusRenderState;
|
|||||||
import appeng.core.Api;
|
import appeng.core.Api;
|
||||||
import appeng.core.AppEng;
|
import appeng.core.AppEng;
|
||||||
import appeng.helpers.AEGlassMaterial;
|
import appeng.helpers.AEGlassMaterial;
|
||||||
import appeng.integration.IntegrationRegistry;
|
|
||||||
import appeng.integration.IntegrationType;
|
|
||||||
import appeng.integration.abstraction.IFMP;
|
|
||||||
import appeng.parts.ICableBusContainer;
|
import appeng.parts.ICableBusContainer;
|
||||||
import appeng.parts.NullCableBusContainer;
|
import appeng.parts.NullCableBusContainer;
|
||||||
import appeng.tile.AEBaseTile;
|
import appeng.tile.AEBaseTile;
|
||||||
@@ -349,10 +346,6 @@ public class BlockCableBus extends AEBaseTileBlock
|
|||||||
{
|
{
|
||||||
out = ( (TileCableBus) te ).getCableBus();
|
out = ( (TileCableBus) te ).getCableBus();
|
||||||
}
|
}
|
||||||
else if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.FMP ) )
|
|
||||||
{
|
|
||||||
out = ( (IFMP) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.FMP ) ).getCableContainer( te );
|
|
||||||
}
|
|
||||||
|
|
||||||
return out == null ? NULL_CABLE_BUS : out;
|
return out == null ? NULL_CABLE_BUS : out;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,12 +161,6 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
{
|
{
|
||||||
super.drawScreen( mouseX, mouseY, btn );
|
super.drawScreen( mouseX, mouseY, btn );
|
||||||
|
|
||||||
final boolean hasClicked = Mouse.isButtonDown( 0 );
|
|
||||||
if( hasClicked && this.getScrollBar() != null )
|
|
||||||
{
|
|
||||||
this.getScrollBar().click( this, mouseX - this.guiLeft, mouseY - this.guiTop );
|
|
||||||
}
|
|
||||||
|
|
||||||
for( final Object c : this.buttonList )
|
for( final Object c : this.buttonList )
|
||||||
{
|
{
|
||||||
if( c instanceof ITooltip )
|
if( c instanceof ITooltip )
|
||||||
@@ -217,7 +211,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
// All lines after the first are colored gray
|
// All lines after the first are colored gray
|
||||||
for( int i = 1; i < lines.size(); i++ )
|
for( int i = 1; i < lines.size(); i++ )
|
||||||
{
|
{
|
||||||
lines.set(i, TextFormatting.GRAY + lines.get(i));
|
lines.set( i, TextFormatting.GRAY + lines.get( i ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
this.drawHoveringText( lines, x, y, fontRendererObj );
|
this.drawHoveringText( lines, x, y, fontRendererObj );
|
||||||
@@ -258,13 +252,15 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
{
|
{
|
||||||
if( fs.isEnabled() )
|
if( fs.isEnabled() )
|
||||||
{
|
{
|
||||||
this.drawTexturedModalRect( ox + fs.xDisplayPosition - 1, oy + fs.yDisplayPosition - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18, 18 );
|
this.drawTexturedModalRect( ox + fs.xDisplayPosition - 1, oy + fs.yDisplayPosition - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18,
|
||||||
|
18 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GlStateManager.color( 1.0F, 1.0F, 1.0F, 0.4F );
|
GlStateManager.color( 1.0F, 1.0F, 1.0F, 0.4F );
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
this.drawTexturedModalRect( ox + fs.xDisplayPosition - 1, oy + fs.yDisplayPosition - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18, 18 );
|
this.drawTexturedModalRect( ox + fs.xDisplayPosition - 1, oy + fs.yDisplayPosition - 1, fs.getSourceX() - 1, fs.getSourceY() - 1, 18,
|
||||||
|
18 );
|
||||||
GlStateManager.color( 1.0F, 1.0F, 1.0F, 1.0F );
|
GlStateManager.color( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -290,6 +286,11 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( this.getScrollBar() != null )
|
||||||
|
{
|
||||||
|
this.getScrollBar().click( this, xCoord - this.guiLeft, yCoord - this.guiTop );
|
||||||
|
}
|
||||||
|
|
||||||
super.mouseClicked( xCoord, yCoord, btn );
|
super.mouseClicked( xCoord, yCoord, btn );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -299,6 +300,11 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
final Slot slot = this.getSlot( x, y );
|
final Slot slot = this.getSlot( x, y );
|
||||||
final ItemStack itemstack = this.mc.thePlayer.inventory.getItemStack();
|
final ItemStack itemstack = this.mc.thePlayer.inventory.getItemStack();
|
||||||
|
|
||||||
|
if( this.getScrollBar() != null )
|
||||||
|
{
|
||||||
|
this.getScrollBar().click( this, x - this.guiLeft, y - this.guiTop );
|
||||||
|
}
|
||||||
|
|
||||||
if( slot instanceof SlotFake && itemstack != null )
|
if( slot instanceof SlotFake && itemstack != null )
|
||||||
{
|
{
|
||||||
this.drag_click.add( slot );
|
this.drag_click.add( slot );
|
||||||
@@ -317,7 +323,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO 1.9.4 aftermath - Whole ClickType thing, to be checked.
|
// TODO 1.9.4 aftermath - Whole ClickType thing, to be checked.
|
||||||
@Override
|
@Override
|
||||||
protected void handleMouseClick( final Slot slot, final int slotIdx, final int mouseButton, final ClickType clickType )
|
protected void handleMouseClick( final Slot slot, final int slotIdx, final int mouseButton, final ClickType clickType )
|
||||||
{
|
{
|
||||||
@@ -325,7 +331,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
|
|
||||||
if( slot instanceof SlotFake )
|
if( slot instanceof SlotFake )
|
||||||
{
|
{
|
||||||
final InventoryAction action = isCtrlKeyDown() ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
final InventoryAction action = mouseButton == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||||
|
|
||||||
if( this.drag_click.size() > 1 )
|
if( this.drag_click.size() > 1 )
|
||||||
{
|
{
|
||||||
@@ -369,7 +375,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Craft stack on right-click, craft single on left-click
|
// Craft stack on right-click, craft single on left-click
|
||||||
action = (mouseButton == 1) ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM;
|
action = ( mouseButton == 1 ) ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
final PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
final PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||||
@@ -409,10 +415,10 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
switch( clickType )
|
switch( clickType )
|
||||||
{
|
{
|
||||||
case PICKUP: // pickup / set-down.
|
case PICKUP: // pickup / set-down.
|
||||||
action = (mouseButton == 1) ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
action = ( mouseButton == 1 ) ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||||
break;
|
break;
|
||||||
case QUICK_MOVE:
|
case QUICK_MOVE:
|
||||||
action = isCtrlKeyDown() ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
|
action = ( mouseButton == 1 ) ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CLONE: // creative dupe:
|
case CLONE: // creative dupe:
|
||||||
@@ -445,7 +451,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
switch( clickType )
|
switch( clickType )
|
||||||
{
|
{
|
||||||
case PICKUP: // pickup / set-down.
|
case PICKUP: // pickup / set-down.
|
||||||
action = (mouseButton == 1) ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
action = ( mouseButton == 1 ) ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||||
stack = ( (SlotME) slot ).getAEStack();
|
stack = ( (SlotME) slot ).getAEStack();
|
||||||
|
|
||||||
if( stack != null && action == InventoryAction.PICKUP_OR_SET_DOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null )
|
if( stack != null && action == InventoryAction.PICKUP_OR_SET_DOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null )
|
||||||
@@ -455,7 +461,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case QUICK_MOVE:
|
case QUICK_MOVE:
|
||||||
action = isCtrlKeyDown() ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
|
action = ( mouseButton == 1 ) ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
|
||||||
stack = ( (SlotME) slot ).getAEStack();
|
stack = ( (SlotME) slot ).getAEStack();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -515,7 +521,9 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
final List<Slot> slots = this.getInventorySlots();
|
final List<Slot> slots = this.getInventorySlots();
|
||||||
for( final Slot inventorySlot : slots )
|
for( final Slot inventorySlot : slots )
|
||||||
{
|
{
|
||||||
if( inventorySlot != null && inventorySlot.canTakeStack( this.mc.thePlayer ) && inventorySlot.getHasStack() && inventorySlot.inventory == slot.inventory && Container.canAddItemToSlot( inventorySlot, this.dbl_whichItem, true ) )
|
if( inventorySlot != null && inventorySlot.canTakeStack(
|
||||||
|
this.mc.thePlayer ) && inventorySlot.getHasStack() && inventorySlot.inventory == slot.inventory && Container.canAddItemToSlot(
|
||||||
|
inventorySlot, this.dbl_whichItem, true ) )
|
||||||
{
|
{
|
||||||
this.handleMouseClick( inventorySlot, inventorySlot.slotNumber, 1, clickType );
|
this.handleMouseClick( inventorySlot, inventorySlot.slotNumber, 1, clickType );
|
||||||
}
|
}
|
||||||
@@ -759,11 +767,15 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
final float f1 = 0.00390625F;
|
final float f1 = 0.00390625F;
|
||||||
final float f = 0.00390625F;
|
final float f = 0.00390625F;
|
||||||
final float par6 = 16;
|
final float par6 = 16;
|
||||||
vb.pos( par1 + 0, par2 + par6, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + par6 ) * f1 ).color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).endVertex();
|
vb.pos( par1 + 0, par2 + par6, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + par6 ) * f1 ).color( 1.0f, 1.0f, 1.0f,
|
||||||
|
aes.getOpacityOfIcon() ).endVertex();
|
||||||
final float par5 = 16;
|
final float par5 = 16;
|
||||||
vb.pos( par1 + par5, par2 + par6, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + par6 ) * f1 ).color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).endVertex();
|
vb.pos( par1 + par5, par2 + par6, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + par6 ) * f1 ).color( 1.0f, 1.0f, 1.0f,
|
||||||
vb.pos( par1 + par5, par2 + 0, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + 0 ) * f1 ).color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).endVertex();
|
aes.getOpacityOfIcon() ).endVertex();
|
||||||
vb.pos( par1 + 0, par2 + 0, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + 0 ) * f1 ).color( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() ).endVertex();
|
vb.pos( par1 + par5, par2 + 0, this.zLevel ).tex( ( par3 + par5 ) * f, ( par4 + 0 ) * f1 ).color( 1.0f, 1.0f, 1.0f,
|
||||||
|
aes.getOpacityOfIcon() ).endVertex();
|
||||||
|
vb.pos( par1 + 0, par2 + 0, this.zLevel ).tex( ( par3 + 0 ) * f, ( par4 + 0 ) * f1 ).color( 1.0f, 1.0f, 1.0f,
|
||||||
|
aes.getOpacityOfIcon() ).endVertex();
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -777,7 +789,8 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
{
|
{
|
||||||
if( ( (AppEngSlot) s ).getIsValid() == hasCalculatedValidness.NotAvailable )
|
if( ( (AppEngSlot) s ).getIsValid() == hasCalculatedValidness.NotAvailable )
|
||||||
{
|
{
|
||||||
boolean isValid = s.isItemValid( is ) || s instanceof SlotOutput || s instanceof AppEngCraftingSlot || s instanceof SlotDisabled || s instanceof SlotInaccessible || s instanceof SlotFake || s instanceof SlotRestrictedInput || s instanceof SlotDisconnected;
|
boolean isValid = s.isItemValid(
|
||||||
|
is ) || s instanceof SlotOutput || s instanceof AppEngCraftingSlot || s instanceof SlotDisabled || s instanceof SlotInaccessible || s instanceof SlotFake || s instanceof SlotRestrictedInput || s instanceof SlotDisconnected;
|
||||||
if( isValid && s instanceof SlotRestrictedInput )
|
if( isValid && s instanceof SlotRestrictedInput )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -848,6 +861,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
final ResourceLocation loc = new ResourceLocation( AppEng.MOD_ID, "textures/" + file );
|
final ResourceLocation loc = new ResourceLocation( AppEng.MOD_ID, "textures/" + file );
|
||||||
this.mc.getTextureManager().bindTexture( loc );
|
this.mc.getTextureManager().bindTexture( loc );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected GuiScrollbar getScrollBar()
|
protected GuiScrollbar getScrollBar()
|
||||||
{
|
{
|
||||||
return this.myScrollBar;
|
return this.myScrollBar;
|
||||||
|
|||||||
@@ -24,8 +24,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
|||||||
import appeng.client.gui.AEBaseGui;
|
import appeng.client.gui.AEBaseGui;
|
||||||
import appeng.container.implementations.ContainerSkyChest;
|
import appeng.container.implementations.ContainerSkyChest;
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.integration.IntegrationRegistry;
|
import appeng.integration.Integrations;
|
||||||
import appeng.integration.IntegrationType;
|
|
||||||
import appeng.tile.storage.TileSkyChest;
|
import appeng.tile.storage.TileSkyChest;
|
||||||
|
|
||||||
|
|
||||||
@@ -55,6 +54,6 @@ public class GuiSkyChest extends AEBaseGui
|
|||||||
@Override
|
@Override
|
||||||
protected boolean enableSpaceClicking()
|
protected boolean enableSpaceClicking()
|
||||||
{
|
{
|
||||||
return !IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.InvTweaks );
|
return !Integrations.invTweaks().isEnabled();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,11 +37,11 @@ import appeng.api.storage.data.IItemList;
|
|||||||
import appeng.client.gui.widgets.IScrollSource;
|
import appeng.client.gui.widgets.IScrollSource;
|
||||||
import appeng.client.gui.widgets.ISortSource;
|
import appeng.client.gui.widgets.ISortSource;
|
||||||
import appeng.core.AEConfig;
|
import appeng.core.AEConfig;
|
||||||
import appeng.integration.modules.JEI;
|
import appeng.integration.Integrations;
|
||||||
import appeng.items.storage.ItemViewCell;
|
import appeng.items.storage.ItemViewCell;
|
||||||
import appeng.util.ItemSorters;
|
import appeng.util.ItemSorters;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
import appeng.util.prioitylist.IPartitionList;
|
import appeng.util.prioritylist.IPartitionList;
|
||||||
|
|
||||||
|
|
||||||
public class ItemRepo
|
public class ItemRepo
|
||||||
@@ -58,7 +58,6 @@ public class ItemRepo
|
|||||||
private String searchString = "";
|
private String searchString = "";
|
||||||
private IPartitionList<IAEItemStack> myPartitionList;
|
private IPartitionList<IAEItemStack> myPartitionList;
|
||||||
private String innerSearch = "";
|
private String innerSearch = "";
|
||||||
private String jeiSearch = null;
|
|
||||||
private boolean hasPower;
|
private boolean hasPower;
|
||||||
|
|
||||||
public ItemRepo( final IScrollSource src, final ISortSource sortSrc )
|
public ItemRepo( final IScrollSource src, final ISortSource sortSrc )
|
||||||
@@ -244,7 +243,7 @@ public class ItemRepo
|
|||||||
|
|
||||||
private void updateJEI( String filter )
|
private void updateJEI( String filter )
|
||||||
{
|
{
|
||||||
JEI.instance.getJei().setSearchText( filter );
|
Integrations.jei().setSearchText( filter );
|
||||||
}
|
}
|
||||||
|
|
||||||
public int size()
|
public int size()
|
||||||
|
|||||||
@@ -108,8 +108,9 @@ public class FacadeDispatcherBakedModel implements IBakedModel
|
|||||||
ItemFacade itemFacade = (ItemFacade) stack.getItem();
|
ItemFacade itemFacade = (ItemFacade) stack.getItem();
|
||||||
|
|
||||||
IBlockState state = itemFacade.getTextureBlockState( stack );
|
IBlockState state = itemFacade.getTextureBlockState( stack );
|
||||||
|
ItemStack textureItem = itemFacade.getTextureItem( stack );
|
||||||
|
|
||||||
return new FacadeWithBlockBakedModel( baseModel, state, format );
|
return new FacadeWithBlockBakedModel( baseModel, state, textureItem, format );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
|||||||
import net.minecraft.client.renderer.block.model.ItemOverrideList;
|
import net.minecraft.client.renderer.block.model.ItemOverrideList;
|
||||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
|
|
||||||
import appeng.client.render.cablebus.CubeBuilder;
|
import appeng.client.render.cablebus.CubeBuilder;
|
||||||
@@ -53,10 +54,13 @@ public class FacadeWithBlockBakedModel implements IBakedModel
|
|||||||
|
|
||||||
private final VertexFormat format;
|
private final VertexFormat format;
|
||||||
|
|
||||||
public FacadeWithBlockBakedModel( IBakedModel baseModel, IBlockState blockState, VertexFormat format )
|
private final ItemStack textureItem;
|
||||||
|
|
||||||
|
public FacadeWithBlockBakedModel( IBakedModel baseModel, IBlockState blockState, ItemStack textureItem, VertexFormat format )
|
||||||
{
|
{
|
||||||
this.baseModel = baseModel;
|
this.baseModel = baseModel;
|
||||||
this.blockState = blockState;
|
this.blockState = blockState;
|
||||||
|
this.textureItem = textureItem;
|
||||||
this.textureModel = Minecraft.getMinecraft().getBlockRendererDispatcher().getModelForState( blockState );
|
this.textureModel = Minecraft.getMinecraft().getBlockRendererDispatcher().getModelForState( blockState );
|
||||||
this.format = format;
|
this.format = format;
|
||||||
}
|
}
|
||||||
@@ -69,10 +73,14 @@ public class FacadeWithBlockBakedModel implements IBakedModel
|
|||||||
{
|
{
|
||||||
List<BakedQuad> quads = new ArrayList<>( 1 );
|
List<BakedQuad> quads = new ArrayList<>( 1 );
|
||||||
CubeBuilder builder = new CubeBuilder( format, quads );
|
CubeBuilder builder = new CubeBuilder( format, quads );
|
||||||
TextureAtlasSprite sprite = FacadeBuilder.getSprite( textureModel, blockState, side, rand );
|
FacadeBuilder.TextureAtlasAndTint sprite = FacadeBuilder.getSprite( textureModel, blockState, side, rand );
|
||||||
if ( sprite != null )
|
if ( sprite != null && sprite.getSprite() != null )
|
||||||
{
|
{
|
||||||
builder.setTexture( sprite );
|
if( sprite.getTint() != -1 )
|
||||||
|
{
|
||||||
|
builder.setColor( Minecraft.getMinecraft().getItemColors().getColorFromItemstack( textureItem, sprite.getTint() ) );
|
||||||
|
}
|
||||||
|
builder.setTexture( sprite.getSprite() );
|
||||||
builder.setDrawFaces( EnumSet.of( EnumFacing.NORTH ) );
|
builder.setDrawFaces( EnumSet.of( EnumFacing.NORTH ) );
|
||||||
builder.addCube( 0, 0, 0, 16, 16, 16 );
|
builder.addCube( 0, 0, 0, 16, 16, 16 );
|
||||||
return quads;
|
return quads;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ package appeng.client.render.cablebus;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -35,7 +36,6 @@ import net.minecraft.client.Minecraft;
|
|||||||
import net.minecraft.client.renderer.BlockRendererDispatcher;
|
import net.minecraft.client.renderer.BlockRendererDispatcher;
|
||||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||||
import net.minecraft.client.renderer.color.BlockColors;
|
|
||||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||||
import net.minecraft.util.BlockRenderLayer;
|
import net.minecraft.util.BlockRenderLayer;
|
||||||
@@ -59,13 +59,14 @@ public class FacadeBuilder
|
|||||||
|
|
||||||
private static final ResourceLocation TEXTURE_FACADE = new ResourceLocation( AppEng.MOD_ID, "parts/cable_anchor" );
|
private static final ResourceLocation TEXTURE_FACADE = new ResourceLocation( AppEng.MOD_ID, "parts/cable_anchor" );
|
||||||
|
|
||||||
private final BlockColors blockColors = Minecraft.getMinecraft().getBlockColors();
|
|
||||||
|
|
||||||
private final VertexFormat format;
|
private final VertexFormat format;
|
||||||
|
|
||||||
private final TextureAtlasSprite facadeTexture;
|
private final TextureAtlasSprite facadeTexture;
|
||||||
|
|
||||||
private final BlockRendererDispatcher blockRendererDispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
|
private final BlockRendererDispatcher blockRendererDispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
|
||||||
|
|
||||||
|
private static final Set<ResourceLocation> warnedFor = new HashSet<>();
|
||||||
|
|
||||||
FacadeBuilder( VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter )
|
FacadeBuilder( VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter )
|
||||||
{
|
{
|
||||||
this.format = format;
|
this.format = format;
|
||||||
@@ -83,7 +84,7 @@ public class FacadeBuilder
|
|||||||
|
|
||||||
CubeBuilder builder = new CubeBuilder( format, quads );
|
CubeBuilder builder = new CubeBuilder( format, quads );
|
||||||
|
|
||||||
facadesState.forEach( ( side, textureItem ) ->
|
facadesState.forEach( ( side, state ) ->
|
||||||
{
|
{
|
||||||
AxisAlignedBB facadeBox = getFacadeBox( side, thinFacades );
|
AxisAlignedBB facadeBox = getFacadeBox( side, thinFacades );
|
||||||
AEAxisAlignedBB cutOutBox = getCutOutBox( facadeBox, partBoxes );
|
AEAxisAlignedBB cutOutBox = getCutOutBox( facadeBox, partBoxes );
|
||||||
@@ -100,10 +101,10 @@ public class FacadeBuilder
|
|||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TextureAtlasSprite getSprite( IBakedModel blockModel, IBlockState state, EnumFacing facing, long rand)
|
public static TextureAtlasAndTint getSprite( IBakedModel blockModel, IBlockState state, EnumFacing facing, long rand)
|
||||||
{
|
{
|
||||||
|
|
||||||
TextureAtlasSprite firstFound = null;
|
TextureAtlasAndTint firstFound = null;
|
||||||
BlockRenderLayer orgLayer = MinecraftForgeClient.getRenderLayer();
|
BlockRenderLayer orgLayer = MinecraftForgeClient.getRenderLayer();
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -116,27 +117,52 @@ public class FacadeBuilder
|
|||||||
|
|
||||||
for( BakedQuad bakedQuad : blockModel.getQuads( state, facing, rand ) )
|
for( BakedQuad bakedQuad : blockModel.getQuads( state, facing, rand ) )
|
||||||
{
|
{
|
||||||
return bakedQuad.getSprite();
|
return new TextureAtlasAndTint( bakedQuad );
|
||||||
}
|
}
|
||||||
|
|
||||||
for( BakedQuad bakedQuad : blockModel.getQuads( state, null, rand ) )
|
for( BakedQuad bakedQuad : blockModel.getQuads( state, null, rand ) )
|
||||||
{
|
{
|
||||||
if( firstFound == null )
|
if( firstFound == null )
|
||||||
{
|
{
|
||||||
firstFound = bakedQuad.getSprite();
|
firstFound = new TextureAtlasAndTint( bakedQuad );
|
||||||
}
|
}
|
||||||
if( bakedQuad.getFace() == facing )
|
if( bakedQuad.getFace() == facing )
|
||||||
{
|
{
|
||||||
return bakedQuad.getSprite();
|
return new TextureAtlasAndTint( bakedQuad );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch( Exception e )
|
||||||
|
{
|
||||||
|
if( warnedFor.add( state.getBlock().getRegistryName() ) )
|
||||||
|
{
|
||||||
|
AELog.warn( "Unable to get facade sprite for blockstate %s. Supressing further warnings for this block.", state );
|
||||||
|
AELog.debug( e );
|
||||||
|
}
|
||||||
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
ForgeHooksClient.setRenderLayer( orgLayer );
|
ForgeHooksClient.setRenderLayer( orgLayer );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fall back to the particle texture, if we havent found anything else so far.
|
||||||
|
if( firstFound == null )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return new TextureAtlasAndTint( blockModel.getParticleTexture(), -1 );
|
||||||
|
}
|
||||||
|
catch( Exception e )
|
||||||
|
{
|
||||||
|
if( warnedFor.add( state.getBlock().getRegistryName() ) )
|
||||||
|
{
|
||||||
|
AELog.warn( "Unable to get facade sprite particle texture fallback for blockstate %s. Supressing further warnings for this block.", state );
|
||||||
|
AELog.debug( e );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return firstFound;
|
return firstFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,6 +174,9 @@ public class FacadeBuilder
|
|||||||
|
|
||||||
builder.setDrawFaces( EnumSet.allOf( EnumFacing.class ) );
|
builder.setDrawFaces( EnumSet.allOf( EnumFacing.class ) );
|
||||||
|
|
||||||
|
// Reset to no color multiplicator
|
||||||
|
builder.setColorRGB( 0xFFFFFF );
|
||||||
|
|
||||||
// We only render the stilt if we don't intersect with any part directly, and if there's no part on our side
|
// We only render the stilt if we don't intersect with any part directly, and if there's no part on our side
|
||||||
if( renderStilt && busBounds == null && layer == BlockRenderLayer.CUTOUT )
|
if( renderStilt && busBounds == null && layer == BlockRenderLayer.CUTOUT )
|
||||||
{
|
{
|
||||||
@@ -186,36 +215,42 @@ public class FacadeBuilder
|
|||||||
|
|
||||||
IBakedModel blockModel = blockRendererDispatcher.getModelForState( blockState );
|
IBakedModel blockModel = blockRendererDispatcher.getModelForState( blockState );
|
||||||
|
|
||||||
int color = 0xffffff;
|
final int color;
|
||||||
try
|
|
||||||
{
|
|
||||||
blockColors.getColor( blockState );
|
|
||||||
}
|
|
||||||
catch( final Throwable ignored )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
if( translucent )
|
if( translucent )
|
||||||
{
|
{
|
||||||
color &= 0xFFFFFF;
|
color = 0x4CFFFFFF;
|
||||||
color |= 0x4C000000;
|
|
||||||
builder.setColor( color );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
builder.setColorRGB( color );
|
color = 0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Cache this
|
// TODO: Cache this
|
||||||
for( EnumFacing facing : facadeState.getOpenFaces() )
|
for( EnumFacing facing : facadeState.getOpenFaces() )
|
||||||
{
|
{
|
||||||
TextureAtlasSprite sprite = getSprite( blockModel, blockState, facing, rand );
|
TextureAtlasAndTint spriteAndTint = getSprite( blockModel, blockState, facing, rand );
|
||||||
if( sprite != null )
|
if( spriteAndTint != null && spriteAndTint.sprite != null )
|
||||||
{
|
{
|
||||||
builder.setTexture( facing, sprite );
|
// Use the tint color from the item stack here, which is based upon the assumption that the
|
||||||
|
// model used for the block will use the same meaning for tint indices as the item model does
|
||||||
|
if( spriteAndTint.tint != -1 )
|
||||||
|
{
|
||||||
|
int tintColor = facadeState.resolveTintColor( spriteAndTint.tint );
|
||||||
|
|
||||||
|
// Still apply the transparency color
|
||||||
|
tintColor &= 0xFFFFFF;
|
||||||
|
tintColor |= color & 0xFF000000;
|
||||||
|
builder.setColor( tintColor );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
builder.setColor( color );
|
||||||
|
}
|
||||||
|
builder.setTexture( facing, spriteAndTint.sprite );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
builder.setColor( color );
|
||||||
builder.setTexture( facing, facadeTexture );
|
builder.setTexture( facing, facadeTexture );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -431,4 +466,34 @@ public class FacadeBuilder
|
|||||||
throw new IllegalArgumentException( "Unsupported face: " + side );
|
throw new IllegalArgumentException( "Unsupported face: " + side );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class TextureAtlasAndTint
|
||||||
|
{
|
||||||
|
private final TextureAtlasSprite sprite;
|
||||||
|
private final int tint;
|
||||||
|
|
||||||
|
private TextureAtlasAndTint( BakedQuad quad )
|
||||||
|
{
|
||||||
|
this.sprite = quad.getSprite();
|
||||||
|
this.tint = quad.getTintIndex();
|
||||||
|
}
|
||||||
|
|
||||||
|
private TextureAtlasAndTint( TextureAtlasSprite sprite, int tint )
|
||||||
|
{
|
||||||
|
this.sprite = sprite;
|
||||||
|
this.tint = tint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TextureAtlasSprite getSprite()
|
||||||
|
{
|
||||||
|
return sprite;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTint()
|
||||||
|
{
|
||||||
|
return tint;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ package appeng.client.render.cablebus;
|
|||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
|
|
||||||
|
|
||||||
@@ -19,10 +21,14 @@ public class FacadeRenderState
|
|||||||
// Which faces of the cube should be rendered for this particular facade
|
// Which faces of the cube should be rendered for this particular facade
|
||||||
private final EnumSet<EnumFacing> openFaces;
|
private final EnumSet<EnumFacing> openFaces;
|
||||||
|
|
||||||
public FacadeRenderState( IBlockState sourceBlock, EnumSet<EnumFacing> openFaces )
|
// For resolving the tint indices of a facade
|
||||||
|
private final ItemStack textureItem;
|
||||||
|
|
||||||
|
public FacadeRenderState( IBlockState sourceBlock, EnumSet<EnumFacing> openFaces, ItemStack textureItem )
|
||||||
{
|
{
|
||||||
this.sourceBlock = sourceBlock;
|
this.sourceBlock = sourceBlock;
|
||||||
this.openFaces = openFaces;
|
this.openFaces = openFaces;
|
||||||
|
this.textureItem = textureItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBlockState getSourceBlock()
|
public IBlockState getSourceBlock()
|
||||||
@@ -35,4 +41,9 @@ public class FacadeRenderState
|
|||||||
return openFaces;
|
return openFaces;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int resolveTintColor( int tintIndex )
|
||||||
|
{
|
||||||
|
return Minecraft.getMinecraft().getItemColors().getColorFromItemstack( textureItem, tintIndex );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
package appeng.client.render.tesr;
|
package appeng.client.render.tesr;
|
||||||
|
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.model.ModelChest;
|
import net.minecraft.client.model.ModelChest;
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
@@ -70,14 +71,8 @@ public class SkyChestTESR extends TileEntitySpecialRenderer<TileSkyChest>
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( te != null )
|
SkyChestType chestType = getChestType( te );
|
||||||
{
|
this.bindTexture( chestType == SkyChestType.STONE ? TEXTURE_STONE : TEXTURE_BLOCK );
|
||||||
this.bindTexture( ( (BlockSkyChest) te.getBlockType() ).type == SkyChestType.STONE ? TEXTURE_STONE : TEXTURE_BLOCK );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.bindTexture( TEXTURE_BLOCK );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
@@ -128,4 +123,20 @@ public class SkyChestTESR extends TileEntitySpecialRenderer<TileSkyChest>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Defensively determine the sky chest type
|
||||||
|
private static SkyChestType getChestType( TileSkyChest te )
|
||||||
|
{
|
||||||
|
if( te == null )
|
||||||
|
{
|
||||||
|
return SkyChestType.BLOCK;
|
||||||
|
}
|
||||||
|
|
||||||
|
Block blockType = te.getBlockType();
|
||||||
|
if( blockType instanceof BlockSkyChest )
|
||||||
|
{
|
||||||
|
return ( (BlockSkyChest) blockType ).type;
|
||||||
|
}
|
||||||
|
return SkyChestType.BLOCK;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ public abstract class AEBaseContainer extends Container
|
|||||||
final ItemStack a = stack == null ? null : stack.getItemStack();
|
final ItemStack a = stack == null ? null : stack.getItemStack();
|
||||||
final ItemStack b = this.clientRequestedTargetItem == null ? null : this.clientRequestedTargetItem.getItemStack();
|
final ItemStack b = this.clientRequestedTargetItem == null ? null : this.clientRequestedTargetItem.getItemStack();
|
||||||
|
|
||||||
if( Platform.isSameItemPrecise( a, b ) )
|
if( Platform.itemComparisons().isSameItem( a, b ) )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -438,13 +438,11 @@ public abstract class AEBaseContainer extends Container
|
|||||||
|
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
{
|
{
|
||||||
for( final Object crafter : this.listeners )
|
for( final IContainerListener listener : this.listeners )
|
||||||
{
|
{
|
||||||
final IContainerListener IContainerListener = (IContainerListener) crafter;
|
|
||||||
|
|
||||||
for( final SyncData sd : this.syncData.values() )
|
for( final SyncData sd : this.syncData.values() )
|
||||||
{
|
{
|
||||||
sd.tick( IContainerListener );
|
sd.tick( listener );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -545,7 +543,7 @@ public abstract class AEBaseContainer extends Container
|
|||||||
|
|
||||||
if( !( cs.isPlayerSide() ) && cs instanceof SlotFake )
|
if( !( cs.isPlayerSide() ) && cs instanceof SlotFake )
|
||||||
{
|
{
|
||||||
if( Platform.isSameItemPrecise( destination, tis ) )
|
if( Platform.itemComparisons().isSameItem( destination, tis ) )
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -577,7 +575,7 @@ public abstract class AEBaseContainer extends Container
|
|||||||
{
|
{
|
||||||
final ItemStack t = d.getStack();
|
final ItemStack t = d.getStack();
|
||||||
|
|
||||||
if( Platform.isSameItemPrecise( tis, t ) ) // t.isItemEqual(tis))
|
if( Platform.itemComparisons().isSameItem( tis, t ) ) // t.isItemEqual(tis))
|
||||||
{
|
{
|
||||||
int maxSize = t.getMaxStackSize();
|
int maxSize = t.getMaxStackSize();
|
||||||
if( maxSize > d.getSlotStackLimit() )
|
if( maxSize > d.getSlotStackLimit() )
|
||||||
@@ -629,7 +627,7 @@ public abstract class AEBaseContainer extends Container
|
|||||||
{
|
{
|
||||||
final ItemStack t = d.getStack();
|
final ItemStack t = d.getStack();
|
||||||
|
|
||||||
if( Platform.isSameItemPrecise( t, tis ) )
|
if( Platform.itemComparisons().isSameItem( t, tis ) )
|
||||||
{
|
{
|
||||||
int maxSize = t.getMaxStackSize();
|
int maxSize = t.getMaxStackSize();
|
||||||
if( d.getSlotStackLimit() < maxSize )
|
if( d.getSlotStackLimit() < maxSize )
|
||||||
@@ -795,7 +793,7 @@ public abstract class AEBaseContainer extends Container
|
|||||||
{
|
{
|
||||||
if( hand == null )
|
if( hand == null )
|
||||||
{
|
{
|
||||||
is.stackSize--;
|
is.stackSize = Math.max( 1, is.stackSize - 1 );
|
||||||
}
|
}
|
||||||
else if( hand.isItemEqual( is ) )
|
else if( hand.isItemEqual( is ) )
|
||||||
{
|
{
|
||||||
@@ -929,7 +927,7 @@ public abstract class AEBaseContainer extends Container
|
|||||||
{
|
{
|
||||||
liftQty = 0;
|
liftQty = 0;
|
||||||
}
|
}
|
||||||
if( !Platform.isSameItemPrecise( slotItem.getItemStack(), item ) )
|
if( !Platform.itemComparisons().isSameItem( slotItem.getItemStack(), item ) )
|
||||||
{
|
{
|
||||||
liftQty = 0;
|
liftQty = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,7 +97,10 @@ public class SyncData
|
|||||||
}
|
}
|
||||||
else if( val instanceof Long || val.getClass() == long.class )
|
else if( val instanceof Long || val.getClass() == long.class )
|
||||||
{
|
{
|
||||||
NetworkHandler.instance.sendTo( new PacketProgressBar( this.channel, (Long) val ), (EntityPlayerMP) o );
|
if( o instanceof EntityPlayerMP )
|
||||||
|
{
|
||||||
|
NetworkHandler.instance.sendTo( new PacketProgressBar( this.channel, (Long) val ), (EntityPlayerMP) o );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if( val instanceof Boolean || val.getClass() == boolean.class )
|
else if( val instanceof Boolean || val.getClass() == boolean.class )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.inventory.IContainerListener;
|
import net.minecraft.inventory.IContainerListener;
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.text.ITextComponent;
|
import net.minecraft.util.text.ITextComponent;
|
||||||
|
|
||||||
@@ -151,22 +152,24 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
|||||||
this.setValidContainer( false );
|
this.setValidContainer( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
for( final Object crafter : this.listeners )
|
for( final IContainerListener listener : this.listeners )
|
||||||
{
|
{
|
||||||
final IContainerListener IContainerListener = (IContainerListener) crafter;
|
|
||||||
|
|
||||||
if( this.prevStack != is )
|
if( this.prevStack != is )
|
||||||
{
|
{
|
||||||
// if the bars changed an item was probably made, so just send shit!
|
// if the bars changed an item was probably made, so just send shit!
|
||||||
for( final Object s : this.inventorySlots )
|
for( final Slot s : this.inventorySlots )
|
||||||
{
|
{
|
||||||
if( s instanceof OptionalSlotRestrictedInput )
|
if( s instanceof OptionalSlotRestrictedInput )
|
||||||
{
|
{
|
||||||
final OptionalSlotRestrictedInput sri = (OptionalSlotRestrictedInput) s;
|
final OptionalSlotRestrictedInput sri = (OptionalSlotRestrictedInput) s;
|
||||||
IContainerListener.sendSlotContents( this, sri.slotNumber, sri.getStack() );
|
listener.sendSlotContents( this, sri.slotNumber, sri.getStack() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
( (EntityPlayerMP) IContainerListener ).isChangingQuantityOnly = false;
|
|
||||||
|
if( listener instanceof EntityPlayerMP )
|
||||||
|
{
|
||||||
|
( (EntityPlayerMP) listener ).isChangingQuantityOnly = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
|||||||
{
|
{
|
||||||
for( final ItemStack optional : AEApi.instance().registries().inscriber().getOptionals() )
|
for( final ItemStack optional : AEApi.instance().registries().inscriber().getOptionals() )
|
||||||
{
|
{
|
||||||
if( Platform.isSameItemPrecise( optional, is ) )
|
if( Platform.itemComparisons().isSameItem( optional, is ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -126,18 +126,18 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
|||||||
|
|
||||||
for( final IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
|
for( final IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
|
||||||
{
|
{
|
||||||
final boolean matchA = ( top == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( top, recipe.getTopOptional().orElse( null ) ) ) && // and...
|
final boolean matchA = ( top == null && !recipe.getTopOptional().isPresent() ) || ( Platform.itemComparisons().isSameItem( top, recipe.getTopOptional().orElse( null ) ) ) && // and...
|
||||||
( bot == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( bot, recipe.getBottomOptional().orElse( null ) ) );
|
( bot == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.itemComparisons().isSameItem( bot, recipe.getBottomOptional().orElse( null ) ) );
|
||||||
|
|
||||||
final boolean matchB = ( bot == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( bot, recipe.getTopOptional().orElse( null ) ) ) && // and...
|
final boolean matchB = ( bot == null && !recipe.getTopOptional().isPresent() ) || ( Platform.itemComparisons().isSameItem( bot, recipe.getTopOptional().orElse( null ) ) ) && // and...
|
||||||
( top == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( top, recipe.getBottomOptional().orElse( null ) ) );
|
( top == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.itemComparisons().isSameItem( top, recipe.getBottomOptional().orElse( null ) ) );
|
||||||
|
|
||||||
if( matchA || matchB )
|
if( matchA || matchB )
|
||||||
{
|
{
|
||||||
matches = true;
|
matches = true;
|
||||||
for( final ItemStack option : recipe.getInputs() )
|
for( final ItemStack option : recipe.getInputs() )
|
||||||
{
|
{
|
||||||
if( Platform.isSameItemPrecise( is, option ) )
|
if( Platform.itemComparisons().isSameItem( is, option ) )
|
||||||
{
|
{
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
@@ -174,13 +174,13 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
|||||||
boolean isValid = false;
|
boolean isValid = false;
|
||||||
for( final IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
|
for( final IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
|
||||||
{
|
{
|
||||||
if( Platform.isSameItemPrecise( recipe.getTopOptional().orElse( null ), otherSlot ) )
|
if( Platform.itemComparisons().isSameItem( recipe.getTopOptional().orElse( null ), otherSlot ) )
|
||||||
{
|
{
|
||||||
isValid = Platform.isSameItemPrecise( is, recipe.getBottomOptional().orElse( null ) );
|
isValid = Platform.itemComparisons().isSameItem( is, recipe.getBottomOptional().orElse( null ) );
|
||||||
}
|
}
|
||||||
else if( Platform.isSameItemPrecise( recipe.getBottomOptional().orElse( null ), otherSlot ) )
|
else if( Platform.itemComparisons().isSameItem( recipe.getBottomOptional().orElse( null ), otherSlot ) )
|
||||||
{
|
{
|
||||||
isValid = Platform.isSameItemPrecise( is, recipe.getTopOptional().orElse( null ) );
|
isValid = Platform.itemComparisons().isSameItem( is, recipe.getTopOptional().orElse( null ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( isValid )
|
if( isValid )
|
||||||
|
|||||||
@@ -186,15 +186,18 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
|||||||
if( sideLocal != sideRemote )
|
if( sideLocal != sideRemote )
|
||||||
{
|
{
|
||||||
this.clientCM.putSetting( set, sideLocal );
|
this.clientCM.putSetting( set, sideLocal );
|
||||||
for( final Object crafter : this.listeners )
|
for( final IContainerListener crafter : this.listeners )
|
||||||
{
|
{
|
||||||
try
|
if( crafter instanceof EntityPlayerMP )
|
||||||
{
|
{
|
||||||
NetworkHandler.instance.sendTo( new PacketValueConfig( set.name(), sideLocal.name() ), (EntityPlayerMP) crafter );
|
try
|
||||||
}
|
{
|
||||||
catch( final IOException e )
|
NetworkHandler.instance.sendTo( new PacketValueConfig( set.name(), sideLocal.name() ), (EntityPlayerMP) crafter );
|
||||||
{
|
}
|
||||||
AELog.debug( e );
|
catch( final IOException e )
|
||||||
|
{
|
||||||
|
AELog.debug( e );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -258,6 +261,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
|||||||
|
|
||||||
super.detectAndSendChanges();
|
super.detectAndSendChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void updatePowerStatus()
|
protected void updatePowerStatus()
|
||||||
@@ -340,7 +344,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeListener( final IContainerListener c )
|
public void removeListener( final IContainerListener c )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public class ContainerMEPortableCell extends ContainerMEMonitorable
|
|||||||
{
|
{
|
||||||
if( currentItem != null )
|
if( currentItem != null )
|
||||||
{
|
{
|
||||||
if( Platform.isSameItem( this.civ.getItemStack(), currentItem ) )
|
if( Platform.itemComparisons().isEqualItem( this.civ.getItemStack(), currentItem ) )
|
||||||
{
|
{
|
||||||
this.getPlayerInv().setInventorySlotContents( this.getPlayerInv().currentItem, this.civ.getItemStack() );
|
this.getPlayerInv().setInventorySlotContents( this.getPlayerInv().currentItem, this.civ.getItemStack() );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class ContainerNetworkTool extends AEBaseContainer
|
|||||||
{
|
{
|
||||||
if( currentItem != null )
|
if( currentItem != null )
|
||||||
{
|
{
|
||||||
if( Platform.isSameItem( this.toolInv.getItemStack(), currentItem ) )
|
if( Platform.itemComparisons().isEqualItem( this.toolInv.getItemStack(), currentItem ) )
|
||||||
{
|
{
|
||||||
this.getPlayerInv().setInventorySlotContents( this.getPlayerInv().currentItem, this.toolInv.getItemStack() );
|
this.getPlayerInv().setInventorySlotContents( this.getPlayerInv().currentItem, this.toolInv.getItemStack() );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
|||||||
if( output != null && !this.isPattern( output ) )
|
if( output != null && !this.isPattern( output ) )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}// if nothing is there we should snag a new pattern.
|
} // if nothing is there we should snag a new pattern.
|
||||||
else if( output == null )
|
else if( output == null )
|
||||||
{
|
{
|
||||||
output = this.patternSlotIN.getStack();
|
output = this.patternSlotIN.getStack();
|
||||||
@@ -414,7 +414,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
|||||||
|
|
||||||
final IRecipe rr = Platform.findMatchingRecipe( real, p.worldObj );
|
final IRecipe rr = Platform.findMatchingRecipe( real, p.worldObj );
|
||||||
|
|
||||||
if( rr == r && Platform.isSameItemPrecise( rr.getCraftingResult( real ), is ) )
|
if( rr == r && Platform.itemComparisons().isSameItem( rr.getCraftingResult( real ), is ) )
|
||||||
{
|
{
|
||||||
final SlotCrafting sc = new SlotCrafting( p, real, this.cOut, 0, 0, 0 );
|
final SlotCrafting sc = new SlotCrafting( p, real, this.cOut, 0, 0, 0 );
|
||||||
sc.onPickupFromSlot( p, is );
|
sc.onPickupFromSlot( p, is );
|
||||||
@@ -483,19 +483,19 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
|||||||
{
|
{
|
||||||
if( s == this.patternSlotOUT && Platform.isServer() )
|
if( s == this.patternSlotOUT && Platform.isServer() )
|
||||||
{
|
{
|
||||||
for( final Object crafter : this.listeners )
|
for( final IContainerListener listener : this.listeners )
|
||||||
{
|
{
|
||||||
final IContainerListener IContainerListener = (IContainerListener) crafter;
|
for( final Slot slot : this.inventorySlots )
|
||||||
|
|
||||||
for( final Object g : this.inventorySlots )
|
|
||||||
{
|
{
|
||||||
if( g instanceof OptionalSlotFake || g instanceof SlotFakeCraftingMatrix )
|
if( slot instanceof OptionalSlotFake || slot instanceof SlotFakeCraftingMatrix )
|
||||||
{
|
{
|
||||||
final Slot sri = (Slot) g;
|
listener.sendSlotContents( this, slot.slotNumber, slot.getStack() );
|
||||||
IContainerListener.sendSlotContents( this, sri.slotNumber, sri.getStack() );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
( (EntityPlayerMP) IContainerListener ).isChangingQuantityOnly = false;
|
if( listener instanceof EntityPlayerMP )
|
||||||
|
{
|
||||||
|
( (EntityPlayerMP) listener ).isChangingQuantityOnly = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.detectAndSendChanges();
|
this.detectAndSendChanges();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
|
|||||||
{
|
{
|
||||||
if( currentItem != null )
|
if( currentItem != null )
|
||||||
{
|
{
|
||||||
if( Platform.isSameItem( this.toolInv.getItemStack(), currentItem ) )
|
if( Platform.itemComparisons().isEqualItem( this.toolInv.getItemStack(), currentItem ) )
|
||||||
{
|
{
|
||||||
this.getPlayerInv().setInventorySlotContents( this.getPlayerInv().currentItem, this.toolInv.getItemStack() );
|
this.getPlayerInv().setInventorySlotContents( this.getPlayerInv().currentItem, this.toolInv.getItemStack() );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,11 +168,10 @@ public class ContainerSecurityStation extends ContainerMEMonitorable implements
|
|||||||
this.wirelessOut.putStack( term );
|
this.wirelessOut.putStack( term );
|
||||||
|
|
||||||
// update the two slots in question...
|
// update the two slots in question...
|
||||||
for( final Object crafter : this.listeners )
|
for( final IContainerListener listener : this.listeners )
|
||||||
{
|
{
|
||||||
final IContainerListener IContainerListener = (IContainerListener) crafter;
|
listener.sendSlotContents( this, this.wirelessIn.slotNumber, this.wirelessIn.getStack() );
|
||||||
IContainerListener.sendSlotContents( this, this.wirelessIn.slotNumber, this.wirelessIn.getStack() );
|
listener.sendSlotContents( this, this.wirelessOut.slotNumber, this.wirelessOut.getStack() );
|
||||||
IContainerListener.sendSlotContents( this, this.wirelessOut.slotNumber, this.wirelessOut.getStack() );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
|||||||
{
|
{
|
||||||
if( currentItem != null )
|
if( currentItem != null )
|
||||||
{
|
{
|
||||||
if( Platform.isSameItem( this.tbInventory.getItemStack(), currentItem ) )
|
if( Platform.itemComparisons().isEqualItem( this.tbInventory.getItemStack(), currentItem ) )
|
||||||
{
|
{
|
||||||
this.getPlayerInv().setInventorySlotContents( this.tbSlot, this.tbInventory.getItemStack() );
|
this.getPlayerInv().setInventorySlotContents( this.tbSlot, this.tbInventory.getItemStack() );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
|||||||
// update crafting matrix...
|
// update crafting matrix...
|
||||||
ItemStack is = this.getStack();
|
ItemStack is = this.getStack();
|
||||||
|
|
||||||
if( is != null && Platform.isSameItem( request, is ) )
|
if( is != null && Platform.itemComparisons().isEqualItem( request, is ) )
|
||||||
{
|
{
|
||||||
final ItemStack[] set = new ItemStack[this.getPattern().getSizeInventory()];
|
final ItemStack[] set = new ItemStack[this.getPattern().getSizeInventory()];
|
||||||
|
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ public class SlotRestrictedInput extends AppEngSlot
|
|||||||
|
|
||||||
for( final ItemStack optional : AEApi.instance().registries().inscriber().getOptionals() )
|
for( final ItemStack optional : AEApi.instance().registries().inscriber().getOptionals() )
|
||||||
{
|
{
|
||||||
if( Platform.isSameItemPrecise( optional, i ) )
|
if( Platform.itemComparisons().isSameItem( optional, i ) )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -258,7 +258,7 @@ public class SlotRestrictedInput extends AppEngSlot
|
|||||||
|
|
||||||
public static boolean isMetalIngot( final ItemStack i )
|
public static boolean isMetalIngot( final ItemStack i )
|
||||||
{
|
{
|
||||||
if( Platform.isSameItemPrecise( i, new ItemStack( Items.IRON_INGOT ) ) )
|
if( Platform.itemComparisons().isSameItem( i, new ItemStack( Items.IRON_INGOT ) ) )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -267,7 +267,7 @@ public class SlotRestrictedInput extends AppEngSlot
|
|||||||
{
|
{
|
||||||
for( final ItemStack ingot : OreDictionary.getOres( "ingot" + name ) )
|
for( final ItemStack ingot : OreDictionary.getOres( "ingot" + name ) )
|
||||||
{
|
{
|
||||||
if( Platform.isSameItemPrecise( i, ingot ) )
|
if( Platform.itemComparisons().isSameItem( i, ingot ) )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ import java.util.Collection;
|
|||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.common.config.Configuration;
|
import net.minecraftforge.common.config.Configuration;
|
||||||
import net.minecraftforge.common.config.Property;
|
import net.minecraftforge.common.config.Property;
|
||||||
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
|
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
|
||||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
|
||||||
import net.minecraftforge.fml.common.ModContainer;
|
import net.minecraftforge.fml.common.ModContainer;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
||||||
@@ -88,6 +88,7 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
|||||||
public boolean enableEffects = true;
|
public boolean enableEffects = true;
|
||||||
public boolean useLargeFonts = false;
|
public boolean useLargeFonts = false;
|
||||||
public boolean useColoredCraftingStatus;
|
public boolean useColoredCraftingStatus;
|
||||||
|
public boolean removeCrashingItemsOnLoad = false;
|
||||||
public int wirelessTerminalBattery = 1600000;
|
public int wirelessTerminalBattery = 1600000;
|
||||||
public int entropyManipulatorBattery = 200000;
|
public int entropyManipulatorBattery = 200000;
|
||||||
public int matterCannonBattery = 200000;
|
public int matterCannonBattery = 200000;
|
||||||
@@ -113,7 +114,7 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
|||||||
super( configFile );
|
super( configFile );
|
||||||
this.configFile = configFile;
|
this.configFile = configFile;
|
||||||
|
|
||||||
FMLCommonHandler.instance().bus().register( this );
|
MinecraftForge.EVENT_BUS.register( this );
|
||||||
|
|
||||||
final double DEFAULT_IC2_EXCHANGE = 2.0;
|
final double DEFAULT_IC2_EXCHANGE = 2.0;
|
||||||
PowerUnits.EU.conversionRatio = this.get( "PowerRatios", "IC2", DEFAULT_IC2_EXCHANGE ).getDouble( DEFAULT_IC2_EXCHANGE );
|
PowerUnits.EU.conversionRatio = this.get( "PowerRatios", "IC2", DEFAULT_IC2_EXCHANGE ).getDouble( DEFAULT_IC2_EXCHANGE );
|
||||||
@@ -126,6 +127,8 @@ public final class AEConfig extends Configuration implements IConfigurableObject
|
|||||||
CondenserOutput.MATTER_BALLS.requiredPower = this.get( "Condenser", "MatterBalls", 256 ).getInt( 256 );
|
CondenserOutput.MATTER_BALLS.requiredPower = this.get( "Condenser", "MatterBalls", 256 ).getInt( 256 );
|
||||||
CondenserOutput.SINGULARITY.requiredPower = this.get( "Condenser", "Singularity", 256000 ).getInt( 256000 );
|
CondenserOutput.SINGULARITY.requiredPower = this.get( "Condenser", "Singularity", 256000 ).getInt( 256000 );
|
||||||
|
|
||||||
|
this.removeCrashingItemsOnLoad = this.get( "general", "removeCrashingItemsOnLoad", false, "Will auto-remove items that crash when being loaded from storage. This will destroy those items instead of crashing the game!" ).getBoolean();
|
||||||
|
|
||||||
this.grinderOres = this.get( "GrindStone", "grinderOres", this.grinderOres ).getStringList();
|
this.grinderOres = this.get( "GrindStone", "grinderOres", this.grinderOres ).getStringList();
|
||||||
this.oreDoublePercentage = this.get( "GrindStone", "oreDoublePercentage", this.oreDoublePercentage ).getDouble( this.oreDoublePercentage );
|
this.oreDoublePercentage = this.get( "GrindStone", "oreDoublePercentage", this.oreDoublePercentage ).getDouble( this.oreDoublePercentage );
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ package appeng.core;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
@@ -30,7 +29,6 @@ import com.google.common.base.Preconditions;
|
|||||||
import net.minecraft.world.DimensionType;
|
import net.minecraft.world.DimensionType;
|
||||||
import net.minecraft.world.biome.Biome;
|
import net.minecraft.world.biome.Biome;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
|
||||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||||
@@ -65,6 +63,7 @@ import appeng.core.localization.GuiText;
|
|||||||
import appeng.core.localization.PlayerMessages;
|
import appeng.core.localization.PlayerMessages;
|
||||||
import appeng.core.stats.PlayerStatsRegistration;
|
import appeng.core.stats.PlayerStatsRegistration;
|
||||||
import appeng.hooks.TickHandler;
|
import appeng.hooks.TickHandler;
|
||||||
|
import appeng.integration.Integrations;
|
||||||
import appeng.items.materials.ItemMaterial;
|
import appeng.items.materials.ItemMaterial;
|
||||||
import appeng.items.parts.ItemFacade;
|
import appeng.items.parts.ItemFacade;
|
||||||
import appeng.loot.ChestLoot;
|
import appeng.loot.ChestLoot;
|
||||||
@@ -86,7 +85,6 @@ import appeng.recipes.game.ShapedRecipe;
|
|||||||
import appeng.recipes.game.ShapelessRecipe;
|
import appeng.recipes.game.ShapelessRecipe;
|
||||||
import appeng.recipes.handlers.Crusher;
|
import appeng.recipes.handlers.Crusher;
|
||||||
import appeng.recipes.handlers.Grind;
|
import appeng.recipes.handlers.Grind;
|
||||||
import appeng.recipes.handlers.GrindFZ;
|
|
||||||
import appeng.recipes.handlers.HCCrusher;
|
import appeng.recipes.handlers.HCCrusher;
|
||||||
import appeng.recipes.handlers.Inscribe;
|
import appeng.recipes.handlers.Inscribe;
|
||||||
import appeng.recipes.handlers.Macerator;
|
import appeng.recipes.handlers.Macerator;
|
||||||
@@ -216,7 +214,6 @@ public final class Registration
|
|||||||
registry.addNewCraftHandler( "mekechamber", MekEnrichment.class );
|
registry.addNewCraftHandler( "mekechamber", MekEnrichment.class );
|
||||||
registry.addNewCraftHandler( "grind", Grind.class );
|
registry.addNewCraftHandler( "grind", Grind.class );
|
||||||
registry.addNewCraftHandler( "crusher", Crusher.class );
|
registry.addNewCraftHandler( "crusher", Crusher.class );
|
||||||
registry.addNewCraftHandler( "grindfz", GrindFZ.class );
|
|
||||||
registry.addNewCraftHandler( "pulverizer", Pulverizer.class );
|
registry.addNewCraftHandler( "pulverizer", Pulverizer.class );
|
||||||
registry.addNewCraftHandler( "macerator", Macerator.class );
|
registry.addNewCraftHandler( "macerator", Macerator.class );
|
||||||
|
|
||||||
@@ -248,13 +245,11 @@ public final class Registration
|
|||||||
final Runnable recipeLoader = new RecipeLoader( recipeDirectory, customRecipeConfig, this.recipeHandler );
|
final Runnable recipeLoader = new RecipeLoader( recipeDirectory, customRecipeConfig, this.recipeHandler );
|
||||||
recipeLoader.run();
|
recipeLoader.run();
|
||||||
|
|
||||||
// TODO readd layers
|
if( Integrations.ic2().isEnabled() )
|
||||||
|
{
|
||||||
// if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.IC2 ) )
|
partHelper.registerNewLayer( "appeng.parts.layers.LayerIEnergySink", "ic2.api.energy.tile.IEnergySink" );
|
||||||
// {
|
partHelper.registerNewLayer( "appeng.parts.layers.LayerIEnergySource", "ic2.api.energy.tile.IEnergySource" );
|
||||||
// partHelper.registerNewLayer( "appeng.parts.layers.LayerIEnergySink", "ic2.api.energy.tile.IEnergySink" );
|
}
|
||||||
// partHelper.registerNewLayer( "appeng.parts.layers.LayerIEnergySource", "ic2.api.energy.tile.IEnergySource" );
|
|
||||||
// }
|
|
||||||
//
|
//
|
||||||
// if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.RF ) )
|
// if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.RF ) )
|
||||||
// {
|
// {
|
||||||
@@ -267,7 +262,6 @@ public final class Registration
|
|||||||
// "li.cil.oc.api.network.SidedEnvironment" );
|
// "li.cil.oc.api.network.SidedEnvironment" );
|
||||||
// }
|
// }
|
||||||
|
|
||||||
FMLCommonHandler.instance().bus().register( TickHandler.INSTANCE );
|
|
||||||
MinecraftForge.EVENT_BUS.register( TickHandler.INSTANCE );
|
MinecraftForge.EVENT_BUS.register( TickHandler.INSTANCE );
|
||||||
|
|
||||||
|
|
||||||
@@ -300,7 +294,7 @@ public final class Registration
|
|||||||
|
|
||||||
this.recipeHandler.injectRecipes();
|
this.recipeHandler.injectRecipes();
|
||||||
|
|
||||||
final PlayerStatsRegistration registration = new PlayerStatsRegistration( FMLCommonHandler.instance().bus(), AEConfig.instance );
|
final PlayerStatsRegistration registration = new PlayerStatsRegistration( MinecraftForge.EVENT_BUS, AEConfig.instance );
|
||||||
registration.registerAchievementHandlers();
|
registration.registerAchievementHandlers();
|
||||||
registration.registerAchievements();
|
registration.registerAchievements();
|
||||||
|
|
||||||
@@ -337,8 +331,6 @@ public final class Registration
|
|||||||
PlayerMessages.values();
|
PlayerMessages.values();
|
||||||
GuiText.values();
|
GuiText.values();
|
||||||
|
|
||||||
Api.INSTANCE.partHelper().initFMPSupport();
|
|
||||||
|
|
||||||
definitions.getRegistry().getBootstrapComponents().forEach( b -> b.postInitialize( event.getSide() ) );
|
definitions.getRegistry().getBootstrapComponents().forEach( b -> b.postInitialize( event.getSide() ) );
|
||||||
|
|
||||||
// Interface
|
// Interface
|
||||||
|
|||||||
@@ -28,7 +28,10 @@ import java.util.LinkedList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.cache.CacheBuilder;
|
||||||
|
import com.google.common.cache.CacheLoader;
|
||||||
|
import com.google.common.cache.LoadingCache;
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
import org.objectweb.asm.ClassReader;
|
import org.objectweb.asm.ClassReader;
|
||||||
import org.objectweb.asm.ClassWriter;
|
import org.objectweb.asm.ClassWriter;
|
||||||
@@ -53,9 +56,6 @@ import appeng.api.parts.IPartHelper;
|
|||||||
import appeng.api.parts.LayerBase;
|
import appeng.api.parts.LayerBase;
|
||||||
import appeng.core.AELog;
|
import appeng.core.AELog;
|
||||||
import appeng.core.CommonHelper;
|
import appeng.core.CommonHelper;
|
||||||
import appeng.integration.IntegrationRegistry;
|
|
||||||
import appeng.integration.IntegrationType;
|
|
||||||
import appeng.integration.abstraction.IFMP;
|
|
||||||
import appeng.parts.PartPlacement;
|
import appeng.parts.PartPlacement;
|
||||||
import appeng.tile.AEBaseTile;
|
import appeng.tile.AEBaseTile;
|
||||||
import appeng.tile.networking.TileCableBus;
|
import appeng.tile.networking.TileCableBus;
|
||||||
@@ -64,80 +64,91 @@ import appeng.tile.networking.TileCableBus;
|
|||||||
public class ApiPart implements IPartHelper
|
public class ApiPart implements IPartHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
private final Map<String, Class<? extends AEBaseTile>> tileImplementations = new HashMap<>();
|
private final LoadingCache<CacheKey, Class<? extends AEBaseTile>> cache = CacheBuilder.newBuilder().build( new CacheLoader<CacheKey, Class<? extends AEBaseTile>>()
|
||||||
private final Map<Class<?>, String> interfaces2Layer = new HashMap<Class<?>, String>();
|
{
|
||||||
private final Map<String, Class> roots = new HashMap<String, Class>();
|
@Override
|
||||||
|
public Class<? extends AEBaseTile> load( CacheKey key ) throws Exception
|
||||||
|
{
|
||||||
|
return generateCombinedClass( key );
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
private final Map<Class<?>, String> interfaces2Layer = new HashMap<>();
|
||||||
private final List<String> desc = new LinkedList<String>();
|
private final List<String> desc = new LinkedList<String>();
|
||||||
|
|
||||||
public void initFMPSupport()
|
/**
|
||||||
{
|
* Conceptually this method will build a new class hierarchy that is rooted at the given base class, and includes a chain of all registered layers.
|
||||||
for( final Class layerInterface : this.interfaces2Layer.keySet() )
|
* <p/>
|
||||||
{
|
* To accomplish this, it takes the first registered layer, replaces it's inheritance from LayerBase with an inheritance from the given baseClass,
|
||||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.FMP ) )
|
* and uses the resulting class as the parent class for the next registered layer, for which it repeats this process. This process is then repeated
|
||||||
{
|
* until a class hierarchy of all layers is formed. While janking out the inheritance from LayerBase, it'll make also sure that calls to that
|
||||||
( (IFMP) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.FMP ) ).registerPassThrough( layerInterface );
|
* classes method will instead be forwarded to the superclass that was inserted as part of the described process.
|
||||||
}
|
* <p/>
|
||||||
}
|
* Example: If layers A and B are registered, and TileCableBus is passed in as the baseClass, a synthetic class A_B_TileCableBus should be returned,
|
||||||
}
|
* which has A_B_TileCableBus -extends-> B_TileCableBus -extends-> TileCableBus as it's class hierarchy, where A_B_TileCableBus has been generated
|
||||||
|
* from A, and B_TileCableBus has been generated from B.
|
||||||
|
*/
|
||||||
public Class<? extends AEBaseTile> getCombinedInstance( final Class<? extends AEBaseTile> baseClass )
|
public Class<? extends AEBaseTile> getCombinedInstance( final Class<? extends AEBaseTile> baseClass )
|
||||||
{
|
{
|
||||||
String base = baseClass.getName();
|
|
||||||
|
|
||||||
if( this.desc.isEmpty() )
|
if( this.desc.isEmpty() )
|
||||||
{
|
{
|
||||||
|
// No layers registered...
|
||||||
return baseClass;
|
return baseClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String description = base + ':' + Joiner.on( ";" ).skipNulls().join( this.desc.iterator() );
|
return cache.getUnchecked( new CacheKey( baseClass, this.desc ) );
|
||||||
|
|
||||||
if( this.tileImplementations.get( description ) != null )
|
|
||||||
{
|
|
||||||
return this.tileImplementations.get( description );
|
|
||||||
}
|
|
||||||
|
|
||||||
String f = base;// TileCableBus.class.getName();
|
|
||||||
String Addendum = baseClass.getSimpleName();
|
|
||||||
Class<? extends AEBaseTile> myClass = baseClass;
|
|
||||||
|
|
||||||
String path = f;
|
|
||||||
|
|
||||||
for( final String name : this.desc )
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
final String newPath = path + ';' + name;
|
|
||||||
myClass = this.getClassByDesc( baseClass.getSimpleName(), newPath, f, this.interfaces2Layer.get( Class.forName( name ) ) );
|
|
||||||
path = newPath;
|
|
||||||
}
|
|
||||||
catch( final Throwable t )
|
|
||||||
{
|
|
||||||
AELog.warn( "Error loading " + name );
|
|
||||||
AELog.debug( t );
|
|
||||||
}
|
|
||||||
f = myClass.getName();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.tileImplementations.put( description, myClass );
|
|
||||||
|
|
||||||
return myClass;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Class getClassByDesc( final String addendum, final String fullPath, final String root, final String next )
|
private Class<? extends AEBaseTile> generateCombinedClass( CacheKey cacheKey )
|
||||||
{
|
{
|
||||||
if( this.roots.get( fullPath ) != null )
|
final Class<? extends AEBaseTile> parentClass;
|
||||||
|
|
||||||
|
// Get the list of interfaces that still need to be implemented beyond the current one
|
||||||
|
List<String> remainingInterfaces = cacheKey.getInterfaces().subList( 1, cacheKey.getInterfaces().size() );
|
||||||
|
|
||||||
|
// We are not at the root of the class hierarchy yet
|
||||||
|
if( !remainingInterfaces.isEmpty() )
|
||||||
{
|
{
|
||||||
return this.roots.get( fullPath );
|
CacheKey parentKey = new CacheKey( cacheKey.getBaseClass(), remainingInterfaces );
|
||||||
|
parentClass = cache.getUnchecked( parentKey );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
parentClass = cacheKey.getBaseClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Which interface should be implemented in this layer?
|
||||||
|
String interfaceName = cacheKey.getInterfaces().get( 0 );
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// This is the particular interface that this layer was registered for. Loading the class may fail if i.e. an API is broken or not present
|
||||||
|
// and in this case, the layer will be skipped!
|
||||||
|
Class<?> interfaceClass = Class.forName( interfaceName );
|
||||||
|
String layerImpl = this.interfaces2Layer.get( interfaceClass );
|
||||||
|
|
||||||
|
return this.getClassByDesc( parentClass, layerImpl );
|
||||||
|
}
|
||||||
|
catch( final Throwable t )
|
||||||
|
{
|
||||||
|
AELog.warn( "Error loading " + interfaceName );
|
||||||
|
AELog.debug( t );
|
||||||
|
return parentClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings( "unchecked" )
|
||||||
|
private Class<? extends AEBaseTile> getClassByDesc( Class<? extends AEBaseTile> baseClass, final String next )
|
||||||
|
{
|
||||||
final ClassWriter cw = new ClassWriter( ClassWriter.COMPUTE_MAXS );
|
final ClassWriter cw = new ClassWriter( ClassWriter.COMPUTE_MAXS );
|
||||||
final ClassNode n = this.getReader( next );
|
final ClassNode n = this.getReader( next );
|
||||||
final String originalName = n.name;
|
final String originalName = n.name;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
n.name = n.name + '_' + addendum;
|
n.name = n.name + '_' + baseClass.getSimpleName();
|
||||||
n.superName = Class.forName( root ).getName().replace( ".", "/" );
|
n.superName = baseClass.getName().replace( '.', '/' );
|
||||||
}
|
}
|
||||||
catch( final Throwable t )
|
catch( final Throwable t )
|
||||||
{
|
{
|
||||||
@@ -167,14 +178,13 @@ public class ApiPart implements IPartHelper
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
final Object fish = clazz.newInstance();
|
final Object fish = clazz.newInstance();
|
||||||
final Class rootC = Class.forName( root );
|
|
||||||
|
|
||||||
boolean hasError = false;
|
boolean hasError = false;
|
||||||
|
|
||||||
if( !rootC.isInstance( fish ) )
|
if( !baseClass.isInstance( fish ) )
|
||||||
{
|
{
|
||||||
hasError = true;
|
hasError = true;
|
||||||
AELog.error( "Error, Expected layer to implement " + root + " did not." );
|
AELog.error( "Error, Expected layer to implement " + baseClass + " did not." );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( fish instanceof LayerBase )
|
if( fish instanceof LayerBase )
|
||||||
@@ -183,19 +193,16 @@ public class ApiPart implements IPartHelper
|
|||||||
AELog.error( "Error, Expected layer to NOT implement LayerBase but it DID." );
|
AELog.error( "Error, Expected layer to NOT implement LayerBase but it DID." );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !fullPath.contains( ".fmp." ) )
|
if( !( fish instanceof TileCableBus ) )
|
||||||
{
|
{
|
||||||
if( !( fish instanceof TileCableBus ) )
|
hasError = true;
|
||||||
{
|
AELog.error( "Error, Expected layer to implement TileCableBus did not." );
|
||||||
hasError = true;
|
}
|
||||||
AELog.error( "Error, Expected layer to implement TileCableBus did not." );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( !( fish instanceof TileEntity ) )
|
if( !( fish instanceof TileEntity ) )
|
||||||
{
|
{
|
||||||
hasError = true;
|
hasError = true;
|
||||||
AELog.error( "Error, Expected layer to implement TileEntity did not." );
|
AELog.error( "Error, Expected layer to implement TileEntity did not." );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !hasError )
|
if( !hasError )
|
||||||
@@ -209,7 +216,6 @@ public class ApiPart implements IPartHelper
|
|||||||
AELog.debug( t );
|
AELog.debug( t );
|
||||||
}
|
}
|
||||||
|
|
||||||
this.roots.put( fullPath, clazz );
|
|
||||||
return clazz;
|
return clazz;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,10 +266,19 @@ public class ApiPart implements IPartHelper
|
|||||||
defineClassMethod.setAccessible( true );
|
defineClassMethod.setAccessible( true );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
final Object[] argsA = { name, name, b };
|
final Object[] argsA = {
|
||||||
|
name,
|
||||||
|
name,
|
||||||
|
b
|
||||||
|
};
|
||||||
b = (byte[]) runTransformersMethod.invoke( loader, argsA );
|
b = (byte[]) runTransformersMethod.invoke( loader, argsA );
|
||||||
|
|
||||||
final Object[] args = { name, b, 0, b.length };
|
final Object[] args = {
|
||||||
|
name,
|
||||||
|
b,
|
||||||
|
0,
|
||||||
|
b.length
|
||||||
|
};
|
||||||
clazz = (Class) defineClassMethod.invoke( loader, args );
|
clazz = (Class) defineClassMethod.invoke( loader, args );
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -319,7 +334,7 @@ public class ApiPart implements IPartHelper
|
|||||||
private static class DefaultPackageClassNameRemapper extends Remapper
|
private static class DefaultPackageClassNameRemapper extends Remapper
|
||||||
{
|
{
|
||||||
|
|
||||||
private final HashMap<String, String> inputOutput = new HashMap<String, String>();
|
private final HashMap<String, String> inputOutput = new HashMap<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String map( final String typeName )
|
public String map( final String typeName )
|
||||||
@@ -332,4 +347,53 @@ public class ApiPart implements IPartHelper
|
|||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static class CacheKey
|
||||||
|
{
|
||||||
|
private final Class<? extends AEBaseTile> baseClass;
|
||||||
|
|
||||||
|
private final List<String> interfaces;
|
||||||
|
|
||||||
|
private CacheKey( Class<? extends AEBaseTile> baseClass, List<String> interfaces )
|
||||||
|
{
|
||||||
|
this.baseClass = baseClass;
|
||||||
|
this.interfaces = ImmutableList.copyOf( interfaces );
|
||||||
|
}
|
||||||
|
|
||||||
|
private Class<? extends AEBaseTile> getBaseClass()
|
||||||
|
{
|
||||||
|
return baseClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> getInterfaces()
|
||||||
|
{
|
||||||
|
return interfaces;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals( Object o )
|
||||||
|
{
|
||||||
|
if( this == o )
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if( o == null || getClass() != o.getClass() )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
CacheKey cacheKey = (CacheKey) o;
|
||||||
|
|
||||||
|
return baseClass.equals( cacheKey.baseClass ) && interfaces.equals( cacheKey.interfaces );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
int result = baseClass.hashCode();
|
||||||
|
result = 31 * result + interfaces.hashCode();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public final class ApiParts implements IParts
|
|||||||
private final IItemDefinition p2PTunnelRedstone;
|
private final IItemDefinition p2PTunnelRedstone;
|
||||||
private final IItemDefinition p2PTunnelItems;
|
private final IItemDefinition p2PTunnelItems;
|
||||||
private final IItemDefinition p2PTunnelLiquids;
|
private final IItemDefinition p2PTunnelLiquids;
|
||||||
// private final IItemDefinition p2PTunnelEU;
|
private final IItemDefinition p2PTunnelEU;
|
||||||
// private final IItemDefinition p2PTunnelRF;
|
// private final IItemDefinition p2PTunnelRF;
|
||||||
private final IItemDefinition p2PTunnelLight;
|
private final IItemDefinition p2PTunnelLight;
|
||||||
// private final IItemDefinition p2PTunnelOpenComputers;
|
// private final IItemDefinition p2PTunnelOpenComputers;
|
||||||
@@ -113,7 +113,7 @@ public final class ApiParts implements IParts
|
|||||||
this.p2PTunnelRedstone = new DamagedItemDefinition( "part.tunnel.redstone", itemPart.createPart( PartType.P2PTunnelRedstone ) );
|
this.p2PTunnelRedstone = new DamagedItemDefinition( "part.tunnel.redstone", itemPart.createPart( PartType.P2PTunnelRedstone ) );
|
||||||
this.p2PTunnelItems = new DamagedItemDefinition( "part.tunnel.item", itemPart.createPart( PartType.P2PTunnelItems ) );
|
this.p2PTunnelItems = new DamagedItemDefinition( "part.tunnel.item", itemPart.createPart( PartType.P2PTunnelItems ) );
|
||||||
this.p2PTunnelLiquids = new DamagedItemDefinition( "part.tunnel.fluid", itemPart.createPart( PartType.P2PTunnelLiquids ) );
|
this.p2PTunnelLiquids = new DamagedItemDefinition( "part.tunnel.fluid", itemPart.createPart( PartType.P2PTunnelLiquids ) );
|
||||||
// this.p2PTunnelEU = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelEU ) );
|
this.p2PTunnelEU = new DamagedItemDefinition( "part.tunnel.eu", itemPart.createPart( PartType.P2PTunnelEU ) );
|
||||||
// this.p2PTunnelRF = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelRF ) );
|
// this.p2PTunnelRF = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelRF ) );
|
||||||
this.p2PTunnelLight = new DamagedItemDefinition( "part.tunnel.light", itemPart.createPart( PartType.P2PTunnelLight ) );
|
this.p2PTunnelLight = new DamagedItemDefinition( "part.tunnel.light", itemPart.createPart( PartType.P2PTunnelLight ) );
|
||||||
// this.p2PTunnelOpenComputers = new DamagedItemDefinition( itemMultiPart.createPart(
|
// this.p2PTunnelOpenComputers = new DamagedItemDefinition( itemMultiPart.createPart(
|
||||||
@@ -286,13 +286,13 @@ public final class ApiParts implements IParts
|
|||||||
return this.p2PTunnelLiquids;
|
return this.p2PTunnelLiquids;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
@Override
|
||||||
* @Override
|
public IItemDefinition p2PTunnelEU()
|
||||||
* public IItemDefinition p2PTunnelEU()
|
{
|
||||||
* {
|
return this.p2PTunnelEU;
|
||||||
* return this.p2PTunnelEU;
|
}
|
||||||
* }
|
|
||||||
* @Override
|
/* @Override
|
||||||
* public IItemDefinition p2PTunnelRF()
|
* public IItemDefinition p2PTunnelRF()
|
||||||
* {
|
* {
|
||||||
* return this.p2PTunnelRF;
|
* return this.p2PTunnelRF;
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class ItemDefinition implements IItemDefinition
|
|||||||
@Override
|
@Override
|
||||||
public final boolean isSameAs( final ItemStack comparableStack )
|
public final boolean isSameAs( final ItemStack comparableStack )
|
||||||
{
|
{
|
||||||
return isEnabled() && Platform.isSameItemType( comparableStack, this.maybeStack( 1 ).get() );
|
return isEnabled() && Platform.itemComparisons().isEqualItemType( comparableStack, this.maybeStack( 1 ).get() );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
|
|||||||
{
|
{
|
||||||
for( final IGrinderEntry gr : this.recipes )
|
for( final IGrinderEntry gr : this.recipes )
|
||||||
{
|
{
|
||||||
if( Platform.isSameItemPrecise( gr.getInput(), appEngGrinderRecipe.getInput() ) )
|
if( Platform.itemComparisons().isSameItem( gr.getInput(), appEngGrinderRecipe.getInput() ) )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -151,7 +151,7 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
|
|||||||
{
|
{
|
||||||
for( final IGrinderEntry r : this.recipes )
|
for( final IGrinderEntry r : this.recipes )
|
||||||
{
|
{
|
||||||
if( Platform.isSameItem( input, r.getInput() ) )
|
if( Platform.itemComparisons().isEqualItem( input, r.getInput() ) )
|
||||||
{
|
{
|
||||||
this.log( "Recipe for " + input.getUnlocalizedName() + " found " + Platform.getItemDisplayName( r.getOutput() ) );
|
this.log( "Recipe for " + input.getUnlocalizedName() + " found " + Platform.getItemDisplayName( r.getOutput() ) );
|
||||||
return r;
|
return r;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class MatterCannonAmmoRegistry implements IOreListener, IMatterCannonAmmo
|
|||||||
{
|
{
|
||||||
for( final ItemStack o : this.DamageModifiers.keySet() )
|
for( final ItemStack o : this.DamageModifiers.keySet() )
|
||||||
{
|
{
|
||||||
if( Platform.isSameItem( o, is ) )
|
if( Platform.itemComparisons().isEqualItem( o, is ) )
|
||||||
{
|
{
|
||||||
return this.DamageModifiers.get( o ).floatValue();
|
return this.DamageModifiers.get( o ).floatValue();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
|
|||||||
return this.tunnels.get( is );
|
return this.tunnels.get( is );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( Platform.isSameItem( is, trigger ) )
|
if( Platform.itemComparisons().isEqualItem( is, trigger ) )
|
||||||
{
|
{
|
||||||
return this.tunnels.get( is );
|
return this.tunnels.get( is );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ public enum TickRates
|
|||||||
|
|
||||||
Inscriber( 1, 1 ),
|
Inscriber( 1, 1 ),
|
||||||
|
|
||||||
|
Charger( 10, 120 ),
|
||||||
|
|
||||||
IOPort( 1, 5 ),
|
IOPort( 1, 5 ),
|
||||||
|
|
||||||
VibrationChamber( 10, 40 ),
|
VibrationChamber( 10, 40 ),
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class AchievementCraftingHandler
|
|||||||
switch( achievement.getType() )
|
switch( achievement.getType() )
|
||||||
{
|
{
|
||||||
case Craft:
|
case Craft:
|
||||||
if( Platform.isSameItemPrecise( achievement.getStack(), event.crafting ) )
|
if( Platform.itemComparisons().isSameItem( achievement.getStack(), event.crafting ) )
|
||||||
{
|
{
|
||||||
achievement.addToPlayer( event.player );
|
achievement.addToPlayer( event.player );
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class AchievementPickupHandler
|
|||||||
|
|
||||||
for( final Achievements achievement : Achievements.values() )
|
for( final Achievements achievement : Achievements.values() )
|
||||||
{
|
{
|
||||||
if( achievement.getType() == AchievementType.Pickup && Platform.isSameItemPrecise( achievement.getStack(), is ) )
|
if( achievement.getType() == AchievementType.Pickup && Platform.itemComparisons().isSameItem( achievement.getStack(), is ) )
|
||||||
{
|
{
|
||||||
achievement.addToPlayer( event.player );
|
achievement.addToPlayer( event.player );
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ import appeng.core.sync.packets.PacketLightning;
|
|||||||
import appeng.core.sync.packets.PacketMEInventoryUpdate;
|
import appeng.core.sync.packets.PacketMEInventoryUpdate;
|
||||||
import appeng.core.sync.packets.PacketMatterCannon;
|
import appeng.core.sync.packets.PacketMatterCannon;
|
||||||
import appeng.core.sync.packets.PacketMockExplosion;
|
import appeng.core.sync.packets.PacketMockExplosion;
|
||||||
import appeng.core.sync.packets.PacketMultiPart;
|
|
||||||
import appeng.core.sync.packets.PacketJEIRecipe;
|
import appeng.core.sync.packets.PacketJEIRecipe;
|
||||||
import appeng.core.sync.packets.PacketNewStorageDimension;
|
import appeng.core.sync.packets.PacketNewStorageDimension;
|
||||||
import appeng.core.sync.packets.PacketPaintedEntity;
|
import appeng.core.sync.packets.PacketPaintedEntity;
|
||||||
@@ -68,8 +67,6 @@ public class AppEngPacketHandlerBase
|
|||||||
|
|
||||||
PACKET_CONFIG_BUTTON( PacketConfigButton.class ),
|
PACKET_CONFIG_BUTTON( PacketConfigButton.class ),
|
||||||
|
|
||||||
PACKET_MULTIPART( PacketMultiPart.class ),
|
|
||||||
|
|
||||||
PACKET_PART_PLACEMENT( PacketPartPlacement.class ),
|
PACKET_PART_PLACEMENT( PacketPartPlacement.class ),
|
||||||
|
|
||||||
PACKET_LIGHTNING( PacketLightning.class ),
|
PACKET_LIGHTNING( PacketLightning.class ),
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ import appeng.items.storage.ItemViewCell;
|
|||||||
import appeng.util.InventoryAdaptor;
|
import appeng.util.InventoryAdaptor;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
import appeng.util.item.AEItemStack;
|
import appeng.util.item.AEItemStack;
|
||||||
import appeng.util.prioitylist.IPartitionList;
|
import appeng.util.prioritylist.IPartitionList;
|
||||||
|
|
||||||
|
|
||||||
public class PacketJEIRecipe extends AppEngPacket
|
public class PacketJEIRecipe extends AppEngPacket
|
||||||
@@ -167,7 +167,7 @@ public class PacketJEIRecipe extends AppEngPacket
|
|||||||
final ItemStack newItemStack = r.matches( testInv, pmp.worldObj ) ? r.getCraftingResult( testInv ) : null;
|
final ItemStack newItemStack = r.matches( testInv, pmp.worldObj ) ? r.getCraftingResult( testInv ) : null;
|
||||||
testInv.setInventorySlotContents( x, patternItem );
|
testInv.setInventorySlotContents( x, patternItem );
|
||||||
|
|
||||||
if( newItemStack == null || !Platform.isSameItemPrecise( newItemStack, is ) )
|
if( newItemStack == null || !Platform.itemComparisons().isSameItem( newItemStack, is ) )
|
||||||
{
|
{
|
||||||
final IAEItemStack in = AEItemStack.create( currentItem );
|
final IAEItemStack in = AEItemStack.create( currentItem );
|
||||||
if( in != null )
|
if( in != null )
|
||||||
|
|||||||
@@ -1,64 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.core.sync.packets;
|
|
||||||
|
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
|
||||||
import io.netty.buffer.Unpooled;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
|
||||||
|
|
||||||
import appeng.core.sync.AppEngPacket;
|
|
||||||
import appeng.core.sync.network.INetworkInfo;
|
|
||||||
import appeng.integration.IntegrationRegistry;
|
|
||||||
import appeng.integration.IntegrationType;
|
|
||||||
import appeng.integration.abstraction.IFMP;
|
|
||||||
|
|
||||||
|
|
||||||
public class PacketMultiPart extends AppEngPacket
|
|
||||||
{
|
|
||||||
|
|
||||||
// automatic.
|
|
||||||
public PacketMultiPart( final ByteBuf stream )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// api
|
|
||||||
public PacketMultiPart()
|
|
||||||
{
|
|
||||||
final ByteBuf data = Unpooled.buffer();
|
|
||||||
|
|
||||||
data.writeInt( this.getPacketID() );
|
|
||||||
|
|
||||||
this.configureWrite( data );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void serverPacketData( final INetworkInfo manager, final AppEngPacket packet, final EntityPlayer player )
|
|
||||||
{
|
|
||||||
final IFMP fmp = (IFMP) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.FMP );
|
|
||||||
if( fmp != null )
|
|
||||||
{
|
|
||||||
final EntityPlayerMP sender = (EntityPlayerMP) player;
|
|
||||||
MinecraftForge.EVENT_BUS.post( fmp.newFMPPacketEvent( sender ) ); // when received it just posts this event.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -34,8 +34,6 @@ import net.minecraftforge.fml.common.FMLCommonHandler;
|
|||||||
import appeng.core.AELog;
|
import appeng.core.AELog;
|
||||||
import appeng.core.AppEng;
|
import appeng.core.AppEng;
|
||||||
import appeng.tile.AEBaseTile;
|
import appeng.tile.AEBaseTile;
|
||||||
import appeng.tile.TileEvent;
|
|
||||||
import appeng.tile.events.TileEventType;
|
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
|
||||||
|
|
||||||
@@ -45,8 +43,8 @@ public class TileChunkLoader extends AEBaseTile implements ITickable
|
|||||||
private boolean requestTicket = true;
|
private boolean requestTicket = true;
|
||||||
private Ticket ct = null;
|
private Ticket ct = null;
|
||||||
|
|
||||||
@TileEvent( TileEventType.TICK )
|
@Override
|
||||||
public void onTickEvent()
|
public void update()
|
||||||
{
|
{
|
||||||
if( this.requestTicket )
|
if( this.requestTicket )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ import net.minecraft.util.text.TextComponentString;
|
|||||||
|
|
||||||
import appeng.core.CommonHelper;
|
import appeng.core.CommonHelper;
|
||||||
import appeng.tile.AEBaseTile;
|
import appeng.tile.AEBaseTile;
|
||||||
import appeng.tile.TileEvent;
|
|
||||||
import appeng.tile.events.TileEventType;
|
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
|
||||||
|
|
||||||
@@ -43,8 +41,8 @@ public class TileCubeGenerator extends AEBaseTile implements ITickable
|
|||||||
private int countdown = 20 * 10;
|
private int countdown = 20 * 10;
|
||||||
private EntityPlayer who = null;
|
private EntityPlayer who = null;
|
||||||
|
|
||||||
@TileEvent( TileEventType.TICK )
|
@Override
|
||||||
public void onTickEvent()
|
public void update()
|
||||||
{
|
{
|
||||||
if( this.is != null && Platform.isServer() )
|
if( this.is != null && Platform.isServer() )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -119,12 +119,12 @@ public final class EntityChargedQuartz extends AEBaseEntityItem
|
|||||||
final ItemStack other = ( (EntityItem) e ).getEntityItem();
|
final ItemStack other = ( (EntityItem) e ).getEntityItem();
|
||||||
if( other != null && other.stackSize > 0 )
|
if( other != null && other.stackSize > 0 )
|
||||||
{
|
{
|
||||||
if( Platform.isSameItem( other, new ItemStack( Items.REDSTONE ) ) )
|
if( Platform.itemComparisons().isEqualItem( other, new ItemStack( Items.REDSTONE ) ) )
|
||||||
{
|
{
|
||||||
redstone = (EntityItem) e;
|
redstone = (EntityItem) e;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( Platform.isSameItem( other, new ItemStack( Items.QUARTZ ) ) )
|
if( Platform.itemComparisons().isEqualItem( other, new ItemStack( Items.QUARTZ ) ) )
|
||||||
{
|
{
|
||||||
netherQuartz = (EntityItem) e;
|
netherQuartz = (EntityItem) e;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ import java.util.Optional;
|
|||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.state.IBlockState;
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
@@ -35,9 +33,6 @@ import appeng.api.parts.IFacadeContainer;
|
|||||||
import appeng.api.parts.IFacadePart;
|
import appeng.api.parts.IFacadePart;
|
||||||
import appeng.api.parts.IPartHost;
|
import appeng.api.parts.IPartHost;
|
||||||
import appeng.api.util.AEPartLocation;
|
import appeng.api.util.AEPartLocation;
|
||||||
import appeng.integration.IntegrationRegistry;
|
|
||||||
import appeng.integration.IntegrationType;
|
|
||||||
import appeng.integration.abstraction.IBuildCraftTransport;
|
|
||||||
import appeng.items.parts.ItemFacade;
|
import appeng.items.parts.ItemFacade;
|
||||||
import appeng.parts.CableBusStorage;
|
import appeng.parts.CableBusStorage;
|
||||||
|
|
||||||
@@ -136,29 +131,16 @@ public class FacadeContainer implements IFacadeContainer
|
|||||||
{
|
{
|
||||||
ids[0] = out.readInt();
|
ids[0] = out.readInt();
|
||||||
ids[1] = out.readInt();
|
ids[1] = out.readInt();
|
||||||
final boolean isBC = ids[0] < 0;
|
|
||||||
ids[0] = Math.abs( ids[0] );
|
ids[0] = Math.abs( ids[0] );
|
||||||
|
|
||||||
if( isBC && IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.BuildCraftTransport ) )
|
Optional<Item> maybeFacadeItem = AEApi.instance().definitions().items().facade().maybeItem();
|
||||||
{
|
if (maybeFacadeItem.isPresent()) {
|
||||||
final IBuildCraftTransport bc = (IBuildCraftTransport) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.BuildCraftTransport );
|
final ItemFacade ifa = (ItemFacade) maybeFacadeItem.get();
|
||||||
final IBlockState state = Block.getStateById( ids[0] );
|
final ItemStack facade = ifa.createFromIDs( ids );
|
||||||
final IFacadePart created = bc.createFacadePart( state, side );
|
if( facade != null )
|
||||||
changed = changed || this.storage.getFacade( x ) == null;
|
{
|
||||||
|
changed = changed || this.storage.getFacade( x ) == null;
|
||||||
this.storage.setFacade( x, created );
|
this.storage.setFacade( x, ifa.createPartFromItemStack( facade, side ) );
|
||||||
}
|
|
||||||
else if( !isBC )
|
|
||||||
{
|
|
||||||
Optional<Item> maybeFacadeItem = AEApi.instance().definitions().items().facade().maybeItem();
|
|
||||||
if (maybeFacadeItem.isPresent()) {
|
|
||||||
final ItemFacade ifa = (ItemFacade) maybeFacadeItem.get();
|
|
||||||
final ItemStack facade = ifa.createFromIDs( ids );
|
|
||||||
if( facade != null )
|
|
||||||
{
|
|
||||||
changed = changed || this.storage.getFacade( x ) == null;
|
|
||||||
this.storage.setFacade( x, ifa.createPartFromItemStack( facade, side ) );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -190,17 +172,6 @@ public class FacadeContainer implements IFacadeContainer
|
|||||||
{
|
{
|
||||||
this.storage.setFacade( x, ( (IFacadeItem) i ).createPartFromItemStack( is, AEPartLocation.fromOrdinal( x ) ) );
|
this.storage.setFacade( x, ( (IFacadeItem) i ).createPartFromItemStack( is, AEPartLocation.fromOrdinal( x ) ) );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.BuildCraftTransport ) )
|
|
||||||
{
|
|
||||||
final IBuildCraftTransport bc = (IBuildCraftTransport) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.BuildCraftTransport );
|
|
||||||
if( bc.isFacade( is ) )
|
|
||||||
{
|
|
||||||
this.storage.setFacade( x, bc.createFacadePart( is, AEPartLocation.fromOrdinal( x ) ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
|
|||||||
{
|
{
|
||||||
final ItemStack testOutput = this.standardRecipe.getCraftingResult( this.testFrame );
|
final ItemStack testOutput = this.standardRecipe.getCraftingResult( this.testFrame );
|
||||||
|
|
||||||
if( Platform.isSameItemPrecise( this.correctOutput, testOutput ) )
|
if( Platform.itemComparisons().isSameItem( this.correctOutput, testOutput ) )
|
||||||
{
|
{
|
||||||
this.testFrame.setInventorySlotContents( slotIndex, this.crafting.getStackInSlot( slotIndex ) );
|
this.testFrame.setInventorySlotContents( slotIndex, this.crafting.getStackInSlot( slotIndex ) );
|
||||||
this.markItemAs( slotIndex, i, TestStatus.ACCEPT );
|
this.markItemAs( slotIndex, i, TestStatus.ACCEPT );
|
||||||
@@ -256,7 +256,7 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
|
|||||||
{
|
{
|
||||||
final ItemStack testOutput = CraftingManager.getInstance().findMatchingRecipe( this.testFrame, w );
|
final ItemStack testOutput = CraftingManager.getInstance().findMatchingRecipe( this.testFrame, w );
|
||||||
|
|
||||||
if( Platform.isSameItemPrecise( this.correctOutput, testOutput ) )
|
if( Platform.itemComparisons().isSameItem( this.correctOutput, testOutput ) )
|
||||||
{
|
{
|
||||||
this.testFrame.setInventorySlotContents( slotIndex, this.crafting.getStackInSlot( slotIndex ) );
|
this.testFrame.setInventorySlotContents( slotIndex, this.crafting.getStackInSlot( slotIndex ) );
|
||||||
this.markItemAs( slotIndex, i, TestStatus.ACCEPT );
|
this.markItemAs( slotIndex, i, TestStatus.ACCEPT );
|
||||||
|
|||||||
@@ -21,7 +21,26 @@ package appeng.integration;
|
|||||||
|
|
||||||
public interface IIntegrationModule
|
public interface IIntegrationModule
|
||||||
{
|
{
|
||||||
void init() throws Throwable;
|
|
||||||
|
|
||||||
void postInit();
|
default boolean isEnabled()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
default void init() throws Throwable
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
default void postInit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
class Stub implements IIntegrationModule
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public boolean isEnabled()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,42 +19,38 @@
|
|||||||
package appeng.integration;
|
package appeng.integration;
|
||||||
|
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
|
|
||||||
import net.minecraftforge.fml.common.Loader;
|
import net.minecraftforge.fml.common.Loader;
|
||||||
import net.minecraftforge.fml.common.ModAPIManager;
|
import net.minecraftforge.fml.common.ModAPIManager;
|
||||||
|
|
||||||
import appeng.api.exceptions.ModNotInstalled;
|
import appeng.api.exceptions.ModNotInstalled;
|
||||||
import appeng.core.AEConfig;
|
import appeng.core.AEConfig;
|
||||||
import appeng.core.AELog;
|
import appeng.core.AELog;
|
||||||
|
import appeng.integration.modules.ic2.IC2Module;
|
||||||
|
import appeng.integration.modules.jei.JEIModule;
|
||||||
|
import appeng.integration.modules.waila.WailaModule;
|
||||||
|
|
||||||
|
|
||||||
public final class IntegrationNode
|
final class IntegrationNode
|
||||||
{
|
{
|
||||||
|
|
||||||
private final String displayName;
|
private final String displayName;
|
||||||
private final String modID;
|
private final String modID;
|
||||||
private final IntegrationType shortName;
|
private final IntegrationType type;
|
||||||
private IntegrationStage state = IntegrationStage.PRE_INIT;
|
private IntegrationStage state = IntegrationStage.PRE_INIT;
|
||||||
private IntegrationStage failedStage = IntegrationStage.PRE_INIT;
|
|
||||||
private Throwable exception = null;
|
private Throwable exception = null;
|
||||||
private String name = null;
|
|
||||||
private Class<?> classValue = null;
|
|
||||||
private Object instance;
|
|
||||||
private IIntegrationModule mod = null;
|
private IIntegrationModule mod = null;
|
||||||
|
|
||||||
public IntegrationNode( final String displayName, final String modID, final IntegrationType shortName, final String name )
|
IntegrationNode( final String displayName, final String modID, final IntegrationType type )
|
||||||
{
|
{
|
||||||
this.displayName = displayName;
|
this.displayName = displayName;
|
||||||
this.shortName = shortName;
|
this.type = type;
|
||||||
this.modID = modID;
|
this.modID = modID;
|
||||||
this.name = name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return this.getShortName().name() + ':' + this.getState().name();
|
return this.getType().name() + ':' + this.getState().name();
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isActive()
|
boolean isActive()
|
||||||
@@ -98,10 +94,18 @@ public final class IntegrationNode
|
|||||||
|
|
||||||
if( enabled )
|
if( enabled )
|
||||||
{
|
{
|
||||||
this.classValue = this.getClass().getClassLoader().loadClass( this.name );
|
switch( type )
|
||||||
this.mod = (IIntegrationModule) this.classValue.getConstructor().newInstance();
|
{
|
||||||
final Field f = this.classValue.getField( "instance" );
|
case IC2:
|
||||||
f.set( this.classValue, this.setInstance( this.mod ) );
|
this.mod = Integrations.setIc2( new IC2Module() );
|
||||||
|
break;
|
||||||
|
case JEI:
|
||||||
|
this.mod = Integrations.setJei( new JEIModule() );
|
||||||
|
break;
|
||||||
|
case Waila:
|
||||||
|
this.mod = new WailaModule();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -128,7 +132,6 @@ public final class IntegrationNode
|
|||||||
}
|
}
|
||||||
catch( final Throwable t )
|
catch( final Throwable t )
|
||||||
{
|
{
|
||||||
this.failedStage = stage;
|
|
||||||
this.exception = t;
|
this.exception = t;
|
||||||
this.setState( IntegrationStage.FAILED );
|
this.setState( IntegrationStage.FAILED );
|
||||||
}
|
}
|
||||||
@@ -151,20 +154,9 @@ public final class IntegrationNode
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Object getInstance()
|
IntegrationType getType()
|
||||||
{
|
{
|
||||||
return this.instance;
|
return this.type;
|
||||||
}
|
|
||||||
|
|
||||||
private Object setInstance( final Object instance )
|
|
||||||
{
|
|
||||||
this.instance = instance;
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
IntegrationType getShortName()
|
|
||||||
{
|
|
||||||
return this.shortName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
IntegrationStage getState()
|
IntegrationStage getState()
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ package appeng.integration;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
|
|
||||||
import net.minecraftforge.fml.relauncher.FMLLaunchHandler;
|
import net.minecraftforge.fml.relauncher.FMLLaunchHandler;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
|
||||||
@@ -32,8 +30,6 @@ public enum IntegrationRegistry
|
|||||||
{
|
{
|
||||||
INSTANCE;
|
INSTANCE;
|
||||||
|
|
||||||
private static final String PACKAGE_PREFIX = "appeng.integration.modules.";
|
|
||||||
|
|
||||||
private final Collection<IntegrationNode> modules = new LinkedList<IntegrationNode>();
|
private final Collection<IntegrationNode> modules = new LinkedList<IntegrationNode>();
|
||||||
|
|
||||||
public void add( final IntegrationType type )
|
public void add( final IntegrationType type )
|
||||||
@@ -48,7 +44,7 @@ public enum IntegrationRegistry
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.modules.add( new IntegrationNode( type.dspName, type.modID, type, PACKAGE_PREFIX + type.name() ) );
|
this.modules.add( new IntegrationNode( type.dspName, type.modID, type ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init()
|
public void init()
|
||||||
@@ -83,7 +79,7 @@ public enum IntegrationRegistry
|
|||||||
builder.append( ", " );
|
builder.append( ", " );
|
||||||
}
|
}
|
||||||
|
|
||||||
final String integrationState = node.getShortName() + ":" + ( node.getState() == IntegrationStage.FAILED ? "OFF" : "ON" );
|
final String integrationState = node.getType() + ":" + ( node.getState() == IntegrationStage.FAILED ? "OFF" : "ON" );
|
||||||
builder.append( integrationState );
|
builder.append( integrationState );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,7 +90,7 @@ public enum IntegrationRegistry
|
|||||||
{
|
{
|
||||||
for( final IntegrationNode node : this.modules )
|
for( final IntegrationNode node : this.modules )
|
||||||
{
|
{
|
||||||
if( node.getShortName() == name )
|
if( node.getType() == name )
|
||||||
{
|
{
|
||||||
return node.isActive();
|
return node.isActive();
|
||||||
}
|
}
|
||||||
@@ -102,18 +98,4 @@ public enum IntegrationRegistry
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
|
||||||
public Object getInstance( final IntegrationType name )
|
|
||||||
{
|
|
||||||
for( final IntegrationNode node : this.modules )
|
|
||||||
{
|
|
||||||
if( node.getShortName() == name && node.isActive() )
|
|
||||||
{
|
|
||||||
return node.getInstance();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new IllegalStateException( "integration with " + name.name() + " is disabled." );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
package appeng.integration;
|
package appeng.integration;
|
||||||
|
|
||||||
|
|
||||||
public enum IntegrationSide
|
enum IntegrationSide
|
||||||
{
|
{
|
||||||
CLIENT, SERVER, BOTH
|
CLIENT, SERVER, BOTH
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
package appeng.integration;
|
package appeng.integration;
|
||||||
|
|
||||||
|
|
||||||
public enum IntegrationStage
|
enum IntegrationStage
|
||||||
{
|
{
|
||||||
|
|
||||||
PRE_INIT, INIT, POST_INIT,
|
PRE_INIT, INIT, POST_INIT,
|
||||||
|
|||||||
@@ -23,46 +23,22 @@ public enum IntegrationType
|
|||||||
{
|
{
|
||||||
IC2( IntegrationSide.BOTH, "Industrial Craft 2", "IC2" ),
|
IC2( IntegrationSide.BOTH, "Industrial Craft 2", "IC2" ),
|
||||||
|
|
||||||
RotaryCraft( IntegrationSide.BOTH, "Rotary Craft", "RotaryCraft" ),
|
|
||||||
|
|
||||||
RC( IntegrationSide.BOTH, "Railcraft", "Railcraft" ),
|
RC( IntegrationSide.BOTH, "Railcraft", "Railcraft" ),
|
||||||
|
|
||||||
BuildCraftCore( IntegrationSide.BOTH, "BuildCraft Core", "BuildCraft|Core" ),
|
|
||||||
|
|
||||||
BuildCraftTransport( IntegrationSide.BOTH, "BuildCraft Transport", "BuildCraft|Transport" ),
|
|
||||||
|
|
||||||
BuildCraftBuilder( IntegrationSide.BOTH, "BuildCraft Builders", "BuildCraft|Builders" ),
|
|
||||||
|
|
||||||
RF( IntegrationSide.BOTH, "RedstoneFlux Power - Tiles", "CoFHAPI" ),
|
RF( IntegrationSide.BOTH, "RedstoneFlux Power - Tiles", "CoFHAPI" ),
|
||||||
|
|
||||||
RFItem( IntegrationSide.BOTH, "RedstoneFlux Power - Items", "CoFHAPI" ),
|
RFItem( IntegrationSide.BOTH, "RedstoneFlux Power - Items", "CoFHAPI" ),
|
||||||
|
|
||||||
MFR( IntegrationSide.BOTH, "Mine Factory Reloaded", "MineFactoryReloaded" ),
|
MFR( IntegrationSide.BOTH, "Mine Factory Reloaded", "MineFactoryReloaded" ),
|
||||||
|
|
||||||
DSU( IntegrationSide.BOTH, "Deep Storage Unit", null ),
|
|
||||||
|
|
||||||
FZ( IntegrationSide.BOTH, "Factorization", "factorization" ),
|
|
||||||
|
|
||||||
FMP( IntegrationSide.BOTH, "Forge MultiPart", "McMultipart" ),
|
|
||||||
|
|
||||||
RB( IntegrationSide.BOTH, "Rotatable Blocks", "RotatableBlocks" ),
|
|
||||||
|
|
||||||
CLApi( IntegrationSide.BOTH, "Colored Lights Core", "coloredlightscore" ),
|
|
||||||
|
|
||||||
Waila( IntegrationSide.BOTH, "Waila", "Waila" ),
|
Waila( IntegrationSide.BOTH, "Waila", "Waila" ),
|
||||||
|
|
||||||
InvTweaks( IntegrationSide.CLIENT, "Inventory Tweaks", "inventorytweaks" ),
|
InvTweaks( IntegrationSide.CLIENT, "Inventory Tweaks", "inventorytweaks" ),
|
||||||
|
|
||||||
JEI( IntegrationSide.CLIENT, "Just Enough Items", "JEI" ),
|
JEI( IntegrationSide.CLIENT, "Just Enough Items", "JEI" ),
|
||||||
|
|
||||||
CraftGuide( IntegrationSide.CLIENT, "Craft Guide", "craftguide" ),
|
|
||||||
|
|
||||||
Mekanism( IntegrationSide.BOTH, "Mekanism", "Mekanism" ),
|
Mekanism( IntegrationSide.BOTH, "Mekanism", "Mekanism" ),
|
||||||
|
|
||||||
ImmibisMicroblocks( IntegrationSide.BOTH, "ImmibisMicroblocks", "ImmibisMicroblocks" ),
|
|
||||||
|
|
||||||
BetterStorage( IntegrationSide.BOTH, "BetterStorage", "betterstorage" ),
|
|
||||||
|
|
||||||
OpenComputers( IntegrationSide.BOTH, "OpenComputers", "OpenComputers" );
|
OpenComputers( IntegrationSide.BOTH, "OpenComputers", "OpenComputers" );
|
||||||
|
|
||||||
public final IntegrationSide side;
|
public final IntegrationSide side;
|
||||||
|
|||||||
@@ -0,0 +1,104 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package appeng.integration;
|
||||||
|
|
||||||
|
|
||||||
|
import appeng.integration.abstraction.IIC2;
|
||||||
|
import appeng.integration.abstraction.IInvTweaks;
|
||||||
|
import appeng.integration.abstraction.IJEI;
|
||||||
|
import appeng.integration.abstraction.IMekanism;
|
||||||
|
import appeng.integration.abstraction.IRC;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides convenient access to various integrations with other mods.
|
||||||
|
*/
|
||||||
|
public final class Integrations
|
||||||
|
{
|
||||||
|
|
||||||
|
static IIC2 ic2 = new IIC2.Stub();
|
||||||
|
|
||||||
|
static IJEI jei = new IJEI.Stub();
|
||||||
|
|
||||||
|
static IRC rc = new IRC.Stub();
|
||||||
|
|
||||||
|
static IMekanism mekanism = new IMekanism.Stub();
|
||||||
|
|
||||||
|
static IInvTweaks invTweaks = new IInvTweaks.Stub();
|
||||||
|
|
||||||
|
private Integrations()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IIC2 ic2()
|
||||||
|
{
|
||||||
|
return ic2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IJEI jei()
|
||||||
|
{
|
||||||
|
return jei;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IRC rc()
|
||||||
|
{
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IMekanism mekanism()
|
||||||
|
{
|
||||||
|
return mekanism;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IInvTweaks invTweaks()
|
||||||
|
{
|
||||||
|
return invTweaks;
|
||||||
|
}
|
||||||
|
|
||||||
|
static IIC2 setIc2( IIC2 ic2 )
|
||||||
|
{
|
||||||
|
Integrations.ic2 = ic2;
|
||||||
|
return ic2;
|
||||||
|
}
|
||||||
|
|
||||||
|
static IJEI setJei( IJEI jei )
|
||||||
|
{
|
||||||
|
Integrations.jei = jei;
|
||||||
|
return jei;
|
||||||
|
}
|
||||||
|
|
||||||
|
static IRC setRc( IRC rc )
|
||||||
|
{
|
||||||
|
Integrations.rc = rc;
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
static IMekanism setMekanism( IMekanism mekanism )
|
||||||
|
{
|
||||||
|
Integrations.mekanism = mekanism;
|
||||||
|
return mekanism;
|
||||||
|
}
|
||||||
|
|
||||||
|
static IInvTweaks setInvTweaks( IInvTweaks invTweaks )
|
||||||
|
{
|
||||||
|
Integrations.invTweaks = invTweaks;
|
||||||
|
return invTweaks;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.integration.abstraction;
|
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.util.EnumFacing;
|
|
||||||
|
|
||||||
import appeng.util.InventoryAdaptor;
|
|
||||||
|
|
||||||
|
|
||||||
public interface IBetterStorage
|
|
||||||
{
|
|
||||||
|
|
||||||
boolean isStorageCrate( Object te );
|
|
||||||
|
|
||||||
InventoryAdaptor getAdaptor( Object te, EnumFacing d );
|
|
||||||
}
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.integration.abstraction;
|
|
||||||
|
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Contains wrench behaviour
|
|
||||||
*
|
|
||||||
* and registers the engines as P2P attunements for RF tunnels (since BC 7, they are part of BC Core) The attunement is
|
|
||||||
* currently not public anymore, because it
|
|
||||||
* was only used internally
|
|
||||||
*
|
|
||||||
* @author AlgorithmX2
|
|
||||||
* @version rv3
|
|
||||||
* @since rv0
|
|
||||||
*/
|
|
||||||
public interface IBuildCraftCore
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param eq to be checked item, can be {@code null}
|
|
||||||
*
|
|
||||||
* @return {@code true} if it is an {@link buildcraft.api.tools.IToolWrench}
|
|
||||||
*/
|
|
||||||
boolean isWrench( @Nullable Item eq );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param wrench to be checked item, must be an {@link buildcraft.api.tools.IToolWrench}
|
|
||||||
* @param wrencher wrenching player, can be probably {@code null}, but not sure
|
|
||||||
* @param pos pos
|
|
||||||
*
|
|
||||||
* @return {@code true} if player can wrench with that {@code wrench}
|
|
||||||
*
|
|
||||||
* @throws NullPointerException if {@code wrench} is {@code null}
|
|
||||||
* @throws ClassCastException if {@code wrench} is not an {@link buildcraft.api.tools.IToolWrench}
|
|
||||||
*/
|
|
||||||
boolean canWrench( @Nonnull Item wrench, EntityPlayer wrencher, BlockPos pos );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param wrench to be checked item, must be an {@link buildcraft.api.tools.IToolWrench}
|
|
||||||
* @param wrencher wrenching player, can be probably {@code null}, but not sure
|
|
||||||
* @param pos pos
|
|
||||||
*
|
|
||||||
* @throws NullPointerException if {@code wrench} is {@code null}
|
|
||||||
* @throws ClassCastException if {@code wrench} is not an {@link buildcraft.api.tools.IToolWrench}
|
|
||||||
*/
|
|
||||||
void wrenchUsed( @Nonnull Item wrench, EntityPlayer wrencher, BlockPos pos );
|
|
||||||
}
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.integration.abstraction;
|
|
||||||
|
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
|
|
||||||
import net.minecraft.block.state.IBlockState;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.util.EnumFacing;
|
|
||||||
|
|
||||||
import appeng.api.parts.IFacadePart;
|
|
||||||
import appeng.api.util.AEPartLocation;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Contains facade logic to interchange BC facades with AE facades,
|
|
||||||
*
|
|
||||||
* pipe logic to interact between storage buses and pipes
|
|
||||||
*
|
|
||||||
* and using pipes for attunements
|
|
||||||
* The attunement is currently not public anymore,
|
|
||||||
* because it was only used internally
|
|
||||||
*
|
|
||||||
* @author thatsIch
|
|
||||||
* @version rv3 - 12.06.2015
|
|
||||||
* @since rv3 12.06.2015
|
|
||||||
*/
|
|
||||||
public interface IBuildCraftTransport
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param is to be checked item
|
|
||||||
*
|
|
||||||
* @return {@code true} if the checked item is a {@link buildcraft.api.facades.IFacadeItem}
|
|
||||||
*/
|
|
||||||
boolean isFacade( @Nullable ItemStack is );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param blk block used for the ae facade
|
|
||||||
* @param meta meta of the block
|
|
||||||
* @param side side of the ae facade
|
|
||||||
*
|
|
||||||
* @return ae facade through bc facade system
|
|
||||||
*/
|
|
||||||
@Nullable
|
|
||||||
IFacadePart createFacadePart( @Nullable IBlockState blk, @Nonnull AEPartLocation side );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param held create facade for that item
|
|
||||||
* @param side on which side should the part be rendered, should rather be not {@code null}
|
|
||||||
*
|
|
||||||
* @return new instance using the {@code held} and side as direct argument, no logic in between
|
|
||||||
*
|
|
||||||
* @throws IllegalArgumentException if {@code held} is {@code null}
|
|
||||||
*/
|
|
||||||
IFacadePart createFacadePart( @Nonnull ItemStack held, @Nonnull AEPartLocation side );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param facade buildcraft facade
|
|
||||||
*
|
|
||||||
* @return item with the block and metadata based on the facade or {@code null} if {@code facade} was not a facade
|
|
||||||
*
|
|
||||||
* @throws NullPointerException if {@code facade} is {@code null}
|
|
||||||
*/
|
|
||||||
@Nullable
|
|
||||||
ItemStack getTextureForFacade( @Nonnull ItemStack facade );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param te the to be checked {@link TileEntity}
|
|
||||||
* @param dir direction of the {@link TileEntity}
|
|
||||||
*
|
|
||||||
* @return {@code true} if {@code te} is a buildcraft pipe, but not plugged
|
|
||||||
*
|
|
||||||
* @throws NullPointerException if {@code dir} is {@code null}
|
|
||||||
*/
|
|
||||||
boolean isPipe( @Nullable TileEntity te, @Nonnull EnumFacing dir );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* checks weather if the {@code te} is injectable and simulates to inject the item
|
|
||||||
*
|
|
||||||
* @param te preferred something like a buildcraft injectable, can handle anything, just fails that way
|
|
||||||
* @param is to be injected item
|
|
||||||
* @param dir direction of the pipe
|
|
||||||
*
|
|
||||||
* @return {@code true} if items were simulated successfully being added
|
|
||||||
*/
|
|
||||||
boolean canAddItemsToPipe( TileEntity te, ItemStack is, EnumFacing dir );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* checks weather if the {@code te} is injectable, simulates the inject and tries to inject the item
|
|
||||||
*
|
|
||||||
* @param te preferred something like a buildcraft injectable, can handle anything, just fails that way
|
|
||||||
* @param is to be injected item
|
|
||||||
* @param dir direction of the pipe
|
|
||||||
*
|
|
||||||
* @return {@code true} if items were added to the buildcraft pipe
|
|
||||||
*/
|
|
||||||
boolean addItemsToPipe( @Nullable TileEntity te, @Nullable ItemStack is, @Nonnull EnumFacing dir );
|
|
||||||
}
|
|
||||||
+1
-1
@@ -16,7 +16,7 @@
|
|||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.ic2;
|
package appeng.integration.abstraction;
|
||||||
|
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.integration.abstraction;
|
|
||||||
|
|
||||||
|
|
||||||
import appeng.api.util.AEColor;
|
|
||||||
|
|
||||||
|
|
||||||
public interface ICLApi
|
|
||||||
{
|
|
||||||
|
|
||||||
int colorLight( AEColor color, int light );
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.integration.abstraction;
|
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
|
|
||||||
import appeng.api.storage.IMEInventory;
|
|
||||||
|
|
||||||
|
|
||||||
public interface IDSU
|
|
||||||
{
|
|
||||||
|
|
||||||
IMEInventory getDSU( TileEntity te );
|
|
||||||
|
|
||||||
boolean isDSU( TileEntity te );
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.integration.abstraction;
|
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
|
|
||||||
import appeng.api.storage.IMEInventory;
|
|
||||||
|
|
||||||
|
|
||||||
public interface IFZ
|
|
||||||
{
|
|
||||||
|
|
||||||
ItemStack barrelGetItem( TileEntity te );
|
|
||||||
|
|
||||||
int barrelGetMaxItemCount( TileEntity te );
|
|
||||||
|
|
||||||
int barrelGetItemCount( TileEntity te );
|
|
||||||
|
|
||||||
void setItemType( TileEntity te, ItemStack input );
|
|
||||||
|
|
||||||
void barrelSetCount( TileEntity te, int max );
|
|
||||||
|
|
||||||
IMEInventory getFactorizationBarrel( TileEntity te );
|
|
||||||
|
|
||||||
boolean isBarrel( TileEntity te );
|
|
||||||
|
|
||||||
void grinderRecipe( ItemStack is, ItemStack itemStack );
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.integration.abstraction;
|
|
||||||
|
|
||||||
|
|
||||||
import appeng.api.features.IItemComparisonProvider;
|
|
||||||
|
|
||||||
|
|
||||||
public interface IForestry
|
|
||||||
{
|
|
||||||
|
|
||||||
IItemComparisonProvider getGeneticsComparisonProvider();
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.integration.abstraction;
|
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
|
|
||||||
import appeng.api.storage.IMEInventory;
|
|
||||||
|
|
||||||
|
|
||||||
public interface IGT
|
|
||||||
{
|
|
||||||
|
|
||||||
boolean isQuantumChest( TileEntity te );
|
|
||||||
|
|
||||||
IMEInventory getQuantumChest( TileEntity te );
|
|
||||||
}
|
|
||||||
@@ -22,15 +22,27 @@ package appeng.integration.abstraction;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
|
import appeng.integration.IIntegrationModule;
|
||||||
|
import appeng.integration.modules.ic2.IC2PowerSinkStub;
|
||||||
|
import appeng.tile.powersink.IExternalPowerSink;
|
||||||
|
|
||||||
public interface IIC2
|
|
||||||
|
public interface IIC2 extends IIntegrationModule
|
||||||
{
|
{
|
||||||
|
|
||||||
void addToEnergyNet( TileEntity appEngTile );
|
default void maceratorRecipe( ItemStack in, ItemStack out )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void removeFromEnergyNet( TileEntity appEngTile );
|
/**
|
||||||
|
* Create an IC2 power sink for the given external sink.
|
||||||
|
*/
|
||||||
|
default IC2PowerSink createPowerSink( TileEntity tileEntity, IExternalPowerSink externalSink ) {
|
||||||
|
return IC2PowerSinkStub.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
ItemStack getItem( String string );
|
class Stub extends IIntegrationModule.Stub implements IIC2
|
||||||
|
{
|
||||||
|
|
||||||
void maceratorRecipe( ItemStack in, ItemStack out );
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.integration.abstraction;
|
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
|
|
||||||
import appeng.api.parts.IPartHost;
|
|
||||||
|
|
||||||
|
|
||||||
public interface IImmibisMicroblocks
|
|
||||||
{
|
|
||||||
|
|
||||||
IPartHost getOrCreateHost( EntityPlayer player, int side, TileEntity te );
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param te to be left tile entity
|
|
||||||
*
|
|
||||||
* @return true if this worked..
|
|
||||||
*/
|
|
||||||
boolean leaveParts( TileEntity te );
|
|
||||||
}
|
|
||||||
@@ -21,9 +21,19 @@ package appeng.integration.abstraction;
|
|||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import appeng.integration.IIntegrationModule;
|
||||||
|
|
||||||
public interface IInvTweaks
|
|
||||||
|
public interface IInvTweaks extends IIntegrationModule
|
||||||
{
|
{
|
||||||
|
|
||||||
int compareItems( ItemStack i, ItemStack j );
|
default int compareItems( ItemStack i, ItemStack j )
|
||||||
|
{
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
|
||||||
|
class Stub extends IIntegrationModule.Stub implements IInvTweaks
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.abstraction;
|
package appeng.integration.abstraction;
|
||||||
|
|
||||||
|
|
||||||
|
import appeng.integration.IIntegrationModule;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstracts access to the JEI API functionality.
|
* Abstracts access to the JEI API functionality.
|
||||||
*/
|
*/
|
||||||
public interface IJEI
|
public interface IJEI extends IIntegrationModule
|
||||||
{
|
{
|
||||||
|
|
||||||
boolean isEnabled();
|
default String getSearchText()
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
String getSearchText();
|
default void setSearchText( String searchText )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void setSearchText( String searchText );
|
class Stub extends IIntegrationModule.Stub implements IJEI
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.integration.abstraction;
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
|
|
||||||
import appeng.api.storage.IMEInventory;
|
|
||||||
|
|
||||||
|
|
||||||
public interface ILP
|
|
||||||
{
|
|
||||||
|
|
||||||
List<ItemStack> getCraftedItems( TileEntity te );
|
|
||||||
|
|
||||||
List<ItemStack> getProvidedItems( TileEntity te );
|
|
||||||
|
|
||||||
boolean isRequestPipe( TileEntity te );
|
|
||||||
|
|
||||||
List<ItemStack> performRequest( TileEntity te, ItemStack wanted );
|
|
||||||
|
|
||||||
IMEInventory getInv( TileEntity te );
|
|
||||||
|
|
||||||
Object getGetPowerPipe( TileEntity te );
|
|
||||||
|
|
||||||
boolean isPowerSource( TileEntity tt );
|
|
||||||
|
|
||||||
boolean canUseEnergy( Object pp, int ceil, List<Object> providersToIgnore );
|
|
||||||
|
|
||||||
boolean useEnergy( Object pp, int ceil, List<Object> providersToIgnore );
|
|
||||||
}
|
|
||||||
@@ -21,11 +21,21 @@ package appeng.integration.abstraction;
|
|||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import appeng.integration.IIntegrationModule;
|
||||||
|
|
||||||
public interface IMekanism
|
|
||||||
|
public interface IMekanism extends IIntegrationModule
|
||||||
{
|
{
|
||||||
|
|
||||||
void addCrusherRecipe( ItemStack in, ItemStack out );
|
default void addCrusherRecipe( ItemStack in, ItemStack out )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void addEnrichmentChamberRecipe( ItemStack in, ItemStack out );
|
default void addEnrichmentChamberRecipe( ItemStack in, ItemStack out )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
class Stub extends IIntegrationModule.Stub implements IMekanism
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,9 +21,16 @@ package appeng.integration.abstraction;
|
|||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import appeng.integration.IIntegrationModule;
|
||||||
|
|
||||||
public interface IRC
|
|
||||||
|
public interface IRC extends IIntegrationModule
|
||||||
{
|
{
|
||||||
|
|
||||||
void rockCrusher( ItemStack input, ItemStack output );
|
default void rockCrusher( ItemStack input, ItemStack output ) {
|
||||||
|
}
|
||||||
|
|
||||||
|
class Stub extends IIntegrationModule.Stub implements IRC {
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.integration.abstraction;
|
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
|
|
||||||
import appeng.api.util.AEPartLocation;
|
|
||||||
|
|
||||||
|
|
||||||
public interface ITE
|
|
||||||
{
|
|
||||||
|
|
||||||
void addPulverizerRecipe( int i, ItemStack blkQuartz, ItemStack blockDust );
|
|
||||||
|
|
||||||
void addPulverizerRecipe( int i, ItemStack blkQuartzOre, ItemStack matQuartz, ItemStack matQuartzDust );
|
|
||||||
|
|
||||||
boolean isPipe( TileEntity te, AEPartLocation opposite );
|
|
||||||
|
|
||||||
ItemStack addItemsToPipe( TileEntity ad, ItemStack itemstack, AEPartLocation dir );
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.integration.modules;
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.function.BiFunction;
|
|
||||||
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
|
|
||||||
import appeng.helpers.Reflected;
|
|
||||||
import appeng.integration.IIntegrationModule;
|
|
||||||
import appeng.integration.modules.ic2.IC2PowerSink;
|
|
||||||
import appeng.integration.modules.ic2.IC2PowerSinkAdapter;
|
|
||||||
import appeng.integration.modules.ic2.IC2PowerSinkStub;
|
|
||||||
import appeng.tile.powersink.IExternalPowerSink;
|
|
||||||
|
|
||||||
|
|
||||||
public class IC2 implements IIntegrationModule
|
|
||||||
{
|
|
||||||
|
|
||||||
@Reflected
|
|
||||||
public static IC2 instance;
|
|
||||||
|
|
||||||
private static BiFunction<TileEntity, IExternalPowerSink, IC2PowerSink> powerSinkFactory = ( ( te, sink ) -> IC2PowerSinkStub.INSTANCE );
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init() throws Throwable
|
|
||||||
{
|
|
||||||
powerSinkFactory = IC2PowerSinkAdapter::new;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void postInit()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create an IC2 power sink for the given external sink.
|
|
||||||
*/
|
|
||||||
public static IC2PowerSink createPowerSink( TileEntity tileEntity, IExternalPowerSink externalSink )
|
|
||||||
{
|
|
||||||
return powerSinkFactory.apply( tileEntity, externalSink );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
package appeng.integration.modules;
|
|
||||||
|
|
||||||
|
|
||||||
import appeng.helpers.Reflected;
|
|
||||||
import appeng.integration.IIntegrationModule;
|
|
||||||
import appeng.integration.abstraction.IJEI;
|
|
||||||
import appeng.integration.modules.jei.NullJEI;
|
|
||||||
|
|
||||||
|
|
||||||
public class JEI implements IIntegrationModule
|
|
||||||
{
|
|
||||||
|
|
||||||
@Reflected
|
|
||||||
public static JEI instance;
|
|
||||||
|
|
||||||
private IJEI jei = new NullJEI();
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init() throws Throwable
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void postInit()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJei( IJEI jei )
|
|
||||||
{
|
|
||||||
this.jei = jei;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IJEI getJei()
|
|
||||||
{
|
|
||||||
return jei;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package appeng.integration.modules.ic2;
|
||||||
|
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
|
import ic2.api.recipe.RecipeInputItemStack;
|
||||||
|
|
||||||
|
import appeng.api.AEApi;
|
||||||
|
import appeng.api.config.TunnelType;
|
||||||
|
import appeng.api.features.IP2PTunnelRegistry;
|
||||||
|
import appeng.integration.IntegrationHelper;
|
||||||
|
import appeng.integration.abstraction.IC2PowerSink;
|
||||||
|
import appeng.integration.abstraction.IIC2;
|
||||||
|
import appeng.tile.powersink.IExternalPowerSink;
|
||||||
|
|
||||||
|
|
||||||
|
public class IC2Module implements IIC2
|
||||||
|
{
|
||||||
|
|
||||||
|
public IC2Module()
|
||||||
|
{
|
||||||
|
IntegrationHelper.testClassExistence( this, ic2.api.energy.tile.IEnergyTile.class );
|
||||||
|
IntegrationHelper.testClassExistence( this, ic2.api.recipe.RecipeInputItemStack.class );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void postInit()
|
||||||
|
{
|
||||||
|
final IP2PTunnelRegistry reg = AEApi.instance().registries().p2pTunnel();
|
||||||
|
reg.addNewAttunement( this.getItem( "copperCableItem" ), TunnelType.IC2_POWER );
|
||||||
|
reg.addNewAttunement( this.getItem( "insulatedCopperCableItem" ), TunnelType.IC2_POWER );
|
||||||
|
reg.addNewAttunement( this.getItem( "goldCableItem" ), TunnelType.IC2_POWER );
|
||||||
|
reg.addNewAttunement( this.getItem( "insulatedGoldCableItem" ), TunnelType.IC2_POWER );
|
||||||
|
reg.addNewAttunement( this.getItem( "ironCableItem" ), TunnelType.IC2_POWER );
|
||||||
|
reg.addNewAttunement( this.getItem( "insulatedIronCableItem" ), TunnelType.IC2_POWER );
|
||||||
|
reg.addNewAttunement( this.getItem( "insulatedTinCableItem" ), TunnelType.IC2_POWER );
|
||||||
|
reg.addNewAttunement( this.getItem( "glassFiberCableItem" ), TunnelType.IC2_POWER );
|
||||||
|
reg.addNewAttunement( this.getItem( "tinCableItem" ), TunnelType.IC2_POWER );
|
||||||
|
reg.addNewAttunement( this.getItem( "detectorCableItem" ), TunnelType.IC2_POWER );
|
||||||
|
reg.addNewAttunement( this.getItem( "splitterCableItem" ), TunnelType.IC2_POWER );
|
||||||
|
}
|
||||||
|
|
||||||
|
private ItemStack getItem( final String name )
|
||||||
|
{
|
||||||
|
return ic2.api.item.IC2Items.getItem( name );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an IC2 power sink for the given external sink.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public IC2PowerSink createPowerSink( TileEntity tileEntity, IExternalPowerSink externalSink )
|
||||||
|
{
|
||||||
|
return new IC2PowerSinkAdapter( tileEntity, externalSink );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void maceratorRecipe( ItemStack in, ItemStack out )
|
||||||
|
{
|
||||||
|
ic2.api.recipe.Recipes.macerator.addRecipe( new RecipeInputItemStack( in, in.stackSize ), null, false, out );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -29,6 +29,7 @@ import ic2.api.energy.prefab.BasicSink;
|
|||||||
import ic2.api.energy.tile.IEnergyEmitter;
|
import ic2.api.energy.tile.IEnergyEmitter;
|
||||||
|
|
||||||
import appeng.api.config.PowerUnits;
|
import appeng.api.config.PowerUnits;
|
||||||
|
import appeng.integration.abstraction.IC2PowerSink;
|
||||||
import appeng.tile.powersink.IExternalPowerSink;
|
import appeng.tile.powersink.IExternalPowerSink;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,9 @@
|
|||||||
package appeng.integration.modules.ic2;
|
package appeng.integration.modules.ic2;
|
||||||
|
|
||||||
|
|
||||||
|
import appeng.integration.abstraction.IC2PowerSink;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of IC2PowerSink that just stubs out all methods and does nothing.
|
* Implementation of IC2PowerSink that just stubs out all methods and does nothing.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+30
-12
@@ -16,25 +16,43 @@
|
|||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package appeng.integration.abstraction;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import appeng.integration.abstraction.IJEI;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
|
||||||
|
|
||||||
import appeng.api.parts.IPartHost;
|
|
||||||
import appeng.parts.CableBusContainer;
|
|
||||||
|
|
||||||
|
|
||||||
public interface IFMP
|
public class JEIModule implements IJEI
|
||||||
{
|
{
|
||||||
|
|
||||||
IPartHost getOrCreateHost( TileEntity tile );
|
private IJEI jei = new IJEI.Stub();
|
||||||
|
|
||||||
CableBusContainer getCableContainer( TileEntity te );
|
public void setJei( IJEI jei )
|
||||||
|
{
|
||||||
|
this.jei = jei;
|
||||||
|
}
|
||||||
|
|
||||||
void registerPassThrough( Class<?> layerInterface );
|
public IJEI getJei()
|
||||||
|
{
|
||||||
|
return jei;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSearchText()
|
||||||
|
{
|
||||||
|
return jei.getSearchText();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setSearchText( String searchText )
|
||||||
|
{
|
||||||
|
jei.setSearchText( searchText );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEnabled()
|
||||||
|
{
|
||||||
|
return jei.isEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
Event newFMPPacketEvent( EntityPlayerMP sender );
|
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
@@ -26,9 +44,7 @@ import appeng.container.implementations.ContainerPatternTerm;
|
|||||||
import appeng.core.AEConfig;
|
import appeng.core.AEConfig;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.integration.IntegrationRegistry;
|
import appeng.integration.Integrations;
|
||||||
import appeng.integration.IntegrationType;
|
|
||||||
import appeng.integration.modules.JEI;
|
|
||||||
import appeng.items.parts.ItemFacade;
|
import appeng.items.parts.ItemFacade;
|
||||||
|
|
||||||
|
|
||||||
@@ -180,7 +196,7 @@ public class JEIPlugin extends BlankModPlugin
|
|||||||
@Override
|
@Override
|
||||||
public void onRuntimeAvailable( IJeiRuntime jeiRuntime )
|
public void onRuntimeAvailable( IJeiRuntime jeiRuntime )
|
||||||
{
|
{
|
||||||
JEI jeiModule = (JEI) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.JEI );
|
JEIModule jeiModule = (JEIModule) Integrations.jei();
|
||||||
jeiModule.setJei( new JeiRuntimeAdapter( jeiRuntime ) );
|
jeiModule.setJei( new JeiRuntimeAdapter( jeiRuntime ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
package appeng.integration.modules.jei;
|
|
||||||
|
|
||||||
|
|
||||||
import appeng.integration.abstraction.IJEI;
|
|
||||||
|
|
||||||
|
|
||||||
public class NullJEI implements IJEI
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public boolean isEnabled()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getSearchText()
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setSearchText( String searchText )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules.jei;
|
package appeng.integration.modules.jei;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+3
-13
@@ -16,7 +16,7 @@
|
|||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package appeng.integration.modules;
|
package appeng.integration.modules.waila;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraftforge.fml.common.event.FMLInterModComms;
|
import net.minecraftforge.fml.common.event.FMLInterModComms;
|
||||||
@@ -24,21 +24,15 @@ import net.minecraftforge.fml.common.event.FMLInterModComms;
|
|||||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||||
import mcp.mobius.waila.api.IWailaRegistrar;
|
import mcp.mobius.waila.api.IWailaRegistrar;
|
||||||
|
|
||||||
import appeng.helpers.Reflected;
|
|
||||||
import appeng.integration.IIntegrationModule;
|
import appeng.integration.IIntegrationModule;
|
||||||
import appeng.integration.IntegrationHelper;
|
import appeng.integration.IntegrationHelper;
|
||||||
import appeng.integration.modules.waila.PartWailaDataProvider;
|
|
||||||
import appeng.integration.modules.waila.TileWailaDataProvider;
|
|
||||||
import appeng.tile.AEBaseTile;
|
import appeng.tile.AEBaseTile;
|
||||||
|
|
||||||
|
|
||||||
public class Waila implements IIntegrationModule
|
public class WailaModule implements IIntegrationModule
|
||||||
{
|
{
|
||||||
@Reflected
|
|
||||||
public static Waila instance;
|
|
||||||
|
|
||||||
@Reflected
|
public WailaModule()
|
||||||
public Waila()
|
|
||||||
{
|
{
|
||||||
IntegrationHelper.testClassExistence( this, mcp.mobius.waila.api.IWailaDataProvider.class );
|
IntegrationHelper.testClassExistence( this, mcp.mobius.waila.api.IWailaDataProvider.class );
|
||||||
IntegrationHelper.testClassExistence( this, mcp.mobius.waila.api.IWailaRegistrar.class );
|
IntegrationHelper.testClassExistence( this, mcp.mobius.waila.api.IWailaRegistrar.class );
|
||||||
@@ -67,8 +61,4 @@ public class Waila implements IIntegrationModule
|
|||||||
FMLInterModComms.sendMessage( "Waila", "register", this.getClass().getName() + ".register" );
|
FMLInterModComms.sendMessage( "Waila", "register", this.getClass().getName() + ".register" );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void postInit()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user