Skip to content

Instantly share code, notes, and snippets.

@Robijnvogel
Created January 27, 2017 18:49
Show Gist options
  • Save Robijnvogel/9e35b4e38d1bde4016c80c612ab0fdb8 to your computer and use it in GitHub Desktop.
Save Robijnvogel/9e35b4e38d1bde4016c80c612ab0fdb8 to your computer and use it in GitHub Desktop.
if (blockString.startsWith("dimdoors")) {
String dimdoorsBlockName = blockString.split(":")[1];
if (dimdoorsBlockName.equals("Fabric of RealityPerm")) { //only special case, because this is now another state of another block
isAncientFabric = true;
} else {
dimdoorsBlockName = convertOldDimDoorsBlockNameToNewDimDoorsBlockName(dimdoorsBlockName);
blockString = "dimdoors:" + dimdoorsBlockName;
}
}
IBlockState blockstate;
if (!isAncientFabric) {
Block block = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(blockString));
blockstate = block.getDefaultState();
} else {
Block block = ForgeRegistries.BLOCKS.getValue(new ResourceLocation("blockDimWall"));
blockstate = getBlockStateWithProperties(block, new String[]{"type=ancient"});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment