From 49a145af5a1b593606d444a089074b496525997b Mon Sep 17 00:00:00 2001 From: nimsolated Date: Tue, 3 Mar 2026 09:07:03 -0800 Subject: [PATCH] update: version 1.3.1 --- elements/BrokenGlassRecipe2.mod.json | 48 +++ elements/OreMinerMineButtonPressed.mod.json | 2 +- nims_random_bullshit.mcreator | 65 ++-- .../OreMinerMineButtonPressedProcedure.java | 310 ++++++++++-------- .../recipes/broken_glass_recipe_2.json | 17 + 5 files changed, 280 insertions(+), 162 deletions(-) create mode 100644 elements/BrokenGlassRecipe2.mod.json create mode 100644 src/main/resources/data/nims_random_bullshit/recipes/broken_glass_recipe_2.json diff --git a/elements/BrokenGlassRecipe2.mod.json b/elements/BrokenGlassRecipe2.mod.json new file mode 100644 index 0000000..b77b747 --- /dev/null +++ b/elements/BrokenGlassRecipe2.mod.json @@ -0,0 +1,48 @@ +{ + "_fv": 73, + "_type": "recipe", + "definition": { + "recipeType": "Crafting", + "recipeRetstackSize": 16, + "group": "", + "cookingBookCategory": "MISC", + "xpReward": 0.0, + "cookingTime": 200, + "craftingBookCategory": "BUILDING", + "recipeShapeless": false, + "recipeSlots": [ + { + "value": "" + }, + { + "value": "" + }, + { + "value": "" + }, + { + "value": "CUSTOM:Shit" + }, + { + "value": "CUSTOM:Shit" + }, + { + "value": "CUSTOM:Shit" + }, + { + "value": "CUSTOM:Shit" + }, + { + "value": "CUSTOM:Shit" + }, + { + "value": "CUSTOM:Shit" + } + ], + "recipeReturnStack": { + "value": "CUSTOM:BrokenGlass" + }, + "name": "broken_glass_recipe_2", + "namespace": "mod" + } +} \ No newline at end of file diff --git a/elements/OreMinerMineButtonPressed.mod.json b/elements/OreMinerMineButtonPressed.mod.json index b60cde3..8bb20e3 100644 --- a/elements/OreMinerMineButtonPressed.mod.json +++ b/elements/OreMinerMineButtonPressed.mod.json @@ -2,6 +2,6 @@ "_fv": 73, "_type": "procedure", "definition": { - "procedurexml": "oreMinerRollno_ext_trigger0Items.DIAMOND_PICKAXEblock.stone.breakblock0.80.91.110local:oreMinerRollRANDOMLTlocal:oreMinerRoll0.125ADD113Items.COAL#01LTlocal:oreMinerRoll0.25ADD224Items.RAW_COPPER2LTlocal:oreMinerRoll0.375ADD31Items.RAW_IRON3LTlocal:oreMinerRoll0.5ADD41Items.RAW_GOLD4LTlocal:oreMinerRoll0.625ADD512Items.DIAMOND5LTlocal:oreMinerRoll0.75ADD612Items.EMERALD6LTlocal:oreMinerRoll0.875ADD736Items.REDSTONE7ADD81Items.NETHERITE_SCRAP8" + "procedurexml": "oreMinerRollno_ext_triggerAND0Items.DIAMOND_PICKAXE0block.amethyst_block.breakblock10.750.85150local:oreMinerRollRANDOMLTlocal:oreMinerRoll0.4ADD113Items.COAL#0106LTlocal:oreMinerRoll0.6ADD224Items.RAW_COPPER208LTlocal:oreMinerRoll0.7ADD31Items.RAW_IRON308LTlocal:oreMinerRoll0.78ADD41Items.RAW_GOLD4010LTlocal:oreMinerRoll0.81ADD512Items.DIAMOND5014LTlocal:oreMinerRoll0.84ADD612Items.EMERALD6014LTlocal:oreMinerRoll0.985ADD736Items.REDSTONE709ADD81Items.NETHERITE_SCRAP8020" } } \ No newline at end of file diff --git a/nims_random_bullshit.mcreator b/nims_random_bullshit.mcreator index d8047ac..34d4fb6 100644 --- a/nims_random_bullshit.mcreator +++ b/nims_random_bullshit.mcreator @@ -949,7 +949,7 @@ "src/main/java/net/mcreator/nimsrandombullshit/network/OreMinerGUIButtonMessage.java" ] }, - "path": "~/Other" + "path": "~/OreMiner" }, { "name": "OreMinerGUISlot0ImageDisplayCondition", @@ -969,7 +969,7 @@ } ] }, - "path": "~/Other" + "path": "~/OreMiner" }, { "name": "NetherriteTemplateRecipe", @@ -1000,7 +1000,7 @@ "src/main/resources/data/nims_random_bullshit/loot_tables/blocks/ore_miner.json" ] }, - "path": "~/Other" + "path": "~/OreMiner" }, { "name": "OreMinerMineButtonPressed", @@ -1035,7 +1035,7 @@ } ] }, - "path": "~/Other" + "path": "~/OreMiner" }, { "name": "OreMinerRecipe", @@ -1048,7 +1048,7 @@ "src/main/resources/data/nims_random_bullshit/recipes/ore_miner_recipe.json" ] }, - "path": "~/Other" + "path": "~/OreMiner" }, { "name": "NetherriteTemplateRecipe2", @@ -1076,7 +1076,7 @@ "src/main/java/net/mcreator/nimsrandombullshit/client/renderer/GhoulRenderer.java" ] }, - "path": "~/Other" + "path": "~/Gravedigger" }, { "name": "GhoulThisEntityKillsAnotherOne", @@ -1107,7 +1107,7 @@ } ] }, - "path": "~/Other" + "path": "~/Gravedigger" }, { "name": "Gravedigger", @@ -1121,7 +1121,7 @@ "src/main/java/net/mcreator/nimsrandombullshit/item/GravediggerItem.java" ] }, - "path": "~/Other" + "path": "~/Gravedigger" }, { "name": "GravediggerRecipe", @@ -1134,7 +1134,7 @@ "src/main/resources/data/nims_random_bullshit/recipes/gravedigger_recipe.json" ] }, - "path": "~/Other" + "path": "~/Gravedigger" }, { "name": "GravediggerRightclickedOnBlock", @@ -1177,7 +1177,7 @@ } ] }, - "path": "~/Other" + "path": "~/Gravedigger" }, { "name": "SummonedEntityEffect", @@ -1190,7 +1190,7 @@ "src/main/java/net/mcreator/nimsrandombullshit/potion/SummonedEntityEffectMobEffect.java" ] }, - "path": "~/Other" + "path": "~/Gravedigger" }, { "name": "SummonedEntityEffectEffectExpires", @@ -1225,7 +1225,7 @@ } ] }, - "path": "~/Other" + "path": "~/Gravedigger" }, { "name": "GhoulOnInitialEntitySpawn", @@ -1244,7 +1244,7 @@ } ] }, - "path": "~/Other" + "path": "~/Gravedigger" }, { "name": "Star", @@ -1258,7 +1258,7 @@ "src/main/java/net/mcreator/nimsrandombullshit/item/StarItem.java" ] }, - "path": "~/Other" + "path": "~/Star" }, { "name": "StarRecipe", @@ -1271,7 +1271,7 @@ "src/main/resources/data/nims_random_bullshit/recipes/star_recipe.json" ] }, - "path": "~/Other" + "path": "~/Star" }, { "name": "StarWand", @@ -1285,7 +1285,7 @@ "src/main/resources/assets/nims_random_bullshit/models/item/star_wand.json" ] }, - "path": "~/Other" + "path": "~/Star" }, { "name": "StarWandRightclicked", @@ -1324,7 +1324,7 @@ } ] }, - "path": "~/Other" + "path": "~/Star" }, { "name": "StarWandRecipe", @@ -1337,7 +1337,7 @@ "src/main/resources/data/nims_random_bullshit/recipes/star_wand_recipe.json" ] }, - "path": "~/Other" + "path": "~/Star" }, { "name": "NetherrackJuice", @@ -1356,7 +1356,7 @@ "src/main/resources/assets/nims_random_bullshit/models/item/netherrack_juice_bucket.json" ] }, - "path": "~/Other" + "path": "~/Netherracks" }, { "name": "NetherrackJuiceBucketRecipe", @@ -1369,7 +1369,7 @@ "src/main/resources/data/nims_random_bullshit/recipes/netherrack_juice_bucket_recipe.json" ] }, - "path": "~/Other" + "path": "~/Netherracks" }, { "name": "NetherrackJuiceOnTickUpdate", @@ -1400,6 +1400,19 @@ } ] }, + "path": "~/Netherracks" + }, + { + "name": "BrokenGlassRecipe2", + "type": "recipe", + "compiles": true, + "locked_code": false, + "registry_name": "broken_glass_recipe_2", + "metadata": { + "files": [ + "src/main/resources/data/nims_random_bullshit/recipes/broken_glass_recipe_2.json" + ] + }, "path": "~/Other" } ], @@ -1490,6 +1503,18 @@ { "name": "Lapis", "children": [] + }, + { + "name": "Star", + "children": [] + }, + { + "name": "Gravedigger", + "children": [] + }, + { + "name": "OreMiner", + "children": [] } ] }, diff --git a/src/main/java/net/mcreator/nimsrandombullshit/procedures/OreMinerMineButtonPressedProcedure.java b/src/main/java/net/mcreator/nimsrandombullshit/procedures/OreMinerMineButtonPressedProcedure.java index 69c4c87..463c1a3 100644 --- a/src/main/java/net/mcreator/nimsrandombullshit/procedures/OreMinerMineButtonPressedProcedure.java +++ b/src/main/java/net/mcreator/nimsrandombullshit/procedures/OreMinerMineButtonPressedProcedure.java @@ -23,149 +23,177 @@ public class OreMinerMineButtonPressedProcedure { if (entity == null) return; double oreMinerRoll = 0; - if ((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY).getItem() == Items.DIAMOND_PICKAXE) { - if (world instanceof Level _level) { - if (!_level.isClientSide()) { - _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.stone.break")), SoundSource.BLOCKS, (float) 0.8, (float) Mth.nextDouble(RandomSource.create(), 0.9, 1.1)); + if (!world.isClientSide()) { + if ((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY).getItem() == Items.DIAMOND_PICKAXE + && !(entity instanceof Player _plrCldCheck4 && _plrCldCheck4.getCooldowns() + .isOnCooldown((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY).getItem()))) { + if (world instanceof Level _level) { + if (!_level.isClientSide()) { + _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.amethyst_block.break")), SoundSource.BLOCKS, 1, (float) Mth.nextDouble(RandomSource.create(), 0.75, 0.85)); + } else { + _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.amethyst_block.break")), SoundSource.BLOCKS, 1, (float) Mth.nextDouble(RandomSource.create(), 0.75, 0.85), false); + } + } + { + ItemStack _ist = (entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY); + if (_ist.hurt(15, RandomSource.create(), null)) { + _ist.shrink(1); + _ist.setDamageValue(0); + } + } + oreMinerRoll = Math.random(); + if (oreMinerRoll < 0.4) { + if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { + ItemStack _setstack = new ItemStack(Items.COAL).copy(); + _setstack.setCount((int) (new Object() { + public int getAmount(int sltid) { + if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { + ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); + if (stack != null) + return stack.getCount(); + } + return 0; + } + }.getAmount(1) + Mth.nextInt(RandomSource.create(), 1, 3))); + ((Slot) _slots.get(1)).set(_setstack); + _player.containerMenu.broadcastChanges(); + } + if (entity instanceof Player _player) + _player.getCooldowns() + .addCooldown((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY).getItem(), 6); + } else if (oreMinerRoll < 0.6) { + if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { + ItemStack _setstack = new ItemStack(Items.RAW_COPPER).copy(); + _setstack.setCount((int) (new Object() { + public int getAmount(int sltid) { + if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { + ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); + if (stack != null) + return stack.getCount(); + } + return 0; + } + }.getAmount(2) + Mth.nextInt(RandomSource.create(), 2, 4))); + ((Slot) _slots.get(2)).set(_setstack); + _player.containerMenu.broadcastChanges(); + } + if (entity instanceof Player _player) + _player.getCooldowns() + .addCooldown((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY).getItem(), 8); + } else if (oreMinerRoll < 0.7) { + if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { + ItemStack _setstack = new ItemStack(Items.RAW_IRON).copy(); + _setstack.setCount((int) (new Object() { + public int getAmount(int sltid) { + if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { + ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); + if (stack != null) + return stack.getCount(); + } + return 0; + } + }.getAmount(3) + 1)); + ((Slot) _slots.get(3)).set(_setstack); + _player.containerMenu.broadcastChanges(); + } + if (entity instanceof Player _player) + _player.getCooldowns() + .addCooldown((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY).getItem(), 8); + } else if (oreMinerRoll < 0.78) { + if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { + ItemStack _setstack = new ItemStack(Items.RAW_GOLD).copy(); + _setstack.setCount((int) (new Object() { + public int getAmount(int sltid) { + if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { + ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); + if (stack != null) + return stack.getCount(); + } + return 0; + } + }.getAmount(4) + 1)); + ((Slot) _slots.get(4)).set(_setstack); + _player.containerMenu.broadcastChanges(); + } + if (entity instanceof Player _player) + _player.getCooldowns() + .addCooldown((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY).getItem(), 10); + } else if (oreMinerRoll < 0.81) { + if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { + ItemStack _setstack = new ItemStack(Items.DIAMOND).copy(); + _setstack.setCount((int) (new Object() { + public int getAmount(int sltid) { + if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { + ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); + if (stack != null) + return stack.getCount(); + } + return 0; + } + }.getAmount(5) + Mth.nextInt(RandomSource.create(), 1, 2))); + ((Slot) _slots.get(5)).set(_setstack); + _player.containerMenu.broadcastChanges(); + } + if (entity instanceof Player _player) + _player.getCooldowns() + .addCooldown((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY).getItem(), 14); + } else if (oreMinerRoll < 0.84) { + if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { + ItemStack _setstack = new ItemStack(Items.EMERALD).copy(); + _setstack.setCount((int) (new Object() { + public int getAmount(int sltid) { + if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { + ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); + if (stack != null) + return stack.getCount(); + } + return 0; + } + }.getAmount(6) + Mth.nextInt(RandomSource.create(), 1, 2))); + ((Slot) _slots.get(6)).set(_setstack); + _player.containerMenu.broadcastChanges(); + } + if (entity instanceof Player _player) + _player.getCooldowns() + .addCooldown((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY).getItem(), 14); + } else if (oreMinerRoll < 0.985) { + if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { + ItemStack _setstack = new ItemStack(Items.REDSTONE).copy(); + _setstack.setCount((int) (new Object() { + public int getAmount(int sltid) { + if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { + ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); + if (stack != null) + return stack.getCount(); + } + return 0; + } + }.getAmount(7) + Mth.nextInt(RandomSource.create(), 3, 6))); + ((Slot) _slots.get(7)).set(_setstack); + _player.containerMenu.broadcastChanges(); + } + if (entity instanceof Player _player) + _player.getCooldowns() + .addCooldown((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY).getItem(), 9); } else { - _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.stone.break")), SoundSource.BLOCKS, (float) 0.8, (float) Mth.nextDouble(RandomSource.create(), 0.9, 1.1), false); - } - } - { - ItemStack _ist = (entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY); - if (_ist.hurt(1, RandomSource.create(), null)) { - _ist.shrink(1); - _ist.setDamageValue(0); - } - } - oreMinerRoll = Math.random(); - if (oreMinerRoll < 0.125) { - if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { - ItemStack _setstack = new ItemStack(Items.COAL).copy(); - _setstack.setCount((int) (new Object() { - public int getAmount(int sltid) { - if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { - ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); - if (stack != null) - return stack.getCount(); + if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { + ItemStack _setstack = new ItemStack(Items.NETHERITE_SCRAP).copy(); + _setstack.setCount((int) (new Object() { + public int getAmount(int sltid) { + if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { + ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); + if (stack != null) + return stack.getCount(); + } + return 0; } - return 0; - } - }.getAmount(1) + Mth.nextInt(RandomSource.create(), 1, 3))); - ((Slot) _slots.get(1)).set(_setstack); - _player.containerMenu.broadcastChanges(); - } - } else if (oreMinerRoll < 0.25) { - if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { - ItemStack _setstack = new ItemStack(Items.RAW_COPPER).copy(); - _setstack.setCount((int) (new Object() { - public int getAmount(int sltid) { - if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { - ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); - if (stack != null) - return stack.getCount(); - } - return 0; - } - }.getAmount(2) + Mth.nextInt(RandomSource.create(), 2, 4))); - ((Slot) _slots.get(2)).set(_setstack); - _player.containerMenu.broadcastChanges(); - } - } else if (oreMinerRoll < 0.375) { - if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { - ItemStack _setstack = new ItemStack(Items.RAW_IRON).copy(); - _setstack.setCount((int) (new Object() { - public int getAmount(int sltid) { - if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { - ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); - if (stack != null) - return stack.getCount(); - } - return 0; - } - }.getAmount(3) + 1)); - ((Slot) _slots.get(3)).set(_setstack); - _player.containerMenu.broadcastChanges(); - } - } else if (oreMinerRoll < 0.5) { - if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { - ItemStack _setstack = new ItemStack(Items.RAW_GOLD).copy(); - _setstack.setCount((int) (new Object() { - public int getAmount(int sltid) { - if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { - ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); - if (stack != null) - return stack.getCount(); - } - return 0; - } - }.getAmount(4) + 1)); - ((Slot) _slots.get(4)).set(_setstack); - _player.containerMenu.broadcastChanges(); - } - } else if (oreMinerRoll < 0.625) { - if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { - ItemStack _setstack = new ItemStack(Items.DIAMOND).copy(); - _setstack.setCount((int) (new Object() { - public int getAmount(int sltid) { - if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { - ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); - if (stack != null) - return stack.getCount(); - } - return 0; - } - }.getAmount(5) + Mth.nextInt(RandomSource.create(), 1, 2))); - ((Slot) _slots.get(5)).set(_setstack); - _player.containerMenu.broadcastChanges(); - } - } else if (oreMinerRoll < 0.75) { - if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { - ItemStack _setstack = new ItemStack(Items.EMERALD).copy(); - _setstack.setCount((int) (new Object() { - public int getAmount(int sltid) { - if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { - ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); - if (stack != null) - return stack.getCount(); - } - return 0; - } - }.getAmount(6) + Mth.nextInt(RandomSource.create(), 1, 2))); - ((Slot) _slots.get(6)).set(_setstack); - _player.containerMenu.broadcastChanges(); - } - } else if (oreMinerRoll < 0.875) { - if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { - ItemStack _setstack = new ItemStack(Items.REDSTONE).copy(); - _setstack.setCount((int) (new Object() { - public int getAmount(int sltid) { - if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { - ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); - if (stack != null) - return stack.getCount(); - } - return 0; - } - }.getAmount(7) + Mth.nextInt(RandomSource.create(), 3, 6))); - ((Slot) _slots.get(7)).set(_setstack); - _player.containerMenu.broadcastChanges(); - } - } else { - if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { - ItemStack _setstack = new ItemStack(Items.NETHERITE_SCRAP).copy(); - _setstack.setCount((int) (new Object() { - public int getAmount(int sltid) { - if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) { - ItemStack stack = ((Slot) _slots.get(sltid)).getItem(); - if (stack != null) - return stack.getCount(); - } - return 0; - } - }.getAmount(8) + 1)); - ((Slot) _slots.get(8)).set(_setstack); - _player.containerMenu.broadcastChanges(); + }.getAmount(8) + 1)); + ((Slot) _slots.get(8)).set(_setstack); + _player.containerMenu.broadcastChanges(); + } + if (entity instanceof Player _player) + _player.getCooldowns() + .addCooldown((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY).getItem(), 20); } } } diff --git a/src/main/resources/data/nims_random_bullshit/recipes/broken_glass_recipe_2.json b/src/main/resources/data/nims_random_bullshit/recipes/broken_glass_recipe_2.json new file mode 100644 index 0000000..72e71e3 --- /dev/null +++ b/src/main/resources/data/nims_random_bullshit/recipes/broken_glass_recipe_2.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "building", + "pattern": [ + "aaa", + "aaa" + ], + "key": { + "a": { + "item": "nims_random_bullshit:shit" + } + }, + "result": { + "item": "nims_random_bullshit:broken_glass", + "count": 16 + } +} \ No newline at end of file