Merge pull request #478 from Meowlala/1.19-multiloader

Config option for picking unbreakable blocks in Survival
This commit is contained in:
Tschipp 2023-04-24 13:54:31 +02:00 committed by GitHub
commit f330646b9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -78,7 +78,7 @@ public class PickupHandler {
if(!ListHandler.isPermitted(state.getBlock()))
return false;
if(state.getDestroySpeed(level, pos) == -1 && !player.isCreative())
if(state.getDestroySpeed(level, pos) == -1 && !player.isCreative() && !Constants.COMMON_CONFIG.settings.pickupUnbreakableBlocks)
return false;
if(blockEntity == null && !Constants.COMMON_CONFIG.settings.pickupAllBlocks)

View File

@ -165,6 +165,12 @@ public class CarryConfig {
description = "Whether Players can be picked up. Creative players can't be picked up in Survival Mode"
)
public boolean pickupPlayers = true;
@Property(
type = PropertyType.BOOLEAN,
description = "Whether players in Survival Mode can pick up unbreakable blocks. Creative players always can."
)
public boolean pickupUnbreakableBlocks = false;
}
@Property(