Merge pull request #7 from quiqueck/main

Minor fixes
This commit is contained in:
paulevsGitch 2021-07-07 20:57:43 +03:00 committed by GitHub
commit c8dd63136c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -65,7 +65,7 @@ def useApi(String dep) {
processResources { processResources {
inputs.property "version", project.version inputs.property "version", project.version
duplicatesStrategy = 'EXCLUDE' duplicatesStrategy = 'WARN'
from(sourceSets.main.resources.srcDirs) { from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json" include "fabric.mod.json"

View file

@ -34,7 +34,9 @@ public class BaseAnvilItem extends BlockItem implements ItemModelProvider {
BlockState blockState = super.getPlacementState(blockPlaceContext); BlockState blockState = super.getPlacementState(blockPlaceContext);
ItemStack stack = blockPlaceContext.getItemInHand(); ItemStack stack = blockPlaceContext.getItemInHand();
int destruction = stack.getOrCreateTag().getInt(DESTRUCTION); int destruction = stack.getOrCreateTag().getInt(DESTRUCTION);
blockState = blockState.setValue(BaseAnvilBlock.DESTRUCTION, destruction); if (blockState != null) {
blockState = blockState.setValue(BaseAnvilBlock.DESTRUCTION, destruction);
}
return blockState; return blockState;
} }