In my cuboid I have min and max variables for the Math.min and Math.max of my XYZ cords I only want to change blocks on the MIN Y and create a outline of the X and Z for the Min Y, basically a platform with an outline of my cube... I can’t seem to fix this any tips? Sent from my iPhone using Tapatalk
Okay so here’s the best way I can explain If we were looking at this cube from Birdseye view, keeping in mind that I have two locations, loc1 and loc2. loc1 has a Y of 0 and loc2 has a Y of 20 Here’s how I want it to look for the Y of 0: XXXXX XOOOX XOOOX XOOOX XXXXX so for this 3D cube, the X marks the border of GLASS and the O marks the platform(glow stone) Sent from my iPhone using Tapatalk @timtower I only want the platform one block high, so basically a platform on Y 0 Sent from my iPhone using Tapatalk EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Here’s what I got Code: For x = minx; x <= max; x++){ For y = miny <= maxy; y++){ For z = minz; z <= maxi; z++){ So now I got all the cords inside this cube and I create a new loc with my new variables Loc loc = new loc(w x y z) Now to check the y If (y == miny) { Loc.getblock.settype(glowstone) Which works, but I can’t seem to create the outline of glass Sent from my iPhone using Tapatalk
@TerroDoor Why the y loop at all? For a floor you don't need it. What are the conditions for the outline? And please post actual code that you can test. Makes it a lot easier.
Well if I don’t loop the Y the players cuboid won’t be between 0 and 20, I need to have the player in the cuboid so they can’t tale damage, sorry I’m not with my laptop but this problem has been bugging me all night Sent from my iPhone using Tapatalk
Only on Y 0, would I get the miny, min and max X and min, max Z? Correct me if I’m wrong Sent from my iPhone using Tapatalk
But the way I’ve been constructing it has it making walls around the edge, I only want it on Y 0 Sent from my iPhone using Tapatalk How can I properly construct this Sent from my iPhone using Tapatalk EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Following my above code I’m using this if statement If (y == miny && x == minx || x == max && z == minz || z == maxi) { Loc.getBlock().setType(Material.GLASS): } Sent from my iPhone using Tapatalk
Thanks Tim I will get back to you shortly, I appreciate your time! Sent from my iPhone using Tapatalk @timtower I switched the && and the || and have gotten it to work, although it’s filling the entire minY, how would I hollow the inside blocks? Sent from my iPhone using Tapatalk EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Sorry I mis worded my sentence, I switched the && and || and added brackets. Here’s the code Code: If (y == miny && (x == minx || x == maxx) && (z == minz || z == maxx)) { Loc.setblock glass } I fiddled with it again before posting so let me explain what’s happening above. It’s placing a glass block only on each corner, not the entire perimeter? Sent from my iPhone using Tapatalk
Copied from my phone off laptop(I’m poor af so I have a fossil as a computer). It’s correct format on my laptop however. Sent from my iPhone using Tapatalk @timtower Solved, Thankyou pal!! Here’s what I did Code: If (y == miny) { //now we know for sure it’s y0 If (x == minx || x == maxx || z == minz || z == maxz){ Loc.set glass Sent from my iPhone using Tapatalk EDIT by Moderator: merged posts, please use the edit button instead of double posting.