Code Formatting
This commit is contained in:
@@ -37,12 +37,16 @@ public enum Upgrades
|
|||||||
/**
|
/**
|
||||||
* Gold Tier Upgrades.
|
* Gold Tier Upgrades.
|
||||||
*/
|
*/
|
||||||
CAPACITY( 0 ), REDSTONE( 0 ), CRAFTING( 0 ),
|
CAPACITY( 0 ),
|
||||||
|
REDSTONE( 0 ),
|
||||||
|
CRAFTING( 0 ),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Diamond Tier Upgrades.
|
* Diamond Tier Upgrades.
|
||||||
*/
|
*/
|
||||||
FUZZY( 1 ), SPEED( 1 ), INVERTER( 1 );
|
FUZZY( 1 ),
|
||||||
|
SPEED( 1 ),
|
||||||
|
INVERTER( 1 );
|
||||||
|
|
||||||
private final int tier;
|
private final int tier;
|
||||||
private final Map<ItemStack, Integer> supportedMax = new HashMap<>();
|
private final Map<ItemStack, Integer> supportedMax = new HashMap<>();
|
||||||
|
|||||||
@@ -47,7 +47,9 @@ public interface IP2PTunnelRegistry
|
|||||||
* @param type - the type of tunnel. Nullable, but then ignored
|
* @param type - the type of tunnel. Nullable, but then ignored
|
||||||
*/
|
*/
|
||||||
void addNewAttunement( @Nonnull ItemStack trigger, @Nullable TunnelType type );
|
void addNewAttunement( @Nonnull ItemStack trigger, @Nullable TunnelType type );
|
||||||
|
|
||||||
void addNewAttunement( @Nonnull String ModId, @Nullable TunnelType type );
|
void addNewAttunement( @Nonnull String ModId, @Nullable TunnelType type );
|
||||||
|
|
||||||
void addNewAttunement( @Nonnull Capability<?> cap, @Nullable TunnelType type );
|
void addNewAttunement( @Nonnull Capability<?> cap, @Nullable TunnelType type );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
package appeng.api.implementations.tiles;
|
package appeng.api.implementations.tiles;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraftforge.items.IItemHandler;
|
import net.minecraftforge.items.IItemHandler;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
package appeng.api.implementations.tiles;
|
package appeng.api.implementations.tiles;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraftforge.items.IItemHandler;
|
import net.minecraftforge.items.IItemHandler;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* The MIT License (MIT)
|
* The MIT License (MIT)
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
package appeng.api.parts;
|
package appeng.api.parts;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: Consider removing and replacing with capabilities.
|
* TODO: Consider removing and replacing with capabilities.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import appeng.api.exceptions.MissingIngredientException;
|
|||||||
import appeng.api.exceptions.RecipeException;
|
import appeng.api.exceptions.RecipeException;
|
||||||
import appeng.api.exceptions.RegistrationException;
|
import appeng.api.exceptions.RegistrationException;
|
||||||
|
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface ICraftHandler
|
public interface ICraftHandler
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
import appeng.api.exceptions.MissingIngredientException;
|
import appeng.api.exceptions.MissingIngredientException;
|
||||||
import appeng.api.exceptions.RegistrationException;
|
import appeng.api.exceptions.RegistrationException;
|
||||||
|
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface IIngredient
|
public interface IIngredient
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import java.io.BufferedReader;
|
|||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface IRecipeLoader
|
public interface IRecipeLoader
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -74,25 +74,30 @@ public enum AEColor
|
|||||||
|
|
||||||
TRANSPARENT( "gui.appliedenergistics2.Fluix", null, 0x1B2344, 0x895CA8, 0xD7BBEC );
|
TRANSPARENT( "gui.appliedenergistics2.Fluix", null, 0x1B2344, 0x895CA8, 0xD7BBEC );
|
||||||
|
|
||||||
public static final List<AEColor> VALID_COLORS = Arrays.asList( WHITE, ORANGE, MAGENTA, LIGHT_BLUE, YELLOW, LIME, PINK, GRAY, LIGHT_GRAY, CYAN, PURPLE, BLUE, BROWN, GREEN, RED, BLACK );
|
public static final List<AEColor> VALID_COLORS = Arrays.asList( WHITE, ORANGE, MAGENTA, LIGHT_BLUE, YELLOW, LIME, PINK, GRAY, LIGHT_GRAY, CYAN, PURPLE,
|
||||||
|
BLUE, BROWN, GREEN, RED, BLACK );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link BakedQuad#getTintIndex() tint index} that can normally be used to get the {@link #blackVariant dark variant} of the apprioriate AE color.
|
* The {@link BakedQuad#getTintIndex() tint index} that can normally be used to get the {@link #blackVariant dark
|
||||||
|
* variant} of the apprioriate AE color.
|
||||||
*/
|
*/
|
||||||
public static final int TINTINDEX_DARK = 1;
|
public static final int TINTINDEX_DARK = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link BakedQuad#getTintIndex() tint index} that can normally be used to get the {@link #mediumVariant medium variant} of the apprioriate AE color.
|
* The {@link BakedQuad#getTintIndex() tint index} that can normally be used to get the {@link #mediumVariant medium
|
||||||
|
* variant} of the apprioriate AE color.
|
||||||
*/
|
*/
|
||||||
public static final int TINTINDEX_MEDIUM = 2;
|
public static final int TINTINDEX_MEDIUM = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link BakedQuad#getTintIndex() tint index} that can normally be used to get the {@link #whiteVariant bright variant} of the apprioriate AE color.
|
* The {@link BakedQuad#getTintIndex() tint index} that can normally be used to get the {@link #whiteVariant bright
|
||||||
|
* variant} of the apprioriate AE color.
|
||||||
*/
|
*/
|
||||||
public static final int TINTINDEX_BRIGHT = 3;
|
public static final int TINTINDEX_BRIGHT = 3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link BakedQuad#getTintIndex() tint index} that can normally be used to get a color between the {@link #mediumVariant medium}
|
* The {@link BakedQuad#getTintIndex() tint index} that can normally be used to get a color between the
|
||||||
|
* {@link #mediumVariant medium}
|
||||||
* and {@link #whiteVariant bright variant} of the apprioriate AE color.
|
* and {@link #whiteVariant bright variant} of the apprioriate AE color.
|
||||||
*/
|
*/
|
||||||
public static final int TINTINDEX_MEDIUM_BRIGHT = 4;
|
public static final int TINTINDEX_MEDIUM_BRIGHT = 4;
|
||||||
@@ -141,7 +146,8 @@ public enum AEColor
|
|||||||
{
|
{
|
||||||
switch( tintIndex )
|
switch( tintIndex )
|
||||||
{
|
{
|
||||||
// Please note that tintindex 0 is hardcoded for the block breaking particles. Returning anything other than -1 for tintindex=0 here
|
// Please note that tintindex 0 is hardcoded for the block breaking particles. Returning anything other than
|
||||||
|
// -1 for tintindex=0 here
|
||||||
// will cause issues with those particles
|
// will cause issues with those particles
|
||||||
case 0:
|
case 0:
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -23,8 +23,10 @@
|
|||||||
|
|
||||||
package appeng.api.util;
|
package appeng.api.util;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.util.math.RayTraceResult;
|
import net.minecraft.util.math.RayTraceResult;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implement on Tile or part to customize if the info gui opens, or an action is preformed.
|
* Implement on Tile or part to customize if the info gui opens, or an action is preformed.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
|
|
||||||
package appeng.bootstrap.components;
|
package appeng.bootstrap.components;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraftforge.fml.common.registry.EntityEntry;
|
import net.minecraftforge.fml.common.registry.EntityEntry;
|
||||||
import net.minecraftforge.registries.IForgeRegistry;
|
import net.minecraftforge.registries.IForgeRegistry;
|
||||||
|
|
||||||
import appeng.bootstrap.IBootstrapComponent;
|
import appeng.bootstrap.IBootstrapComponent;
|
||||||
|
|
||||||
|
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
public interface IEntityRegistrationComponent extends IBootstrapComponent
|
public interface IEntityRegistrationComponent extends IBootstrapComponent
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -78,7 +78,8 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
|||||||
|
|
||||||
if( this.tabCraftButton == btn || this.tabProcessButton == btn )
|
if( this.tabCraftButton == btn || this.tabProcessButton == btn )
|
||||||
{
|
{
|
||||||
NetworkHandler.instance().sendToServer(
|
NetworkHandler.instance()
|
||||||
|
.sendToServer(
|
||||||
new PacketValueConfig( "PatternTerminal.CraftMode", this.tabProcessButton == btn ? CRAFTMODE_CRFTING : CRAFTMODE_PROCESSING ) );
|
new PacketValueConfig( "PatternTerminal.CraftMode", this.tabProcessButton == btn ? CRAFTMODE_CRFTING : CRAFTMODE_PROCESSING ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,7 +95,8 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
|||||||
|
|
||||||
if( this.substitutionsEnabledBtn == btn || this.substitutionsDisabledBtn == btn )
|
if( this.substitutionsEnabledBtn == btn || this.substitutionsDisabledBtn == btn )
|
||||||
{
|
{
|
||||||
NetworkHandler.instance().sendToServer(
|
NetworkHandler.instance()
|
||||||
|
.sendToServer(
|
||||||
new PacketValueConfig( "PatternTerminal.Substitute", this.substitutionsEnabledBtn == btn ? SUBSITUTION_DISABLE : SUBSITUTION_ENABLE ) );
|
new PacketValueConfig( "PatternTerminal.Substitute", this.substitutionsEnabledBtn == btn ? SUBSITUTION_DISABLE : SUBSITUTION_ENABLE ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import net.minecraft.util.EnumFacing;
|
|||||||
public class DummyFluidBakedModel implements IBakedModel
|
public class DummyFluidBakedModel implements IBakedModel
|
||||||
{
|
{
|
||||||
private final ImmutableList<BakedQuad> quads;
|
private final ImmutableList<BakedQuad> quads;
|
||||||
|
|
||||||
public DummyFluidBakedModel( ImmutableList<BakedQuad> quads )
|
public DummyFluidBakedModel( ImmutableList<BakedQuad> quads )
|
||||||
{
|
{
|
||||||
this.quads = quads;
|
this.quads = quads;
|
||||||
|
|||||||
@@ -247,7 +247,9 @@ public enum UVLModelLoader implements ICustomModelLoader
|
|||||||
{
|
{
|
||||||
String s = modelLocation.getResourcePath();
|
String s = modelLocation.getResourcePath();
|
||||||
|
|
||||||
iresource = Minecraft.getMinecraft().getResourceManager().getResource(
|
iresource = Minecraft.getMinecraft()
|
||||||
|
.getResourceManager()
|
||||||
|
.getResource(
|
||||||
new ResourceLocation( modelLocation.getResourceDomain(), "models/" + modelPath + ".json" ) );
|
new ResourceLocation( modelLocation.getResourceDomain(), "models/" + modelPath + ".json" ) );
|
||||||
reader = new InputStreamReader( iresource.getInputStream(), Charsets.UTF_8 );
|
reader = new InputStreamReader( iresource.getInputStream(), Charsets.UTF_8 );
|
||||||
|
|
||||||
|
|||||||
@@ -468,7 +468,8 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
|||||||
final ItemStack failed = real.getStackInSlot( x );
|
final ItemStack failed = real.getStackInSlot( x );
|
||||||
if( !failed.isEmpty() )
|
if( !failed.isEmpty() )
|
||||||
{
|
{
|
||||||
this.getCellInventory().injectItems( AEItemStack.fromItemStack( failed ), Actionable.MODULATE,
|
this.getCellInventory()
|
||||||
|
.injectItems( AEItemStack.fromItemStack( failed ), Actionable.MODULATE,
|
||||||
new MachineSource( this.getPatternTerminal() ) );
|
new MachineSource( this.getPatternTerminal() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,7 +90,6 @@ public class FluidSorters
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
private static SortDir getDirection()
|
private static SortDir getDirection()
|
||||||
{
|
{
|
||||||
return Direction;
|
return Direction;
|
||||||
|
|||||||
@@ -18,10 +18,12 @@
|
|||||||
|
|
||||||
package appeng.helpers;
|
package appeng.helpers;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
import appeng.core.sync.GuiBridge;
|
import appeng.core.sync.GuiBridge;
|
||||||
|
|
||||||
|
|
||||||
public interface IPriorityHost
|
public interface IPriorityHost
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,8 @@ final class IntegrationNode
|
|||||||
final ModAPIManager apiManager = ModAPIManager.INSTANCE;
|
final ModAPIManager apiManager = ModAPIManager.INSTANCE;
|
||||||
boolean enabled = this.modID == null || Loader.isModLoaded( this.modID ) || apiManager.hasAPI( this.modID );
|
boolean enabled = this.modID == null || Loader.isModLoaded( this.modID ) || apiManager.hasAPI( this.modID );
|
||||||
|
|
||||||
AEConfig.instance().addCustomCategoryComment( "ModIntegration",
|
AEConfig.instance()
|
||||||
|
.addCustomCategoryComment( "ModIntegration",
|
||||||
"Valid Values are 'AUTO', 'ON', or 'OFF' - defaults to 'AUTO' ; Suggested that you leave this alone unless your experiencing an issue, or wish to disable the integration for a reason." );
|
"Valid Values are 'AUTO', 'ON', or 'OFF' - defaults to 'AUTO' ; Suggested that you leave this alone unless your experiencing an issue, or wish to disable the integration for a reason." );
|
||||||
final String mode = AEConfig.instance().get( "ModIntegration", this.displayName.replace( " ", "" ), "AUTO" ).getString();
|
final String mode = AEConfig.instance().get( "ModIntegration", this.displayName.replace( " ", "" ), "AUTO" ).getString();
|
||||||
|
|
||||||
|
|||||||
@@ -79,9 +79,11 @@ public class JEIPlugin implements IModPlugin
|
|||||||
this.registerDescriptions( definitions, registry );
|
this.registerDescriptions( definitions, registry );
|
||||||
|
|
||||||
// Allow recipe transfer from JEI to crafting and pattern terminal
|
// Allow recipe transfer from JEI to crafting and pattern terminal
|
||||||
registry.getRecipeTransferRegistry().addRecipeTransferHandler( new RecipeTransferHandler<>( ContainerCraftingTerm.class ),
|
registry.getRecipeTransferRegistry()
|
||||||
|
.addRecipeTransferHandler( new RecipeTransferHandler<>( ContainerCraftingTerm.class ),
|
||||||
VanillaRecipeCategoryUid.CRAFTING );
|
VanillaRecipeCategoryUid.CRAFTING );
|
||||||
registry.getRecipeTransferRegistry().addRecipeTransferHandler( new RecipeTransferHandler<>( ContainerPatternTerm.class ),
|
registry.getRecipeTransferRegistry()
|
||||||
|
.addRecipeTransferHandler( new RecipeTransferHandler<>( ContainerPatternTerm.class ),
|
||||||
VanillaRecipeCategoryUid.CRAFTING );
|
VanillaRecipeCategoryUid.CRAFTING );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -225,7 +225,8 @@ public enum PartType
|
|||||||
|
|
||||||
FORMATION_PLANE( 320, "formation_plane", EnumSet.of( AEFeature.FORMATION_PLANE ), EnumSet.noneOf( IntegrationType.class ), PartFormationPlane.class ),
|
FORMATION_PLANE( 320, "formation_plane", EnumSet.of( AEFeature.FORMATION_PLANE ), EnumSet.noneOf( IntegrationType.class ), PartFormationPlane.class ),
|
||||||
|
|
||||||
FLUID_FORMATION_PLANE( 321, "fluid_formation_plane", EnumSet.of( AEFeature.FLUID_FORMATION_PLANE ), EnumSet.noneOf( IntegrationType.class ), PartFluidFormationPlane.class ),
|
FLUID_FORMATION_PLANE( 321, "fluid_formation_plane", EnumSet.of( AEFeature.FLUID_FORMATION_PLANE ), EnumSet
|
||||||
|
.noneOf( IntegrationType.class ), PartFluidFormationPlane.class ),
|
||||||
|
|
||||||
PATTERN_TERMINAL( 340, "pattern_terminal", EnumSet.of( AEFeature.PATTERNS ), EnumSet.noneOf( IntegrationType.class ), PartPatternTerminal.class ),
|
PATTERN_TERMINAL( 340, "pattern_terminal", EnumSet.of( AEFeature.PATTERNS ), EnumSet.noneOf( IntegrationType.class ), PartPatternTerminal.class ),
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,10 @@ public class ItemCreativeStorageCell extends AEBaseItem implements ICellWorkbenc
|
|||||||
@Override
|
@Override
|
||||||
public void addCheckedInformation( final ItemStack stack, final World world, final List<String> lines, final ITooltipFlag advancedTooltips )
|
public void addCheckedInformation( final ItemStack stack, final World world, final List<String> lines, final ITooltipFlag advancedTooltips )
|
||||||
{
|
{
|
||||||
final IMEInventoryHandler<?> inventory = AEApi.instance().registries().cell().getCellInventory( stack, null,
|
final IMEInventoryHandler<?> inventory = AEApi.instance()
|
||||||
|
.registries()
|
||||||
|
.cell()
|
||||||
|
.getCellInventory( stack, null,
|
||||||
AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
|
AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
|
||||||
|
|
||||||
if( inventory instanceof ICellInventoryHandler )
|
if( inventory instanceof ICellInventoryHandler )
|
||||||
|
|||||||
@@ -157,7 +157,8 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
|
|||||||
BlockPos offset = manager.getCellDimensionOrigin( cellid );
|
BlockPos offset = manager.getCellDimensionOrigin( cellid );
|
||||||
|
|
||||||
this.setStorageCell( is, cellid, targetSize );
|
this.setStorageCell( is, cellid, targetSize );
|
||||||
StorageHelper.getInstance().swapRegions( w, min.x + 1, min.y + 1, min.z + 1, manager.getWorld(), offset.getX(), offset.getY(),
|
StorageHelper.getInstance()
|
||||||
|
.swapRegions( w, min.x + 1, min.y + 1, min.z + 1, manager.getWorld(), offset.getX(), offset.getY(),
|
||||||
offset.getZ(), targetX - 1, targetY - 1,
|
offset.getZ(), targetX - 1, targetY - 1,
|
||||||
targetZ - 1 );
|
targetZ - 1 );
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ public class ChestLoot
|
|||||||
final IMaterials materials = AEApi.instance().definitions().materials();
|
final IMaterials materials = AEApi.instance().definitions().materials();
|
||||||
materials.certusQuartzCrystal().maybeStack( 1 ).ifPresent( is ->
|
materials.certusQuartzCrystal().maybeStack( 1 ).ifPresent( is ->
|
||||||
{
|
{
|
||||||
event.getTable().addPool( new LootPool( new LootEntry[] {
|
event.getTable()
|
||||||
|
.addPool( new LootPool( new LootEntry[] {
|
||||||
new LootEntryItem( is.getItem(), 2, 3, new LootFunction[] {
|
new LootEntryItem( is.getItem(), 2, 3, new LootFunction[] {
|
||||||
new SetMetadata( null, new RandomValueRange( is.getItemDamage() ) ) }, new LootCondition[] {
|
new SetMetadata( null, new RandomValueRange( is.getItemDamage() ) ) }, new LootCondition[] {
|
||||||
new RandomChance( 1 ) }, "AE2 Crystal_" + is.getItemDamage() )
|
new RandomChance( 1 ) }, "AE2 Crystal_" + is.getItemDamage() )
|
||||||
@@ -56,7 +57,8 @@ public class ChestLoot
|
|||||||
|
|
||||||
materials.certusQuartzDust().maybeStack( 1 ).ifPresent( is ->
|
materials.certusQuartzDust().maybeStack( 1 ).ifPresent( is ->
|
||||||
{
|
{
|
||||||
event.getTable().addPool( new LootPool( new LootEntryItem[] {
|
event.getTable()
|
||||||
|
.addPool( new LootPool( new LootEntryItem[] {
|
||||||
new LootEntryItem( is.getItem(), 2, 3, new LootFunction[] {
|
new LootEntryItem( is.getItem(), 2, 3, new LootFunction[] {
|
||||||
new SetMetadata( null, new RandomValueRange( is.getItemDamage() ) ) }, new LootCondition[] {
|
new SetMetadata( null, new RandomValueRange( is.getItemDamage() ) ) }, new LootCondition[] {
|
||||||
new RandomChance( 1 ) }, "AE2 Dust_" + is.getItemDamage() )
|
new RandomChance( 1 ) }, "AE2 Dust_" + is.getItemDamage() )
|
||||||
|
|||||||
@@ -777,7 +777,8 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
|||||||
|
|
||||||
if( details.isCraftable() )
|
if( details.isCraftable() )
|
||||||
{
|
{
|
||||||
FMLCommonHandler.instance().firePlayerCraftingEvent( Platform.getPlayer( (WorldServer) this.getWorld() ),
|
FMLCommonHandler.instance()
|
||||||
|
.firePlayerCraftingEvent( Platform.getPlayer( (WorldServer) this.getWorld() ),
|
||||||
details.getOutput( ic, this.getWorld() ), ic );
|
details.getOutput( ic, this.getWorld() ), ic );
|
||||||
|
|
||||||
for( int x = 0; x < ic.getSizeInventory(); x++ )
|
for( int x = 0; x < ic.getSizeInventory(); x++ )
|
||||||
|
|||||||
@@ -156,7 +156,9 @@ public class QuantumCluster implements ILocatable, IAECluster
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sideA.connection = sideB.connection = new ConnectionWrapper( AEApi.instance().grid().createGridConnection( sideA.getNode(),
|
sideA.connection = sideB.connection = new ConnectionWrapper( AEApi.instance()
|
||||||
|
.grid()
|
||||||
|
.createGridConnection( sideA.getNode(),
|
||||||
sideB.getNode() ) );
|
sideB.getNode() ) );
|
||||||
}
|
}
|
||||||
catch( final FailedConnectionException e )
|
catch( final FailedConnectionException e )
|
||||||
|
|||||||
@@ -239,8 +239,11 @@ public class PartP2PTunnelME extends PartP2PTunnel<PartP2PTunnelME> implements I
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
connections.getConnections().put( me.getGridNode(),
|
connections.getConnections()
|
||||||
new TunnelConnection( me, AEApi.instance().grid().createGridConnection( this.outerProxy.getNode(),
|
.put( me.getGridNode(),
|
||||||
|
new TunnelConnection( me, AEApi.instance()
|
||||||
|
.grid()
|
||||||
|
.createGridConnection( this.outerProxy.getNode(),
|
||||||
me.outerProxy.getNode() ) ) );
|
me.outerProxy.getNode() ) ) );
|
||||||
}
|
}
|
||||||
catch( final FailedConnectionException e )
|
catch( final FailedConnectionException e )
|
||||||
|
|||||||
@@ -105,7 +105,10 @@ public final class DisassembleRecipe extends net.minecraftforge.registries.IForg
|
|||||||
{
|
{
|
||||||
ItemStack storageCellStack = maybeCellOutput.get();
|
ItemStack storageCellStack = maybeCellOutput.get();
|
||||||
// make sure the storage cell stackInSlot empty...
|
// make sure the storage cell stackInSlot empty...
|
||||||
final IMEInventory<IAEItemStack> cellInv = AEApi.instance().registries().cell().getCellInventory( stackInSlot, null,
|
final IMEInventory<IAEItemStack> cellInv = AEApi.instance()
|
||||||
|
.registries()
|
||||||
|
.cell()
|
||||||
|
.getCellInventory( stackInSlot, null,
|
||||||
AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
|
AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) );
|
||||||
if( cellInv != null )
|
if( cellInv != null )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -521,7 +521,9 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return (int) ( this.getProxy().getEnergy().extractAEPower( ticksPassed * bonusValue * acceleratorTax, Actionable.MODULATE,
|
return (int) ( this.getProxy()
|
||||||
|
.getEnergy()
|
||||||
|
.extractAEPower( ticksPassed * bonusValue * acceleratorTax, Actionable.MODULATE,
|
||||||
PowerMultiplier.CONFIG ) / acceleratorTax );
|
PowerMultiplier.CONFIG ) / acceleratorTax );
|
||||||
}
|
}
|
||||||
catch( final GridAccessException e )
|
catch( final GridAccessException e )
|
||||||
|
|||||||
@@ -177,7 +177,10 @@ public class AppEngInternalAEInventory implements IInternalItemHandler, Iterable
|
|||||||
{
|
{
|
||||||
if( existing.isEmpty() )
|
if( existing.isEmpty() )
|
||||||
{
|
{
|
||||||
this.inv[slot] = AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createStack(
|
this.inv[slot] = AEApi.instance()
|
||||||
|
.storage()
|
||||||
|
.getStorageChannel( IItemStorageChannel.class )
|
||||||
|
.createStack(
|
||||||
reachedLimit ? ItemHandlerHelper.copyStackWithSize( stack, limit ) : stack );
|
reachedLimit ? ItemHandlerHelper.copyStackWithSize( stack, limit ) : stack );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -97,7 +97,8 @@ public class TileSkyChest extends AEBaseInvTile implements ITickable
|
|||||||
|
|
||||||
if( this.getPlayerOpen() == 1 )
|
if( this.getPlayerOpen() == 1 )
|
||||||
{
|
{
|
||||||
this.getWorld().playSound( player, this.pos.getX() + 0.5D, this.pos.getY() + 0.5D, this.pos.getZ() + 0.5D, SoundEvents.BLOCK_CHEST_OPEN,
|
this.getWorld()
|
||||||
|
.playSound( player, this.pos.getX() + 0.5D, this.pos.getY() + 0.5D, this.pos.getZ() + 0.5D, SoundEvents.BLOCK_CHEST_OPEN,
|
||||||
SoundCategory.BLOCKS, 0.5F, this.getWorld().rand.nextFloat() * 0.1F + 0.9F );
|
SoundCategory.BLOCKS, 0.5F, this.getWorld().rand.nextFloat() * 0.1F + 0.9F );
|
||||||
this.markForUpdate();
|
this.markForUpdate();
|
||||||
}
|
}
|
||||||
@@ -120,7 +121,8 @@ public class TileSkyChest extends AEBaseInvTile implements ITickable
|
|||||||
|
|
||||||
if( this.getPlayerOpen() == 0 )
|
if( this.getPlayerOpen() == 0 )
|
||||||
{
|
{
|
||||||
this.getWorld().playSound( player, this.pos.getX() + 0.5D, this.pos.getY() + 0.5D, this.pos.getZ() + 0.5D, SoundEvents.BLOCK_CHEST_CLOSE,
|
this.getWorld()
|
||||||
|
.playSound( player, this.pos.getX() + 0.5D, this.pos.getY() + 0.5D, this.pos.getZ() + 0.5D, SoundEvents.BLOCK_CHEST_CLOSE,
|
||||||
SoundCategory.BLOCKS, 0.5F, this.getWorld().rand.nextFloat() * 0.1F + 0.9F );
|
SoundCategory.BLOCKS, 0.5F, this.getWorld().rand.nextFloat() * 0.1F + 0.9F );
|
||||||
this.markForUpdate();
|
this.markForUpdate();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,7 +203,8 @@ public final class MeteoritePlacer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for( final Object o : w.getWorld().getEntitiesWithinAABB( EntityItem.class,
|
for( final Object o : w.getWorld()
|
||||||
|
.getEntitiesWithinAABB( EntityItem.class,
|
||||||
new AxisAlignedBB( w.minX( x - 30 ), y - 5, w.minZ( z - 30 ), w.maxX( x + 30 ), y + 30, w.maxZ( z + 30 ) ) ) )
|
new AxisAlignedBB( w.minX( x - 30 ), y - 5, w.minZ( z - 30 ), w.maxX( x + 30 ), y + 30, w.maxZ( z + 30 ) ) ) )
|
||||||
{
|
{
|
||||||
final Entity e = (Entity) o;
|
final Entity e = (Entity) o;
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
|
|
||||||
package appeng.core.worlddata;
|
package appeng.core.worlddata;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
|
|
||||||
public class SpatialDimensionManagerTest
|
public class SpatialDimensionManagerTest
|
||||||
{
|
{
|
||||||
private static final BlockPos CONTENT = new BlockPos( 1, 1, 1 );
|
private static final BlockPos CONTENT = new BlockPos( 1, 1, 1 );
|
||||||
@@ -22,7 +25,6 @@ public class SpatialDimensionManagerTest
|
|||||||
private static final int ID_B = 10;
|
private static final int ID_B = 10;
|
||||||
private static final int ID_C = 11;
|
private static final int ID_C = 11;
|
||||||
|
|
||||||
|
|
||||||
private static final BlockPos POS_1 = new BlockPos( -320, 64, -320 );
|
private static final BlockPos POS_1 = new BlockPos( -320, 64, -320 );
|
||||||
private static final BlockPos POS_2 = new BlockPos( 192, 64, -320 );
|
private static final BlockPos POS_2 = new BlockPos( 192, 64, -320 );
|
||||||
private static final BlockPos POS_3 = new BlockPos( -320, 64, 192 );
|
private static final BlockPos POS_3 = new BlockPos( -320, 64, 192 );
|
||||||
@@ -38,7 +40,6 @@ public class SpatialDimensionManagerTest
|
|||||||
private static final BlockPos POS_B = new BlockPos( -320, 64, 704 );
|
private static final BlockPos POS_B = new BlockPos( -320, 64, 704 );
|
||||||
private static final BlockPos POS_C = new BlockPos( 192, 64, 704 );
|
private static final BlockPos POS_C = new BlockPos( 192, 64, 704 );
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testBlockPosGeneration()
|
public void testBlockPosGeneration()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user