-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13b6b62
commit 5c42b1c
Showing
15 changed files
with
65 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 1 addition & 40 deletions
41
shared/src/main/java/net/blay09/mods/excompressum/item/CompressedHammerItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,13 @@ | ||
package net.blay09.mods.excompressum.item; | ||
|
||
import net.blay09.mods.excompressum.ExCompressum; | ||
import net.blay09.mods.excompressum.registry.ExRegistries; | ||
import net.blay09.mods.excompressum.registry.ExNihilo; | ||
|
||
import net.blay09.mods.excompressum.utils.StupidUtils; | ||
import net.minecraft.tags.BlockTags; | ||
import net.minecraft.world.entity.player.Player; | ||
import net.minecraft.world.item.DiggerItem; | ||
import net.minecraft.world.item.Item; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.item.Tier; | ||
import net.minecraft.world.item.crafting.RecipeManager; | ||
import net.minecraft.world.level.Level; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
|
||
import java.util.HashSet; | ||
|
||
public class CompressedHammerItem extends DiggerItem implements ICompressedHammer { | ||
public class CompressedHammerItem extends DiggerItem { | ||
|
||
public CompressedHammerItem(Tier tier, Item.Properties properties) { | ||
super(6f, -3.2f, tier, ModTags.MINEABLE_WITH_HAMMER, properties); | ||
} | ||
|
||
@Override | ||
public boolean isCorrectToolForDrops(BlockState state) { | ||
RecipeManager recipeManager = ExCompressum.proxy.get().getRecipeManager(null); | ||
ItemStack itemStack = StupidUtils.getItemStackFromState(state); | ||
return ExRegistries.getCompressedHammerRegistry().isHammerable(recipeManager, itemStack) || ExNihilo.getInstance().isHammerable(state); | ||
} | ||
|
||
@Override | ||
public float getDestroySpeed(ItemStack stack, BlockState state) { | ||
RecipeManager recipeManager = ExCompressum.proxy.get().getRecipeManager(null); | ||
ItemStack itemStack = StupidUtils.getItemStackFromState(state); | ||
if ((ExRegistries.getCompressedHammerRegistry().isHammerable(recipeManager, itemStack) || ExNihilo.getInstance().isHammerable(state))) { | ||
return speed * 0.75f; | ||
} | ||
return 0.8f; | ||
} | ||
|
||
@Override | ||
public boolean canHammer(ItemStack itemStack, Level level, BlockState state, Player player) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public int getHammerLevel(ItemStack itemStack, Level level, BlockState state, Player player) { | ||
return getTier().getLevel(); | ||
} | ||
} |
11 changes: 0 additions & 11 deletions
11
shared/src/main/java/net/blay09/mods/excompressum/item/ICompressedCrook.java
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
shared/src/main/java/net/blay09/mods/excompressum/item/ICompressedHammer.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
shared/src/main/resources/data/excompressum/recipes/exnihilosequentia/crushed_andesite.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"type": "minecraft:crafting_shapeless", | ||
"result": { | ||
"item": "exnihilosequentia:crushed_andesite", | ||
"count": 9 | ||
}, | ||
"ingredients": [ | ||
{ | ||
"item": "excompressum:compressed_crushed_andesite" | ||
} | ||
], | ||
"conditions": [ | ||
{ | ||
"type": "forge:item_exists", | ||
"item": "exnihilosequentia:crushed_andesite" | ||
} | ||
] | ||
} |
18 changes: 18 additions & 0 deletions
18
shared/src/main/resources/data/excompressum/recipes/exnihilosequentia/crushed_diorite.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"type": "minecraft:crafting_shapeless", | ||
"result": { | ||
"item": "exnihilosequentia:crushed_diorite", | ||
"count": 9 | ||
}, | ||
"ingredients": [ | ||
{ | ||
"item": "excompressum:compressed_crushed_diorite" | ||
} | ||
], | ||
"conditions": [ | ||
{ | ||
"type": "forge:item_exists", | ||
"item": "exnihilosequentia:crushed_diorite" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
shared/src/main/resources/data/excompressum/recipes/exnihilosequentia/crushed_granite.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"type": "minecraft:crafting_shapeless", | ||
"result": { | ||
"item": "exnihilosequentia:crushed_granite", | ||
"count": 9 | ||
}, | ||
"ingredients": [ | ||
{ | ||
"item": "excompressum:compressed_crushed_granite" | ||
} | ||
], | ||
"conditions": [ | ||
{ | ||
"type": "forge:item_exists", | ||
"item": "exnihilosequentia:crushed_granite" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters