Jump to content




[1.53] [SMP/SSP] Turtle "Mines" Entities


  • You cannot reply to this topic
8 replies to this topic

#1 civilwargeeky

  • Members
  • 393 posts

Posted 13 June 2013 - 05:02 PM

Version Info:
Minecraft 1.5.2
Forge 715
CC 1.53

Description of Problem:
Recently, I have had people complain of my quarry program encountering bedrock when there was none there (on somewhat laggy servers), and so I went into an SSP world to test different things. My mining function works like this (basically):
while not turtle.forward() do
  count = count + 1
  if turtle.dig() then
	 mined = mined + 1
  else
	turtle.attack()
  end
  if count > 20 then
	foundBedrock()
  end
end
I know its not exactly the best solution for bedrock, but it gets the job done, usually. Now the bug comes when it cannot go forward because of an entity (like a sheep or a player). When it tries to mine the sheep, brown particles pop up and turtle.dig() returns true. It does this 20 times and says it found bedrock.
If I'm not mistaken, turtle.dig is not supposed to mine entities, only blocks.
http://imgur.com/a/aY6V4

So, when it mines an entity:
Expected Outcome:
Turtle returns false, as there is no block to mine.
Actual Outcome:
Turtle "mines" entity, and returns true.

#2 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 14 June 2013 - 10:33 AM

turtle.dig() will 'attack' an entity if it's in front of it, and in range. It's been like that for a while, since being able to use swords.

#3 civilwargeeky

  • Members
  • 393 posts

Posted 14 June 2013 - 12:38 PM

View PostCranium, on 14 June 2013 - 10:33 AM, said:

turtle.dig() will 'attack' an entity if it's in front of it, and in range. It's been like that for a while, since being able to use swords.
Attacks? Do you mean like "actually tries to hurt"? Because it just makes a block breaking sound, shoots brown particles like it mined a block, and returns true, without causing any harm to the entity in front of it.

#4 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 14 June 2013 - 03:42 PM

turtle.attack attacks entities.

#5 civilwargeeky

  • Members
  • 393 posts

Posted 15 June 2013 - 02:19 PM

View Postimmibis, on 14 June 2013 - 03:42 PM, said:

turtle.attack attacks entities.
I know that, but you see, turtle.dig apparently attempts to "attack" entities. This "attack" does not do damage, or cause knockback. It just emits brown particles and returns true for the dig function. I cannot see any reason for this to be intended, as it only introduces inaccuracies in mining programs, which is why I posted this problem in bugs. If this behavior is intended (for whatever reason), I would like to know.

#6 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 15 June 2013 - 05:42 PM

This is incorrect. It does not try to dig entities at all - I have just tested this. No particles, no anything.

#7 civilwargeeky

  • Members
  • 393 posts

Posted 16 June 2013 - 05:58 PM

View PostCloudy, on 15 June 2013 - 05:42 PM, said:

This is incorrect. It does not try to dig entities at all - I have just tested this. No particles, no anything.
I can assure you that it does indeed. I have made a video to describe my situation.

(If you cannot see it, it will be ready within the hour)

#8 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 16 June 2013 - 07:36 PM

Ok, I have reproduced this. We do not check if the block is an air block before digging. Railcraft drops invisible blocks round players to be used for the goggles which can show where players have been.

For now, you can disable the Railcraft hidden blocks in the config. I'll fix this for the next CC version (when I get the dev environment set up on this laptop, after court tomorrow)!

#9 civilwargeeky

  • Members
  • 393 posts

Posted 16 June 2013 - 08:12 PM

Ok. Thank you very much. Good luck in the case :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users