Java Code Examples for net.minecraft.world.World.notifyNeighborsOfStateExcept()

The following are Jave code examples for showing how to use notifyNeighborsOfStateExcept() of the net.minecraft.world.World class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: Minecoprocessors   File: BlockMinecoprocessor.java   Source Code and License Vote up 5 votes
protected void notifyNeighborsOnSide(World worldIn, BlockPos pos, EnumFacing side) {
  BlockPos neighborPos = pos.offset(side);
  if (net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(worldIn, pos, worldIn.getBlockState(pos), java.util.EnumSet.of(side), false)
      .isCanceled()) {
    return;
  }
  worldIn.neighborChanged(neighborPos, this, pos);
  worldIn.notifyNeighborsOfStateExcept(neighborPos, this, side.getOpposite());
}
 
Example 2
Project: DecompiledMinecraft   File: BlockRedstoneDiode.java   Source Code and License Vote up 5 votes
protected void notifyNeighbors(World worldIn, BlockPos pos, IBlockState state)
{
    EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
    BlockPos blockpos = pos.offset(enumfacing.getOpposite());
    worldIn.notifyBlockOfStateChange(blockpos, this);
    worldIn.notifyNeighborsOfStateExcept(blockpos, this, enumfacing);
}
 
Example 3
Project: DecompiledMinecraft   File: BlockRedstoneDiode.java   Source Code and License Vote up 5 votes
protected void notifyNeighbors(World worldIn, BlockPos pos, IBlockState state)
{
    EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
    BlockPos blockpos = pos.offset(enumfacing.getOpposite());
    worldIn.notifyBlockOfStateChange(blockpos, this);
    worldIn.notifyNeighborsOfStateExcept(blockpos, this, enumfacing);
}
 
Example 4
Project: BaseClient   File: BlockRedstoneDiode.java   Source Code and License Vote up 5 votes
protected void notifyNeighbors(World worldIn, BlockPos pos, IBlockState state)
{
    EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
    BlockPos blockpos = pos.offset(enumfacing.getOpposite());
    worldIn.notifyBlockOfStateChange(blockpos, this);
    worldIn.notifyNeighborsOfStateExcept(blockpos, this, enumfacing);
}
 
Example 5
Project: BaseClient   File: BlockRedstoneDiode.java   Source Code and License Vote up 5 votes
protected void notifyNeighbors(World worldIn, BlockPos pos, IBlockState state)
{
    EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
    BlockPos blockpos = pos.offset(enumfacing.getOpposite());
    worldIn.notifyBlockOfStateChange(blockpos, this);
    worldIn.notifyNeighborsOfStateExcept(blockpos, this, enumfacing);
}
 
Example 6
Project: Backmemed   File: BlockRedstoneDiode.java   Source Code and License Vote up 5 votes
protected void notifyNeighbors(World worldIn, BlockPos pos, IBlockState state)
{
    EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
    BlockPos blockpos = pos.offset(enumfacing.getOpposite());
    worldIn.func_190524_a(blockpos, this, pos);
    worldIn.notifyNeighborsOfStateExcept(blockpos, this, enumfacing);
}
 
Example 7
Project: Backmemed   File: BlockObserver.java   Source Code and License Vote up 5 votes
protected void func_190961_e(World p_190961_1_, BlockPos p_190961_2_, IBlockState p_190961_3_)
{
    EnumFacing enumfacing = (EnumFacing)p_190961_3_.getValue(FACING);
    BlockPos blockpos = p_190961_2_.offset(enumfacing.getOpposite());
    p_190961_1_.func_190524_a(blockpos, this, p_190961_2_);
    p_190961_1_.notifyNeighborsOfStateExcept(blockpos, this, enumfacing);
}
 
Example 8
Project: CustomWorldGen   File: BlockRedstoneDiode.java   Source Code and License Vote up 5 votes
protected void notifyNeighbors(World worldIn, BlockPos pos, IBlockState state)
{
    EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
    BlockPos blockpos = pos.offset(enumfacing.getOpposite());
    if(net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(worldIn, pos, worldIn.getBlockState(pos), java.util.EnumSet.of(enumfacing.getOpposite())).isCanceled())
        return;
    worldIn.notifyBlockOfStateChange(blockpos, this);
    worldIn.notifyNeighborsOfStateExcept(blockpos, this, enumfacing);
}