MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / checkForDrop

Method checkForDrop

src/main/java/net/minecraft/block/BlockTorch.java:163–179  ·  view source on GitHub ↗
(World worldIn, BlockPos pos, IBlockState state)

Source from the content-addressed store, hash-verified

161 }
162
163 protected boolean checkForDrop(World worldIn, BlockPos pos, IBlockState state)
164 {
165 if (state.getBlock() == this && this.canPlaceAt(worldIn, pos, state.getValue(FACING)))
166 {
167 return true;
168 }
169 else
170 {
171 if (worldIn.getBlockState(pos).getBlock() == this)
172 {
173 this.dropBlockAsItem(worldIn, pos, state, 0);
174 worldIn.setBlockToAir(pos);
175 }
176
177 return false;
178 }
179 }
180
181 /**
182 * Ray traces through the blocks collision from start vector to end vector returning a ray trace hit.

Callers 2

onBlockAddedMethod · 0.95

Calls 6

canPlaceAtMethod · 0.95
dropBlockAsItemMethod · 0.80
setBlockToAirMethod · 0.80
getBlockMethod · 0.65
getValueMethod · 0.65
getBlockStateMethod · 0.65

Tested by

no test coverage detected