Povstalec / StargateJourney

A repository for the Stargate Journey Minecraft Mod
39 stars 16 forks source link

Create mod Weighted Ejector cannot teleport items through stargate #19

Open slava110 opened 9 months ago

slava110 commented 9 months ago

Weighted Ejector is a block that launches items to the air. However, for some reason, launched items don't teleport when going through event horizon of Stargate. They just ignore it

Povstalec commented 9 months ago

Not sure how exactly the Ejector works, but I assume the reason for that is that it's just an animation and there are no physical item entities involved, in which case, there would be nothing I can do.

Though, if you don't mind, would you confirm/deny my hypothesis by turning on hitboxes (F3 + B) in-game and checking if the items being launched have hitboxes? (I would normally check myself, but I barely know anything about Create so just setting up the necessary machinery would be hard)

slava110 commented 9 months ago

Yeah, they don't have hitboxes... Welp, I guess it'd be hard to fix then with mixins and stuff (searching where to inject, etc.)

Povstalec commented 9 months ago

Yup, fixing that will require directly making the Stargate into some kind of Create component I suppose, which I don't know how hard that is. We'll see...

slava110 commented 9 months ago

Nope, I think you'd need to mixin somewhere around here: https://github.com/Creators-of-Create/Create/blob/da9f15cbdf4be8468f585f1f30b364d8cc4a652c/src/main/java/com/simibubi/create/content/logistics/depot/EjectorBlockEntity.java#L355 Virtual item is doing raycasting to check for obstacles so you need to actually be an obstacle for it. Or you need to mixin into method above it to perform actual teleportation before or after any check for obstacles. Still, minor thing