Merge branch 'master' of https://bitbucket.org/AlgorithmX2/appliedenergistics2
This commit is contained in:
commit
40e71566ea
|
@ -37,7 +37,7 @@ import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
||||||
import cpw.mods.fml.common.event.FMLServerStoppingEvent;
|
import cpw.mods.fml.common.event.FMLServerStoppingEvent;
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||||
|
|
||||||
@Mod(modid = AppEng.modid, name = AppEng.name, version = AEConfig.VERSION, dependencies = AppEng.dependencies)
|
@Mod(modid = AppEng.modid, acceptedMinecraftVersions = "[1.7.2]", name = AppEng.name, version = AEConfig.VERSION, dependencies = AppEng.dependencies)
|
||||||
public class AppEng
|
public class AppEng
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ public class AppEng
|
||||||
|
|
||||||
AELog.info( "Starting ( PreInit )" );
|
AELog.info( "Starting ( PreInit )" );
|
||||||
|
|
||||||
CreativeTab.init();
|
CreativeTab.init();
|
||||||
if ( AEConfig.instance.isFeatureEnabled( AEFeature.Facades ) )
|
if ( AEConfig.instance.isFeatureEnabled( AEFeature.Facades ) )
|
||||||
CreativeTabFacade.init();
|
CreativeTabFacade.init();
|
||||||
|
|
||||||
|
|
27
integration/modules/RFItem.java
Normal file
27
integration/modules/RFItem.java
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
package appeng.integration.modules;
|
||||||
|
|
||||||
|
import appeng.integration.BaseModule;
|
||||||
|
import appeng.integration.IIntegrationModule;
|
||||||
|
|
||||||
|
public class RFItem extends BaseModule implements IIntegrationModule
|
||||||
|
{
|
||||||
|
|
||||||
|
public static RFItem instance;
|
||||||
|
|
||||||
|
public RFItem() {
|
||||||
|
TestClass( cofh.api.energy.IEnergyContainerItem.class );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void PostInit()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -178,8 +178,7 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private boolean dissassembleDrive(ItemStack stack, World world, EntityPlayer player)
|
||||||
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
|
||||||
{
|
{
|
||||||
if ( player.isSneaking() )
|
if ( player.isSneaking() )
|
||||||
{
|
{
|
||||||
|
@ -213,4 +212,17 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
|
||||||
|
{
|
||||||
|
dissassembleDrive( stack, world, player );
|
||||||
|
return stack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||||
|
{
|
||||||
|
return dissassembleDrive( stack, world, player );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import appeng.api.config.PowerUnits;
|
||||||
import appeng.transformer.annotations.integration.Interface;
|
import appeng.transformer.annotations.integration.Interface;
|
||||||
import cofh.api.energy.IEnergyContainerItem;
|
import cofh.api.energy.IEnergyContainerItem;
|
||||||
|
|
||||||
@Interface(iface = "cofh.api.energy.IEnergyContainerItem", iname = "RF")
|
@Interface(iface = "cofh.api.energy.IEnergyContainerItem", iname = "RFItem")
|
||||||
public class RedstoneFlux extends IC2 implements IEnergyContainerItem
|
public class RedstoneFlux extends IC2 implements IEnergyContainerItem
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,13 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.RenderBlocks;
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
|
import net.minecraft.item.ItemFirework;
|
||||||
import net.minecraft.item.ItemSkull;
|
import net.minecraft.item.ItemSkull;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
@ -390,6 +392,16 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
|
||||||
EntityPlayer player = Platform.getPlayer( (WorldServer) w );
|
EntityPlayer player = Platform.getPlayer( (WorldServer) w );
|
||||||
Platform.configurePlayer( player, side, tile );
|
Platform.configurePlayer( player, side, tile );
|
||||||
|
|
||||||
|
if ( i instanceof ItemFirework )
|
||||||
|
{
|
||||||
|
Chunk c = w.getChunkFromBlockCoords( x, z );
|
||||||
|
int sum = 0;
|
||||||
|
for (List Z : c.entityLists)
|
||||||
|
sum += Z.size();
|
||||||
|
if ( sum > 32 )
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
|
||||||
maxStorage = is.stackSize;
|
maxStorage = is.stackSize;
|
||||||
worked = true;
|
worked = true;
|
||||||
if ( type == Actionable.MODULATE )
|
if ( type == Actionable.MODULATE )
|
||||||
|
@ -435,21 +447,39 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
|
||||||
{
|
{
|
||||||
if ( type == Actionable.MODULATE )
|
if ( type == Actionable.MODULATE )
|
||||||
{
|
{
|
||||||
|
|
||||||
is.stackSize = (int) maxStorage;
|
is.stackSize = (int) maxStorage;
|
||||||
if ( type == Actionable.MODULATE )
|
EntityItem ei = new EntityItem( w, // w
|
||||||
|
((side.offsetX != 0 ? 0.0 : 0.7) * (Platform.getRandomFloat() - 0.5f)) + 0.5 + side.offsetX * -0.3 + (double) x, // spawn
|
||||||
|
((side.offsetY != 0 ? 0.0 : 0.7) * (Platform.getRandomFloat() - 0.5f)) + 0.5 + side.offsetY * -0.3 + (double) y, // spawn
|
||||||
|
((side.offsetZ != 0 ? 0.0 : 0.7) * (Platform.getRandomFloat() - 0.5f)) + 0.5 + side.offsetZ * -0.3 + (double) z, // spawn
|
||||||
|
is.copy() );
|
||||||
|
|
||||||
|
Entity result = ei;
|
||||||
|
|
||||||
|
ei.motionX = side.offsetX * 0.2;
|
||||||
|
ei.motionY = side.offsetY * 0.2;
|
||||||
|
ei.motionZ = side.offsetZ * 0.2;
|
||||||
|
|
||||||
|
if ( is.getItem().hasCustomEntity( is ) )
|
||||||
{
|
{
|
||||||
EntityItem ei = new EntityItem( w, // w
|
result = is.getItem().createEntity( w, ei, is );
|
||||||
((side.offsetX != 0 ? 0.0 : 0.7) * (Platform.getRandomFloat() - 0.5f)) + 0.5 + side.offsetX * -0.3 + (double) x, // spawn
|
if ( result != null )
|
||||||
((side.offsetY != 0 ? 0.0 : 0.7) * (Platform.getRandomFloat() - 0.5f)) + 0.5 + side.offsetY * -0.3 + (double) y, // spawn
|
ei.setDead();
|
||||||
((side.offsetZ != 0 ? 0.0 : 0.7) * (Platform.getRandomFloat() - 0.5f)) + 0.5 + side.offsetZ * -0.3 + (double) z, // spawn
|
else
|
||||||
is.copy() );
|
result = ei;
|
||||||
ei.motionX = side.offsetX * 0.2;
|
|
||||||
ei.motionY = side.offsetY * 0.2;
|
|
||||||
ei.motionZ = side.offsetZ * 0.2;
|
|
||||||
w.spawnEntityInWorld( ei );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !w.spawnEntityInWorld( result ) )
|
||||||
|
{
|
||||||
|
result.setDead();
|
||||||
|
worked = false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
worked = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,10 @@ public class ASMIntegration implements IClassTransformer
|
||||||
integrationModules.add( IntegrationSide.BOTH, "BuildCraft", "BuildCraft|Silicon", "BC" );
|
integrationModules.add( IntegrationSide.BOTH, "BuildCraft", "BuildCraft|Silicon", "BC" );
|
||||||
integrationModules.add( IntegrationSide.BOTH, "BuildCraft5 Power", null, "MJ5" );
|
integrationModules.add( IntegrationSide.BOTH, "BuildCraft5 Power", null, "MJ5" );
|
||||||
integrationModules.add( IntegrationSide.BOTH, "BuildCraft6 Power", null, "MJ6" );
|
integrationModules.add( IntegrationSide.BOTH, "BuildCraft6 Power", null, "MJ6" );
|
||||||
integrationModules.add( IntegrationSide.BOTH, "RedstoneFlux Power", null, "RF" );
|
|
||||||
|
integrationModules.add( IntegrationSide.BOTH, "RedstoneFlux Power - Tiles", null, "RF" );
|
||||||
|
integrationModules.add( IntegrationSide.BOTH, "RedstoneFlux Power - Items", null, "RFItem" );
|
||||||
|
|
||||||
// integrationModules.add( IntegrationSide.BOTH, "Greg Tech", "gregtech_addon", "GT" );
|
// integrationModules.add( IntegrationSide.BOTH, "Greg Tech", "gregtech_addon", "GT" );
|
||||||
// integrationModules.add( IntegrationSide.BOTH, "Universal Electricity", null, "UE" );
|
// integrationModules.add( IntegrationSide.BOTH, "Universal Electricity", null, "UE" );
|
||||||
// integrationModules.add( IntegrationSide.BOTH, "Logistics Pipes", "LogisticsPipes|Main", "LP" );
|
// integrationModules.add( IntegrationSide.BOTH, "Logistics Pipes", "LogisticsPipes|Main", "LP" );
|
||||||
|
|
Loading…
Reference in a new issue