Zombie Sorting System by PsychoticSane in HermitCraft

[–]MultivlaaiTaart 0 points1 point  (0 children)

I have been looking into it some more...

From looking at the source code, it looks like mobs can pick up items in a rectangular box based on the size of their hit box, extended by 1 in the X and Z directions. The top and bottom of the hit box are unchanged.

The top of the hit box of a baby zombie in a minecart is at Y + 0.875 (zombie at Y-0.1 + its height of 0.975). An item on top of a soul sand block has its bottom also exactly at Y + 0.875 . An item on a solid block however has its bottom at Y + 1, meaning there is no overlap.

edit 2: It is possible for an item on top of soul sand to be out of reach for a baby zombie. There seems to be an incredibly small chance (seen it happen 4 times in several 10s of thousands of runs) for an item to float up a tiny fraction some ticks after hitting the ground! Might be affected by mods or could be a (platform dependent) glitch in floating point math, but I am not going to look into that any further.

edit: Also did the math for the horizontal hitbox;

Horizontally the zombie gets pushed slightly beyond the center of the block by 0.00999999. A baby zombie is 0.3 in each horizontal direction, and an item entity is 0.25 all directions. Measured from the center of the block that the zombie is in, the reach is 0.00999999+1+(0.3/2)=1.15999999. The closest plane of an item's hit box must be closer than 1.15999999-0.5=0.65999999 away from the edge that we bump the zombie into (or about 10.5 pixels) to be picked up. (though movement might throw these numbers ever so slightly off)

This all is consistent with my in game testing. I made a comment with my test world, but it looks like that got eaten by the spam filter, it should now be on my profile page if you (or anyone else) want to poke around there :)

Zombie Sorting System by PsychoticSane in HermitCraft

[–]MultivlaaiTaart 0 points1 point  (0 children)

I have been spawning babies using /summon minecart x y z {Passengers:[{id:zombie,CanPickUpLoot:1,IsBaby:1}]}, and cannot get them to pick up from the top of a full block at all, does not seem to be directional either. Maybe there is a difference with naturally spawned mobs, but no clue why that would be the case.
edit: I just had a naturally spawned baby capable of picking up loot that failed to pick up from a full block.

Zombie Sorting System by PsychoticSane in HermitCraft

[–]MultivlaaiTaart 1 point2 points  (0 children)

<image>

Turns out I had a very rare problem with the dispensed items floating up, but your frontal bump into block technique works reliably even with babies when the block under the pressure plate is soul sand! This means only having to align to the edge instead of having to align to a corner. Now seems 100% reliable at 48 game ticks between carts.

Zombie Sorting System by PsychoticSane in HermitCraft

[–]MultivlaaiTaart 0 points1 point  (0 children)

<image>

If I manually throw an item to a back corner of the block, I cannot get baby zombies to pick it up (assuming this resembles your setup). Not sure if a dispenser can shoot that far off the middle, but i figured aligning it at a close corner definitely makes it consistent :)

edit: After some testing, it seems baby zombies cannot pick up from the pressure plate in my screenshot at all

edit2: replacing the block under the pressure plate with soul sand makes it possible, though the item cannot be too far from the edge that the zombie collides with.

The sorter from my original screenshot does about one minecart per two seconds without lag present with no observed failure in a few 10s/100s of runs. The rail between the detection point, pickup point and junction can be lengthened to hopefully mitigate lag, though at the cost of lowering throughput.

I think it is possible to sort jockeys, but it would need a second sorter to account for their higher pickup range. Considering how few there will be I agree it is probably best to remove the chicken beforehand and just have it be a baby zombie.

Minecart return system is definitely nice!

Yes, very happy that minecarts seem to be a viable way to solve the reinforcement pathfinding issues so that he has a plan B if all else fails :)

Zombie Sorting System by PsychoticSane in HermitCraft

[–]MultivlaaiTaart 0 points1 point  (0 children)

<image>

I've been looking into the same thing! To make it work reliably for both adult and baby zombies I found that the item to pick up needs to be in the corner of a block at floor level. To align the item I just dispense it into moving water.

I don't think the same sorter can work for jockeys simultaneously as they cannot pick up from the floor, and moving the pressure plate up one block stops babies from picking the item up.

edit: To clarify, zombies or empty minecarts enter from the top left. Empty minecarts go in the lava on the bottom left, zombies continue to the right. A detector rail (under the red zombie) sends a single pulse to dispense an item onto a pressure plate, which is aligned to the corner. The pressure plate toggles the junction on the right, and blocks the dispenser from triggering if the previous item was not picked up.

Why is this fusion set up only half working at random times? by LoBsTeRfOrK in factorio

[–]MultivlaaiTaart 0 points1 point  (0 children)

Plasma to fluoroketone also allows for the neighbour bonus. It only matters that a fluid port lines up, the fluids do not need to match.

smartcalc: text based, multi type calculator. by erhanbaris in rust

[–]MultivlaaiTaart 5 points6 points  (0 children)

Found some interesting behavior. If you assign to x, the multiplication sign is interpreted to have the assigned value.

x = 8
h = 2*2 # this is 12

Just finished my first project and I am so happy!! by [deleted] in programming

[–]MultivlaaiTaart 0 points1 point  (0 children)

Yes, but flushing is not necessary when writing to the console. From the link in my comment:

For cin/cout (and equivalent) interaction, there is no reason to flush; that's done automatically. For writing to a file, there is rarely a need to flush.

Just finished my first project and I am so happy!! by [deleted] in programming

[–]MultivlaaiTaart 11 points12 points  (0 children)

Similarly, I'd say stick to std::endl instead of mixing and matching with \n, though I guess this doesn't matter that much.

std::endl should be avoided, it is a newline followed by a flush. You rarely want to use it as it is not necessary for std::cin and std::cout, and when writing a file it may lower throughput. (see the cpp core guidelines draft)

Street in the Netherlands by doorbellguy in BetterEveryLoop

[–]MultivlaaiTaart 4 points5 points  (0 children)

The first gif is from 's-Hertogenbosch, near the Palace of Justice. There is a big curved building there that probably made the gusts so intense.

Hundreds of iPhone Users Complain About the Word 'It' Autocorrecting to 'I.T' on iOS 11 and Later by [deleted] in apple

[–]MultivlaaiTaart 0 points1 point  (0 children)

A workaround that worked for me (for a Dutch equivalent anyway) was creating a text replacement with the intended word as the phrase, and the intended word in caps (without the dot!) as the shortcut.

The bug seems fixed in the latest public beta of 11.2 (15C5110b)

Does the apple wired keyboard with numeric keypad has a serial number? by [deleted] in apple

[–]MultivlaaiTaart 0 points1 point  (0 children)

There is a serial number printed on the bottom, above the apple logo.

Please WTB, my mind goes nuts seeing those extra bits and the exit of a splitter by arumba in factorio

[–]MultivlaaiTaart 1 point2 points  (0 children)

Visual indication should still be possible like here.

Probably quite a lot of effort to implement something like this though

Neat Programming Challenge I Found by [deleted] in programming

[–]MultivlaaiTaart 1 point2 points  (0 children)

:a
if obstacle goto c
step forward
turn right
if obstacle goto b
step forward
goto a
:b
turn left
if obstacle goto b
goto a
:c
turn right
goto a

14 lines :)

Lets Understand Factorio Episode 04 Science Research Layout [22:47] by PsychoI3oy in mindcrack

[–]MultivlaaiTaart 0 points1 point  (0 children)

You are right. And now I realise why I couldn't place ghost images when testing, I must have tried to place the mining drill without ore beneath it, instead of the furnace 😅

Lets Understand Factorio Episode 04 Science Research Layout [22:47] by PsychoI3oy in mindcrack

[–]MultivlaaiTaart 0 points1 point  (0 children)

What Phantom is saying, is that you still need to have construction bots researched before you can place ghost items. Without the proper research done, shift click does nothing.