Make powerups claim-then-use, fix right-click, disable player collision
- Merge missing config.yml keys from the bundled defaults into an existing file on load, so upgrading over an old config no longer silently drops newer sections (this is what caused powerups to never spawn). - Claiming a powerup now gives an inventory item instead of applying its effect instantly; right-click the item later to activate it. - Switch the held item's material off placeable blocks (TORCH/END_ROD) to non-block items (SUGAR/FEATHER, configurable) - block items only fire a right-click event when aimed at a block, which made the powerup unusable unless the player was looking at the floor. - Disable player collision by default (gameplay.disable-player-collision) so participants stop shoving each other around on a shrinking floor. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
cbef1d7a88
commit
039cfab92d
@@ -108,6 +108,15 @@ public class PowerupManager {
|
||||
return configManager.getPowerupMarkerMaterial(type == PowerupType.SUPER_SPEED ? "super-speed" : "air-blast");
|
||||
}
|
||||
|
||||
/** The material a claimed powerup uses as its held/inventory item - see
|
||||
* {@link us.tss3.blockparty.config.ConfigManager#getPowerupItemMaterial} for why this is
|
||||
* intentionally not the same as the floor marker material. */
|
||||
public Material itemMaterial(PowerupType type) {
|
||||
return type == PowerupType.SUPER_SPEED
|
||||
? configManager.getPowerupItemMaterial("super-speed", Material.SUGAR)
|
||||
: configManager.getPowerupItemMaterial("air-blast", Material.FEATHER);
|
||||
}
|
||||
|
||||
private void placeMarkerBlock(World world, String key, Material material) {
|
||||
Block block = blockAt(world, key);
|
||||
if (block != null && block.getType() != material) {
|
||||
|
||||
Reference in New Issue
Block a user