Added skystone, skystone block, skystone brick, skystone small brick, certus quartz, certus quartz pillar, chiseled certus quartz and fluix stars

To integrate these into the current system, some changes to the background had to be done, especially to the feature handler. It now uses an interface to work against which you can implement to get your own feature handler instead modifying the base one and add several special cases code
This commit is contained in:
thatsIch
2014-11-18 16:47:30 +01:00
parent 1572351a54
commit 56aad10ffe
46 changed files with 2624 additions and 1401 deletions
@@ -18,27 +18,34 @@
package appeng.items.tools.quartz;
import java.util.EnumSet;
import com.google.common.base.Optional;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.api.tools.IToolWrench;
import appeng.api.implementations.items.IAEWrench;
import appeng.api.util.DimensionalCoord;
import appeng.core.features.AEFeature;
import appeng.items.AEBaseItem;
import appeng.transformer.annotations.integration.Interface;
import appeng.util.Platform;
import buildcraft.api.tools.IToolWrench;
@Interface(iface = "buildcraft.api.tools.IToolWrench", iname = "BC")
@Interface( iface = "buildcraft.api.tools.IToolWrench", iname = "BC" )
public class ToolQuartzWrench extends AEBaseItem implements IAEWrench, IToolWrench
{
public ToolQuartzWrench(AEFeature type) {
super( ToolQuartzWrench.class, type.name() );
public ToolQuartzWrench( AEFeature type )
{
super( ToolQuartzWrench.class, Optional.of( type.name() ) );
this.setFeature( EnumSet.of( type, AEFeature.QuartzWrench ) );
this.setMaxStackSize( 1 );
@@ -46,7 +53,7 @@ public class ToolQuartzWrench extends AEBaseItem implements IAEWrench, IToolWren
}
@Override
public boolean onItemUseFirst(ItemStack is, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
public boolean onItemUseFirst( ItemStack is, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ )
{
Block b = world.getBlock( x, y, z );
if ( b != null && !player.isSneaking() && Platform.hasPermissions( new DimensionalCoord( world, x, y, z ), player ) )
@@ -67,25 +74,25 @@ public class ToolQuartzWrench extends AEBaseItem implements IAEWrench, IToolWren
@Override
// public boolean shouldPassSneakingClickToBlock(World w, int x, int y, int z)
public boolean doesSneakBypassUse(World world, int x, int y, int z, EntityPlayer player)
public boolean doesSneakBypassUse( World world, int x, int y, int z, EntityPlayer player )
{
return true;
}
@Override
public boolean canWrench(ItemStack is, EntityPlayer player, int x, int y, int z)
public boolean canWrench( ItemStack is, EntityPlayer player, int x, int y, int z )
{
return true;
}
@Override
public boolean canWrench(EntityPlayer player, int x, int y, int z)
public boolean canWrench( EntityPlayer player, int x, int y, int z )
{
return true;
}
@Override
public void wrenchUsed(EntityPlayer player, int x, int y, int z)
public void wrenchUsed( EntityPlayer player, int x, int y, int z )
{
player.swingItem();
}