mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 13:09:59 +00:00
46 files changed
+149
-141
No files matched your search
@@ -98,7 +98,7 @@ public class ClearableRegistry<T> extends MutableRegistry<T>
|
||||
}
|
||||
|
||||
@Override
|
||||
public <V extends T> V func_218382_a(int id, ResourceLocation key, V value)
|
||||
public <V extends T> V register(int id, ResourceLocation key, V value)
|
||||
{
|
||||
Validate.isTrue(id >= 0, "Invalid ID, can not be < 0");
|
||||
Validate.notNull(key);
|
||||
@@ -121,9 +121,9 @@ public class ClearableRegistry<T> extends MutableRegistry<T>
|
||||
}
|
||||
|
||||
@Override
|
||||
public <V extends T> V func_218381_a(ResourceLocation key, V value)
|
||||
public <V extends T> V register(ResourceLocation key, V value)
|
||||
{
|
||||
return func_218382_a(nextId, key, value);
|
||||
return register(nextId, key, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -829,7 +829,7 @@ public class ForgeRegistry<V extends IForgeRegistryEntry<V>> implements IForgeRe
|
||||
tag.putInt("V", e.getValue());
|
||||
ids.add(tag);
|
||||
});
|
||||
data.func_218657_a("ids", ids);
|
||||
data.put("ids", ids);
|
||||
|
||||
ListNBT aliases = new ListNBT();
|
||||
this.aliases.entrySet().stream().forEach(e ->
|
||||
@@ -839,7 +839,7 @@ public class ForgeRegistry<V extends IForgeRegistryEntry<V>> implements IForgeRe
|
||||
tag.putString("V", e.getKey().toString());
|
||||
aliases.add(tag);
|
||||
});
|
||||
data.func_218657_a("aliases", aliases);
|
||||
data.put("aliases", aliases);
|
||||
|
||||
ListNBT overrides = new ListNBT();
|
||||
this.overrides.entrySet().stream().forEach(e ->
|
||||
@@ -849,14 +849,14 @@ public class ForgeRegistry<V extends IForgeRegistryEntry<V>> implements IForgeRe
|
||||
tag.putString("V", e.getValue());
|
||||
overrides.add(tag);
|
||||
});
|
||||
data.func_218657_a("overrides", overrides);
|
||||
data.put("overrides", overrides);
|
||||
|
||||
int[] blocked = this.blocked.stream().mapToInt(x->x).sorted().toArray();
|
||||
data.putIntArray("blocked", blocked);
|
||||
|
||||
ListNBT dummied = new ListNBT();
|
||||
this.dummied.stream().sorted().forEach(e -> dummied.add(new StringNBT(e.toString())));
|
||||
data.func_218657_a("dummied", dummied);
|
||||
data.put("dummied", dummied);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -379,7 +379,7 @@ public class GameData
|
||||
state.func_215692_c();
|
||||
}
|
||||
|
||||
block.func_220068_i();
|
||||
block.getLootTable();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class NamespacedDefaultedWrapper<T extends IForgeRegistryEntry<T>> extends Defau
|
||||
}
|
||||
|
||||
@Override
|
||||
public <V extends T> V func_218382_a(int id, ResourceLocation key, V value)
|
||||
public <V extends T> V register(int id, ResourceLocation key, V value)
|
||||
{
|
||||
if (locked)
|
||||
throw new IllegalStateException("Can not register to a locked registry. Modder should use Forge Register methods.");
|
||||
@@ -64,9 +64,9 @@ class NamespacedDefaultedWrapper<T extends IForgeRegistryEntry<T>> extends Defau
|
||||
}
|
||||
|
||||
@Override
|
||||
public <V extends T> V func_218381_a(ResourceLocation key, V value)
|
||||
public <V extends T> V register(ResourceLocation key, V value)
|
||||
{
|
||||
return func_218382_a(-1, key, value);
|
||||
return register(-1, key, value);
|
||||
}
|
||||
|
||||
// Reading Functions
|
||||
|
||||
@@ -43,7 +43,7 @@ class NamespacedWrapper<T extends IForgeRegistryEntry<T>> extends SimpleRegistry
|
||||
}
|
||||
|
||||
@Override
|
||||
public <V extends T> V func_218382_a(int id, ResourceLocation key, V value)
|
||||
public <V extends T> V register(int id, ResourceLocation key, V value)
|
||||
{
|
||||
if (locked)
|
||||
throw new IllegalStateException("Can not register to a locked registry. Modder should use Forge Register methods.");
|
||||
@@ -60,9 +60,9 @@ class NamespacedWrapper<T extends IForgeRegistryEntry<T>> extends SimpleRegistry
|
||||
}
|
||||
|
||||
@Override
|
||||
public <R extends T> R func_218381_a(ResourceLocation key, R value)
|
||||
public <R extends T> R register(ResourceLocation key, R value)
|
||||
{
|
||||
return func_218382_a(-1, key, value);
|
||||
return register(-1, key, value);
|
||||
}
|
||||
|
||||
// Reading Functions
|
||||
|
||||
Reference in new issue
Block a user