mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-18 19:39:06 +00:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39578a4419 | ||
|
|
e3574800c0 | ||
|
|
5cd7556e6a | ||
|
|
80c2cba778 | ||
|
|
31173a1fbd | ||
|
|
fd08a93554 |
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.1:dev')
|
||||
implementation('com.github.GTNewHorizons:GTNHLib:0.6.2: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.30'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.31'
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -325,9 +325,8 @@ public class ClientHandler {
|
||||
|
||||
if (!Minecraft.getMinecraft().isSingleplayer()) // wait for server to initiate in singleplayer
|
||||
NEIClientConfig.loadWorld("remote/" + ClientUtils.getServerIP().replace(':', '~'));
|
||||
|
||||
ItemMobSpawner.clearEntityReferences(world);
|
||||
}
|
||||
ItemMobSpawner.clearEntityReferences(world);
|
||||
|
||||
lastworld = world;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
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;
|
||||
|
||||
@@ -36,7 +37,7 @@ public class ItemStackMap<T> {
|
||||
}
|
||||
|
||||
public StackMetaKey(ItemStack key) {
|
||||
this(key.getItemDamage(), key.stackTagCompound);
|
||||
this(actualDamage(key), key.stackTagCompound);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
@@ -74,7 +75,7 @@ public class ItemStackMap<T> {
|
||||
if (wildcard != null) return wildcard;
|
||||
|
||||
if (damageMap != null) {
|
||||
final T ret = damageMap.get(key.getItemDamage());
|
||||
final T ret = damageMap.get(actualDamage(key));
|
||||
if (ret != null) return ret;
|
||||
}
|
||||
if (tagMap != null) {
|
||||
@@ -88,7 +89,7 @@ public class ItemStackMap<T> {
|
||||
|
||||
public T put(ItemStack key, T value) {
|
||||
try {
|
||||
switch (getKeyType(key.getItemDamage(), key.stackTagCompound)) {
|
||||
switch (getKeyType(actualDamage(key), key.stackTagCompound)) {
|
||||
case 0:
|
||||
if (metaMap == null) metaMap = new HashMap<>();
|
||||
return metaMap.put(new StackMetaKey(key), value);
|
||||
@@ -97,7 +98,7 @@ public class ItemStackMap<T> {
|
||||
return tagMap.put(key.stackTagCompound, value);
|
||||
case 2:
|
||||
if (damageMap == null) damageMap = new HashMap<>();
|
||||
return damageMap.put(key.getItemDamage(), value);
|
||||
return damageMap.put(actualDamage(key), value);
|
||||
case 3:
|
||||
T ret = wildcard;
|
||||
wildcard = value;
|
||||
@@ -112,13 +113,13 @@ public class ItemStackMap<T> {
|
||||
|
||||
public T remove(ItemStack key) {
|
||||
try {
|
||||
switch (getKeyType(key.getItemDamage(), key.stackTagCompound)) {
|
||||
switch (getKeyType(actualDamage(key), 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(key.getItemDamage()) : null;
|
||||
return damageMap != null ? damageMap.remove(actualDamage(key)) : null;
|
||||
case 3:
|
||||
T ret = wildcard;
|
||||
wildcard = null;
|
||||
|
||||
@@ -43,7 +43,9 @@ public class ItemsGrid {
|
||||
}
|
||||
|
||||
public boolean needRefresh(int mode) {
|
||||
return this.nextCacheRefresh == 0
|
||||
final Minecraft minecraft = Minecraft.getMinecraft();
|
||||
return this.nextCacheRefresh == 0 || this.framebuffer.framebufferWidth != minecraft.displayWidth
|
||||
|| framebuffer.framebufferHeight != minecraft.displayHeight
|
||||
|| getGridRenderingCacheFPS(mode) > 0 && this.nextCacheRefresh < System.currentTimeMillis();
|
||||
}
|
||||
|
||||
|
||||
@@ -123,6 +123,8 @@ public class ItemsTooltipLineHandler implements ITooltipLineHandler {
|
||||
|
||||
for (ItemStack stack : items) {
|
||||
final NBTTagCompound nbTag = StackInfo.itemStackToNBT(stack, true);
|
||||
if (nbTag == null) continue;
|
||||
|
||||
final String GUID = StackInfo.getItemStackGUID(stack);
|
||||
|
||||
if (!unique.containsKey(GUID)) {
|
||||
|
||||
Reference in new issue
Block a user