initial commit

This commit is contained in:
Sen 2025-03-11 00:23:54 +01:00 committed by Sen
parent 3c9ee26b06
commit 22186c33b9
1458 changed files with 282792 additions and 0 deletions

View file

@ -0,0 +1,20 @@
package game.init;
public class RegistryDefaulted<K, V> extends RegistrySimple<K, V>
{
/**
* Default object for this registry, returned when an object is not found.
*/
private final V defaultObject;
public RegistryDefaulted(V defaultObjectIn)
{
this.defaultObject = defaultObjectIn;
}
public V getObject(K name)
{
V v = super.getObject(name);
return (V)(v == null ? this.defaultObject : v);
}
}