more block data fixes

This commit is contained in:
Sen 2025-06-23 11:58:16 +02:00
parent ea76cecba3
commit 1d6fef0eee
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
24 changed files with 46 additions and 48 deletions

View file

@ -4,7 +4,6 @@ import java.util.List;
import java.util.Map;
import common.biome.Biome;
import common.biome.IBiome;
import common.block.Block;
import common.block.foliage.LeavesType;
import common.collect.Lists;
import common.collect.Maps;

View file

@ -1,7 +1,6 @@
package common.item;
import java.text.DecimalFormat;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@ -74,10 +73,6 @@ public final class ItemStack
Item item = ItemRegistry.REGISTRY.byNameExact(name);
return item == null ? def : new ItemStack(item);
}
public static Collection<String> getKeys() {
return ItemRegistry.REGISTRY.getKeys();
}
private ItemStack()
{

View file

@ -85,16 +85,8 @@ public class State {
if(state != null)
return state;
int idx = name.indexOf(",");
if(idx >= 0) {
Block block = BlockRegistry.REGISTRY.byNameExact(name.substring(0, idx));
if(block != null)
return block.getState();
}
return def;
}
public static Collection<String> getKeys() {
return NAME_MAP.keySet();
Block block = BlockRegistry.REGISTRY.byNameExact(idx >= 0 ? name.substring(0, idx) : name);
return block != null ? block.getState() : def;
}
public State(Block block, ImmutableMap<Property, Comparable> properties) {