Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void renderStructure(@NotNull final BlockPos startingPos, @NotNull final World clientWorld, @NotNull final EntityPlayer player, final float partialTicks)
- {
- final Template.BlockInfo[] blockList = this.getBlockInfoWithSettings(this.settings);
- final Entity[] entityList = this.getEntityInfoWithSettings(clientWorld, startingPos, this.settings);
- for (final Template.BlockInfo aBlockList : blockList)
- {
- Block block = aBlockList.blockState.getBlock();
- IBlockState iblockstate = aBlockList.blockState;
- if (block == ModBlocks.blockSubstitution)
- {
- continue;
- }
- if (block == ModBlocks.blockSolidSubstitution)
- {
- iblockstate = BlockUtils.getSubstitutionBlockAtWorld(clientWorld, startingPos);
- block = iblockstate.getBlock();
- }
- final BlockPos blockpos = aBlockList.pos.add(startingPos);
- final IBlockState iBlockExtendedState = block.getExtendedState(iblockstate, clientWorld, blockpos);
- final IBakedModel ibakedmodel = Minecraft.getMinecraft().getBlockRendererDispatcher().getModelForState(iblockstate);
- TileEntity tileentity = null;
- if (block.hasTileEntity(iblockstate) && aBlockList.tileentityData != null)
- {
- tileentity = block.createTileEntity(clientWorld, iblockstate);
- tileentity.readFromNBT(aBlockList.tileentityData);
- }
- final ModelHolder models = new ModelHolder(blockpos, iblockstate, iBlockExtendedState, tileentity, ibakedmodel);
- getQuads(models, models.quads);
- this.renderGhost(clientWorld, models, player, partialTicks);
- }
- for (final Entity anEntityList : entityList)
- {
- if (anEntityList != null)
- {
- Minecraft.getMinecraft().getRenderManager().renderEntityStatic(anEntityList, 0.0F, true);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement