This commit is contained in:
AlgorithmX2 2014-08-19 15:01:35 -05:00
commit 8102614048
10 changed files with 606 additions and 573 deletions

View file

@ -709,14 +709,14 @@ public class BaseBlockRender
double maxY = (forward.offsetY > 0 ? 1 : 0) + mapFaceUV( west.offsetY, u2 ) + mapFaceUV( up.offsetY, v2 );
double maxZ = (forward.offsetZ > 0 ? 1 : 0) + mapFaceUV( west.offsetZ, u2 ) + mapFaceUV( up.offsetZ, v2 );
renderer.renderMinX = Math.max( 0.0, Math.min( minX, maxX ) - 0.001 );
renderer.renderMaxX = Math.min( 1.0, Math.max( minX, maxX ) + 0.001 );
renderer.renderMinX = Math.max( 0.0, Math.min( minX, maxX ) - (forward.offsetX != 0 ? 0 : 0.001) );
renderer.renderMaxX = Math.min( 1.0, Math.max( minX, maxX ) + (forward.offsetX != 0 ? 0 : 0.001) );
renderer.renderMinY = Math.max( 0.0, Math.min( minY, maxY ) - 0.001 );
renderer.renderMaxY = Math.min( 1.0, Math.max( minY, maxY ) + 0.001 );
renderer.renderMinY = Math.max( 0.0, Math.min( minY, maxY ) - (forward.offsetY != 0 ? 0 : 0.001) );
renderer.renderMaxY = Math.min( 1.0, Math.max( minY, maxY ) + (forward.offsetY != 0 ? 0 : 0.001) );
renderer.renderMinZ = Math.max( 0.0, Math.min( minZ, maxZ ) - 0.001 );
renderer.renderMaxZ = Math.min( 1.0, Math.max( minZ, maxZ ) + 0.001 );
renderer.renderMinZ = Math.max( 0.0, Math.min( minZ, maxZ ) - (forward.offsetZ != 0 ? 0 : 0.001) );
renderer.renderMaxZ = Math.min( 1.0, Math.max( minZ, maxZ ) + (forward.offsetZ != 0 ? 0 : 0.001) );
}
private double mapFaceUV(int offset, int uv)

View file

@ -566,9 +566,6 @@ public class Registration
AEApi.instance().registries().matterCannon().registerAmmo( AEApi.instance().materials().materialMatterBall.stack( 1 ), 32.0 );
// default settings..
((P2PTunnelRegistry) AEApi.instance().registries().p2pTunnel()).configure();
recipeHandler.injectRecipes();
if ( AEConfig.instance.isFeatureEnabled( AEFeature.enableDisassemblyCrafting ) )
@ -582,6 +579,9 @@ public class Registration
{
registerSpatial( true );
// default settings..
((P2PTunnelRegistry) AEApi.instance().registries().p2pTunnel()).configure();
// add to localizaiton..
PlayerMessages.values();
GuiText.values();

View file

@ -53,6 +53,7 @@ public class P2PTunnelRegistry implements IP2PTunnelRegistry
addNewAttunement( new ItemStack( Blocks.redstone_wire ), TunnelType.REDSTONE );
addNewAttunement( new ItemStack( Blocks.redstone_block ), TunnelType.REDSTONE );
addNewAttunement( new ItemStack( Blocks.lever ), TunnelType.REDSTONE );
addNewAttunement( getModItem( "EnderIO", "itemRedstoneConduit", OreDictionary.WILDCARD_VALUE ), TunnelType.REDSTONE );
/**
* attune based on lots of random item related stuff
@ -69,6 +70,8 @@ public class P2PTunnelRegistry implements IP2PTunnelRegistry
addNewAttunement( new ItemStack( Blocks.chest ), TunnelType.ITEM );
addNewAttunement( new ItemStack( Blocks.trapped_chest ), TunnelType.ITEM );
addNewAttunement( getModItem( "ExtraUtilities", "extractor_base", 0 ), TunnelType.ITEM );
addNewAttunement( getModItem( "Mekanism", "PartTransmitter", 9 ), TunnelType.ITEM );
addNewAttunement( getModItem( "EnderIO", "itemItemConduit", OreDictionary.WILDCARD_VALUE ), TunnelType.ITEM );
/**
* attune based on lots of random item related stuff
@ -77,7 +80,11 @@ public class P2PTunnelRegistry implements IP2PTunnelRegistry
addNewAttunement( new ItemStack( Items.lava_bucket ), TunnelType.FLUID );
addNewAttunement( new ItemStack( Items.milk_bucket ), TunnelType.FLUID );
addNewAttunement( new ItemStack( Items.water_bucket ), TunnelType.FLUID );
addNewAttunement( getModItem( "Mekanism", "MachineBlock2", 11 ), TunnelType.FLUID );
addNewAttunement( getModItem( "Mekanism", "PartTransmitter", 4 ), TunnelType.FLUID );
addNewAttunement( getModItem( "ExtraUtilities", "extractor_base", 6 ), TunnelType.FLUID );
addNewAttunement( getModItem( "ExtraUtilities", "drum", OreDictionary.WILDCARD_VALUE ), TunnelType.FLUID );
addNewAttunement( getModItem( "EnderIO", "itemLiquidConduit", OreDictionary.WILDCARD_VALUE ), TunnelType.FLUID );
for (AEColor c : AEColor.values())
{

File diff suppressed because it is too large Load diff

View file

@ -72,7 +72,7 @@ public class FMPEvent
if ( held.getItem() instanceof AEBaseItemBlock )
{
AEBaseItemBlock ib = (AEBaseItemBlock) held.getItem();
blk = Block.getBlockFromItem(ib);
blk = Block.getBlockFromItem( ib );
part = PartRegistry.getPartByBlock( blk, hit.sideHit );
}
@ -88,9 +88,9 @@ public class FMPEvent
&& block.onBlockActivated( world, hit.blockX, hit.blockY, hit.blockZ, player, hit.sideHit, (float) f.x, (float) f.y, (float) f.z ) )
{
player.swingItem();
PacketCustom.sendToServer(new C08PacketPlayerBlockPlacement( hit.blockX, hit.blockY, hit.blockZ, hit.sideHit, player.inventory.getCurrentItem(), (float) f.x,
(float) f.y, (float) f.z ) );
return false;
PacketCustom.sendToServer( new C08PacketPlayerBlockPlacement( hit.blockX, hit.blockY, hit.blockZ, hit.sideHit, player.inventory
.getCurrentItem(), (float) f.x, (float) f.y, (float) f.z ) );
return true;
}
}

View file

@ -4,7 +4,6 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import appeng.api.AEApi;
import appeng.api.config.TunnelType;
import appeng.api.features.IP2PTunnelRegistry;
import appeng.integration.BaseModule;
import appeng.integration.IIntegrationModule;
import cpw.mods.fml.common.registry.GameRegistry;
@ -22,30 +21,32 @@ public class RF extends BaseModule implements IIntegrationModule
@Override
public void Init()
{
IP2PTunnelRegistry reg = AEApi.instance().registries().p2pTunnel();
}
ItemStack energyPipe = GameRegistry.findItemStack( "ExtraUtilities", "extractor_base", 1 );
if ( energyPipe != null )
void RFStack(String mod, String name, int dmg)
{
ItemStack modItem = GameRegistry.findItemStack( mod, name, 1 );
if ( modItem != null )
{
energyPipe.setItemDamage( 12 );
reg.addNewAttunement( energyPipe, TunnelType.RF_POWER );
modItem.setItemDamage( dmg );
AEApi.instance().registries().p2pTunnel().addNewAttunement( modItem, TunnelType.RF_POWER );
}
ItemStack energyConduit = GameRegistry.findItemStack( "EnderIO", "itemPowerConduit", 1 );
if ( energyConduit != null )
{
energyConduit.setItemDamage( OreDictionary.WILDCARD_VALUE );
reg.addNewAttunement( energyConduit, TunnelType.RF_POWER );
}
reg.addNewAttunement( GameRegistry.findItemStack( "EnderIO", "blockCapacitorBank", 1 ), TunnelType.RF_POWER );
reg.addNewAttunement( GameRegistry.findItemStack( "EnderIO", "blockPowerMonitor", 1 ), TunnelType.RF_POWER );
}
@Override
public void PostInit()
{
RFStack( "ExtraUtilities", "extractor_base", 12 );
RFStack( "ExtraUtilities", "pipes", 11 );
RFStack( "ExtraUtilities", "pipes", 14 );
RFStack( "ExtraUtilities", "generator", OreDictionary.WILDCARD_VALUE );
RFStack( "ThermalExpansion", "Cell", OreDictionary.WILDCARD_VALUE );
RFStack( "ThermalExpansion", "Dynamo", OreDictionary.WILDCARD_VALUE );
RFStack( "EnderIO", "itemPowerConduit", OreDictionary.WILDCARD_VALUE );
RFStack( "EnderIO", "blockCapacitorBank", 0 );
RFStack( "EnderIO", "blockPowerMonitor", 0 );
}
}

View file

@ -70,6 +70,9 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
{
ItemStack is = player.inventory.getCurrentItem();
// UniqueIdentifier id = GameRegistry.findUniqueIdentifierFor( is.getItem() );
// AELog.info( "ID:" + id.toString() + " : " + is.getItemDamage() );
TunnelType tt = AEApi.instance().registries().p2pTunnel().getTunnelTypeByItem( is );
if ( is != null && is.getItem() instanceof IMemoryCard )
{

View file

@ -17,7 +17,6 @@ import appeng.api.config.PowerMultiplier;
import appeng.api.config.PowerUnits;
import appeng.api.implementations.items.IAEItemPowerStorage;
import appeng.api.implementations.tiles.ICrankable;
import appeng.api.networking.GridFlags;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.util.AECableType;
import appeng.me.GridAccessException;
@ -141,7 +140,7 @@ public class TileCharger extends AENetworkPowerTile implements ICrankable
public TileCharger() {
gridProxy.setValidSides( EnumSet.noneOf( ForgeDirection.class ) );
gridProxy.setFlags( GridFlags.CANNOT_CARRY );
gridProxy.setFlags();
internalMaxPower = 1500;
gridProxy.setIdlePowerUsage( 0 );
addNewHandler( new TileChargerHandler() );

View file

@ -7,7 +7,6 @@ import java.util.EnumSet;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.implementations.IPowerChannelState;
import appeng.api.networking.GridFlags;
import appeng.api.networking.events.MENetworkEventSubscribe;
import appeng.api.networking.events.MENetworkPowerStatusChange;
import appeng.api.util.AECableType;
@ -66,7 +65,7 @@ public class TileQuartzGrowthAccelerator extends AENetworkTile implements IPower
public TileQuartzGrowthAccelerator() {
gridProxy.setValidSides( EnumSet.noneOf( ForgeDirection.class ) );
gridProxy.setFlags( GridFlags.CANNOT_CARRY );
gridProxy.setFlags();
gridProxy.setIdlePowerUsage( 8 );
addNewHandler( new TileChargerHandler() );
}

View file

@ -10,7 +10,6 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntityFurnace;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.config.Actionable;
import appeng.api.networking.GridFlags;
import appeng.api.networking.IGridNode;
import appeng.api.networking.energy.IEnergyGrid;
import appeng.api.networking.ticking.IGridTickable;
@ -88,7 +87,7 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
public TileVibrationChamber() {
gridProxy.setIdlePowerUsage( 0 );
gridProxy.setFlags( GridFlags.CANNOT_CARRY );
gridProxy.setFlags();
addNewHandler( new TileVibrationChamberHandler() );
}