minecraft_items 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 33806e5067b292f17ba43606ce3ca4e301ab01bd43bce07f0e0b18dd13b57604
4
- data.tar.gz: e147eb7dbf0d8143c3794c60a12e90ea8b1c8c14f92d20b384e2d4a804128be3
3
+ metadata.gz: 225a3f65cce6eba1b6a0814f772b3e058ab963ffd64de2b9a69806ae97b8e5ef
4
+ data.tar.gz: 22e0b9a9712d69993ceb73cd03f5d539a52a54fd3e5da7f3f35ec141bf199373
5
5
  SHA512:
6
- metadata.gz: 4066443c12040039726609c0ac30498862713a89ab60a0ae26714c211da40154a447cbe9420244af54e01473400261e83eb21dc94de7c9915f460a2c3cc8e37e
7
- data.tar.gz: 43295240cc90c805916209008ed0c58428415d7fde1501aab2c8e4f6b3d0c26626c8a4aa80d0825f72beb90bf68ace497d5cf6cc16bbbded99b207c8d7f54f75
6
+ metadata.gz: b3c3b2b52f54427adf5390ce8d8606dd86779d90f2c472590f01d5841e91ed68e79ccb3b94ac09be21f07315b7d79d0277cdc0d2d76600f12b4465142c48d959
7
+ data.tar.gz: f4e732405397fb0c8aa374454d509b668a3be97e3f19b086d4396d8b931b9ac9013a8b8ec76cc916986e5f35a03d6c6babf2855fc02cf97028069b87f6737ac3
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem 'rake'
4
+ gem 'yaml'
5
+ gem 'rspec'
6
+ gem 'activesupport'
data/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Maximilian Alexander
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,36 @@
1
+ A Ruby implementation of lists of MineCraft items (also known as blocks), also acting as an exercise in metaprogramming.
2
+
3
+ Example usage:
4
+
5
+ All the items in minecraft are stored within 2 categories.
6
+ type and variant.
7
+ The types are as follows:
8
+ ```
9
+ aquatic_types
10
+ concrete_types
11
+ dirt_types
12
+ end_types
13
+ glass_types
14
+ light_types
15
+ mineral_types
16
+ nether_types
17
+ plant_types
18
+ redstone_types
19
+ wood_types
20
+ stone_types
21
+ terracotta_types
22
+ glazed_terracotta_types
23
+ utility_types
24
+ ```
25
+ These types all have variants or other items that can be made from them.
26
+ As there is more variants than types and to keep the instructions short and sweet, please go to the variants.xml file for a full list of them.
27
+
28
+ To retrieve a list of all minecraft wood types do this:
29
+ ```
30
+
31
+ # Full list of types of items
32
+ Minecraft.wood_types
33
+ # =>
34
+ ['oak', 'spruce', 'birch', 'jungle', 'acacia', 'dark oak', 'crimson', 'warped', 'mangrove']
35
+
36
+ ```
@@ -0,0 +1,5 @@
1
+ Dir[File.join(__dir__, 'concerns', '*.rb')].each { |file| require file }
2
+ module BlockTypes
3
+ include MinecraftVariants
4
+ include MinecraftTypes
5
+ end
@@ -0,0 +1,6 @@
1
+ module MinecraftTypes
2
+ require 'yaml'
3
+ def minecraft_types
4
+ YAML.load_file(File.join(File.dirname(__FILE__), 'types.yml')).with_indifferent_access
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module MinecraftVariants
2
+ require 'yaml'
3
+ def minecraft_variants
4
+ YAML.load_file(File.join(File.dirname(__FILE__), 'variants.yml')).with_indifferent_access
5
+ end
6
+ end
@@ -0,0 +1,16 @@
1
+ ---
2
+ aquatic_types: ["coral", "coral block", "coral fan", "dead coral", "dead coral block", "dead coral fan", "snow", "ice", "kelp", "seagrass", "sponge", "prismarine"]
3
+ concrete_types: ["concrete", "concete powder"]
4
+ dirt_types: ["clay", "coarse dirt", "dirt", "dirt path", "farmland", "grass block", "gravel", "mud", "mycelium", "podzol", "red sand", "rooted dirt", "sand"]
5
+ end_types: ["chorus", "end stone", "purpur"]
6
+ glass_types: ["glass block", "glass pane"]
7
+ light_types: ["candles", "end and nether", "froglights", "lanterns and lamps", "underwater", "torches"]
8
+ mineral_types: ["iron", "gold", "diamond", "emerald", "amethyst", "lapis lazuli", "obsidian", "coal", "copper"]
9
+ nether_types: ["basalt", "blackstone", "crimson", "nether quartz", "netherrack", "soul and magma", "nether wart", "warped"]
10
+ plant_types: ["leaves", "saplings", "flowers", "mushrooms", "crops", "cave plants", "shrubbery"]
11
+ redstone_types: ["redstone ores", "redstone wiring", "power sources", "container blocks", "pistons", "sticky blocks", "rails", "iron doors", "other"]
12
+ wood_types: ["oak", "spruce", "birch", "jungle", "acacia", "dark oak", "mangrove", "crimson", "warped"]
13
+ stone_types: ["Stone", "stone brick", "sandstone", "red sandstone", "Cobblestone", "Stone Brick", "Andesite", "Polished Andesite", "Diorite", "Polished Diorite", "Granite", "Polished Granite", "Brick", "Deepslate" ,"Mud", "dripstone", "mossy stone"]
14
+ terracotta_types: ["black", "blue", "brown", "cyan", "gray", "green", "light blue", "light gray", "lime", "magenta", "orange", "pink", "purple", "red", "plain", "white", "yellow"]
15
+ glazed_terracotta_types: ["black", "blue", "brown", "cyan", "gray", "green", "light blue", "light gray", "lime", "magenta", "orange", "pink", "purple", "red", "white", "yellow"]
16
+ utility_types: ["containers", "shulkers", "workstations", "bed"]
@@ -0,0 +1,95 @@
1
+ ---
2
+ coral_variants: ["Brain Coral", "Bubble Coral", "Fire Coral", "Horn Coral", "Tube Coral"]
3
+ coral_block_variants: ["Brain Coral Block", "Bubble Coral Block", "Fire Coral Block", "Horn Coral Block", "Tube Coral Block"]
4
+ coral_fan_variants: ["Brain Coral fan", "Bubble Coral fan", "Fire Coral fan", "Horn Coral fan", "Tube Coral fan"]
5
+ dead_coral_variants: ["Dead Brain Coral", "Dead Bubble Coral", "Dead Fire Coral", "Dead Horn Coral", "Dead Tube Coral"]
6
+ dead_coral_fan_variants: ["Dead Brain Coral Block", "Dead Bubble Coral Block", "Dead Fire Coral Block", "Dead Horn Coral Block", "Dead Tube Coral Block"]
7
+ dead_coral_block_variants: ["Dead Brain Coral Block", "Dead Bubble Coral Block", "Dead Fire Coral Block", "Dead Horn Coral Block", "Dead Tube Coral Block"]
8
+ dead_coral_fan_variants: ["Dead Brain Coral Fan", "Dead Bubble Coral Fan", "Dead Fire Coral Fan", "Dead Horn Coral Fan"]
9
+ snow_and_ice_variants: ["Blue Ice", "Ice", "Packed Ice", "Snow", "Snow Block"]
10
+ kelp_seagrass_variants: ["Dried Kelp Block", "Kelp", "Seagrass"]
11
+ sponge_variants: ["Sponge", "Wet Sponge"]
12
+ prismarine_variants: ["Dark Prismarine", "Dark Prismarine Slab", "Dark Prismarine Stairs", "Prismarine", "Prismarine Brick Slab", "Prismarine Brick Stairs", "Prismarine Bricks", "Prismarine Slab", "Prismarine Stairs", "Prismarine Wall"]
13
+ #start concrete types
14
+ concrete_variants: ["Pink Concrete", "Yellow Concrete", "Gray Concrete", "Light Gray Concrete", "Black Concrete", "Purple Concrete", "Blue Concrete", "Light Blue Concrete", "Cyan Concrete", "Red Concrete", "Magenta Concrete", "Brown Concrete", "White Concrete", "Green Concrete", "Lime Concrete", "Orange Concrete"]
15
+ concrete_powder_variants: ["Pink Concrete Powder", "Yellow Concrete Powder", "Gray Concrete Powder", "Light Gray Concrete Powder", "Black Concrete Powder", "Purple Concrete Powder", "Blue Concrete Powder", "Light Blue Concrete Powder", "Cyan Concrete Powder", "Red Concrete Powder", "Magenta Concrete Powder", "Brown Concrete Powder", "White Concrete Powder", "Green Concrete Powder", "Lime Concrete Powder", "Orange Concrete Powder"]
16
+ #start end_type variants
17
+ chorus_variants: ["Chorus Plant", "Chorus Flower"]
18
+ end_stone_variants: ["End Stone", "End Stone Bricks", "End Stone Brick Stairs", "End Stone Brick Slab", "End Stone Brick Wall"]
19
+ purpur_variants: ["Purpur Block", "Purpur Pillar", "Purpur Stairs", "Purpur Slab"]
20
+ #start glass variants
21
+ glass_block_variants: ["Glass", "Black Stained Glass", "Blue Stained Glass", "Brown Stained Glass", "Cyan Stained Glass", "Gray Stained Glass", "Green Stained Glass", "Light Blue Stained Glass", "Light Gray Stained Glass", "Lime Stained Glass", "Magenta Stained Glass", "Orange Stained Glass", "Pink Stained Glass", "Purple Stained Glass", "Red Stained Glass", "White Stained Glass", "Yellow Stained Glass" ]
22
+ glass_pane_variants: ["Glass Pane", "Black Stained Glass Pane", "Blue Stained Glass Pane", "Brown Stained Glass Pane", "Cyan Stained Glass Pane", "Gray Stained Glass Pane", "Green Stained Glass Pane", "Light Blue Stained Glass Pane", "Light Gray Stained Glass Pane", "Lime Stained Glass Pane", "Magenta Stained Glass Pane", "Orange Stained Glass Pane", "Pink Stained Glass Pane", "Purple Stained Glass Pane", "Red Stained Glass Pane", "White Stained Glass Pane", "Yellow Stained Glass Pane"]
23
+ #start light type variants
24
+ candle_variants: ["Black Candle", "Blue Candle", "Brown Candle", "Candle", "Cyan Candle", "Green Candle", "Grey Candle", "Light Blue Candle", "Light Grey Candle", "Lime Candle", "Magenta Candle", "Orange Candle", "Pink Candle", "Purple Candle", "Red Candle", "White Candle", "Yellow Candle"]
25
+ campfire_variants: ["Campfire", "Soul Campfire"]
26
+ end_nether_light_variants: ["End Rod", "Glowstone", "Shroomlight"]
27
+ froglight_variants: ["Ochre Froglight", "Pearlescent Froglight", "Verdant Froglight"]
28
+ lanterns_lamps_variants: ["Jack o'Lantern", "Lantern", "Redstone Lamp", "Soul Lantern"]
29
+ underwater_light_variants: ["Sea Lantern", "Sea Pickle"]
30
+ torch_variants: ["Soul Torch", "Torch"]
31
+ #start mineral_type variants
32
+ iron_variants: ["Block of Iron", "Block of Raw Iron", "Chain", "Deepslate Iron Ore", "Iron Bars", "Iron Ore"]
33
+ gold_variants: ["Block of Gold", "Block of Raw Gold", "Deepslate Gold Ore", "Gold Ore"]
34
+ diamond_variants: ["Deepslate Diamond Ore", "Diamond Block", "Diamond Ore"]
35
+ amethyst_variants: ["Amethyst Cluster", "Block of Amethyst", "Budding Amethyst", "Large Amethyst Bud", "Medium Amethyst Bud", "Small Amethyst Bud"]
36
+ emerald_variants: ["Deepslape Emerald ore", "Emerald Block", "Emerald Ore"]
37
+ obsidian_variants: ["Crying Obsidian", "Obsidian"]
38
+ coal_variants: ["Block of Coal", "Coal Ore", "Deepslate Coal Ore"]
39
+ copper_variants: ["Block of Copper", "Block of Raw Copper", "Copper Ore", "Cut Copper", "Cut Copper Slab", "Cut Copper Stairs", "Deepslate Copper Ore", "Exposed Copper", "Exposed Cut Copper", "Exposed Cut Copper Slab", "Exposed Cut Copper Stairs", "Oxidized Copper", "Oxidized Cut Copper", "Oxidized Cut Copper Slab", "Oxidized Cut Copper Stairs", "Waxed Block of Copper", "Waxed Cut Copper", "Waxed Cut Copper Slab", "Waxed Cut Copper Stairs", "Waxed Exposed Copper", "Waxed Exposed Cut Copper", "Waxed Exposed Cut Copper Slab", "Waxed Exposed Cut Copper Stairs", "Waxed Oxidized Copper", "Waxed Oxidized Cut Copper", "Waxed Oxidized Cut Copper Slab", "Waxed Oxidized Cut Copper Stairs", "Waxed Weathered Copper", "Waxed Weathered Cut Copper", "Waxed Weathered Cut Copper Slab", "Waxed Weathered Cut Copper Stairs", "Weathered Copper", "Weathered Cut Copper", "Weathered Cut Copper Slab", "Weathered Cut Copper Stairs"]
40
+ #start nether_type variants
41
+ basalt_variants: ["Basalt", "Polished Basalt", "Smooth Basalt"]
42
+ blackstone_variants: ["Blackstone", "Blackstone Slab", "Blackstone Stairs", "Blackstone Wall", "Chiseled Polished Blackstone", "Cracked Polished Blackstone Bricks", "Gilded Blackstone", "Polished Blackstone", "Polished Blackstone Brick Slab", "Polished Blackstone Brick Stairs", "Polished Blackstone Brick Wall", "Polished Blackstone Bricks", "Polished Blackstone Slab", "Polished Blackstone Stairs", "Polished Blackstone Wall"]
43
+ crimson_variants: ["Crimson Button", "Crimson Door", "Crimson Fence", "Crimson Fence Gate", "Crimson Fungus", "Crimson Hyphae", "Crimson Nylium", "Crimson Planks", "Crimson Pressure Plate", "Crimson Roots", "Crimson Sign", "Crimson Slab", "Crimson Stairs", "Crimson Stem", "Crimson Trapdoor", "Stripped Crimson Hyphae", "Stripped Crimson Stem", "Weeping Vines"]
44
+ nether_quartz_variants: ["Block of Quartz", "Chiseled Quartz Block", "Nether Quartz Ore", "Quartz Pillar", "Quartz Slab", "Quartz Stairs", "Smooth Quartz Block", "Smooth Quartz Slab", "Smooth Quartz Stairs"]
45
+ netherrack_brick_variants: ["Nether Brick Fence", "Nether Brick Slab", "Nether Brick Stairs", "Nether Brick Wall", "Nether Bricks", "Netherrack", "Red Nether Brick Slab", "Red Nether Brick Stairs", "Red Nether Brick Wall", "Red Nether Bricks"]
46
+ soul_magma_variants: ["Magma Block", "Soul Sand", "Soul Soil"]
47
+ nether_wart_variants: ["Nether Wart", "Nether Wart Block"]
48
+ warped_variants: ["Nether Sprouts", "Stripped Warped Hyphae", "Stripped Warped Stem", "Twisting Vines", "Warped Button", "Warped Door", "Warped Fence", "Warped Fence Gate", "Warped Fungus", "Warped Hyphae", "Warped Nylium", "Warped Planks", "Warped Pressure Plate", "Warped Roots", "Warped Sign", "Warped Slab", "Warped Stairs", "Warped Stem", "Warped Trapdoor"]
49
+ #start plant types
50
+ leave_variants: ["Oak Leaves", "Spruce Leaves", "Birch Leaves", "Jungle Leaves", "Acacia Leaves", "Dark Oak Leaves", "Azalea Leaves", "Flowering Azalea Leaves", "Mangrove Leaves"]
51
+ sapling_variants: ["Oak Sapling", "Spruce Sapling", "Birch Sapling", "Jungle Sapling", "Acacia Sapling", "Dark Oak Sapling", "Azalea", "Flowering Azalea", "Mangrove Propagule"]
52
+ flower_variants: ["Allium", "Azure Bluet", "Blue Orchid", "Cornflower", "Dandelion", "Lilac", "Lily of the Valley", "Orange Tulip",
53
+ "Oxeye Daisy", "Peony", "Pink Tulip", "Poppy", "Red Tulip", "Rose Bush", "Sunflower", "White Tulip", "Wither Rose"]
54
+ mushroom_variants: ["Brown Mushroom", "Brown Mushroom Block", "Mushroom Stem", "Red Mushroom", "Red Mushroom Block"]
55
+ cave_plant_variants: ["Big Dripleaf", "Glow Lichen", "Hanging Roots", "Moss Block", "Moss Carpet", "Small Dripleaf", "Spore Blossom"]
56
+ crop_variants: ["Bamboo", "Cactus", "Carved Pumpkin", "Hay Bale", "Melon", "Pumpkin", "Sugar Cane"]
57
+ shrubbery_variants: ["Dead Bush", "Fern", "Grass", "Large Fern", "Lily Pad", "Tall Grass", "Vines"]
58
+ #start redstone types
59
+ redstone_ore_variants: ["Deepslate Redstone Ore", "Redstone Ore"]
60
+ redstone_wiring_variants: ["Redstone Comparator", "Redstone Dust", "Redstone Repeater"]
61
+ power_source_variants: ["Block of Redstone", "Daylight Detector", "Lever", "Observer", "Redstone Torch", "Sculk Sensor", "Target", "Tripwire Hook"]
62
+ button_variants: ["Acacia Button", "Birch Button", "Dark Oak Button", "Jungle Button", "Mangrove Button", "Oak Button", "Polished Blackstone Button", "Spruce Button", "Stone Button"]
63
+ pressure_plate_variants: ["Acacia Pressure Plate", "Birch Pressure Plate", "Dark Oak Pressure Plate", "Heavy Weighted Pressure Plate", "Jungle Pressure Plate", "Light Weighted Pressure Plate", "Mangrove Pressure Plate", "Oak Pressure Plate", "Polished Blackstone Pressure Plate", "Spruce Pressure Plate", "Stone Pressure Plate"]
64
+ redstone_container_variants: ["Dispenser", "Dropper", "Hopper", "Trapped Chest"]
65
+ piston_variants: ["Piston", "Sticky Piston"]
66
+ sticky_block_variants: ["Honey Block", "Slime Block"]
67
+ rail_variants: ["Activator Rails", "Detector Rails", "Powered Rails", "Rail"]
68
+ iron_door_variants: ["Iron Trapdoor", "Iron Door"]
69
+ other_redstone_variants: ["Jukebox", "Noteblock", "TNT"]
70
+ #start stone type variants
71
+ stone_variants: ["Stone", "Smooth Stone Slab", "Smooth Stone", "Stone Stairs", "Stone Slab"]
72
+ cobblestone_variants: ["Cobblestone", "Cobblestone Slab", "Cobblestone Stairs", "Cobblestone Wall"]
73
+ andesite_variants: ["Andesite", "Polished Andesite", "Andesite Stair", "Andesite Slab", "Polished Andesite Slab", "Andesite Wall"]
74
+ diorite_variants: ["Diorite", "Polished Diorite", "Polished Diorite Stair", "Polished Diorite Slab", "Diorite Slab", "Diorite Wall"]
75
+ granite_variants: ["Granite", "Polished Granite", "Polished Granite Stair", "Granite Stair", "Polished Granite Slab", "Granite Slab", "Granite Wall"]
76
+ sandstone_variants: ["Sandstone", "Chiseled Sandstone", "Smooth Sandstone", "Sandstone Slab", "Sandstone Stairs", "Red Sandstone", "Chiseled Red Sandstone", "Smooth Red Sandstone", "Red Sandstone Stairs", "Red Sandstone Slab", "Smooth Red Sandstone Stairs", "Smooth Sandstone Stairs", "Smooth Red Sandstone Slab", "Smooth Sandstone Slab", "Red Sandstone Wall", "Sandstone Wall", "Cut Sandstone Slab", "Cut Red Sandstone Slab", "Cut Sandstone", "Cut Red Sandstone"]
77
+ deepslate_variants: ["Cobbled Deepslate Wall", "Polished Deepslate Wall", "Deepslate Brick Wall", "Deepslate Tile Wall", "Cobbled Deepslate Stairs", "Deepslate Tile Stairs", "Polished Deepslate Stairs", "Deepslate Brick Stairs", "Infested Deepslate", "Cobbled Deepslate Slab", "Polished Deepslate Slab", "Deepslate Tile Slab", "Deepslate Brick Slab", "Deepslate Tiles", "Cracked Deepslate Tiles", "Deepslate Bricks", "Cracked Deepslate Bricks", "Chiseled Deepslate", "Cobbled Deepslate", "Polished Deepslate"]
78
+ stone_brick_variants: ["Stone Brick Slab", " Stone Brick", "Cracked Stone Brick", "Chiseled Stone Brick", "Stone Brick Stair", "Stone Brick Wall"]
79
+ mossy_cobblestone_variants: ["Mossy Cobblestone", "Mossy Cobblestone Wall", "Mossy Cobblestone Stair", "Mossy Cobblestone Slab"]
80
+ mossy_stone_brick_variants: ["Mossy Stone Brick", "Mossy Stone Brick Stair", "Mossy Stone Brick Slab", "Mossy Stone Brick Wall"]
81
+ brick_variants: ["Brick Slab", "Brick", "Brick Stair", "Brick Wall"]
82
+ mud_brick_variants: ["Mud Brick Slab", "Packed Mud", "Mud Brick", "Mud Brick Stair", "Mud Brick Wall"]
83
+ dripstone_variants: ["Pointed Dripstone", "Dripstone Block"]
84
+ #start utility type variants
85
+ container_variants: ["Chest", "Ender Chest"]
86
+ crafting_block_variants: ["Anvil", "Crafting Table", "Enchanting Table", "Furnace"]
87
+ workstation_variants: ["Barrel", "Bell", "Blast Furnace", "Brewing Stand", "Cartography Table", "Cauldron", "Composter", "Fletching Table", "Grindstone", "Lectern", "Loom", "Smithing Table", "Smoker", "Stonecutter"]
88
+ #Start wood_type variants
89
+ acacia_variants: ["Acacia Door", "Acacia Fence", "Acacia Fence Gate", "Acacia Log", "Acacia Planks", "Acacia Sign", "Acacia Slab", "Acacia Stairs", "Acacia Trapdoor", "Acacia Wood", "Stripped Acacia Log", "Stripped Acacia Wood"]
90
+ birch_variants: ["Birch Door", "Birch Fence", "Birch Fence Gate", "Birch Log", "Birch Planks", "Birch Sign", "Birch Slab", "Birch Stairs", "Birch Trapdoor", "Birch Wood", "Stripped Birch Log", "Stripped Birch Wood"]
91
+ dark_oak_variants: ["Dark Oak Door", "Dark Oak Fence", "Dark Oak Fence Gate", "Dark Oak Log", "Dark Oak Planks", "Dark Oak Sign", "Dark Oak Slab", "Dark Oak Stairs", "Dark Oak Trapdoor", "Dark Oak Wood", "Stripped Dark Oak Log", "Stripped Dark Oak Wood"]
92
+ jungle_variants: ["Jungle Door", "Jungle Fence", "Jungle Fence Gate", "Jungle Log", "Jungle Planks", "Jungle Sign", "Jungle Slab", "Jungle Stairs", "Jungle Trapdoor", "Jungle Wood", "Stripped Jungle Log", "Stripped Jungle Wood"]
93
+ spruce_variants: ["Spruce Door", "Spruce Fence", "Spruce Fence Gate", "Spruce Log", "Spruce Planks", "Spruce Sign", "Spruce Slab", "Spruce Stairs", "Spruce Trapdoor", "Spruce Wood", "Stripped Spruce Log", "Stripped Spruce Wood"]
94
+ mangrove_variants: ["Mangrove Door", "Mangrove Fence", "Mangrove Fence Gate", "Mangrove Log", "Mangrove Planks", "Mangrove Roots", "Mangrove Sign", "Mangrove Slab", "Mangrove Stairs", "Mangrove Trapdoor", "Mangrove Wood", "Muddy Mangrove Roots", "Stripped Mangrove Log", "Stripped Mangrove Wood"]
95
+ oak_variants: ["Oak Door", "Oak Fence", "Oak Fence Gate", "Oak Log", "Oak Planks", "Oak Sign", "Oak Slab", "Oak Stairs", "Oak Trapdoor", "Oak Wood", "Petrified Oak Slab", "Stripped Oak Log", "Stripped Oak Wood"]
data/lib/item_list.rb ADDED
@@ -0,0 +1,37 @@
1
+ WOODS = {
2
+ "Acacia" => ["Block", "Slab", "Stairs", "Fence", "Gate", "Trapdoor", "Pressure plate"],
3
+ "Oak" => ["Block", "Slab", "Stairs", "Fence", "Gate", "Trapdoor", "Pressure plate"],
4
+ "Birch" => ["Block", "Slab", "Stairs", "Fence", "Gate", "Trapdoor", "Pressure plate"],
5
+ "Jungle" => ["Block", "Slab", "Stairs", "Fence", "Gate", "Trapdoor", "Pressure plate"],
6
+ "Dark Oak" => ["Block", "Slab", "Stairs", "Fence", "Gate", "Trapdoor", "Pressure plate"],
7
+ "Spruce" => ["Block", "Slab", "Stairs", "Fence", "Gate", "Trapdoor", "Pressure plate"],
8
+ "Spruce" => ["Block", "Slab", "Stairs", "Fence", "Gate", "Trapdoor", "Pressure plate"],
9
+ "Crimson" => ["Block", "Slab", "Stairs", "Fence", "Gate", "Trapdoor", "Pressure plate"],
10
+ "Warped" => ["Block", "Slab", "Stairs", "Fence", "Gate", "Trapdoor", "Pressure plate"],
11
+ "Mangrove" => ["Block", "Slab", "Stairs", "Fence", "Gate", "Trapdoor", "Pressure plate"]
12
+ }
13
+ ROCKS = {
14
+ "Stone" => ["Slab", "Stairs", "Wall"],
15
+ "Smooth Stone" => ["Slab", "Stairs", "Wall"],
16
+ "Cobblestone" => ["Slab", "Stairs", "Wall"],
17
+ "Stone Brick" => ["Slab", "Stairs", "Wall"],
18
+ "Andesite" => ["Slab", "Stairs", "Wall"],
19
+ "Polished Andesite",["Slab", "Stairs", "Wall"],
20
+ "Diorite" => ["Slab", "Stairs", "Wall"],
21
+ "Polished Diorite" => ["Slab", "Stairs", "Wall"],
22
+ "Granite" => ["Slab", "Stairs", "Wall"],
23
+ "Polished Granite" => ["Slab", "Stairs", "Wall"],
24
+ "Sandstone" => ["Slab", "Stairs", "Wall"],
25
+ "Red Sandstone" => ["Slab", "Stairs", "Wall"],
26
+ "Brick" => ["Slab", "Stairs", "Wall"],
27
+ "Prismarine" => ["Slab", "Stairs", "Wall"],
28
+ "Nether Brick" => ["Slab", "Stairs", "Wall"],
29
+ "Quartz" => ["Slab", "Stairs", "Wall"],
30
+ "Purpur" => ["Slab", "Stairs", "Wall"],
31
+ "Endstone" => ["Slab", "Stairs", "Wall"],
32
+ "Blackstone" => ["Slab", "Stairs", "Wall"],
33
+ "Copper" => ["Slab", "Stairs", "Wall"],
34
+ "Deepslate" => ["Slab", "Stairs", "Wall"],
35
+ "Mud" => ["Slab", "Stairs", "Wall"]
36
+ }
37
+ REDSTONE = %w(Comparator Repeater Redstone_dust Redstone_torch Sculk Target_block Tripwire Button Pressure_plate Dispenser Dropper Hopper Chest Piston Stick_piston Activator_rails Detector_rails Powered_rails Rails Jukebox Notblock TNT Iron)
@@ -0,0 +1,18 @@
1
+ require 'active_support/core_ext/hash/indifferent_access'
2
+ require 'block_types' #first require block types. This includes the modules that contain the methods for loading the minecraft item hashes
3
+
4
+ class MinecraftItems #make a Minecraft parent class
5
+ class << self #and make all the methods inside class methods?
6
+ include BlockTypes
7
+ #if not it will default to this which is just an error method
8
+ def method_missing(method_name)
9
+ if method_name.to_s.include?("_variants")
10
+ minecraft_variants[method_name]
11
+ elsif method_name.to_s.include?("_types")
12
+ minecraft_types[method_name]
13
+ else
14
+ super
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,13 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = 'minecraft_items'
5
+ s.version = '0.1.1'
6
+ s.licenses = ['MIT']
7
+ s.summary = "A list of most minecraft items"
8
+ s.description = "With a few simple commands return all the types of blocks as well as each types variant."
9
+ s.authors = ["Maximilian Alexander", "Zane Sandin"]
10
+ s.email = 'maxx.stack15@gmail.com'
11
+ s.homepage = 'https://github.com/malexander15/minecraft_items'
12
+ s.files = Dir['lib/**/*.rb', 'lib/**/*.yml','minecraft_items.gemspec', 'README.md', 'LICENSE.md', 'Gemfile']
13
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minecraft_items
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maximilian Alexander
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-01-25 00:00:00.000000000 Z
12
+ date: 2023-03-13 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: With a few simple commands return all the types of blocks as well as
15
15
  each types variant.
@@ -17,7 +17,18 @@ email: maxx.stack15@gmail.com
17
17
  executables: []
18
18
  extensions: []
19
19
  extra_rdoc_files: []
20
- files: []
20
+ files:
21
+ - Gemfile
22
+ - LICENSE.md
23
+ - README.md
24
+ - lib/block_types.rb
25
+ - lib/concerns/minecraft_types.rb
26
+ - lib/concerns/minecraft_variants.rb
27
+ - lib/concerns/types.yml
28
+ - lib/concerns/variants.yml
29
+ - lib/item_list.rb
30
+ - lib/minecraft_items.rb
31
+ - minecraft_items.gemspec
21
32
  homepage: https://github.com/malexander15/minecraft_items
22
33
  licenses:
23
34
  - MIT