minecraft_items 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -4
- data/lib/minecraft_items.rb +11 -7
- data/minecraft_items.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41511a9b8e715a1cf1e4fdb1892bc5a46696eeb9323fb315843bbd5b113f32c1
|
4
|
+
data.tar.gz: 14f194c56b4e37b08814e6032d52a00c9089f2d5eb4a4cf1adf0cf747e759fd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1257c21053b9fe531f73b587f7d6276700114851f64fe17a08bf5fcd6b957d883fc940fc570e3f94c5cbcd7016d142b66af141e44260aae26e192e867c41f8f
|
7
|
+
data.tar.gz: 0f2c08f7dc3bf386fad3eb04015f8fc2ddf68f6a9c04ecfd2e50e45e6ac9a3cd6214aa06f30c38f21409ef5c819211725d0806beff9315ebed29ab5ecd5574ae
|
data/README.md
CHANGED
@@ -23,14 +23,40 @@ glazed_terracotta_types
|
|
23
23
|
utility_types
|
24
24
|
```
|
25
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
|
26
|
+
As there is more variants than types and to keep the instructions short and sweet, please go to the variants.xml file or running
|
27
|
+
```
|
28
|
+
MinecraftItems.minecraft_variants
|
29
|
+
```
|
30
|
+
for a full list of them.
|
27
31
|
|
28
32
|
To retrieve a list of all minecraft wood types do this:
|
33
|
+
|
29
34
|
```
|
35
|
+
MinecraftItems.wood_types
|
30
36
|
|
31
|
-
|
32
|
-
Minecraft.wood_types
|
33
|
-
# =>
|
37
|
+
=>
|
34
38
|
['oak', 'spruce', 'birch', 'jungle', 'acacia', 'dark oak', 'crimson', 'warped', 'mangrove']
|
39
|
+
```
|
35
40
|
|
41
|
+
Subsequently, after seeing the wood_types and wanted to know the variants for one of the types, let's say spruce, I would:
|
36
42
|
```
|
43
|
+
MinecraftItems.spruce_variants
|
44
|
+
=>
|
45
|
+
["Spruce Door",
|
46
|
+
"Spruce Fence",
|
47
|
+
"Spruce Fence Gate",
|
48
|
+
"Spruce Log",
|
49
|
+
"Spruce Planks",
|
50
|
+
"Spruce Sign",
|
51
|
+
"Spruce Slab",
|
52
|
+
"Spruce Stairs",
|
53
|
+
"Spruce Trapdoor",
|
54
|
+
"Spruce Wood",
|
55
|
+
"Stripped Spruce Log",
|
56
|
+
"Stripped Spruce Wood"]
|
57
|
+
```
|
58
|
+
It should also be noted that both type and variant data is in the form of a hash where the name of the types or variants (e.g. wood_types or spruce_variants) is the key and the value is an array of strings for the pertinent type or variant.
|
59
|
+
```
|
60
|
+
wood_types hash example
|
61
|
+
wood_types: ["oak", "spruce", "birch", "jungle", "acacia", "dark oak", "mangrove", "crimson", "warped"]
|
62
|
+
```
|
data/lib/minecraft_items.rb
CHANGED
@@ -1,12 +1,16 @@
|
|
1
1
|
require 'active_support/core_ext/hash/indifferent_access'
|
2
|
-
require 'block_types'
|
2
|
+
require 'block_types'
|
3
3
|
|
4
|
-
class MinecraftItems
|
5
|
-
class << self
|
6
|
-
include BlockTypes
|
7
|
-
|
8
|
-
def method_missing(method_name)
|
9
|
-
if method_name.to_s.include?("
|
4
|
+
class MinecraftItems
|
5
|
+
class << self
|
6
|
+
include BlockTypes
|
7
|
+
|
8
|
+
def method_missing(method_name)
|
9
|
+
if method_name.to_s.include?("all_types")
|
10
|
+
minecraft_types
|
11
|
+
elsif method_name.to_s.include?("all_variants")
|
12
|
+
minecraft_variants
|
13
|
+
elsif method_name.to_s.include?("_variants")
|
10
14
|
minecraft_variants[method_name]
|
11
15
|
elsif method_name.to_s.include?("_types")
|
12
16
|
minecraft_types[method_name]
|
data/minecraft_items.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'minecraft_items'
|
3
|
-
s.version = '0.1.
|
3
|
+
s.version = '0.1.4'
|
4
4
|
s.licenses = ['MIT']
|
5
5
|
s.summary = "A list of most minecraft items"
|
6
6
|
s.description = "With a few simple commands return all the types of blocks as well as each types variant."
|
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.
|
4
|
+
version: 0.1.4
|
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-03-
|
12
|
+
date: 2023-03-20 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.
|