Draconic Evolution

Draconic Evolution

77M Downloads

[1.10.2] DislocatorAdvanced can't teleport entites to a different dimension

flobernd opened this issue ยท 1 comments

commented

It just shows the message "You need a more powerfull dislocator".

I traced down the problem to the onLeftClickEntity method of the DislocatorAdvanced class, Line 53. It should be
if (entity instanceof EntityPlayer && !(this instanceof DislocatorAdvanced)) {
instead of just
if (entity instanceof EntityPlayer) {.

I'm not into minecraft plugin development, but in my opinion DislocatorAdvanced should not even re-implement and override the onLeftClickEntity event, because all the code is already present in the Dislocator base-class.
The only piece missing is:

stack.damageItem(1, player);
if (stack.stackSize <= 0) {
    player.inventory.deleteStack(stack);
}

Just implement that block in the Dislocator class with a proper instanceof check, delete the onLeftClickEntity in DislocatorAdvanced and it should work like intended.

commented

This has already been fixed in dev and will be in the next release.
I wouldn't look too deep into the advance dislocator code if i was you because its pretty much just copied directly from my 1.7 code which is a complete mess. The item classes are not too bad but if you look at the packet and gui classes for the advanced dislocator you head may explode.... I am going to re write it at some point but for now it works.