Piston Body from Piston Head #3885
Labels
status: needs triage
This label is automatically applied to new issues and pull requests to indicate they require triage
type: feature request
A feature request
Is this request specific to one implementation of Sponge?
No
Sponge Version
1.16.5-8.1.0-RC1357
What are you requesting?
Currently Sponge's
org.spongepowered.api.block.entity.Piston
can be either a piston head, piston body or sticky piston body. If thePiston
is the head then I would love to be able to access theBlockState
of the piston.Looking at the fields, there is a field known as
blockState
which fufils this so should be a easy scenario of exporting this.Code example
The problem with the current block()?
Currently there is already a method of
Piston#block()
provides themovingState
rather then the body of the piston.This is fine for what im doing until the piston retracts, where the block taking over the head position. so this
block()
returns that block ... which means i cant get piston data.Whats wrong with the current blockstate()?
Currently there is a method of
Piston.blockstate()
which returns a Mutable where you should be able toget()
However
This happens
And personally I haven't looked at if this block state is what im after
Why not Piston#get?
This seems to get the data of the movingStore rather then the BlockState
The text was updated successfully, but these errors were encountered: