Advertisement
vacla

Untitled

Nov 17th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.99 KB | None | 0 0
  1. //start
  2. public synchronized void drawOutlines() {
  3.     if(Configs.Generic.OUTLINE_SHOWN.getBooleanValue()) {
  4.         Tessellator tessellator = Tessellator.getInstance();
  5.         BufferBuilder buffer = tessellator.getBuffer();
  6.         buffer.begin(GL11.GL_LINES, DefaultVertexFormats.POSITION_COLOR);
  7.         for(PlayereditSet editsForPlayer : _playerEdits.values()) {
  8.             editsForPlayer.drawOutlines(buffer);
  9.         }
  10.         tessellator.draw();
  11.     }
  12. }
  13.  
  14. //PlayerEditSet
  15. public synchronized void drawOutlines(BufferBuilder buffer) {
  16.     if(isVisible()) {
  17.         if(Configs.Generic.OUTLINE_SHOWN.getBooleanValue()) {
  18.             for(BlockEdit edit : _edits) {
  19.                 edit.drawOutline(buffer);
  20.             }
  21.         }
  22.     }
  23. }
  24.  
  25. //BlockEdit
  26. public void drawOutline(BufferBuilder buffer) {
  27.     IBakedModel model;
  28.     IBlockState state = (IRegistry.BLOCK.get(new ResourceLocation(block.getName()))).getDefaultState();
  29.     model = this.blockModelShapes.getModel(state);
  30.     RenderUtils.drawBlockModelQuadOverlayBatched(model, state, new BlockPos(x, y, z), block.getColor(), 0, buffer);
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement