Mekanism

Mekanism

111M Downloads

[Request] Teleporter portals in variable sizes

pflonk opened this issue ยท 2 comments

commented

Hey there,

I don't like mobs. They are evil. I want to kill them. With style. :D
That's why I've been experimenting with a mobgrinder that teleports mobs to their death. This works fine for any 1x2 blocks sized mobs. But those pesky spiders bung the teleporter gate because they are too FAT :D
I would really like the teleporter-gates being able to be built in various sizes, such as 2x2 or even 2x3.
If you have too much time, it'd be very nice to implement gates horizontally, so i can drop them into gates (maybe even with the kinetic energy they posess when entering the gate, transferred when exiting on some teleporter plattform. Mobthrowing could really become a new leisure activity of mine :D)
If you don't have too much time, the various sized portal frames would be much appreciated :)

Kind regards
pflonk

commented

Well, I really have no clue of java and the minecraft API, but I have been browsing the sourcecode, which is - due to open source - possible, thanks for that! :D
For my understanding it is necessary to expand the definition of the "hasFrame" boolean in the "TileEntityTeleporter.java", what seems to be just a diligent piece of work, where I am - even without knowledge of the API - able to help with. So this would be that for a 3x2 portal frame (with 5x4 outter frame for symetry) for north/south and east/west orientation:

`
if(
isFrame(getPos().getX()-1, getPos().getY(), getPos().getZ()) &&
isFrame(getPos().getX()-2, getPos().getY(), getPos().getZ()) &&
isFrame(getPos().getX()+1, getPos().getY(), getPos().getZ()) &&
isFrame(getPos().getX()+2, getPos().getY(), getPos().getZ()) &&
isFrame(getPos().getX()-2, getPos().getY()+1, getPos().getZ()) &&
isFrame(getPos().getX()-2, getPos().getY()+2, getPos().getZ()) &&
isFrame(getPos().getX()-2, getPos().getY()+3, getPos().getZ()) &&
isFrame(getPos().getX()-1, getPos().getY()+3, getPos().getZ()) &&
isFrame(getPos().getX() , getPos().getY()+3, getPos().getZ()) &&
isFrame(getPos().getX()+1, getPos().getY()+3, getPos().getZ()) &&
isFrame(getPos().getX()+2, getPos().getY()+3, getPos().getZ()) &&
isFrame(getPos().getX()+2, getPos().getY()+2, getPos().getZ()) &&
isFrame(getPos().getX()+2, getPos().getY()+1, getPos().getZ())
) {return:true;}

if(
isFrame(getPos().getX(), getPos().getY(), getPos().getZ()+1) &&
isFrame(getPos().getX(), getPos().getY(), getPos().getZ()+2) &&
isFrame(getPos().getX(), getPos().getY(), getPos().getZ()-1) &&
isFrame(getPos().getX(), getPos().getY(), getPos().getZ()-2) &&
isFrame(getPos().getX(), getPos().getY+1(), getPos().getZ()+2) &&
isFrame(getPos().getX(), getPos().getY+2(), getPos().getZ()+2) &&
isFrame(getPos().getX(), getPos().getY+3(), getPos().getZ()+2) &&
isFrame(getPos().getX(), getPos().getY+3(), getPos().getZ()+1) &&
isFrame(getPos().getX(), getPos().getY+3(), getPos().getZ()) &&
isFrame(getPos().getX(), getPos().getY+3(), getPos().getZ()-1) &&
isFrame(getPos().getX(), getPos().getY+3(), getPos().getZ()-2) &&
isFrame(getPos().getX(), getPos().getY+2(), getPos().getZ()-2) &&
isFrame(getPos().getX(), getPos().getY+1(), getPos().getZ()-2) &&
) {return:true;}
`

I seem not to be able to put that code into code-tags... -__-
I tried! :D

I have not yet understood where in the code the purple and visible portal frames are going to be spawned and how the actual teleporter mechanism works, but I hope anyway I made it easier to implement my request. (If you approve it)

Kind regards
pflonk

commented

I'd rather find a more dynamic solution to this. I need to focus on bugs right now but know this isn't off my agenda :)