internal float ApplyColorAtNoSync(BetterPaintMod mymod, PaintLayerType layer, PaintBrushType brushType, Color color, byte glow, PaintBrushSize brushSize, float pressurePrecent, int randSeed, int worldX, int worldY) { if (Main.netMode == 2) { throw new ModHelpersException("No server."); } PaintBrush brush = mymod.Modes[brushType]; float paintsUsed = 0f; switch (layer) { case PaintLayerType.Background: paintsUsed += brush.Apply(this.Background, color, glow, brushSize, pressurePrecent, randSeed, worldX, worldY); break; case PaintLayerType.Foreground: paintsUsed += brush.Apply(this.Foreground, color, glow, brushSize, pressurePrecent, randSeed, worldX, worldY); break; case PaintLayerType.Anyground: paintsUsed += brush.Apply(this.Background, color, glow, brushSize, pressurePrecent, randSeed, worldX, worldY); paintsUsed += brush.Apply(this.Foreground, color, glow, brushSize, pressurePrecent, randSeed, worldX, worldY); break; default: throw new ModHelpersException("Not implemented."); } return(paintsUsed); }