mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 11:29:23 +01:00
1.11, first step.
This commit is contained in:
parent
483d20ff99
commit
ec8c642099
132 changed files with 317 additions and 740 deletions
|
@ -23,10 +23,10 @@ if(hasProperty('buildnumber')){
|
|||
}
|
||||
|
||||
minecraft {
|
||||
version = "1.10.2-12.18.2.2121"
|
||||
version = "1.11-13.19.0.2153"
|
||||
runDir = "idea"
|
||||
|
||||
mappings = "snapshot_20160519"
|
||||
mappings = "snapshot_20161111"
|
||||
makeObfSourceJar = false
|
||||
//useDepAts = true
|
||||
|
||||
|
@ -45,7 +45,7 @@ repositories {
|
|||
|
||||
dependencies {
|
||||
compile "net.darkhax.tesla:Tesla:1.10.2-1.2.1.49"
|
||||
deobfCompile "mezz.jei:jei_1.10.2:3.13.2.360"
|
||||
deobfCompile "mezz.jei:jei_1.11:4.0.1.193"
|
||||
}
|
||||
|
||||
processResources {
|
||||
|
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip
|
||||
|
|
|
@ -64,7 +64,8 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
ItemStack heldItem = player.getHeldItem(hand);
|
||||
if(this.tryToggleRedstone(world, pos, player)){
|
||||
return true;
|
||||
}
|
||||
|
@ -140,7 +141,7 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud
|
|||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){
|
||||
int rotation = BlockPistonBase.getFacingFromEntity(pos, player).ordinal();
|
||||
int rotation = EnumFacing.func_190914_a(pos, player).ordinal();
|
||||
world.setBlockState(pos, this.getStateFromMeta(rotation), 2);
|
||||
|
||||
super.onBlockPlacedBy(world, pos, state, player, stack);
|
||||
|
|
|
@ -43,7 +43,7 @@ public class BlockBioReactor extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
if(world.getTileEntity(pos) instanceof TileEntityBioReactor){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.BIO_REACTOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
|
|
|
@ -52,7 +52,7 @@ public class BlockBreaker extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(this.tryToggleRedstone(world, pos, player)){
|
||||
return true;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ public class BlockBreaker extends BlockContainerBase{
|
|||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){
|
||||
int rotation = BlockPistonBase.getFacingFromEntity(pos, player).ordinal();
|
||||
int rotation = EnumFacing.func_190914_a(pos, player).ordinal();
|
||||
world.setBlockState(pos, this.getStateFromMeta(rotation), 2);
|
||||
|
||||
super.onBlockPlacedBy(world, pos, state, player, stack);
|
||||
|
|
|
@ -52,11 +52,11 @@ public class BlockCanolaPress extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing side, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityCanolaPress press = (TileEntityCanolaPress)world.getTileEntity(pos);
|
||||
if(press != null){
|
||||
if(this.checkFailUseItemOnTank(player, stack, press.tank)){
|
||||
if(this.checkFailUseItemOnTank(player, player.getHeldItem(hand), press.tank)){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.CANOLA_PRESS.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public class BlockCoalGenerator extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityCoalGenerator press = (TileEntityCoalGenerator)world.getTileEntity(pos);
|
||||
if(press != null){
|
||||
|
|
|
@ -61,11 +61,11 @@ public class BlockCoffeeMachine extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing f6, float f7, float f8, float f9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing f6, float f7, float f8, float f9){
|
||||
if(!world.isRemote){
|
||||
TileEntityCoffeeMachine machine = (TileEntityCoffeeMachine)world.getTileEntity(pos);
|
||||
if(machine != null){
|
||||
if(this.checkFailUseItemOnTank(player, stack, machine.tank)){
|
||||
if(this.checkFailUseItemOnTank(player, player.getHeldItem(hand), machine.tank)){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.COFFEE_MACHINE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -64,7 +65,8 @@ public class BlockColoredLamp extends BlockBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing side, float hitX, float hitY, float hitZ){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ){
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
//Turning On
|
||||
if(player.isSneaking()){
|
||||
if(!world.isRemote){
|
||||
|
@ -105,7 +107,7 @@ public class BlockColoredLamp extends BlockBase{
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list){
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, NonNullList list){
|
||||
for(int j = 0; j < ALL_LAMP_TYPES.length; j++){
|
||||
list.add(new ItemStack(item, 1, j));
|
||||
}
|
||||
|
|
|
@ -82,7 +82,8 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stackPlayer, EnumFacing f6, float f7, float f8, float f9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing f6, float f7, float f8, float f9){
|
||||
ItemStack stackPlayer = player.getHeldItem(hand);
|
||||
if(!world.isRemote){
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if(tile instanceof TileEntityCompost){
|
||||
|
|
|
@ -23,6 +23,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -50,7 +51,7 @@ public class BlockCrystal extends BlockBase{
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list){
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, NonNullList list){
|
||||
for(int j = 0; j < ALL_CRYSTALS.length; j++){
|
||||
list.add(new ItemStack(item, 1, j));
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class BlockDirectionalBreaker extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(this.tryToggleRedstone(world, pos, player)){
|
||||
return true;
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public class BlockDirectionalBreaker extends BlockContainerBase{
|
|||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){
|
||||
int rotation = BlockPistonBase.getFacingFromEntity(pos, player).ordinal();
|
||||
int rotation = EnumFacing.func_190914_a(pos, player).ordinal();
|
||||
world.setBlockState(pos, this.getStateFromMeta(rotation), 2);
|
||||
|
||||
super.onBlockPlacedBy(world, pos, state, player, stack);
|
||||
|
|
|
@ -50,7 +50,8 @@ public class BlockDisplayStand extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand,EnumFacing par6, float par7, float par8, float par9){
|
||||
ItemStack heldItem = player.getHeldItem(hand);
|
||||
if(!world.isRemote){
|
||||
TileEntityDisplayStand stand = (TileEntityDisplayStand)world.getTileEntity(pos);
|
||||
if(stand != null){
|
||||
|
|
|
@ -48,7 +48,7 @@ public class BlockDropper extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(this.tryToggleRedstone(world, pos, player)){
|
||||
return true;
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ public class BlockDropper extends BlockContainerBase{
|
|||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){
|
||||
int rotation = BlockPistonBase.getFacingFromEntity(pos, player).ordinal();
|
||||
int rotation = EnumFacing.func_190914_a(pos, player).ordinal();
|
||||
world.setBlockState(pos, this.getStateFromMeta(rotation), 2);
|
||||
|
||||
super.onBlockPlacedBy(world, pos, state, player, stack);
|
||||
|
|
|
@ -50,7 +50,8 @@ public class BlockEmpowerer extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
ItemStack heldItem = player.getHeldItem(hand);
|
||||
if(!world.isRemote){
|
||||
TileEntityEmpowerer empowerer = (TileEntityEmpowerer)world.getTileEntity(pos);
|
||||
if(empowerer != null){
|
||||
|
|
|
@ -47,7 +47,7 @@ public class BlockEnergizer extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
if(this.isEnergizer){
|
||||
TileEntityEnergizer energizer = (TileEntityEnergizer)world.getTileEntity(pos);
|
||||
|
|
|
@ -48,7 +48,7 @@ public class BlockFarmer extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityFarmer farmer = (TileEntityFarmer)world.getTileEntity(pos);
|
||||
if(farmer != null){
|
||||
|
|
|
@ -43,7 +43,7 @@ public class BlockFeeder extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityFeeder feeder = (TileEntityFeeder)world.getTileEntity(pos);
|
||||
if(feeder != null){
|
||||
|
|
|
@ -58,7 +58,8 @@ public class BlockFermentingBarrel extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
ItemStack heldItem = player.getHeldItem(hand);
|
||||
if(!world.isRemote){
|
||||
TileEntityFermentingBarrel press = (TileEntityFermentingBarrel)world.getTileEntity(pos);
|
||||
if(press != null){
|
||||
|
|
|
@ -42,7 +42,7 @@ public class BlockFireworkBox extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
return this.tryToggleRedstone(world, pos, player);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,8 @@ public class BlockFluidCollector extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
if(this.tryToggleRedstone(world, pos, player)){
|
||||
return true;
|
||||
}
|
||||
|
@ -76,7 +77,7 @@ public class BlockFluidCollector extends BlockContainerBase{
|
|||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){
|
||||
int rotation = BlockPistonBase.getFacingFromEntity(pos, player).ordinal();
|
||||
int rotation = EnumFacing.func_190914_a(pos, player).ordinal();
|
||||
world.setBlockState(pos, this.getStateFromMeta(rotation), 2);
|
||||
|
||||
super.onBlockPlacedBy(world, pos, state, player, stack);
|
||||
|
|
|
@ -96,7 +96,7 @@ public class BlockFurnaceDouble extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityFurnaceDouble furnace = (TileEntityFurnaceDouble)world.getTileEntity(pos);
|
||||
if(furnace != null){
|
||||
|
|
|
@ -79,7 +79,7 @@ public class BlockGiantChest extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityGiantChest chest = (TileEntityGiantChest)world.getTileEntity(pos);
|
||||
if(chest != null){
|
||||
|
@ -106,7 +106,7 @@ public class BlockGiantChest extends BlockContainerBase{
|
|||
for(int i = 0; i < list.tagCount(); i++){
|
||||
NBTTagCompound compound = list.getCompoundTagAt(i);
|
||||
if(compound != null && compound.hasKey("id")){
|
||||
slots[i] = ItemStack.loadItemStackFromNBT(list.getCompoundTagAt(i));
|
||||
slots[i] = new ItemStack(list.getCompoundTagAt(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ public class BlockGrinder extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityGrinder grinder = (TileEntityGrinder)world.getTileEntity(pos);
|
||||
if(grinder != null){
|
||||
|
|
|
@ -58,7 +58,7 @@ public class BlockInputter extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityInputter inputter = (TileEntityInputter)world.getTileEntity(pos);
|
||||
if(inputter != null){
|
||||
|
|
|
@ -46,7 +46,7 @@ public class BlockItemRepairer extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityItemRepairer repairer = (TileEntityItemRepairer)world.getTileEntity(pos);
|
||||
if(repairer != null){
|
||||
|
|
|
@ -42,7 +42,7 @@ public class BlockLampPowerer extends BlockBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn){
|
||||
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos otherPos){
|
||||
this.updateLamp(worldIn, pos);
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ public class BlockLampPowerer extends BlockBase{
|
|||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){
|
||||
int rotation = BlockPistonBase.getFacingFromEntity(pos, player).ordinal();
|
||||
int rotation = EnumFacing.func_190914_a(pos, player).ordinal();
|
||||
world.setBlockState(pos, this.getStateFromMeta(rotation), 2);
|
||||
|
||||
super.onBlockPlacedBy(world, pos, state, player, stack);
|
||||
|
|
|
@ -135,7 +135,8 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
TileEntityLaserRelay tile = (TileEntityLaserRelay)world.getTileEntity(pos);
|
||||
if(tile instanceof TileEntityLaserRelayItem){
|
||||
TileEntityLaserRelayItem relay = (TileEntityLaserRelayItem)tile;
|
||||
|
|
|
@ -49,7 +49,7 @@ public class BlockMiner extends BlockContainerBase implements IHudDisplay{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if(tile instanceof TileEntityMiner){
|
||||
|
|
|
@ -23,6 +23,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -47,7 +48,7 @@ public class BlockMisc extends BlockBase{
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list){
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, NonNullList list){
|
||||
for(int j = 0; j < ALL_MISC_BLOCKS.length; j++){
|
||||
list.add(new ItemStack(item, 1, j));
|
||||
}
|
||||
|
|
|
@ -77,7 +77,8 @@ public class BlockOilGenerator extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
if(!world.isRemote){
|
||||
TileEntityOilGenerator generator = (TileEntityOilGenerator)world.getTileEntity(pos);
|
||||
if(generator != null){
|
||||
|
|
|
@ -106,7 +106,7 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ){
|
||||
if(this.tryToggleRedstone(world, pos, player)){
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class BlockRangedCollector extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityRangedCollector breaker = (TileEntityRangedCollector)world.getTileEntity(pos);
|
||||
if(breaker != null){
|
||||
|
|
|
@ -118,7 +118,8 @@ public class BlockSlabs extends BlockBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){
|
||||
public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){
|
||||
ItemStack stack = playerIn.getHeldItem(hand);
|
||||
if(StackUtil.isValid(stack) && playerIn.canPlayerEdit(pos.offset(facing), facing, stack)){
|
||||
IBlockState state = worldIn.getBlockState(pos);
|
||||
|
||||
|
@ -138,7 +139,7 @@ public class BlockSlabs extends BlockBase{
|
|||
}
|
||||
}
|
||||
|
||||
return this.tryPlace(playerIn, stack, hand, worldIn, pos.offset(facing)) ? EnumActionResult.SUCCESS : super.onItemUse(stack, playerIn, worldIn, pos, hand, facing, hitX, hitY, hitZ);
|
||||
return this.tryPlace(playerIn, stack, hand, worldIn, pos.offset(facing)) ? EnumActionResult.SUCCESS : super.onItemUse(playerIn, worldIn, pos, hand, facing, hitX, hitY, hitZ);
|
||||
}
|
||||
else{
|
||||
return EnumActionResult.FAIL;
|
||||
|
|
|
@ -72,7 +72,7 @@ public class BlockSmileyCloud extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing f6, float f7, float f8, float f9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing f6, float f7, float f8, float f9){
|
||||
if(!world.isRemote){
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if(tile instanceof TileEntitySmileyCloud){
|
||||
|
|
|
@ -26,6 +26,7 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Random;
|
||||
|
||||
//Copied from BlockTorch.
|
||||
|
@ -66,8 +67,9 @@ public class BlockTinyTorch extends BlockBase{
|
|||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos){
|
||||
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos){
|
||||
return NULL_AABB;
|
||||
}
|
||||
|
||||
|
@ -125,7 +127,7 @@ public class BlockTinyTorch extends BlockBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn){
|
||||
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos otherPos){
|
||||
this.onNeighborChangeInternal(worldIn, pos, state);
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ public class BlockTreasureChest extends BlockBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
world.playSound(null, pos, SoundEvents.BLOCK_CHEST_OPEN, SoundCategory.BLOCKS, 0.2F, world.rand.nextFloat()*0.1F+0.9F);
|
||||
this.dropItems(world, pos);
|
||||
|
|
|
@ -22,6 +22,7 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
@ -109,7 +110,7 @@ public class BlockWallAA extends BlockBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos){
|
||||
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos){
|
||||
blockState = this.getActualState(blockState, worldIn, pos);
|
||||
return CLIP_AABB_BY_INDEX[yesThisIsCopyPastedFromBlockWallAndIHaveNoIdeaWhatThisMethodDoes(blockState)];
|
||||
}
|
||||
|
@ -126,7 +127,7 @@ public class BlockWallAA extends BlockBase{
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list){
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, NonNullList list){
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ import net.minecraft.item.EnumRarity;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
@ -65,7 +66,7 @@ public class BlockWildPlant extends BlockBushBase{
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list){
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, NonNullList list){
|
||||
for(int j = 0; j < ALL_WILD_PLANTS.length; j++){
|
||||
list.add(new ItemStack(item, 1, j));
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class BlockXPSolidifier extends BlockContainerBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing par6, float par7, float par8, float par9){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){
|
||||
if(!world.isRemote){
|
||||
TileEntityXPSolidifier solidifier = (TileEntityXPSolidifier)world.getTileEntity(pos);
|
||||
if(solidifier != null){
|
||||
|
|
|
@ -37,6 +37,7 @@ import net.minecraft.util.EnumBlockRenderType;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.FluidActionResult;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
import net.minecraftforge.fluids.FluidUtil;
|
||||
|
||||
|
@ -167,8 +168,8 @@ public abstract class BlockContainerBase extends BlockContainer implements ItemB
|
|||
}
|
||||
|
||||
@Override
|
||||
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn){
|
||||
super.neighborChanged(state, worldIn, pos, blockIn);
|
||||
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos otherPos){
|
||||
super.neighborChanged(state, worldIn, pos, blockIn, otherPos);
|
||||
this.neighborsChangedCustom(worldIn, pos);
|
||||
}
|
||||
|
||||
|
@ -201,7 +202,7 @@ public abstract class BlockContainerBase extends BlockContainer implements ItemB
|
|||
}
|
||||
|
||||
protected boolean checkFailUseItemOnTank(EntityPlayer player, ItemStack heldItem, FluidTank tank){
|
||||
return !StackUtil.isValid(heldItem) || !FluidUtil.interactWithFluidHandler(heldItem, tank, player);
|
||||
return !StackUtil.isValid(heldItem) || !FluidUtil.interactWithFluidHandler(heldItem, tank, player).isSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -90,7 +90,7 @@ public class BlockPlant extends BlockCrops implements ItemBlockBase.ICustomRarit
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing facing, float hitX, float hitY, float hitZ){
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){
|
||||
if(this.getMetaFromState(state) >= 7){
|
||||
if(!world.isRemote){
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.common.ForgeModContainer;
|
||||
import net.minecraftforge.fluids.UniversalBucket;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
@ -28,7 +29,7 @@ import java.util.List;
|
|||
public class CreativeTab extends CreativeTabs{
|
||||
|
||||
public static final CreativeTab INSTANCE = new CreativeTab();
|
||||
private List<ItemStack> list;
|
||||
private NonNullList<ItemStack> list;
|
||||
|
||||
public CreativeTab(){
|
||||
super(ModUtil.MOD_ID);
|
||||
|
@ -46,13 +47,13 @@ public class CreativeTab extends CreativeTabs{
|
|||
}
|
||||
|
||||
@Override
|
||||
public Item getTabIconItem(){
|
||||
return InitItems.itemBooklet;
|
||||
public ItemStack getTabIconItem(){
|
||||
return new ItemStack(InitItems.itemBooklet);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void displayAllRelevantItems(List<ItemStack> list){
|
||||
public void displayAllRelevantItems(NonNullList<ItemStack> list){
|
||||
this.list = list;
|
||||
|
||||
this.add(InitItems.itemBooklet);
|
||||
|
|
|
@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.entity;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraftforge.fml.common.registry.EntityRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
@ -22,7 +23,7 @@ public final class InitEntities{
|
|||
public static void init(){
|
||||
ModUtil.LOGGER.info("Initializing Entities...");
|
||||
|
||||
EntityRegistry.registerModEntity(EntityWorm.class, ModUtil.MOD_ID+".worm", 0, ActuallyAdditions.instance, 64, 1, false);
|
||||
EntityRegistry.registerModEntity(new ResourceLocation(ModUtil.MOD_ID, "worm"), EntityWorm.class, ModUtil.MOD_ID+".worm", 0, ActuallyAdditions.instance, 64, 1, false);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.gen;
|
|||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheJams;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.entity.IMerchant;
|
||||
import net.minecraft.entity.passive.EntityVillager.ITradeList;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -24,7 +25,7 @@ import java.util.Random;
|
|||
public class JamVillagerTradeList implements ITradeList{
|
||||
|
||||
@Override
|
||||
public void modifyMerchantRecipeList(MerchantRecipeList recipeList, Random random){
|
||||
public void func_190888_a(IMerchant merchant, MerchantRecipeList recipeList, Random random){
|
||||
for(int i = 0; i < random.nextInt(3)+3; i++){
|
||||
ItemStack jam = new ItemStack(InitItems.itemJams, 1, random.nextInt(TheJams.values().length));
|
||||
ItemStack emerald = new ItemStack(Items.EMERALD);
|
||||
|
|
|
@ -115,7 +115,7 @@ public class OreGen implements IWorldGenerator{
|
|||
BlockPos randomPos = new BlockPos(event.getPos().getX()+event.getRand().nextInt(16)+8, 0, event.getPos().getZ()+event.getRand().nextInt(16)+8);
|
||||
randomPos = event.getWorld().getTopSolidOrLiquidBlock(randomPos);
|
||||
|
||||
if(event.getWorld().getBiomeGenForCoords(randomPos) instanceof BiomeOcean){
|
||||
if(event.getWorld().getBiome(randomPos) instanceof BiomeOcean){
|
||||
if(randomPos.getY() >= 25 && randomPos.getY() <= 45){
|
||||
if(event.getWorld().getBlockState(randomPos).getMaterial() == Material.WATER){
|
||||
if(event.getWorld().getBlockState(randomPos.down()).getMaterial().isSolid()){
|
||||
|
|
|
@ -183,7 +183,7 @@ public class ContainerBag extends Container implements IButtonReactor{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
@ -308,6 +308,11 @@ public class ContainerBag extends Container implements IButtonReactor{
|
|||
return this.slots.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_191420_l(){
|
||||
return StackUtil.isIInvEmpty(this.slots);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i){
|
||||
if(i < this.getSizeInventory()){
|
||||
|
|
|
@ -88,7 +88,7 @@ public class ContainerBioReactor extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ public class ContainerBreaker extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ public class ContainerCanolaPress extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ public class ContainerCoalGenerator extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ public class ContainerCoffeeMachine extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ public class ContainerCrafter extends Container{
|
|||
return StackUtil.getNull();
|
||||
}
|
||||
|
||||
slot.onPickupFromSlot(player, itemstack1);
|
||||
slot.func_190901_a(player, itemstack1);
|
||||
}
|
||||
|
||||
return itemstack;
|
||||
|
|
|
@ -85,7 +85,7 @@ public class ContainerDirectionalBreaker extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ public class ContainerDrill extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
@ -222,6 +222,11 @@ public class ContainerDrill extends Container{
|
|||
return this.slots.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_191420_l(){
|
||||
return StackUtil.isIInvEmpty(this.slots);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i){
|
||||
if(i < this.getSizeInventory()){
|
||||
|
|
|
@ -85,7 +85,7 @@ public class ContainerDropper extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ public class ContainerEnergizer extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ public class ContainerEnervator extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ public class ContainerFarmer extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ public class ContainerFeeder extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ public class ContainerFermentingBarrel extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ public class ContainerFilter extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
@ -215,6 +215,11 @@ public class ContainerFilter extends Container{
|
|||
return this.slots.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_191420_l(){
|
||||
return StackUtil.isIInvEmpty(this.slots);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i){
|
||||
if(i < this.getSizeInventory()){
|
||||
|
|
|
@ -82,7 +82,7 @@ public class ContainerFluidCollector extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ public class ContainerFurnaceDouble extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ public class ContainerGiantChest extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ public class ContainerGrinder extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ public class ContainerInputter extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ public class ContainerLaserRelayItemWhitelist extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ public class ContainerMiner extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ public class ContainerOilGenerator extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ public class ContainerPhantomPlacer extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ public class ContainerRangedCollector extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ public class ContainerRepairer extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ public class ContainerXPSolidifier extends Container{
|
|||
if(StackUtil.getStackSize(newStack) == StackUtil.getStackSize(currentStack)){
|
||||
return StackUtil.getNull();
|
||||
}
|
||||
theSlot.onPickupFromSlot(player, newStack);
|
||||
theSlot.func_190901_a(player, newStack);
|
||||
|
||||
return currentStack;
|
||||
}
|
||||
|
|
|
@ -64,12 +64,12 @@ public class ItemAllToolAA extends ItemToolAA implements IColorProvidingItem{
|
|||
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ){
|
||||
public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ){
|
||||
if(!playerIn.isSneaking()){
|
||||
return Items.IRON_HOE.onItemUse(stack, playerIn, worldIn, pos, hand, side, hitX, hitY, hitZ);
|
||||
return Items.IRON_HOE.onItemUse(playerIn, worldIn, pos, hand, side, hitX, hitY, hitZ);
|
||||
}
|
||||
else{
|
||||
return Items.IRON_SHOVEL.onItemUse(stack, playerIn, worldIn, pos, hand, side, hitX, hitY, hitZ);
|
||||
return Items.IRON_SHOVEL.onItemUse(playerIn, worldIn, pos, hand, side, hitX, hitY, hitZ);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -137,7 +137,8 @@ public class ItemBag extends ItemBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){
|
||||
public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){
|
||||
ItemStack stack = playerIn.getHeldItem(hand);
|
||||
if(!this.isVoid){
|
||||
TileEntity tile = worldIn.getTileEntity(pos);
|
||||
if(tile != null && tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing)){
|
||||
|
@ -178,11 +179,11 @@ public class ItemBag extends ItemBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand){
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand){
|
||||
if(!world.isRemote){
|
||||
player.openGui(ActuallyAdditions.instance, (this.isVoid ? GuiTypes.VOID_BAG : GuiTypes.BAG).ordinal(), world, (int)player.posX, (int)player.posY, (int)player.posZ);
|
||||
}
|
||||
return new ActionResult<ItemStack>(EnumActionResult.PASS, stack);
|
||||
return new ActionResult<ItemStack>(EnumActionResult.PASS, player.getHeldItem(hand));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -77,14 +77,15 @@ public class ItemBattery extends ItemEnergy{
|
|||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World worldIn, EntityPlayer player, EnumHand hand){
|
||||
public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer player, EnumHand hand){
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
if(!worldIn.isRemote && player.isSneaking()){
|
||||
boolean isDischarge = this.isDischargeMode(stack);
|
||||
this.setDischargeMode(stack, !isDischarge);
|
||||
|
||||
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
|
||||
}
|
||||
return super.onItemRightClick(stack, worldIn, player, hand);
|
||||
return super.onItemRightClick(worldIn, player, hand);
|
||||
}
|
||||
|
||||
private boolean isDischargeMode(ItemStack stack){
|
||||
|
|
|
@ -54,7 +54,7 @@ public class ItemBooklet extends ItemBase implements IHudDisplay{
|
|||
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing face, float hitX, float hitY, float hitZ){
|
||||
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing face, float hitX, float hitY, float hitZ){
|
||||
if(player.isSneaking()){
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
Block block = state.getBlock();
|
||||
|
@ -64,7 +64,7 @@ public class ItemBooklet extends ItemBase implements IHudDisplay{
|
|||
if(world.isRemote){
|
||||
forcedPage = page;
|
||||
}
|
||||
this.onItemRightClick(stack, world, player, hand);
|
||||
this.onItemRightClick(world, player, hand);
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
|
@ -73,14 +73,14 @@ public class ItemBooklet extends ItemBase implements IHudDisplay{
|
|||
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand){
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.BOOK.ordinal(), world, (int)player.posX, (int)player.posY, (int)player.posZ);
|
||||
|
||||
if(!world.isRemote){
|
||||
TheAchievements.OPEN_BOOKLET.get(player);
|
||||
TheAchievements.OPEN_BOOKLET_MILESTONE.get(player);
|
||||
}
|
||||
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
|
||||
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -37,7 +37,8 @@ public class ItemChestToCrateUpgrade extends ItemBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUse(ItemStack heldStack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float par8, float par9, float par10){
|
||||
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float par8, float par9, float par10){
|
||||
ItemStack heldStack = player.getHeldItem(hand);
|
||||
if(player.isSneaking()){
|
||||
TileEntity tileHit = world.getTileEntity(pos);
|
||||
if(tileHit.getClass() == this.start){
|
||||
|
@ -79,7 +80,7 @@ public class ItemChestToCrateUpgrade extends ItemBase{
|
|||
}
|
||||
}
|
||||
|
||||
return super.onItemUse(heldStack, player, world, pos, hand, facing, par8, par9, par10);
|
||||
return super.onItemUse(player, world, pos, hand, facing, par8, par9, par10);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -30,11 +30,11 @@ public class ItemCrafterOnAStick extends ItemBase{
|
|||
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand){
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand){
|
||||
if(!world.isRemote){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.CRAFTER.ordinal(), world, (int)player.posX, (int)player.posY, (int)player.posZ);
|
||||
}
|
||||
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
|
||||
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -58,7 +59,7 @@ public class ItemCrystal extends ItemBase{
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list){
|
||||
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){
|
||||
for(int j = 0; j < BlockCrystal.ALL_CRYSTALS.length; j++){
|
||||
list.add(new ItemStack(this, 1, j));
|
||||
}
|
||||
|
|
|
@ -104,7 +104,8 @@ public class ItemDrill extends ItemEnergy{
|
|||
|
||||
@Override
|
||||
//Places Blocks if the Placing Upgrade is installed
|
||||
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ){
|
||||
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ){
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
ItemStack upgrade = this.getHasUpgradeAsStack(stack, ItemDrillUpgrade.UpgradeType.PLACER);
|
||||
if(StackUtil.isValid(upgrade)){
|
||||
int slot = ItemDrillUpgrade.getSlotToPlaceFrom(upgrade);
|
||||
|
@ -127,7 +128,7 @@ public class ItemDrill extends ItemEnergy{
|
|||
}
|
||||
//Notify the Player and log the Exception
|
||||
catch(Exception e){
|
||||
player.addChatComponentMessage(new TextComponentString("Ouch! That really hurt! You must have done something wrong, don't do that again please!"));
|
||||
player.addChatMessage(new TextComponentString("Ouch! That really hurt! You must have done something wrong, don't do that again please!"));
|
||||
ModUtil.LOGGER.error("Player "+player.getName()+" who should place a Block using a Drill at "+player.posX+", "+player.posY+", "+player.posZ+" in World "+world.provider.getDimension()+" threw an Exception! Don't let that happen again!");
|
||||
}
|
||||
}
|
||||
|
@ -168,11 +169,11 @@ public class ItemDrill extends ItemEnergy{
|
|||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand){
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand){
|
||||
if(!world.isRemote && player.isSneaking()){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.DRILL.ordinal(), world, (int)player.posX, (int)player.posY, (int)player.posZ);
|
||||
}
|
||||
return new ActionResult<ItemStack>(EnumActionResult.PASS, stack);
|
||||
return new ActionResult<ItemStack>(EnumActionResult.PASS, player.getHeldItem(hand));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -366,7 +367,7 @@ public class ItemDrill extends ItemEnergy{
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list){
|
||||
public void getSubItems(Item item, CreativeTabs tabs, NonNullList list){
|
||||
for(int i = 0; i < 16; i++){
|
||||
this.addDrillStack(list, i);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,8 @@ public class ItemDrillUpgrade extends ItemBase{
|
|||
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand){
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand){
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
if(!world.isRemote && this.type == UpgradeType.PLACER){
|
||||
this.setSlotToPlaceFrom(stack, player.inventory.currentItem);
|
||||
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
|
||||
|
|
|
@ -20,6 +20,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -53,7 +54,7 @@ public class ItemDust extends ItemBase implements IColorProvidingItem{
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list){
|
||||
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){
|
||||
for(int j = 0; j < ALL_DUSTS.length; j++){
|
||||
list.add(new ItemStack(this, 1, j));
|
||||
}
|
||||
|
|
|
@ -33,14 +33,15 @@ public class ItemFertilizer extends ItemBase{
|
|||
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float par8, float par9, float par10){
|
||||
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing side, float par8, float par9, float par10){
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
if(ItemDye.applyBonemeal(stack, world, pos, player)){
|
||||
if(!world.isRemote){
|
||||
world.playEvent(2005, pos, 0);
|
||||
}
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
return super.onItemUse(stack, player, world, pos, hand, side, par8, par9, par10);
|
||||
return super.onItemUse(player, world, pos, hand, side, par8, par9, par10);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -85,7 +85,8 @@ public class ItemFillingWand extends ItemEnergy{
|
|||
}
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){
|
||||
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
if(!world.isRemote && player.getItemInUseCount() <= 0){
|
||||
if(player.isSneaking()){
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
|
|
|
@ -38,11 +38,11 @@ public class ItemFilter extends ItemBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand){
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand){
|
||||
if(!world.isRemote){
|
||||
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.FILTER.ordinal(), world, (int)player.posX, (int)player.posY, (int)player.posZ);
|
||||
}
|
||||
return new ActionResult<ItemStack>(EnumActionResult.PASS, stack);
|
||||
return new ActionResult<ItemStack>(EnumActionResult.PASS, player.getHeldItem(hand));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,6 +24,7 @@ import net.minecraft.item.EnumAction;
|
|||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -96,7 +97,7 @@ public class ItemFoods extends ItemFoodBase{
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list){
|
||||
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){
|
||||
for(int j = 0; j < ALL_FOODS.length; j++){
|
||||
list.add(new ItemStack(this, 1, j));
|
||||
}
|
||||
|
|
|
@ -55,7 +55,8 @@ public class ItemHairyBall extends ItemBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand){
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand){
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
if(!world.isRemote){
|
||||
ItemStack returnItem = this.getRandomReturnItem(world.rand);
|
||||
if(!player.inventory.addItemStackToInventory(returnItem)){
|
||||
|
|
|
@ -26,6 +26,7 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -62,7 +63,7 @@ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list){
|
||||
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){
|
||||
for(int j = 0; j < ALL_JAMS.length; j++){
|
||||
list.add(new ItemStack(this, 1, j));
|
||||
}
|
||||
|
|
|
@ -39,13 +39,14 @@ public class ItemLaserWrench extends ItemBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing par7, float par8, float par9, float par10){
|
||||
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing par7, float par8, float par9, float par10){
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if(tile instanceof TileEntityLaserRelay){
|
||||
if(!world.isRemote){
|
||||
if(ItemPhantomConnector.getStoredPosition(stack) == null){
|
||||
ItemPhantomConnector.storeConnection(stack, pos.getX(), pos.getY(), pos.getZ(), world);
|
||||
player.addChatComponentMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".laser.stored.desc"));
|
||||
player.addChatMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".laser.stored.desc"));
|
||||
}
|
||||
else{
|
||||
BlockPos savedPos = ItemPhantomConnector.getStoredPosition(stack);
|
||||
|
@ -59,10 +60,10 @@ public class ItemLaserWrench extends ItemBase{
|
|||
((TileEntityLaserRelay)savedTile).sendUpdate();
|
||||
relay.sendUpdate();
|
||||
|
||||
player.addChatComponentMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".laser.connected.desc"));
|
||||
player.addChatMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".laser.connected.desc"));
|
||||
}
|
||||
else{
|
||||
player.addChatComponentMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".laser.cantConnect.desc"));
|
||||
player.addChatMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".laser.cantConnect.desc"));
|
||||
ItemPhantomConnector.clearStorage(stack, "XCoordOfTileStored", "YCoordOfTileStored", "ZCoordOfTileStored", "WorldOfTileStored");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,9 +45,9 @@ public class ItemLeafBlower extends ItemBase implements IDisplayStandItem{
|
|||
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand){
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand){
|
||||
player.setActiveHand(hand);
|
||||
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
|
||||
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ import net.minecraft.entity.item.EntityItem;
|
|||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
@ -58,7 +59,7 @@ public class ItemMisc extends ItemBase{
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list){
|
||||
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){
|
||||
for(int j = 0; j < ALL_MISC_ITEMS.length; j++){
|
||||
if(j != TheMiscItems.YOUTUBE_ICON.ordinal()){
|
||||
list.add(new ItemStack(this, 1, j));
|
||||
|
|
|
@ -86,7 +86,8 @@ public class ItemPhantomConnector extends ItemBase{
|
|||
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing par7, float par8, float par9, float par10){
|
||||
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing par7, float par8, float par9, float par10){
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
if(!world.isRemote){
|
||||
//Passing Data to Phantoms
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
|
@ -99,7 +100,7 @@ public class ItemPhantomConnector extends ItemBase{
|
|||
((TileEntityBase)tile).sendUpdate();
|
||||
}
|
||||
clearStorage(stack, "XCoordOfTileStored", "YCoordOfTileStored", "ZCoordOfTileStored", "WorldOfTileStored");
|
||||
player.addChatComponentMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".phantom.connected.desc"));
|
||||
player.addChatMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".phantom.connected.desc"));
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
return EnumActionResult.FAIL;
|
||||
|
@ -107,7 +108,7 @@ public class ItemPhantomConnector extends ItemBase{
|
|||
}
|
||||
//Storing Connections
|
||||
storeConnection(stack, pos.getX(), pos.getY(), pos.getZ(), world);
|
||||
player.addChatComponentMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".phantom.stored.desc"));
|
||||
player.addChatMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".phantom.stored.desc"));
|
||||
}
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
|
@ -120,7 +121,7 @@ public class ItemPhantomConnector extends ItemBase{
|
|||
if(tile instanceof IPhantomTile){
|
||||
((IPhantomTile)tile).setBoundPosition(null);
|
||||
}
|
||||
player.addChatComponentMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".phantom.unbound.desc"));
|
||||
player.addChatMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".phantom.unbound.desc"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,7 +67,8 @@ public class ItemPlayerProbe extends ItemBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){
|
||||
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if(tile instanceof TileEntityPlayerInterface){
|
||||
if(stack.hasTagCompound()){
|
||||
|
|
|
@ -28,6 +28,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
@ -91,7 +92,7 @@ public class ItemPotionRing extends ItemBase implements IColorProvidingItem, IDi
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list){
|
||||
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){
|
||||
for(int j = 0; j < ALL_RINGS.length; j++){
|
||||
list.add(new ItemStack(this, 1, j));
|
||||
}
|
||||
|
|
|
@ -28,7 +28,8 @@ public class ItemResonantRice extends ItemBase{
|
|||
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand){
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand){
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
if(!world.isRemote){
|
||||
stack = StackUtil.addStackSize(stack, -1);
|
||||
world.createExplosion(null, player.posX, player.posY, player.posZ, 0.5F, true);
|
||||
|
|
|
@ -51,8 +51,8 @@ public class ItemShovelAA extends ItemToolAA{
|
|||
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){
|
||||
return Items.IRON_SHOVEL.onItemUse(stack, playerIn, worldIn, pos, hand, facing, hitX, hitY, hitZ);
|
||||
public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){
|
||||
return Items.IRON_SHOVEL.onItemUse(playerIn, worldIn, pos, hand, facing, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -52,7 +52,8 @@ public class ItemSolidifiedExperience extends ItemBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand){
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand){
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
if(!world.isRemote){
|
||||
int amount;
|
||||
if(!player.isSneaking()){
|
||||
|
|
|
@ -29,6 +29,7 @@ import net.minecraft.tileentity.TileEntityMobSpawner;
|
|||
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.util.text.TextFormatting;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -58,7 +59,7 @@ public class ItemSpawnerChanger extends ItemBase{
|
|||
}
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUse(ItemStack aStack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){
|
||||
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){
|
||||
if(!world.isRemote){
|
||||
ItemStack stack = player.getHeldItemMainhand();
|
||||
if(player.canPlayerEdit(pos.offset(facing), facing, stack)){
|
||||
|
@ -76,7 +77,7 @@ public class ItemSpawnerChanger extends ItemBase{
|
|||
compound.removeTag("SpawnData");
|
||||
logic.readFromNBT(compound);
|
||||
|
||||
logic.setEntityName(entity);
|
||||
logic.func_190894_a(new ResourceLocation(entity));
|
||||
|
||||
tile.markDirty();
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue