1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Updated Ore Crusher Recipes

This commit is contained in:
TheBusyBiscuit 2020-01-05 21:49:21 +01:00
parent 9ff093affa
commit ff6f160138
3 changed files with 25 additions and 14 deletions

View File

@ -41,6 +41,8 @@ https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#4
* Added Kelp Cookies
* Added support for multiple recipes on vanilla items
* Added a "Craft last" button to the Automated Crafting Chamber
* Added more ore-doubling Recipes to the Ore Crusher
* Added more dust recipes to the Ore Crusher
### Changes
* Revamped Guide Settings menu
@ -89,6 +91,7 @@ https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#4
* Fixed #1349
* Fixed #1332
* Fixed #1356 and maybe other concurrency issues
* Fixed Ore Crusher's missing recipes
## Release Candidate 3 (21 Nov 2019)
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#3

View File

@ -79,7 +79,7 @@ public class SlimefunMachine extends SlimefunItem implements RecipeDisplayItem {
for (ItemStack recipeItem : shownRecipes) {
SlimefunItem item = SlimefunItem.getByItem(recipeItem);
if (item == null || !SlimefunItem.isDisabled(recipeItem)) {
if (item == null || !item.isDisabled()) {
this.recipes.add(new ItemStack[] {recipeItem});
}
}

View File

@ -29,31 +29,39 @@ public class OreCrusher extends MultiBlockMachine {
"ORE_CRUSHER",
new ItemStack[] {null, null, null, null, new ItemStack(Material.NETHER_BRICK_FENCE), null, new ItemStack(Material.IRON_BARS), new CustomItem(Material.DISPENSER, "Dispenser (Facing up)"), new ItemStack(Material.IRON_BARS)},
new ItemStack[] {
new ItemStack(Material.IRON_ORE), new CustomItem(SlimefunItems.IRON_DUST, (boolean) Slimefun.getItemValue("ORE_CRUSHER", "double-ores") ? 2: 1),
new ItemStack(Material.GOLD_ORE), new CustomItem(SlimefunItems.GOLD_DUST, (boolean) Slimefun.getItemValue("ORE_CRUSHER", "double-ores") ? 2: 1),
new ItemStack(Material.NETHERRACK, 16), SlimefunItems.SULFATE,
SlimefunItems.SIFTED_ORE, SlimefunItems.CRUSHED_ORE,
SlimefunItems.CRUSHED_ORE, SlimefunItems.PULVERIZED_ORE,
SlimefunItems.PURE_ORE_CLUSTER, SlimefunItems.TINY_URANIUM,
new ItemStack(Material.COAL_ORE), new ItemStack(Material.COAL, isDoubleDropsEnabled() ? 2: 1),
new ItemStack(Material.LAPIS_ORE), new ItemStack(Material.LAPIS_LAZULI, isDoubleDropsEnabled() ? 14: 7),
new ItemStack(Material.REDSTONE_ORE), new ItemStack(Material.REDSTONE, isDoubleDropsEnabled() ? 8: 4),
new ItemStack(Material.DIAMOND_ORE), new ItemStack(Material.DIAMOND, isDoubleDropsEnabled() ? 2: 1),
new ItemStack(Material.EMERALD_ORE), new ItemStack(Material.EMERALD, isDoubleDropsEnabled() ? 2: 1),
new ItemStack(Material.COBBLESTONE, 8), new ItemStack(Material.SAND, 1),
new ItemStack(Material.GOLD_INGOT), SlimefunItems.GOLD_DUST,
SlimefunItems.GOLD_4K, SlimefunItems.GOLD_DUST,
new ItemStack(Material.GRAVEL), new ItemStack(Material.SAND)
new ItemStack(Material.GRAVEL), new ItemStack(Material.SAND),
new ItemStack(Material.IRON_INGOT), SlimefunItems.IRON_DUST,
new ItemStack(Material.GOLD_INGOT), SlimefunItems.GOLD_DUST,
SlimefunItems.ALUMINUM_INGOT, SlimefunItems.ALUMINUM_DUST,
SlimefunItems.COPPER_INGOT, SlimefunItems.COPPER_DUST,
SlimefunItems.LEAD_INGOT, SlimefunItems.LEAD_DUST,
SlimefunItems.MAGNESIUM_INGOT, SlimefunItems.MAGNESIUM_DUST,
SlimefunItems.SILVER_INGOT, SlimefunItems.SILVER_DUST,
SlimefunItems.TIN_INGOT, SlimefunItems.TIN_DUST,
SlimefunItems.ZINC_INGOT, SlimefunItems.ZINC_DUST
},
BlockFace.SELF
);
}
private static boolean isDoubleDropsEnabled() {
return (boolean) Slimefun.getItemValue("ORE_CRUSHER", "double-ores");
}
@Override
public List<ItemStack> getDisplayRecipes() {
return recipes.stream().map(items -> items[0]).collect(Collectors.toList());
}
@Override
public void install() {
// Do nothing to prevent double-registration of recipes
}
@Override
public void onInteract(Player p, Block b) {
Block dispBlock = b.getRelative(BlockFace.DOWN);