You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using the Energy Turret, there is a function called exstendShaft() that gives the description of being able to extend 0 through 2, but when I input a value it only extends up to 0.5.
Is this on purpose and the desc function hasn't been updated?
Or am I just being dumb and missed something?
I have tried to install the movement upgrades but it doesn't seem to work.
I believe it should be able to move this high because setting the pitch with moveTo and in the wiki notes it says it can be set in the range -45 to 90 when assumedly fully extended.
In which environment did the Bug appear?
This appeared in my Singleplayer world
To Reproduce
Connect Energy Turret to Working OC Computer
type "lua" to get to the lua terminal
type "component.os_energyturret.powerOn()"
type "component.os_energyturret.extendShaft" to see desc of 0 through 2
type "component.os_energyturret.extendShaft(2)" (or any number larger than 0.5)
to see it only goes up to 0.5 in what it says in the return value.
Or type "component.os_energyturret.getShaftLength()" to see its only 0.5
Expected behavior
After typing "component.os_energyturret.extendShaft(2)", the rotary shaft of the turret should extend to 2, and by typing "component.os_energyturret.getShaftLength()" I should get 2.
This then gives the ability to set the turret pitch to the full range of -45 through 90
Minecraft:
OpenSecurity-1.12.2-1.0-83
1.12.2
Forge 14.23.5.2855
OptiFine_1.12.2_HD_U_F5, with no shaders
Additional context
I saw in OpenSecurity/src/main/java/pcl/opensecurity/common/tileentity/logic/EnergyTurret.java
that maxShaftLengthForOneBlock = 0.5f and getMaxAvailableShaftLength(float newExt) { newExt = Math.max(0, Math.min(newExt, 2)); return newExt <= maxShaftLengthForOneBlock /* && canExtendShaft() */ ? newExt : maxShaftLengthForOneBlock; }
which could be the cause or have something to do with it?
Tho for all I know I could be a complete dummy and there's a way to set shaft length to 2 and I am just doing it wrong xD, if so, then sorry on my part
The text was updated successfully, but these errors were encountered:
yea you are right, actually that code is limiting the shaft length to 0.5. There used to be a check if the above block is air, but this got somehow removed and i can't recall why that was done.
i can't give an ETA for a fix as the project currently doesn't have any regular active maintainer.
yea if you are familiar with minecraft code, there's a block event which gets called if the neighbour block gets changed, imho that check should be implemented before we make a official release that supports extending over a 2nd block.
Describe the bug
When using the Energy Turret, there is a function called exstendShaft() that gives the description of being able to extend 0 through 2, but when I input a value it only extends up to 0.5.
Is this on purpose and the desc function hasn't been updated?
Or am I just being dumb and missed something?
I have tried to install the movement upgrades but it doesn't seem to work.
I believe it should be able to move this high because setting the pitch with moveTo and in the wiki notes it says it can be set in the range -45 to 90 when assumedly fully extended.
In which environment did the Bug appear?
This appeared in my Singleplayer world
To Reproduce
Connect Energy Turret to Working OC Computer
type "lua" to get to the lua terminal
type "component.os_energyturret.powerOn()"
type "component.os_energyturret.extendShaft" to see desc of 0 through 2
type "component.os_energyturret.extendShaft(2)" (or any number larger than 0.5)
to see it only goes up to 0.5 in what it says in the return value.
Or type "component.os_energyturret.getShaftLength()" to see its only 0.5
Expected behavior
After typing "component.os_energyturret.extendShaft(2)", the rotary shaft of the turret should extend to 2, and by typing "component.os_energyturret.getShaftLength()" I should get 2.
This then gives the ability to set the turret pitch to the full range of -45 through 90
Minecraft:
Additional context
I saw in
OpenSecurity/src/main/java/pcl/opensecurity/common/tileentity/logic/EnergyTurret.java
that
maxShaftLengthForOneBlock = 0.5f
andgetMaxAvailableShaftLength(float newExt) { newExt = Math.max(0, Math.min(newExt, 2)); return newExt <= maxShaftLengthForOneBlock /* && canExtendShaft() */ ? newExt : maxShaftLengthForOneBlock; }
which could be the cause or have something to do with it?
Tho for all I know I could be a complete dummy and there's a way to set shaft length to 2 and I am just doing it wrong xD, if so, then sorry on my part
The text was updated successfully, but these errors were encountered: