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

Method getMetaFromState

src/main/java/net/minecraft/block/Block.java:267–277  ·  view source on GitHub ↗

Convert the BlockState into the correct metadata value

(IBlockState state)

Source from the content-addressed store, hash-verified

265 * Convert the BlockState into the correct metadata value
266 */
267 public int getMetaFromState(IBlockState state)
268 {
269 if (state != null && !state.getPropertyNames().isEmpty())
270 {
271 throw new IllegalArgumentException("Don\'t know how to convert " + state + " back into data...");
272 }
273 else
274 {
275 return 0;
276 }
277 }
278
279 /**
280 * Get the actual Block state of this Block at the given position. This applies properties not visible in the

Callers 15

pushEntityMethod · 0.95
drawSlotMethod · 0.95
setBlockStateMethod · 0.95
getStateIdMethod · 0.95
createStackedBlockMethod · 0.95
doMoveMethod · 0.95
writeEntityToNBTMethod · 0.95
addEntityCrashInfoMethod · 0.95
onUpdateMethod · 0.95
getMetadataMethod · 0.45
renderBlockMethod · 0.45
processCommandMethod · 0.45

Calls 2

getPropertyNamesMethod · 0.65
isEmptyMethod · 0.45

Tested by 1

processCommandMethod · 0.36