mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-18 19:39:06 +00:00
Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
887afbfb8d | ||
|
|
ff87fd550e | ||
|
|
12c4995642 | ||
|
|
d40f7ff498 | ||
|
|
60c94f4e40 | ||
|
|
27fc0b8b98 | ||
|
|
cf83b39b84 | ||
|
|
0e986c9af4 | ||
|
|
946f1b3e53 | ||
|
|
f2cd82c8fa | ||
|
|
bde9a20947 | ||
|
|
d242f238ab |
No files matched your search
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:CodeChickenCore:1.4.1:dev')
|
||||
implementation('com.github.GTNewHorizons:GTNHLib:0.6.2:dev')
|
||||
implementation('com.github.GTNewHorizons:GTNHLib:0.6.1:dev')
|
||||
|
||||
shadowImplementation('org.apache.commons:commons-csv:1.10.0')
|
||||
}
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.31'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.30'
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package codechicken.nei;
|
||||
|
||||
import static codechicken.lib.inventory.InventoryUtils.actualDamage;
|
||||
import static codechicken.lib.inventory.InventoryUtils.newItemStack;
|
||||
import static net.minecraftforge.oredict.OreDictionary.WILDCARD_VALUE;
|
||||
|
||||
@@ -37,7 +36,7 @@ public class ItemStackMap<T> {
|
||||
}
|
||||
|
||||
public StackMetaKey(ItemStack key) {
|
||||
this(actualDamage(key), key.stackTagCompound);
|
||||
this(key.getItemDamage(), key.stackTagCompound);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
@@ -75,7 +74,7 @@ public class ItemStackMap<T> {
|
||||
if (wildcard != null) return wildcard;
|
||||
|
||||
if (damageMap != null) {
|
||||
final T ret = damageMap.get(actualDamage(key));
|
||||
final T ret = damageMap.get(key.getItemDamage());
|
||||
if (ret != null) return ret;
|
||||
}
|
||||
if (tagMap != null) {
|
||||
@@ -89,7 +88,7 @@ public class ItemStackMap<T> {
|
||||
|
||||
public T put(ItemStack key, T value) {
|
||||
try {
|
||||
switch (getKeyType(actualDamage(key), key.stackTagCompound)) {
|
||||
switch (getKeyType(key.getItemDamage(), key.stackTagCompound)) {
|
||||
case 0:
|
||||
if (metaMap == null) metaMap = new HashMap<>();
|
||||
return metaMap.put(new StackMetaKey(key), value);
|
||||
@@ -98,7 +97,7 @@ public class ItemStackMap<T> {
|
||||
return tagMap.put(key.stackTagCompound, value);
|
||||
case 2:
|
||||
if (damageMap == null) damageMap = new HashMap<>();
|
||||
return damageMap.put(actualDamage(key), value);
|
||||
return damageMap.put(key.getItemDamage(), value);
|
||||
case 3:
|
||||
T ret = wildcard;
|
||||
wildcard = value;
|
||||
@@ -113,13 +112,13 @@ public class ItemStackMap<T> {
|
||||
|
||||
public T remove(ItemStack key) {
|
||||
try {
|
||||
switch (getKeyType(actualDamage(key), key.stackTagCompound)) {
|
||||
switch (getKeyType(key.getItemDamage(), key.stackTagCompound)) {
|
||||
case 0:
|
||||
return metaMap != null ? metaMap.remove(new StackMetaKey(key)) : null;
|
||||
case 1:
|
||||
return tagMap != null ? tagMap.remove(key.stackTagCompound) : null;
|
||||
case 2:
|
||||
return damageMap != null ? damageMap.remove(actualDamage(key)) : null;
|
||||
return damageMap != null ? damageMap.remove(key.getItemDamage()) : null;
|
||||
case 3:
|
||||
T ret = wildcard;
|
||||
wildcard = null;
|
||||
|
||||
Reference in new issue
Block a user