-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement shulker boxes #956
base: master
Are you sure you want to change the base?
Conversation
Implemented inventory Implemented sounds Implemented opening/closing animations
Hope it doesn't break anything else
@@ -254,7 +254,7 @@ func (s *Session) invByID(id int32, tx *world.Tx) (*inventory.Inventory, bool) { | |||
return nil, false | |||
} | |||
switch id { | |||
case protocol.ContainerLevelEntity: | |||
case protocol.ContainerLevelEntity, protocol.ContainerShulkerBox: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should validate that the shulker box actually exists, as is the case with other container block inventories.
|
||
// ShulkerBox is a dye-able block that stores items. Unlike other blocks, it keeps its contents when broken. | ||
type ShulkerBox struct { | ||
solid // TODO: I don't think it should be solid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Transparent & water loggable
|
||
// BreakInfo ... | ||
func (s ShulkerBox) BreakInfo() BreakInfo { | ||
return newBreakInfo(2, alwaysHarvestable, pickaxeEffective, oneOf(s)).withBlastResistance(10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return newBreakInfo(2, alwaysHarvestable, pickaxeEffective, oneOf(s)).withBlastResistance(10) | |
return newBreakInfo(2, alwaysHarvestable, pickaxeEffective, oneOf(s)) |
Not needed if blast resistance = hardness * 5
@@ -0,0 +1,205 @@ | |||
package block | |||
|
|||
// ShulkerBoxType represents a type of shulker box. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if we could avoid this. Candles & bundles will also have a no color option.
This PR aims to fully implement shulker boxes.
Only one thing needs to be addressed: