mojira.dev
MC-75689

Lag depending on the orientation and vertical motion of entities

I created the first version of the program Paint in Minecraft with a fill bucket (able to fill any shape that you define). After I was finished, I discovered a VERY odd bug regarding the vertical motion of entities (applies to all) that causes very severe lag. I need to explain how the system works first. You start out with an enclosed shape that you want to fill. You put your cursor anywhere inside. After you've done this, you press the fill button. It summons a WitherSkull (which we will just call Bucket from now on) onto the board where the cursor is. Every Bucket first places the block you're painting with where it is on the board, then tests above, below, to the left, and to the right for black wool (the color of the board), and if it finds it, it summons another Bucket in those locations. It'll die right after it completes this (to prevent lag). The new Buckets then repeat the exact same process. When it encounters a wall that isn't black wool (a block you've painted the board), it won't summon one there. That's how the system works. On the size of the board I've made, there can't be more than 200 entities on screen (I've had 1000+ entities active in my game before with no lag). This fill bucket works perfectly at any distance when you're using it to fill something that isn't that tall vertically, but any distance horizontally.

What I expected to happen when I used it vertically is the exact same thing, because it's doing the EXACT same thing that it does horizontally.

What ended up happening was that my game crashed. I was able to do it at four blocks height 30 blocks across with zero lag. Then, I tried to do it four blocks across and only 10 blocks up and down and I crashed. I tried making many changes to the machines and creating different maps but everytime, the thing crashed my Minecraft.

It's a bit tricky to explain how to reproduce it, but I'll try my best (the easiest way would just be to download the world). Follow these steps:
1. Create a simple fill clock that's about 10 long
2. In chat, type this:
/scoreboard objectives add Paint dummy
3. Put command blocks along a fill clock (look it up if you aren't sure what a fill clock is, but you guys probably know) that will be activated in this order:

/execute @e[type=WitherSkull,name=PaintBucket] ~ ~ ~ setblock ~ ~ ~ wool 0
/scoreboard players set @e[type=WitherSkull,name=PaintBucket] Paint 1
/execute @e[type=WitherSkull,name=PaintBucket] ~ ~ ~ detect ~ ~1 ~ wool 15 summon WitherSkull ~ ~1 ~ {CustomName:"PaintBucket",direction:[],ExplosionPower:0}
/execute @e[type=WitherSkull,name=PaintBucket] ~ ~ ~ detect ~ ~-1 ~ wool 15 summon WitherSkull ~ ~-1 ~ {CustomName:"PaintBucket",direction:[],ExplosionPower:0}
/execute @e[type=WitherSkull,name=PaintBucket] ~ ~ ~ detect ~1 ~ ~ wool 15 summon WitherSkull ~1 ~ ~ {CustomName:"PaintBucket",direction:[],ExplosionPower:0}
/execute @e[type=WitherSkull,name=PaintBucket] ~ ~ ~ detect ~-1 ~ ~ wool 15 summon WitherSkull ~-1 ~ ~ {CustomName:"PaintBucket",direction:[],ExplosionPower:0}
/kill @e[type=WitherSkull,name=PaintBucket,score_Paint_min=1]

Then, build a slighty large black wool wall. Then, put any definite shape that you want to fill on it. Go somewhere in the middle, then summon a WitherSkull named PaintBucket inside the black wool: /summon WitherSkull x y z {CustomName:"PaintBucket,direction:[],ExplosionPower:0}

World Download provided, too 🙂

I know this is a really weird problem, and since this is the first time I'm reporting a bug I may have explained it incorrectly, you may be slightly confused on how to recreate it. If I've explained it poorly feel free to contact me through the email linked to my Mojang account. Thanks for taking the time to read this! 🙂

Comments 7

Since, I provided a World Download, you don't have to do everything I said to recreate it. Just draw your defined shape by pressing [Q] on the white wool in your inventory and moving the cursor around, then test for yourself. 🙂

Try filling the one across and it won't crash. Try filling the one vertical and it will crash.

Cannot reproduce. In fact, your download doesn't place any blocks at all. I suspect that you have a feedback loop in your redstone circuitry.

Carl, you're able to reproduce it. The download link I provided does work. If you look directly behind you when you log in, you'll notice a black or white wool block there (I forgot which). You need to place the block you want to paint with there. Then to actually paint on the screen, you have to press [Q] on the wool item in your last hotbar slot. To reproduce the effect I was talking about, simply draw a slightly large vertical box, put your cursor in the middle, then turn around and click the button at the top. If your issue is that nothing is working at all, you need to either make sure command blocks are enabled or locate the start of the fill clock and replace the redstone block there with another redstone block.

This bug is false. I figured that out a long time ago but I'm not sure how to delete this post. 😛

Don't destroy tickets. Others might have the same thoughts too.

Again: Regardless if the was never a bug: Don't destroy tickets. Others might have the same thoughts too.

Shane Wolf

No User

(Unassigned)

Unconfirmed

Minecraft 1.8.2-pre1

Retrieved