mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 23:47:38 +01:00
Guard against chunk protections
This commit is contained in:
parent
d66170c8fe
commit
e9a17eb2f8
2 changed files with 6 additions and 1 deletions
|
@ -206,6 +206,10 @@ dependencies {
|
||||||
// runtimeOnly fg.deobf("maven.modrinth:spark:1.10.38-forge")
|
// runtimeOnly fg.deobf("maven.modrinth:spark:1.10.38-forge")
|
||||||
//runtimeOnly fg.deobf("curse.maven:forbidden-arcanus-309858:4729924")
|
//runtimeOnly fg.deobf("curse.maven:forbidden-arcanus-309858:4729924")
|
||||||
//runtimeOnly fg.deobf("curse.maven:valhelsia-core-416935:3886212")
|
//runtimeOnly fg.deobf("curse.maven:valhelsia-core-416935:3886212")
|
||||||
|
// implementation fg.deobf("curse.maven:ftb-chunks-forge-314906:4494633")
|
||||||
|
// implementation fg.deobf("curse.maven:architectury-api-419699:4521465")
|
||||||
|
// implementation fg.deobf("curse.maven:ftb-library-forge-404465:4396792")
|
||||||
|
// implementation fg.deobf("curse.maven:ftb-teams-forge-404468:4579981")
|
||||||
|
|
||||||
// https://discord.com/channels/313125603924639766/725850371834118214/910619168821354497
|
// https://discord.com/channels/313125603924639766/725850371834118214/910619168821354497
|
||||||
// Prevent Mixin annotation processor from getting into IntelliJ's annotation processor settings
|
// Prevent Mixin annotation processor from getting into IntelliJ's annotation processor settings
|
||||||
|
|
|
@ -55,13 +55,14 @@ public interface IWrenchable {
|
||||||
BlockPos pos = context.getClickedPos();
|
BlockPos pos = context.getClickedPos();
|
||||||
Player player = context.getPlayer();
|
Player player = context.getPlayer();
|
||||||
if (world instanceof ServerLevel) {
|
if (world instanceof ServerLevel) {
|
||||||
|
if (!world.destroyBlock(pos, false))
|
||||||
|
return InteractionResult.PASS;
|
||||||
if (player != null && !player.isCreative())
|
if (player != null && !player.isCreative())
|
||||||
Block.getDrops(state, (ServerLevel) world, pos, world.getBlockEntity(pos), player, context.getItemInHand())
|
Block.getDrops(state, (ServerLevel) world, pos, world.getBlockEntity(pos), player, context.getItemInHand())
|
||||||
.forEach(itemStack -> {
|
.forEach(itemStack -> {
|
||||||
player.getInventory().placeItemBackInInventory(itemStack);
|
player.getInventory().placeItemBackInInventory(itemStack);
|
||||||
});
|
});
|
||||||
state.spawnAfterBreak((ServerLevel) world, pos, ItemStack.EMPTY);
|
state.spawnAfterBreak((ServerLevel) world, pos, ItemStack.EMPTY);
|
||||||
world.destroyBlock(pos, false);
|
|
||||||
playRemoveSound(world, pos);
|
playRemoveSound(world, pos);
|
||||||
}
|
}
|
||||||
return InteractionResult.SUCCESS;
|
return InteractionResult.SUCCESS;
|
||||||
|
|
Loading…
Reference in a new issue