# Solved How to Generate a Square?

Discussion in 'Spigot Plugin Development' started by Rockinredross867, Jun 30, 2016.

1. ### Rockinredross867

I am trying to make a plotme plugin and I need to know how to make a plot efficiently. How will I go about making a plot?

2. ### FiXed

simple, don't make a plotme plugin until you figure out the basics of Java (and I'd say even the advanced bits) and are past high school math

• Optimistic x 1
3. ### Rockinredross867

@ExoticCode I know java and I don't know a lot about high school math. Is this possible without knowing a lot about complicated math?

4. ### Nikl

For simple plotting you do not need that much math... no idea what you learn in high school, but for most symmatrical stuff + - * and sin() should be sufficient

Edit: what you DO need is good logical thinking

• Agree x 1
5. ### Choco Moderator

sin() isn't even needed for squares Unless you take @finnbon's Polygon tutorial he released recently (which was pretty genius btw)

• Funny x 1
• Friendly x 1
6. ### Rockinredross867

I'm not event in high school

7. ### Nikl

Yeah i extended to plotting in general

• Like x 1
8. ### FiXed

@Rockinredross867
Learn Java MORE then work on this, once you're past high school math where you can calculate where to put the squares and where to put the alleys and walkways then continue, there's no need for a custom plotme plugin when so many are available. Honestly the amount of work that is put into plotme plugins is insane, also, if you don't know how to loop through x amount of blocks inside a square then you definitely shouldn't be continuing.

• Winner x 1
• Optimistic x 1
9. ### Nikl

Yes
The ammount of work is defenetly high.

But if there is nothing that can stop you from trying: get some mathematical idea of how to set up the world. Best thing would be to take ( i am oldschool ^^) pen and paper and draw a few squares with paths and everything and think about the dimensions.

• Agree x 2
10. ### FiXed

that's a great idea however you also need to know how chunk generators work to accomplish this task which goes down to bytes which is annoying to deal with (not actually sure if that's how to do it but eh haven't worked with them)

11. ### Choco Moderator

There's also a method to do with long values (due to bytes being limited to 128) in the ChunkGenerator class. It's a 2-dimensional array iirc containing long values corresponding to block id values

12. ### FiXed

ah, yeah that's cool I might get into them eventually but I'm just a beginner that's only been coding for 7 months (kinda since boarding school isn't really coder friendly) so I've still got time

I have done some generating of buildings though which is fun to do especially if you can figure out which blocks go where, in that case it's just a either "map it out on paper" situation or "test 50 times" situation.