Skip to content

Commit

Permalink
fixed small ore drops when the material has no gems or crushed but ha…
Browse files Browse the repository at this point in the history
…s dust
  • Loading branch information
Trinsdar committed Nov 29, 2023
1 parent 43a2d6a commit 2057f5d
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@
import java.util.Map;
import java.util.function.Function;

import static muramasa.antimatter.data.AntimatterMaterialTypes.ORE;
import static muramasa.antimatter.data.AntimatterMaterialTypes.ORE_SMALL;
import static muramasa.antimatter.data.AntimatterMaterialTypes.*;

public class AntimatterBlockLootProvider extends BlockLoot implements DataProvider, IAntimatterProvider {
protected final String providerDomain, providerName;
Expand Down Expand Up @@ -160,7 +159,12 @@ protected void addToFortune(BlockOre block) {

public static Function<Block, LootTable.Builder> addToFortuneWithoutCustomDrops(BlockOre block) {
if (block.getOreType() == ORE_SMALL) {
if (!block.getMaterial().has(AntimatterMaterialTypes.GEM) && !(block.getMaterial().has(AntimatterMaterialTypes.CRUSHED))) return BlockLoot::createSingleItemTable;
if (!block.getMaterial().has(AntimatterMaterialTypes.GEM) && !(block.getMaterial().has(AntimatterMaterialTypes.CRUSHED))) {
if (block.getMaterial().has(DUST)){
return b -> BlockLoot.createSingleItemTable(DUST.get(block.getMaterial()));
}
return BlockLoot::createSingleItemTable;
}
Item item = block.getMaterial().has(AntimatterMaterialTypes.GEM) ? AntimatterMaterialTypes.GEM.get(block.getMaterial()) : null;
int multiplier = MaterialTags.ORE_MULTI.getInt(block.getMaterial());
LootPool.Builder builder;
Expand Down

0 comments on commit 2057f5d

Please sign in to comment.