kyrptonaught / customportalapi

Developer Api for creating custom portals to any dimension
MIT License
63 stars 22 forks source link

Portals spawned via /setblock don't work #18

Closed Jack-Papel closed 3 years ago

Jack-Papel commented 3 years ago

For example, in the aether mod, on beta28, /setblock ~ ~ ~ the_aether:blue_portal doesn't work how it should. Reviewing the code, it isn't an error with the aether. When using setblock, CustomPortalBlock:getPortalBase() loops forever (Although this is fixed in #17.) After this fix however, the portal will still not teleport you, and the swirl will be the wrong color.

This could be fixed by making getPortalBase() non-static, so that classes which extend CustomPortalBlock can override and return a custom value (For example, for the aether, Blocks.GLOWSTONE). Alternatively, you could store the portal base / dimension in the class as a variable. However both these ideas are somewhat flawed in their current state, and there is likely a better solution out there.

kyrptonaught commented 3 years ago

I've made it non-static, I'll go ahead and test it with the aether to see if that helps

kyrptonaught commented 3 years ago

It did seem to work fine in the aether. https://github.com/devs-immortal/The-Aether/pull/191

Jack-Papel commented 3 years ago

Great to hear!