Minecraft Data Packs / Tool

Survival Tools: Circles

  • check_circle Advancements
  • check_circle Functions
  • 5,437 views, 1 today
  • 251 downloads, 0 today
  • 12
  • 11
  • 18
Minecraft Maniac X's Avatar Minecraft Maniac X
Level 43 : Master Herobrine
20
Minecraft is a blocky game, but I often find myself wanting to build with circles. Most circle datapacks, mods, or plugins create the circles for you out of blocks, removing any possible use it might have had for any survival build. Not this one. This datapack helps you build circles by providing guides out of particles. Just type in "/trigger circle set" and then the number for the radius of the circle (example: "/trigger circle set 4" will create a guide for a circle with a radius of 4), and then you will get a guide for the circle. Any where you see a barrier block particle, place a block. To remove all guides in a world, type in /trigger removeCircles. This works in survival without cheats because it uses a trigger command. Thanks for looking at this datapack. I hope you like it.

ALL CIRCLES 1 - 100 ARE DONE!!!





More info on creating circles
To create a circle of a radius of 10, type in /trigger circle set 10. You can replace the number ten with any number. If it doesn't work, assume that the circle size does not exist yet.

INFO FOR NERDS:

How did I generate all those long lists of particles and coordinates to make the circles without writing them by hand? A simple program. It's written in c, and the amount of arguments is the radius of your circle (I was too lazy to convert a string to an integer :) ). Here it is:

#include <stdio.h>

#include <math.h>
void format(int circle[​500][​500], int radius);

int main(int argc, char *argv[])

{
  int circle[​500][​500];
  int row = 0;
  int column = 0;
  int i, j, k, r = argc - 1, x = argc - 1, y = argc - 1, d, a, l;

  for (i = 0; i < (((argc - 1) * 2) + 1); i++)
  {
    for (j = 0; j < (((argc - 1) * 2) + 1); j++)
    {
      a = ((i - x) * (i - x)) + ((j - y) * (j - y));
      d = sqrt(a);

      if (r == d)
      {
        circle[​row][​column] = 1;
        column++;
      }
      else
      {
        column++;
      }
    }
    row++;
    column = 0;
  }
  format(circle, argc - 1);
}

void format(int circle[​500][​500], int radius)

{
  for (int i = 0; i < (radius * 2) + 1; i++)
  {
    for (int j = 0; j < (radius * 2) + 1; j++)
    {
      if (circle[​i][​j] == 1)
      {
        printf("summon armor_stand ~%i ~-10 ~%i {Tags:[\"cyl\"],Marker:1,NoGravity:1,Invulnerable:1}\n",i - radius, j - radius);
      }
    }
  }
  return;
}

Bugs or Questions? Report them in the comments.
CompatibilityMinecraft 1.13
toMinecraft 1.16
Tags

1 Update Logs

Update #1 : by Minecraft Maniac X 07/08/2020 1:57:37 pmJul 8th, 2020

made description easier to read

Create an account or sign in to comment.

1
07/17/2021 4:42 pm
Level 2 : Apprentice Miner
TaakoTheDruid
TaakoTheDruid's Avatar
Do you intend on making circles over 100?
1
08/05/2021 10:55 am
Level 43 : Master Herobrine
Minecraft Maniac X
Minecraft Maniac X's Avatar
i haven't worked on this in a while, but i suppose if you tell me what you specifically need i could find the time to add them
1
03/27/2021 5:40 am
Level 1 : New Miner
Magness
Magness's Avatar
hi i cant getn it to work it says their is no scoarboard objective with that name plz help
1
03/29/2021 10:22 am
Level 43 : Master Herobrine
Minecraft Maniac X
Minecraft Maniac X's Avatar
can you tell me the exact command you tried to run?
1
08/20/2020 4:05 pm
Level 21 : Expert Farmer
King_MarcelB
King_MarcelB's Avatar
Hello, I looked at your code, and I must say, it's not very good. Instead of 2 for for-loops I would only use 1 and instead of beginningin a corner, I would start in the center of the circle, like so:

for (i = 0; i < (argc + 1); i++)
  {
    a = ((i * i) - (r * r);
    b = sqrt(a);

    circle[​-i][-b] = 1;
    circle[​-i][b] = 1;
    circle[i][-b] = 1;
    circle[​i][b] = 1;
  }
  format(circle, argc - 1);
}
[hr]it should realy easy and a lot faster than your code.
1
08/20/2020 4:13 pmhistory
Level 43 : Master Herobrine
Minecraft Maniac X
Minecraft Maniac X's Avatar
1. Thanks so much! I knew there were ways to make it faster, but I just couldn't figure out how to do them.
2. Its so nice to meet a fellow c programer!
1
08/21/2020 9:37 am
Level 21 : Expert Farmer
King_MarcelB
King_MarcelB's Avatar
sorry to say, but my time as a programmer is a long long time ago. the last time I used the C-language was, I thing 10 years ago, maybe even longer... but it's like riding a bicycle, once you've learnd it, you only need to refresh your memory.
(hope I could make myself clear, because I'm from germany, and my english isn't the best there is.)
1
08/21/2020 3:39 pm
Level 43 : Master Herobrine
Minecraft Maniac X
Minecraft Maniac X's Avatar
Ok. Im sort of new to c. Started about a year ago, so its nice to get some feedback on my code.
4
06/05/2020 8:24 pm
Level 43 : Master Herobrine
Minecraft Maniac X
Minecraft Maniac X's Avatar
Do you guys think I should add more circles other than up to 100? I already have 1 - 100. Should I add more, and what to?
2
06/30/2020 10:56 am
Level 37 : Artisan Mage
nitro_dynamite18
nitro_dynamite18's Avatar
You should add circles with radius up to 376. Here's my logic:

The maximum number of stacks of items you can hold in your inventory at once is 37. 1 stack in the off hand, 9 in the hotbar, and 27 in the inventory GUI. Multiply that number by the highest possible stack, 64, to get 2368. This is the circumference of the largest circle you can make without refilling your inventory. To find the radius of a circle with that circumference, divide the circumference by pi, then divide the result by 2 to get the radius.

2368/3.14=754.140127389
754.140127389/2=377.070063694

Now, I know I said 376 should be the maximum radius at the beginning, even though the math shown here points to 377. This is because when you use more digits of pi, you get a more precise result, which in this case is 376.8, which you round down to 376 because you can't have .8 blocks.

Alternatively, you could go with the render distance logic, which is, "The maximum render distance without mods is 512 blocks. That should therefore be the maximum because I don't want the template out of render distance."
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome