turtles can break blocks protected by rftools block protector [1.7.10]
Stekeblad opened this issue ยท 5 comments
A few days ago someone asked on the Computercraft forums about how to stop a turtle from mining into a base and break things and I suggested to test with RFtools.
Today I decided to test myself to make sure it worked and discovered that a block protected by a Block Protector can be destroyed by a mining turtle.
I asked this earlier today on rftools github and got the answer that: "As far as I know the fault is actually on ComputerCraft's side for not firing the appropriate BreakBlock event first"
This was tested on FTB Infinity Evolved 2.5.0
ComputerCraft has advanced to Minecraft 1.8.9; the final release for 1.7.10 is already out, so tests there may not get you any useful results.
That said, as of CC 1.74 (for MC 1.7.10) there's a "turtle permissions API" for the purpose of allowing other mods to control what turtles can and cannot do. The documentation is included in the mod archive.
This should be fixed by #222 i believe.
Never mind i was mistaken.
@Wojbie This is a separate issue with Turtles not firing BlockEvent.BreakEvent
. I've got a PR in the works which fixes this (and adds some other features), it just needs some polishing up.
I was just about to start work on one. Make sure it also fires the blockdrops event with the current held stack so turtles get the proper drops if another mod has special behavior (betterwithmods for example)
@KnightMiner I'm not sure when I'll get round to finishing the PR, so feel free to have a stab at it. If anyone else is interested - the places where events (probably) should be fired:
BlockEvent.BreakEvent
inTurtleDigCommand
(technically inComputerCraft.isBlockEditable
).PlayerInteractEvent
all over the place inTurtlePlaceCommand
AttackEntityEvent
inTurtleAttackCommand
BlockEvent.HarvestBlockEvent
inTurtleDigCommand
(see #100).
I don't know if there is some "move" event which can be fired when turtles move into a block. BlockEvent.PlaceEvent
would almost suffice, but isn't ideal.
There is also an argument for firing ItemTossEvent
on turtle.drop
, but I'm less sure about that.