Jump to content
Final Calibur

[Beginner Friendly] FC Paint System

Recommended Posts

Final Calibur    389

Today I will be sharing an extremely simple and easy to use paint system for your scripts. Some of you may have seen it in my open sourced scripts, but I think it would be beneficial to have a thread specifically for it.

 

This system allows for a nice, clean, easy to use paint. You can implement it within seconds when creating new scripts, and don't have to worry whatsoever about lining things up coordinate by coordinate.
 
What you will be adding (example)
 

Spoiler


1cad0c2d84.png


Implementation
 

Spoiler


To implement the FC Paint system, you will need two files:

After you have the two files, you must make your main script class implement Painting & FCPaintable. For example:

 


public class FCAIOMiner extends Script implements Painting, FCPaintable

 
Once you have that done, you must include these two methods in your main script class:


@Override
public String[] getPaintInfo() {
	return new String[]{};
}

@Override
public void onPaint(Graphics g) {
	PAINT.paint(g);
}

After that, you need to instantiate an FCPaint object in your main script class, as so (you can choose whatever color you want):

 


final FCPaint PAINT = new FCPaint(this, Color.GREEN);

 


Usage
 

Spoiler


After following the steps above, you simply have to fill out your getPaintInfo() method. For example, here is a basic paint:


@Override
public String[] getPaintInfo() {
	return new String[]{"Time ran: " + PAINT.getTimeRan(), "Planks made: " + planksMade, "Planks per hour: " + PAINT.getPerHour(planksMade), "Status: " + Vars.get().status};
}

 

Edited by iFluffee
  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×