First update pass (1/3) - ~1400 -> 82 errors
This is first update pass, which is mainly import reorganization, name fixes, etc... Although some parts of second were done where changes aren't important. Errors: ~1400 -> 82.
This commit is contained in:
@@ -21,7 +21,7 @@ package appeng.items.contents;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.api.implementations.guiobjects.INetworkTool;
|
||||
import appeng.api.implementations.items.IUpgradeModule;
|
||||
@@ -164,7 +164,7 @@ public class NetworkToolViewer implements INetworkTool
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent getDisplayName()
|
||||
public ITextComponent getDisplayName()
|
||||
{
|
||||
return this.inv.getDisplayName();
|
||||
}
|
||||
|
||||
@@ -43,9 +43,11 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -298,7 +300,7 @@ public final class MultiItem extends AEBaseItem implements IStorageComponent, IU
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst( final ItemStack is, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public EnumActionResult onItemUseFirst( final ItemStack is, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ, final EnumHand hand )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
@@ -307,7 +309,7 @@ public final class MultiItem extends AEBaseItem implements IStorageComponent, IU
|
||||
|
||||
if( te instanceof IPartHost )
|
||||
{
|
||||
final SelectedPart sp = ( (IPartHost) te ).selectPart( new Vec3( hitX, hitY, hitZ ) );
|
||||
final SelectedPart sp = ( (IPartHost) te ).selectPart( new Vec3d( hitX, hitY, hitZ ) );
|
||||
if( sp.part instanceof IUpgradeableHost )
|
||||
{
|
||||
upgrades = ( (ISegmentedInventory) sp.part ).getInventoryByName( "upgrades" );
|
||||
@@ -330,17 +332,17 @@ public final class MultiItem extends AEBaseItem implements IStorageComponent, IU
|
||||
{
|
||||
if( player.worldObj.isRemote )
|
||||
{
|
||||
return false;
|
||||
return EnumActionResult.PASS;
|
||||
}
|
||||
|
||||
player.inventory.setInventorySlotContents( player.inventory.currentItem, ad.addItems( is ) );
|
||||
return true;
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return super.onItemUseFirst( is, player, world, pos, side, hitX, hitY, hitZ );
|
||||
return super.onItemUseFirst( is, player, world, pos, side, hitX, hitY, hitZ, hand );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,7 +28,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
@@ -26,13 +26,16 @@ import java.util.WeakHashMap;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -101,17 +104,17 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick( final ItemStack stack, final World w, final EntityPlayer player )
|
||||
public ActionResult<ItemStack> onItemRightClick( final ItemStack stack, final World w, final EntityPlayer player, final EnumHand hand )
|
||||
{
|
||||
this.clearPattern( stack, player );
|
||||
|
||||
return stack;
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, stack );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst( final ItemStack stack, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public EnumActionResult onItemUseFirst( final ItemStack stack, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ, final EnumHand hand )
|
||||
{
|
||||
return this.clearPattern( stack, player );
|
||||
return this.clearPattern( stack, player ) ? EnumActionResult.SUCCESS : EnumActionResult.FAIL;
|
||||
}
|
||||
|
||||
private boolean clearPattern( final ItemStack stack, final EntityPlayer player )
|
||||
@@ -149,7 +152,7 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
|
||||
|
||||
if( details == null )
|
||||
{
|
||||
lines.add( EnumChatFormatting.RED + GuiText.InvalidPattern.getLocal() );
|
||||
lines.add( TextFormatting.RED + GuiText.InvalidPattern.getLocal() );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -82,6 +82,7 @@ public class ItemPaintBall extends AEBaseItem
|
||||
return ( is.getItemDamage() >= DAMAGE_THRESHOLD ? GuiText.Lumen.getLocal() + ' ' : "" ) + this.getColor( is );
|
||||
}
|
||||
|
||||
//TODO 1.9.4 - Move to IItemColor
|
||||
@Override
|
||||
public int getColorFromItemStack( final ItemStack stack, final int renderPass )
|
||||
{
|
||||
|
||||
@@ -34,13 +34,14 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry.UniqueIdentifier;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.exceptions.MissingDefinition;
|
||||
@@ -68,9 +69,9 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst( final ItemStack is, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public EnumActionResult onItemUseFirst( final ItemStack is, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ, final EnumHand hand )
|
||||
{
|
||||
return AEApi.instance().partHelper().placeBus( is, pos, side, player, world );
|
||||
return AEApi.instance().partHelper().placeBus( is, pos, side, player, world ) ? EnumActionResult.SUCCESS : EnumActionResult.FAIL;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -104,7 +105,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
if( this.subTypes == null )
|
||||
{
|
||||
this.subTypes = new ArrayList<ItemStack>( 1000 );
|
||||
for( final Object blk : Block.blockRegistry )
|
||||
for( final Object blk : Block.REGISTRY )
|
||||
{
|
||||
final Block b = (Block) blk;
|
||||
try
|
||||
@@ -154,7 +155,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
final boolean enableGlass = b instanceof BlockGlass || b instanceof BlockStainedGlass;
|
||||
final boolean disableOre = b instanceof QuartzOreBlock;
|
||||
|
||||
final boolean defaultValue = ( b.isOpaqueCube() && !b.getTickRandomly() && !hasTile && !disableOre ) || enableGlass;
|
||||
final boolean defaultValue = ( b.isOpaqueCube(b.getDefaultState()) && !b.getTickRandomly() && !hasTile && !disableOre ) || enableGlass;
|
||||
if( FacadeConfig.instance.checkEnabled( b, metadata, defaultValue ) )
|
||||
{
|
||||
if( returnItem )
|
||||
@@ -168,6 +169,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
ds[0] = Item.getIdFromItem( l.getItem() );
|
||||
ds[1] = metadata;
|
||||
data.setIntArray( "x", ds );
|
||||
//TODO 1.9.4 - UniqueIdentifier => ResourceLocation ???
|
||||
final UniqueIdentifier ui = GameRegistry.findUniqueIdentifierFor( l.getItem() );
|
||||
data.setString( "modid", ui.modId );
|
||||
data.setString( "itemname", ui.name );
|
||||
@@ -238,7 +240,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
}
|
||||
}
|
||||
}
|
||||
return Blocks.glass;
|
||||
return Blocks.GLASS;
|
||||
}
|
||||
|
||||
public List<ItemStack> getFacades()
|
||||
@@ -252,7 +254,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
this.calculateSubTypes();
|
||||
if( this.subTypes.isEmpty() )
|
||||
{
|
||||
return new ItemStack( Items.cake );
|
||||
return new ItemStack( Items.CAKE );
|
||||
}
|
||||
return this.subTypes.get( 0 );
|
||||
}
|
||||
@@ -282,7 +284,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
}
|
||||
|
||||
final Block blk = Block.getBlockFromItem( out.getItem() );
|
||||
if( blk != null && blk.canRenderInLayer( EnumWorldBlockLayer.TRANSLUCENT ) )
|
||||
if( blk != null && blk.canRenderInLayer( BlockRenderLayer.TRANSLUCENT ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -39,9 +40,11 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -176,14 +179,14 @@ public final class ItemMultiPart extends AEBaseItem implements IPartItem, IItemG
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse( final ItemStack is, final EntityPlayer player, final World w, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public EnumActionResult onItemUse( final ItemStack is, final EntityPlayer player, final World w, final BlockPos pos, final EnumHand hand, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( this.getTypeByStack( is ) == PartType.InvalidType )
|
||||
{
|
||||
return false;
|
||||
return EnumActionResult.PASS;
|
||||
}
|
||||
|
||||
return AEApi.instance().partHelper().placeBus( is, pos, side, player, w );
|
||||
return AEApi.instance().partHelper().placeBus( is, pos, side, player, w ) ? EnumActionResult.SUCCESS : EnumActionResult.FAIL;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,8 +29,11 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -217,10 +220,10 @@ public final class ItemBasicStorageCell extends AEBaseItem implements IStorageCe
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick( final ItemStack stack, final World world, final EntityPlayer player )
|
||||
public ActionResult<ItemStack> onItemRightClick( final ItemStack stack, final World world, final EntityPlayer player, final EnumHand hand )
|
||||
{
|
||||
this.disassembleDrive( stack, world, player );
|
||||
return stack;
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, stack );
|
||||
}
|
||||
|
||||
private boolean disassembleDrive( final ItemStack stack, final World world, final EntityPlayer player )
|
||||
@@ -246,7 +249,7 @@ public final class ItemBasicStorageCell extends AEBaseItem implements IStorageCe
|
||||
final ItemStack extraB = ia.addItems( this.component.stack( 1 ) );
|
||||
if( extraB != null )
|
||||
{
|
||||
player.dropPlayerItemWithRandomChoice( extraB, false );
|
||||
player.dropItem( extraB, false );
|
||||
}
|
||||
|
||||
// drop upgrades
|
||||
@@ -257,7 +260,7 @@ public final class ItemBasicStorageCell extends AEBaseItem implements IStorageCe
|
||||
final ItemStack leftStack = ia.addItems( upgradeStack );
|
||||
if( leftStack != null && upgradeStack.getItem() instanceof IUpgradeModule )
|
||||
{
|
||||
player.dropPlayerItemWithRandomChoice( upgradeStack, false );
|
||||
player.dropItem( upgradeStack, false );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,7 +270,7 @@ public final class ItemBasicStorageCell extends AEBaseItem implements IStorageCe
|
||||
final ItemStack extraA = ia.addItems( storageCellStack );
|
||||
if( extraA != null )
|
||||
{
|
||||
player.dropPlayerItemWithRandomChoice( extraA, false );
|
||||
player.dropItem( extraA, false );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,9 +287,9 @@ public final class ItemBasicStorageCell extends AEBaseItem implements IStorageCe
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst( final ItemStack stack, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public EnumActionResult onItemUseFirst( final ItemStack stack, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ, final EnumHand hand )
|
||||
{
|
||||
return this.disassembleDrive( stack, world, player );
|
||||
return this.disassembleDrive( stack, world, player ) ? EnumActionResult.SUCCESS : EnumActionResult.FAIL;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,6 +29,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTUtil;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
@@ -56,29 +59,29 @@ public class ToolBiometricCard extends AEBaseItem implements IBiometricCard
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick( final ItemStack is, final World w, final EntityPlayer p )
|
||||
public ActionResult<ItemStack> onItemRightClick( final ItemStack is, final World w, final EntityPlayer p, final EnumHand hand )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
this.encode( is, p );
|
||||
p.swingItem();
|
||||
return is;
|
||||
p.swingArm( hand );
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, is );
|
||||
}
|
||||
|
||||
return is;
|
||||
return new ActionResult<ItemStack>( EnumActionResult.PASS, is );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean itemInteractionForEntity( ItemStack is, final EntityPlayer par2EntityPlayer, final EntityLivingBase target )
|
||||
public boolean itemInteractionForEntity( ItemStack is, final EntityPlayer player, final EntityLivingBase target, final EnumHand hand )
|
||||
{
|
||||
if( target instanceof EntityPlayer && !par2EntityPlayer.isSneaking() )
|
||||
if( target instanceof EntityPlayer && !player.isSneaking() )
|
||||
{
|
||||
if( par2EntityPlayer.capabilities.isCreativeMode )
|
||||
if( player.capabilities.isCreativeMode )
|
||||
{
|
||||
is = par2EntityPlayer.getCurrentEquippedItem();
|
||||
is = player.getHeldItem( hand );
|
||||
}
|
||||
this.encode( is, (EntityPlayer) target );
|
||||
par2EntityPlayer.swingItem();
|
||||
player.swingArm( hand );
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -25,9 +25,12 @@ import java.util.List;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.implementations.items.IMemoryCard;
|
||||
@@ -55,7 +58,7 @@ public class ToolMemoryCard extends AEBaseItem implements IMemoryCard
|
||||
final NBTTagCompound data = this.getData( stack );
|
||||
if( data.hasKey( "tooltip" ) )
|
||||
{
|
||||
lines.add( StatCollector.translateToLocal( this.getLocalizedName( data.getString( "tooltip" ) + ".name", data.getString( "tooltip" ) ) ) );
|
||||
lines.add( I18n.translateToLocal( this.getLocalizedName( data.getString( "tooltip" ) + ".name", data.getString( "tooltip" ) ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +73,7 @@ public class ToolMemoryCard extends AEBaseItem implements IMemoryCard
|
||||
{
|
||||
for( final String n : name )
|
||||
{
|
||||
final String l = StatCollector.translateToLocal( n );
|
||||
final String l = I18n.translateToLocal( n );
|
||||
if( !l.equals( n ) )
|
||||
{
|
||||
return l;
|
||||
@@ -140,23 +143,23 @@ public class ToolMemoryCard extends AEBaseItem implements IMemoryCard
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse( final ItemStack is, final EntityPlayer player, final World w, final BlockPos pos, final EnumFacing side, final float hx, final float hy, final float hz )
|
||||
public EnumActionResult onItemUse( final ItemStack is, final EntityPlayer player, final World w, final BlockPos pos, final EnumHand hand, final EnumFacing side, final float hx, final float hy, final float hz )
|
||||
{
|
||||
if( player.isSneaking() && !w.isRemote )
|
||||
{
|
||||
final IMemoryCard mem = (IMemoryCard) is.getItem();
|
||||
mem.notifyUser( player, MemoryCardMessages.SETTINGS_CLEARED );
|
||||
is.setTagCompound( null );
|
||||
return true;
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
return super.onItemUse( is, player, w, pos, side, hx, hy, hz );
|
||||
return super.onItemUse( is, player, w, pos, hand, side, hx, hy, hz );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean doesSneakBypassUse( final World world, final BlockPos pos, final EntityPlayer player )
|
||||
public boolean doesSneakBypassUse( final ItemStack itemstack, final IBlockAccess world, final BlockPos pos, final EntityPlayer player )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -27,10 +27,14 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.implementations.guiobjects.IGuiItem;
|
||||
@@ -75,32 +79,32 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench /
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick( final ItemStack it, final World w, final EntityPlayer p )
|
||||
public ActionResult<ItemStack> onItemRightClick( final ItemStack it, final World w, final EntityPlayer p, final EnumHand hand )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
final MovingObjectPosition mop = ClientHelper.proxy.getMOP();
|
||||
final RayTraceResult mop = ClientHelper.proxy.getRTR();
|
||||
|
||||
if( mop == null )
|
||||
{
|
||||
this.onItemUseFirst( it, p, w, new BlockPos( 0, 0, 0 ), null, 0, 0, 0 ); // eh?
|
||||
this.onItemUseFirst( it, p, w, new BlockPos( 0, 0, 0 ), null, 0, 0, 0, hand ); // eh?
|
||||
}
|
||||
else
|
||||
{
|
||||
if( w.getBlockState( mop.getBlockPos() ).getBlock().isAir( w, mop.getBlockPos() ) )
|
||||
if( w.getBlockState( mop.getBlockPos() ).getBlock().isAir( w.getBlockState( mop.getBlockPos() ), w, mop.getBlockPos() ) )
|
||||
{
|
||||
this.onItemUseFirst( it, p, w, new BlockPos( 0, 0, 0 ), null, 0, 0, 0 ); // eh?
|
||||
this.onItemUseFirst( it, p, w, new BlockPos( 0, 0, 0 ), null, 0, 0, 0, hand ); // eh?
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return it;
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, it );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst( final ItemStack stack, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public EnumActionResult onItemUseFirst( final ItemStack stack, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ, final EnumHand hand )
|
||||
{
|
||||
final MovingObjectPosition mop = new MovingObjectPosition( new Vec3( hitX, hitY, hitZ ), side, pos );
|
||||
final RayTraceResult mop = new RayTraceResult( new Vec3d( hitX, hitY, hitZ ), side, pos );
|
||||
final TileEntity te = world.getTileEntity( pos );
|
||||
if( te instanceof IPartHost )
|
||||
{
|
||||
@@ -109,24 +113,24 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench /
|
||||
{
|
||||
if( part.part instanceof INetworkToolAgent && !( (INetworkToolAgent) part.part ).showNetworkInfo( mop ) )
|
||||
{
|
||||
return false;
|
||||
return EnumActionResult.FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( te instanceof INetworkToolAgent && !( (INetworkToolAgent) te ).showNetworkInfo( mop ) )
|
||||
{
|
||||
return false;
|
||||
return EnumActionResult.FAIL;
|
||||
}
|
||||
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketClick( pos, side, hitX, hitY, hitZ ) );
|
||||
}
|
||||
return true;
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesSneakBypassUse( final World world, final BlockPos pos, final EntityPlayer player )
|
||||
public boolean doesSneakBypassUse( final ItemStack itemstack, final IBlockAccess world, final BlockPos pos, final EntityPlayer player )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -135,6 +139,8 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench /
|
||||
{
|
||||
if( side != null )
|
||||
{
|
||||
//TODO 1.9.4 - 2 hands! Just do something!
|
||||
final EnumHand hand = EnumHand.MAIN_HAND;
|
||||
if( !Platform.hasPermissions( new DimensionalCoord( w, pos ), p ) )
|
||||
{
|
||||
return false;
|
||||
@@ -148,8 +154,8 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench /
|
||||
{
|
||||
if( b.rotateBlock( w, pos, side ) )
|
||||
{
|
||||
b.onNeighborBlockChange( w, pos, Platform.AIR_BLOCK.getDefaultState(), Platform.AIR_BLOCK );
|
||||
p.swingItem();
|
||||
b.neighborChanged( Platform.AIR_BLOCK.getDefaultState(), w, pos, Platform.AIR_BLOCK );
|
||||
p.swingArm( hand );
|
||||
return !w.isRemote;
|
||||
}
|
||||
}
|
||||
@@ -177,7 +183,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench /
|
||||
}
|
||||
else
|
||||
{
|
||||
b.onBlockActivated( w, pos, w.getBlockState( pos ), p, side, hitX, hitY, hitZ );
|
||||
b.onBlockActivated( w, pos, w.getBlockState( pos ), p, hand, is, side, hitX, hitY, hitZ );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -25,8 +25,8 @@ import com.google.common.base.Optional;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.features.AEFeature;
|
||||
|
||||
@@ -44,8 +44,8 @@ import net.minecraft.item.ItemSnowball;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
@@ -117,7 +117,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
||||
public void postInit()
|
||||
{
|
||||
super.postInit();
|
||||
BlockDispenser.dispenseBehaviorRegistry.putObject( this, new DispenserBlockTool() );
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject( this, new DispenserBlockTool() );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -371,12 +371,12 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
||||
return w.setBlockState( pos, state.withProperty( BlockColored.COLOR, newColor.dye ) );
|
||||
}
|
||||
|
||||
if( blk == Blocks.glass )
|
||||
if( blk == Blocks.GLASS )
|
||||
{
|
||||
return w.setBlockState( pos, Blocks.stained_glass.getDefaultState().withProperty( BlockStainedGlass.COLOR, newColor.dye ) );
|
||||
return w.setBlockState( pos, Blocks.STAINED_GLASS.getDefaultState().withProperty( BlockStainedGlass.COLOR, newColor.dye ) );
|
||||
}
|
||||
|
||||
if( blk == Blocks.stained_glass )
|
||||
if( blk == Blocks.STAINED_GLASS )
|
||||
{
|
||||
final EnumDyeColor color = (EnumDyeColor) state.getValue( BlockStainedGlass.COLOR );
|
||||
|
||||
@@ -388,12 +388,12 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
||||
return w.setBlockState( pos, state.withProperty( BlockStainedGlass.COLOR, newColor.dye ) );
|
||||
}
|
||||
|
||||
if( blk == Blocks.glass_pane )
|
||||
if( blk == Blocks.GLASS_PANE )
|
||||
{
|
||||
return w.setBlockState( pos, Blocks.stained_glass_pane.getDefaultState().withProperty( BlockStainedGlassPane.COLOR, newColor.dye ) );
|
||||
return w.setBlockState( pos, Blocks.STAINED_GLASS_PANE.getDefaultState().withProperty( BlockStainedGlassPane.COLOR, newColor.dye ) );
|
||||
}
|
||||
|
||||
if( blk == Blocks.stained_glass_pane )
|
||||
if( blk == Blocks.STAINED_GLASS_PANE )
|
||||
{
|
||||
final EnumDyeColor color = (EnumDyeColor) state.getValue( BlockStainedGlassPane.COLOR );
|
||||
|
||||
@@ -405,9 +405,9 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
|
||||
return w.setBlockState( pos, state.withProperty( BlockStainedGlassPane.COLOR, newColor.dye ) );
|
||||
}
|
||||
|
||||
if( blk == Blocks.hardened_clay )
|
||||
if( blk == Blocks.HARDENED_CLAY )
|
||||
{
|
||||
return w.setBlockState( pos, Blocks.stained_hardened_clay.getDefaultState().withProperty( BlockColored.COLOR, newColor.dye ) );
|
||||
return w.setBlockState( pos, Blocks.STAINED_HARDENED_CLAY.getDefaultState().withProperty( BlockColored.COLOR, newColor.dye ) );
|
||||
}
|
||||
|
||||
if( blk instanceof BlockCableBus )
|
||||
|
||||
@@ -36,13 +36,17 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
@@ -70,28 +74,28 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
this.heatUp = new HashMap<InWorldToolOperationIngredient, InWorldToolOperationResult>();
|
||||
this.coolDown = new HashMap<InWorldToolOperationIngredient, InWorldToolOperationResult>();
|
||||
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.stone.getDefaultState() ), new InWorldToolOperationResult( new ItemStack( Blocks.cobblestone ) ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.stonebrick.getDefaultState() ), new InWorldToolOperationResult( new ItemStack( Blocks.stonebrick, 1, 2 ) ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.lava, true ), new InWorldToolOperationResult( new ItemStack( Blocks.obsidian ) ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.flowing_lava, true ), new InWorldToolOperationResult( new ItemStack( Blocks.obsidian ) ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.grass, true ), new InWorldToolOperationResult( new ItemStack( Blocks.dirt ) ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.STONE.getDefaultState() ), new InWorldToolOperationResult( new ItemStack( Blocks.COBBLESTONE ) ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.STONEBRICK.getDefaultState() ), new InWorldToolOperationResult( new ItemStack( Blocks.STONEBRICK, 1, 2 ) ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.LAVA, true ), new InWorldToolOperationResult( new ItemStack( Blocks.OBSIDIAN ) ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.FLOWING_LAVA, true ), new InWorldToolOperationResult( new ItemStack( Blocks.OBSIDIAN ) ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.GRASS, true ), new InWorldToolOperationResult( new ItemStack( Blocks.DIRT ) ) );
|
||||
|
||||
final List<ItemStack> snowBalls = new ArrayList<ItemStack>();
|
||||
snowBalls.add( new ItemStack( Items.snowball ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.flowing_water, true ), new InWorldToolOperationResult( null, snowBalls ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.water, true ), new InWorldToolOperationResult( new ItemStack( Blocks.ice ) ) );
|
||||
snowBalls.add( new ItemStack( Items.SNOWBALL ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.FLOWING_WATER, true ), new InWorldToolOperationResult( null, snowBalls ) );
|
||||
this.coolDown.put( new InWorldToolOperationIngredient( Blocks.WATER, true ), new InWorldToolOperationResult( new ItemStack( Blocks.ICE ) ) );
|
||||
|
||||
this.heatUp.put( new InWorldToolOperationIngredient( Blocks.ice.getDefaultState() ), new InWorldToolOperationResult( new ItemStack( Blocks.water ) ) );
|
||||
this.heatUp.put( new InWorldToolOperationIngredient( Blocks.flowing_water, true ), new InWorldToolOperationResult() );
|
||||
this.heatUp.put( new InWorldToolOperationIngredient( Blocks.water, true ), new InWorldToolOperationResult() );
|
||||
this.heatUp.put( new InWorldToolOperationIngredient( Blocks.snow, true ), new InWorldToolOperationResult( new ItemStack( Blocks.flowing_water ) ) );
|
||||
this.heatUp.put( new InWorldToolOperationIngredient( Blocks.ICE.getDefaultState() ), new InWorldToolOperationResult( new ItemStack( Blocks.WATER ) ) );
|
||||
this.heatUp.put( new InWorldToolOperationIngredient( Blocks.FLOWING_WATER, true ), new InWorldToolOperationResult() );
|
||||
this.heatUp.put( new InWorldToolOperationIngredient( Blocks.WATER, true ), new InWorldToolOperationResult() );
|
||||
this.heatUp.put( new InWorldToolOperationIngredient( Blocks.SNOW, true ), new InWorldToolOperationResult( new ItemStack( Blocks.FLOWING_WATER ) ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit()
|
||||
{
|
||||
super.postInit();
|
||||
BlockDispenser.dispenseBehaviorRegistry.putObject( this, new DispenserBlockTool() );
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject( this, new DispenserBlockTool() );
|
||||
}
|
||||
|
||||
private static class InWorldToolOperationIngredient
|
||||
@@ -220,19 +224,21 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick( final ItemStack item, final World w, final EntityPlayer p )
|
||||
public ActionResult<ItemStack> onItemRightClick( final ItemStack item, final World w, final EntityPlayer p, final EnumHand hand )
|
||||
{
|
||||
final MovingObjectPosition target = this.getMovingObjectPositionFromPlayer( w, p, true );
|
||||
//TODO 1.9.4 - getRayTraceResultFromPlayer => ?
|
||||
final RayTraceResult target = this.getRayTraceResultFromPlayer( w, p, true );
|
||||
|
||||
if( target == null )
|
||||
{
|
||||
return item;
|
||||
return new ActionResult<ItemStack>( EnumActionResult.FAIL, item );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( target.typeOfHit == MovingObjectType.BLOCK )
|
||||
if( target.typeOfHit == RayTraceResult.Type.BLOCK )
|
||||
{
|
||||
if( w.getBlockState( target.getBlockPos() ).getBlock().getMaterial() == Material.lava || w.getBlockState( target.getBlockPos() ).getBlock().getMaterial() == Material.water )
|
||||
final IBlockState state = w.getBlockState( target.getBlockPos() );
|
||||
if( state.getMaterial() == Material.LAVA || state.getMaterial() == Material.WATER )
|
||||
{
|
||||
if( Platform.hasPermissions( new DimensionalCoord( w, target.getBlockPos() ), p ) )
|
||||
{
|
||||
@@ -242,7 +248,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
}
|
||||
}
|
||||
|
||||
return item;
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, item );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -322,7 +328,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
{
|
||||
this.extractAEPower( item, 1600 );
|
||||
final InWorldToolOperationResult or = InWorldToolOperationResult.getBlockOperationResult( out.toArray( new ItemStack[out.size()] ) );
|
||||
w.playSoundEffect( pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F );
|
||||
w.playSound( p, pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, SoundEvents.ITEM_FLINTANDSTEEL_USE, SoundCategory.PLAYERS, 1.0F, itemRand.nextFloat() * 0.4F + 0.8F );
|
||||
|
||||
if( or.getBlockItem() == null )
|
||||
{
|
||||
@@ -353,8 +359,8 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
|
||||
if( w.isAirBlock( offsetPos ) )
|
||||
{
|
||||
this.extractAEPower( item, 1600 );
|
||||
w.playSoundEffect( offsetPos.getX() + 0.5D, offsetPos.getY() + 0.5D, offsetPos.getZ() + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F );
|
||||
w.setBlockState( offsetPos, Blocks.fire.getDefaultState() );
|
||||
w.playSound( p, offsetPos.getX() + 0.5D, offsetPos.getY() + 0.5D, offsetPos.getZ() + 0.5D, SoundEvents.ITEM_FLINTANDSTEEL_USE, SoundCategory.PLAYERS, 1.0F, itemRand.nextFloat() * 0.4F + 0.8F );
|
||||
w.setBlockState( offsetPos, Blocks.FIRE.getDefaultState() );
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.google.common.base.Optional;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDispenser;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
@@ -34,13 +35,15 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -92,7 +95,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
public void postInit()
|
||||
{
|
||||
super.postInit();
|
||||
BlockDispenser.dispenseBehaviorRegistry.putObject( this, new DispenserMatterCannon() );
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject( this, new DispenserMatterCannon() );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -114,7 +117,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick( final ItemStack item, final World w, final EntityPlayer p )
|
||||
public ActionResult<ItemStack> onItemRightClick( final ItemStack item, final World w, final EntityPlayer p, final EnumHand hand )
|
||||
{
|
||||
if( this.getAECurrentPower( item ) > 1600 )
|
||||
{
|
||||
@@ -140,33 +143,33 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return item;
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, item );
|
||||
}
|
||||
|
||||
aeAmmo.setStackSize( 1 );
|
||||
final ItemStack ammo = ( (IAEItemStack) aeAmmo ).getItemStack();
|
||||
if( ammo == null )
|
||||
{
|
||||
return item;
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, item );
|
||||
}
|
||||
|
||||
ammo.stackSize = 1;
|
||||
aeAmmo = inv.extractItems( aeAmmo, Actionable.MODULATE, new PlayerSource( p, null ) );
|
||||
if( aeAmmo == null )
|
||||
{
|
||||
return item;
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, item );
|
||||
}
|
||||
|
||||
final LookDirection dir = Platform.getPlayerRay( p, p.getEyeHeight() );
|
||||
|
||||
final Vec3 vec3 = dir.getA();
|
||||
final Vec3 vec31 = dir.getB();
|
||||
final Vec3 direction = vec31.subtract( vec3 );
|
||||
final Vec3d Vec3d = dir.getA();
|
||||
final Vec3d Vec3d1 = dir.getB();
|
||||
final Vec3d direction = Vec3d1.subtract( Vec3d );
|
||||
direction.normalize();
|
||||
|
||||
final double d0 = vec3.xCoord;
|
||||
final double d1 = vec3.yCoord;
|
||||
final double d2 = vec3.zCoord;
|
||||
final double d0 = Vec3d.xCoord;
|
||||
final double d1 = Vec3d.yCoord;
|
||||
final double d2 = Vec3d.zCoord;
|
||||
|
||||
final float penetration = AEApi.instance().registries().matterCannon().getPenetration( ammo ); // 196.96655f;
|
||||
if( penetration <= 0 )
|
||||
@@ -174,13 +177,13 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
final ItemStack type = ( (IAEItemStack) aeAmmo ).getItemStack();
|
||||
if( type.getItem() instanceof ItemPaintBall )
|
||||
{
|
||||
this.shootPaintBalls( type, w, p, vec3, vec31, direction, d0, d1, d2 );
|
||||
this.shootPaintBalls( type, w, p, Vec3d, Vec3d1, direction, d0, d1, d2 );
|
||||
}
|
||||
return item;
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, item );
|
||||
}
|
||||
else
|
||||
{
|
||||
this.standardAmmo( penetration, w, p, vec3, vec31, direction, d0, d1, d2 );
|
||||
this.standardAmmo( penetration, w, p, Vec3d, Vec3d1, direction, d0, d1, d2 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -190,16 +193,16 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
{
|
||||
p.addChatMessage( PlayerMessages.AmmoDepleted.get() );
|
||||
}
|
||||
return item;
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, item );
|
||||
}
|
||||
}
|
||||
}
|
||||
return item;
|
||||
return new ActionResult<ItemStack>( EnumActionResult.FAIL, item );
|
||||
}
|
||||
|
||||
private void shootPaintBalls( final ItemStack type, final World w, final EntityPlayer p, final Vec3 vec3, final Vec3 vec31, final Vec3 direction, final double d0, final double d1, final double d2 )
|
||||
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 = AxisAlignedBB.fromBounds( Math.min( vec3.xCoord, vec31.xCoord ), Math.min( vec3.yCoord, vec31.yCoord ), Math.min( vec3.zCoord, vec31.zCoord ), Math.max( vec3.xCoord, vec31.xCoord ), Math.max( vec3.yCoord, vec31.yCoord ), Math.max( vec3.zCoord, vec31.zCoord ) ).expand( 16, 16, 16 );
|
||||
final AxisAlignedBB bb = new AxisAlignedBB( Math.min( Vec3d.xCoord, Vec3d1.xCoord ), Math.min( Vec3d.yCoord, Vec3d1.yCoord ), Math.min( Vec3d.zCoord, Vec3d1.zCoord ), Math.max( Vec3d.xCoord, Vec3d1.xCoord ), Math.max( Vec3d.yCoord, Vec3d1.yCoord ), Math.max( Vec3d.zCoord, Vec3d1.zCoord ) ).expand( 16, 16, 16 );
|
||||
|
||||
Entity entity = null;
|
||||
final List list = w.getEntitiesWithinAABBExcludingEntity( p, bb );
|
||||
@@ -214,7 +217,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
if( entity1.isEntityAlive() )
|
||||
{
|
||||
// prevent killing / flying of mounts.
|
||||
if( entity1.riddenByEntity == p )
|
||||
if( entity1.isRidingOrBeingRiddenBy( p ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -222,11 +225,11 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
final float f1 = 0.3F;
|
||||
|
||||
final AxisAlignedBB boundingBox = entity1.getEntityBoundingBox().expand( f1, f1, f1 );
|
||||
final MovingObjectPosition movingObjectPosition = boundingBox.calculateIntercept( vec3, vec31 );
|
||||
final RayTraceResult RayTraceResult = boundingBox.calculateIntercept( Vec3d, Vec3d1 );
|
||||
|
||||
if( movingObjectPosition != null )
|
||||
if( RayTraceResult != null )
|
||||
{
|
||||
final double nd = vec3.squareDistanceTo( movingObjectPosition.hitVec );
|
||||
final double nd = Vec3d.squareDistanceTo( RayTraceResult.hitVec );
|
||||
|
||||
if( nd < closest )
|
||||
{
|
||||
@@ -238,16 +241,16 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
}
|
||||
}
|
||||
|
||||
MovingObjectPosition pos = w.rayTraceBlocks( vec3, vec31, false );
|
||||
RayTraceResult pos = w.rayTraceBlocks( Vec3d, Vec3d1, false );
|
||||
|
||||
final Vec3 vec = new Vec3( d0, d1, d2 );
|
||||
final Vec3d vec = new Vec3d( d0, d1, d2 );
|
||||
if( entity != null && pos != null && pos.hitVec.squareDistanceTo( vec ) > closest )
|
||||
{
|
||||
pos = new MovingObjectPosition( entity );
|
||||
pos = new RayTraceResult( entity );
|
||||
}
|
||||
else if( entity != null && pos == null )
|
||||
{
|
||||
pos = new MovingObjectPosition( entity );
|
||||
pos = new RayTraceResult( entity );
|
||||
}
|
||||
|
||||
try
|
||||
@@ -266,7 +269,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
final AEColor col = ipb.getColor( type );
|
||||
// boolean lit = ipb.isLumen( type );
|
||||
|
||||
if( pos.typeOfHit == MovingObjectType.ENTITY )
|
||||
if( pos.typeOfHit == RayTraceResult.Type.ENTITY )
|
||||
{
|
||||
final int id = pos.entityHit.getEntityId();
|
||||
final PlayerColor marker = new PlayerColor( id, col, 20 * 30 );
|
||||
@@ -281,7 +284,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
pos.entityHit.attackEntityFrom( DamageSource.causePlayerDamage( p ), 0 );
|
||||
NetworkHandler.instance.sendToAll( marker.getPacket() );
|
||||
}
|
||||
else if( pos.typeOfHit == MovingObjectType.BLOCK )
|
||||
else if( pos.typeOfHit == RayTraceResult.Type.BLOCK )
|
||||
{
|
||||
final EnumFacing side = pos.sideHit;
|
||||
final BlockPos hitPos = pos.getBlockPos().offset( side );
|
||||
@@ -303,21 +306,21 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
final TileEntity te = w.getTileEntity( hitPos );
|
||||
if( te instanceof TilePaint )
|
||||
{
|
||||
final Vec3 hp = pos.hitVec.subtract( hitPos.getX(), hitPos.getY(), hitPos.getZ() );
|
||||
final Vec3d hp = pos.hitVec.subtract( hitPos.getX(), hitPos.getY(), hitPos.getZ() );
|
||||
( (TilePaint) te ).addBlot( type, side.getOpposite(), hp );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void standardAmmo( float penetration, final World w, final EntityPlayer p, final Vec3 vec3, final Vec3 vec31, final Vec3 direction, final double d0, final double d1, final double d2 )
|
||||
private void standardAmmo( float penetration, final World w, final EntityPlayer p, final Vec3d Vec3d, final Vec3d Vec3d1, final Vec3d direction, final double d0, final double d1, final double d2 )
|
||||
{
|
||||
boolean hasDestroyed = true;
|
||||
while( penetration > 0 && hasDestroyed )
|
||||
{
|
||||
hasDestroyed = false;
|
||||
|
||||
final AxisAlignedBB bb = AxisAlignedBB.fromBounds( Math.min( vec3.xCoord, vec31.xCoord ), Math.min( vec3.yCoord, vec31.yCoord ), Math.min( vec3.zCoord, vec31.zCoord ), Math.max( vec3.xCoord, vec31.xCoord ), Math.max( vec3.yCoord, vec31.yCoord ), Math.max( vec3.zCoord, vec31.zCoord ) ).expand( 16, 16, 16 );
|
||||
final AxisAlignedBB bb = new AxisAlignedBB( Math.min( Vec3d.xCoord, Vec3d1.xCoord ), Math.min( Vec3d.yCoord, Vec3d1.yCoord ), Math.min( Vec3d.zCoord, Vec3d1.zCoord ), Math.max( Vec3d.xCoord, Vec3d1.xCoord ), Math.max( Vec3d.yCoord, Vec3d1.yCoord ), Math.max( Vec3d.zCoord, Vec3d1.zCoord ) ).expand( 16, 16, 16 );
|
||||
|
||||
Entity entity = null;
|
||||
final List list = w.getEntitiesWithinAABBExcludingEntity( p, bb );
|
||||
@@ -332,7 +335,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
if( entity1.isEntityAlive() )
|
||||
{
|
||||
// prevent killing / flying of mounts.
|
||||
if( entity1.riddenByEntity == p )
|
||||
if( entity1.isRidingOrBeingRiddenBy( p ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -340,11 +343,11 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
final float f1 = 0.3F;
|
||||
|
||||
final AxisAlignedBB boundingBox = entity1.getEntityBoundingBox().expand( f1, f1, f1 );
|
||||
final MovingObjectPosition movingObjectPosition = boundingBox.calculateIntercept( vec3, vec31 );
|
||||
final RayTraceResult RayTraceResult = boundingBox.calculateIntercept( Vec3d, Vec3d1 );
|
||||
|
||||
if( movingObjectPosition != null )
|
||||
if( RayTraceResult != null )
|
||||
{
|
||||
final double nd = vec3.squareDistanceTo( movingObjectPosition.hitVec );
|
||||
final double nd = Vec3d.squareDistanceTo( RayTraceResult.hitVec );
|
||||
|
||||
if( nd < closest )
|
||||
{
|
||||
@@ -356,15 +359,15 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
}
|
||||
}
|
||||
|
||||
final Vec3 vec = new Vec3( d0, d1, d2 );
|
||||
MovingObjectPosition pos = w.rayTraceBlocks( vec3, vec31, true );
|
||||
final Vec3d vec = new Vec3d( d0, d1, d2 );
|
||||
RayTraceResult pos = w.rayTraceBlocks( Vec3d, Vec3d1, true );
|
||||
if( entity != null && pos != null && pos.hitVec.squareDistanceTo( vec ) > closest )
|
||||
{
|
||||
pos = new MovingObjectPosition( entity );
|
||||
pos = new RayTraceResult( entity );
|
||||
}
|
||||
else if( entity != null && pos == null )
|
||||
{
|
||||
pos = new MovingObjectPosition( entity );
|
||||
pos = new RayTraceResult( entity );
|
||||
}
|
||||
|
||||
try
|
||||
@@ -381,7 +384,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
final DamageSource dmgSrc = DamageSource.causePlayerDamage( p );
|
||||
dmgSrc.damageType = "masscannon";
|
||||
|
||||
if( pos.typeOfHit == MovingObjectType.ENTITY )
|
||||
if( pos.typeOfHit == RayTraceResult.Type.ENTITY )
|
||||
{
|
||||
final int dmg = (int) Math.ceil( penetration / 20.0f );
|
||||
if( pos.entityHit instanceof EntityLivingBase )
|
||||
@@ -389,8 +392,8 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
final EntityLivingBase el = (EntityLivingBase) pos.entityHit;
|
||||
penetration -= dmg;
|
||||
el.knockBack( p, 0, -direction.xCoord, -direction.zCoord );
|
||||
// el.knockBack( p, 0, vec3.xCoord,
|
||||
// vec3.zCoord );
|
||||
// el.knockBack( p, 0, Vec3d.xCoord,
|
||||
// Vec3d.zCoord );
|
||||
el.attackEntityFrom( dmgSrc, dmg );
|
||||
if( !el.isEntityAlive() )
|
||||
{
|
||||
@@ -407,7 +410,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
hasDestroyed = true;
|
||||
}
|
||||
}
|
||||
else if( pos.typeOfHit == MovingObjectType.BLOCK )
|
||||
else if( pos.typeOfHit == RayTraceResult.Type.BLOCK )
|
||||
{
|
||||
if( !AEConfig.instance.isFeatureEnabled( AEFeature.MassCannonBlockDamage ) )
|
||||
{
|
||||
@@ -415,11 +418,11 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||
}
|
||||
else
|
||||
{
|
||||
final Block b = w.getBlockState( pos.getBlockPos() ).getBlock();
|
||||
final IBlockState bs = w.getBlockState( pos.getBlockPos() );
|
||||
// int meta = w.getBlockMetadata(
|
||||
// pos.blockX, pos.blockY, pos.blockZ );
|
||||
|
||||
final float hardness = b.getBlockHardness( w, pos.getBlockPos() ) * 9.0f;
|
||||
final float hardness = bs.getBlockHardness( w, pos.getBlockPos() ) * 9.0f;
|
||||
if( hardness >= 0.0 )
|
||||
{
|
||||
if( penetration > hardness && Platform.hasPermissions( new DimensionalCoord( w, pos.getBlockPos() ), p ) )
|
||||
|
||||
@@ -28,7 +28,10 @@ import com.google.common.base.Optional;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -66,10 +69,10 @@ public class ToolPortableCell extends AEBasePoweredItem implements IStorageCell,
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick( final ItemStack item, final World w, final EntityPlayer player )
|
||||
public ActionResult<ItemStack> onItemRightClick( final ItemStack item, final World w, final EntityPlayer player, final EnumHand hand )
|
||||
{
|
||||
Platform.openGUI( player, null, AEPartLocation.INTERNAL, GuiBridge.GUI_PORTABLE_CELL );
|
||||
return item;
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, item );
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
|
||||
@@ -27,7 +27,10 @@ import com.google.common.base.Optional;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -58,10 +61,10 @@ public class ToolWirelessTerminal extends AEBasePoweredItem implements IWireless
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick( final ItemStack item, final World w, final EntityPlayer player )
|
||||
public ActionResult<ItemStack> onItemRightClick( final ItemStack item, final World w, final EntityPlayer player, final EnumHand hand )
|
||||
{
|
||||
AEApi.instance().registries().wireless().openWirelessTerminalGui( item, w, player );
|
||||
return item;
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, item );
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
@@ -95,7 +98,7 @@ public class ToolWirelessTerminal extends AEBasePoweredItem implements IWireless
|
||||
}
|
||||
else
|
||||
{
|
||||
lines.add( StatCollector.translateToLocal( "AppEng.GuiITooltip.Unlinked" ) );
|
||||
lines.add( I18n.translateToLocal( "AppEng.GuiITooltip.Unlinked" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,11 @@ import com.google.common.base.Optional;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.implementations.guiobjects.IGuiItem;
|
||||
@@ -54,24 +57,24 @@ public class ToolQuartzCuttingKnife extends AEBaseItem implements IGuiItem
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse( final ItemStack stack, final EntityPlayer p, final World worldIn, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public EnumActionResult onItemUse( final ItemStack stack, final EntityPlayer p, final World worldIn, final BlockPos pos, final EnumHand hand, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
Platform.openGUI( p, null, AEPartLocation.INTERNAL, GuiBridge.GUI_QUARTZ_KNIFE );
|
||||
}
|
||||
return true;
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick( final ItemStack it, final World w, final EntityPlayer p )
|
||||
public ActionResult<ItemStack> onItemRightClick( final ItemStack it, final World w, final EntityPlayer p, final EnumHand hand )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
Platform.openGUI( p, null, AEPartLocation.INTERNAL, GuiBridge.GUI_QUARTZ_KNIFE );
|
||||
}
|
||||
p.swingItem();
|
||||
return it;
|
||||
p.swingArm( hand );
|
||||
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, it );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,8 +26,11 @@ 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.util.BlockPos;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.implementations.items.IAEWrench;
|
||||
@@ -52,28 +55,28 @@ public class ToolQuartzWrench extends AEBaseItem implements IAEWrench /* , ITool
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst( final ItemStack stack, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public EnumActionResult onItemUseFirst( final ItemStack stack, final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ, final EnumHand hand )
|
||||
{
|
||||
final Block b = world.getBlockState( pos ).getBlock();
|
||||
if( b != null && !player.isSneaking() && Platform.hasPermissions( new DimensionalCoord( world, pos ), player ) )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return !world.isRemote;
|
||||
return !world.isRemote ? EnumActionResult.SUCCESS : EnumActionResult.FAIL;
|
||||
}
|
||||
|
||||
if( b.rotateBlock( world, pos, side ) )
|
||||
{
|
||||
b.onNeighborBlockChange( world, pos, Platform.AIR_BLOCK.getDefaultState(), Platform.AIR_BLOCK );
|
||||
player.swingItem();
|
||||
return !world.isRemote;
|
||||
b.neighborChanged( Platform.AIR_BLOCK.getDefaultState(), world, pos, Platform.AIR_BLOCK );
|
||||
player.swingArm( hand );
|
||||
return !world.isRemote ? EnumActionResult.SUCCESS : EnumActionResult.FAIL;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return EnumActionResult.PASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesSneakBypassUse( final World world, final BlockPos pos, final EntityPlayer player )
|
||||
public boolean doesSneakBypassUse( final ItemStack itemstack, final IBlockAccess world, final BlockPos pos, final EntityPlayer player )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user