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

Method getBlockFromName

src/main/java/net/minecraft/block/Block.java:188–207  ·  view source on GitHub ↗
(String name)

Source from the content-addressed store, hash-verified

186 }
187
188 public static Block getBlockFromName(String name)
189 {
190 ResourceLocation resourcelocation = new ResourceLocation(name);
191
192 if (blockRegistry.containsKey(resourcelocation))
193 {
194 return blockRegistry.getObject(resourcelocation);
195 }
196 else
197 {
198 try
199 {
200 return blockRegistry.getObjectById(Integer.parseInt(name));
201 }
202 catch (NumberFormatException var3)
203 {
204 return null;
205 }
206 }
207 }
208
209 public boolean isFullBlock()
210 {

Callers 15

detectMatchBlocksMethod · 0.95
loadEntityDataMapMethod · 0.95
parseBlockPartMethod · 0.95
getTooltipMethod · 0.95
canDestroyMethod · 0.95
canPlaceOnMethod · 0.95
processCommandMethod · 0.95
processCommandMethod · 0.95
func_180715_aMethod · 0.95
readChunkFromNBTMethod · 0.95
readEntityFromNBTMethod · 0.95
readEntityFromNBTMethod · 0.95

Calls 4

getObjectMethod · 0.65
containsKeyMethod · 0.45
getObjectByIdMethod · 0.45
parseIntMethod · 0.45

Tested by 1

processCommandMethod · 0.76