Initial 1.13.2 update. Major thing to note is that Dimensions have been completely revamped.

DimensionType is not unique per Dimension. See DimensionManager for more details.
Vanilla now has a chunk loading system, so Forge's will need to be deprecated/adapted.
This commit is contained in:
LexManos committed 2019-02-14 15:08:53 -08:00
1 parent 9a1688599a
commit ca72710937
361 files changed
+3166 -3547

No files matched your search

@@ -33,7 +33,7 @@ import net.minecraft.util.registry.RegistryNamespacedDefaultedByKey;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
class NamespacedDefaultedWrapper<V extends IForgeRegistryEntry<V>> extends RegistryNamespacedDefaultedByKey<ResourceLocation, V> implements ILockableRegistry
class NamespacedDefaultedWrapper<V extends IForgeRegistryEntry<V>> extends RegistryNamespacedDefaultedByKey<V> implements ILockableRegistry
{
private static final Logger LOGGER = LogManager.getLogger();
private boolean locked = false;
@@ -66,18 +66,19 @@ class NamespacedDefaultedWrapper<V extends IForgeRegistryEntry<V>> extends Regis
register(-1, key, value);
}
// Reading Functions
@Override
public void validateKey()
@Nullable
public V func_212608_b(@Nullable ResourceLocation name)
{
this.delegate.validateKey();
return this.delegate.getRaw(name); //get without default
}
// Reading Functions
@Override
@Nullable
public V get(@Nullable ResourceLocation name)
{
return this.delegate.getValue(name);
return this.delegate.getValue(name); //getOrDefault
}
@Override
@@ -88,7 +89,7 @@ class NamespacedDefaultedWrapper<V extends IForgeRegistryEntry<V>> extends Regis
}
@Override
public boolean containsKey(ResourceLocation key)
public boolean func_212607_c(ResourceLocation key)
{
return this.delegate.containsKey(key);
}
@@ -126,6 +127,12 @@ class NamespacedDefaultedWrapper<V extends IForgeRegistryEntry<V>> extends Regis
return values.stream().skip(random.nextInt(values.size())).findFirst().orElse(null);
}
@Override
public ResourceLocation func_212609_b()
{
return this.delegate.getDefaultKey();
}
//internal
@Override
public void lock(){ this.locked = true; }