Highly incomplete code. First work on porting to 1.12. Still need to rework a LOT of things.

This commit is contained in:
Gunther De Wachter
2017-07-06 01:57:19 +02:00
parent d67f97cd16
commit fbcf8c4705
127 changed files with 850 additions and 425 deletions
@@ -25,6 +25,7 @@ import javax.annotation.Nullable;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
@@ -77,6 +78,8 @@ import appeng.me.storage.CellInventoryHandler;
import appeng.tile.misc.TilePaint;
import appeng.util.LookDirection;
import appeng.util.Platform;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell
@@ -87,10 +90,11 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell
super( AEConfig.instance().getMatterCannonBattery() );
}
@SideOnly( Side.CLIENT )
@Override
public void addCheckedInformation( final ItemStack stack, final EntityPlayer player, final List<String> lines, final boolean displayMoreInfo )
public void addCheckedInformation( final ItemStack stack, final World world, final List<String> lines, final ITooltipFlag advancedTooltips )
{
super.addCheckedInformation( stack, player, lines, displayMoreInfo );
super.addCheckedInformation( stack, world, lines, advancedTooltips );
final IMEInventory<IAEItemStack> cdi = AEApi.instance().registries().cell().getCellInventory( stack, null, StorageChannel.ITEMS );
@@ -191,7 +195,7 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell
private void shootPaintBalls( final ItemStack type, final World w, final EntityPlayer p, final Vec3d Vec3d, final Vec3d Vec3d1, final Vec3d direction, final double d0, final double d1, final double d2 )
{
final AxisAlignedBB bb = new AxisAlignedBB( Math.min( Vec3d.x, Vec3d1.x ), Math.min( Vec3d.y, Vec3d1.y ), Math.min( Vec3d.z, Vec3d1.z ), Math.max( Vec3d.x, Vec3d1.x ), Math.max( Vec3d.y, Vec3d1.y ), Math.max( Vec3d.z, Vec3d1.z ) ).expand( 16, 16, 16 );
final AxisAlignedBB bb = new AxisAlignedBB( Math.min( Vec3d.x, Vec3d1.x ), Math.min( Vec3d.y, Vec3d1.y ), Math.min( Vec3d.z, Vec3d1.z ), Math.max( Vec3d.x, Vec3d1.x ), Math.max( Vec3d.y, Vec3d1.y ), Math.max( Vec3d.z, Vec3d1.z ) ).grow( 16, 16, 16 );
Entity entity = null;
final List list = w.getEntitiesWithinAABBExcludingEntity( p, bb );
@@ -213,7 +217,7 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell
final float f1 = 0.3F;
final AxisAlignedBB boundingBox = entity1.getEntityBoundingBox().expand( f1, f1, f1 );
final AxisAlignedBB boundingBox = entity1.getEntityBoundingBox().grow( f1, f1, f1 );
final RayTraceResult RayTraceResult = boundingBox.calculateIntercept( Vec3d, Vec3d1 );
if( RayTraceResult != null )
@@ -309,7 +313,7 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell
{
hasDestroyed = false;
final AxisAlignedBB bb = new AxisAlignedBB( Math.min( Vec3d.x, Vec3d1.x ), Math.min( Vec3d.y, Vec3d1.y ), Math.min( Vec3d.z, Vec3d1.z ), Math.max( Vec3d.x, Vec3d1.x ), Math.max( Vec3d.y, Vec3d1.y ), Math.max( Vec3d.z, Vec3d1.z ) ).expand( 16, 16, 16 );
final AxisAlignedBB bb = new AxisAlignedBB( Math.min( Vec3d.x, Vec3d1.x ), Math.min( Vec3d.y, Vec3d1.y ), Math.min( Vec3d.z, Vec3d1.z ), Math.max( Vec3d.x, Vec3d1.x ), Math.max( Vec3d.y, Vec3d1.y ), Math.max( Vec3d.z, Vec3d1.z ) ).grow( 16, 16, 16 );
Entity entity = null;
final List list = w.getEntitiesWithinAABBExcludingEntity( p, bb );
@@ -331,7 +335,7 @@ public class ToolMatterCannon extends AEBasePoweredItem implements IStorageCell
final float f1 = 0.3F;
final AxisAlignedBB boundingBox = entity1.getEntityBoundingBox().expand( f1, f1, f1 );
final AxisAlignedBB boundingBox = entity1.getEntityBoundingBox().grow( f1, f1, f1 );
final RayTraceResult RayTraceResult = boundingBox.calculateIntercept( Vec3d, Vec3d1 );
if( RayTraceResult != null )