Compare commits

..
Author SHA1 Message Date
e3574800c0 Subset Widget Improvement (#577)
Co-authored-by: slprime <[email protected]>
Co-authored-by: Martin Robertz <[email protected]>
Co-authored-by: Caedis <[email protected]>
Co-authored-by: Maya <[email protected]>
2025-01-16 21:12:26 +01:00
Martin Robertz 5cd7556e6a update 2025-01-16 12:44:42 +01:00
80c2cba778 Created Grid Rendering Cache Mode (#573)
Co-authored-by: slprime <[email protected]>
Co-authored-by: Martin Robertz <[email protected]>
Co-authored-by: Caedis <[email protected]>
2025-01-15 23:23:16 -06:00
Glease 31173a1fbd fix memory leak fixes not working for MP (#590)
#258 addresses the memory leak in ItemMobSpawner. Unfortunately the clean up handler is not consistently called on every world unloaded. This PR fixes this issue by moving the call out of that if block
2025-01-10 17:11:52 +08:00
Caedis fd08a93554 Fix NPE in ItemsTooltipLineHandler (#589) 2025-01-10 10:42:23 +02:00
5 changed files with 12 additions and 10 deletions

No files matched your search

+1 -1
View File
@@ -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
View File
@@ -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;
@@ -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)) {