Reimplemented cable and parts rendering.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
package appeng.core.features.registries;
|
||||
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import appeng.api.parts.IPartModels;
|
||||
|
||||
|
||||
public class PartModels implements IPartModels
|
||||
{
|
||||
|
||||
private final Set<ResourceLocation> models = new HashSet<>();
|
||||
|
||||
private boolean initialized = false;
|
||||
|
||||
@Override
|
||||
public void registerModels( Collection<ResourceLocation> partModels )
|
||||
{
|
||||
if( initialized )
|
||||
{
|
||||
throw new IllegalStateException( "Cannot register models after the pre-initialization phase!" );
|
||||
}
|
||||
|
||||
models.addAll( partModels );
|
||||
}
|
||||
|
||||
public Set<ResourceLocation> getModels()
|
||||
{
|
||||
return models;
|
||||
}
|
||||
|
||||
public void setInitialized( boolean initialized )
|
||||
{
|
||||
this.initialized = initialized;
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,7 @@ import appeng.api.features.IWirelessTermRegistry;
|
||||
import appeng.api.features.IWorldGen;
|
||||
import appeng.api.movable.IMovableRegistry;
|
||||
import appeng.api.networking.IGridCacheRegistry;
|
||||
import appeng.api.parts.IPartModels;
|
||||
import appeng.api.storage.ICellRegistry;
|
||||
import appeng.api.storage.IExternalStorageRegistry;
|
||||
|
||||
@@ -59,6 +60,7 @@ public class RegistryContainer implements IRegistryContainer
|
||||
private final IMatterCannonAmmoRegistry matterCannonReg = new MatterCannonAmmoRegistry();
|
||||
private final IPlayerRegistry playerRegistry = new PlayerRegistry();
|
||||
private final IRecipeHandlerRegistry recipeReg = new RecipeHandlerRegistry();
|
||||
private final IPartModels partModels = new PartModels();
|
||||
|
||||
@Override
|
||||
public IMovableRegistry movable()
|
||||
@@ -143,4 +145,11 @@ public class RegistryContainer implements IRegistryContainer
|
||||
{
|
||||
return WorldGenRegistry.INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPartModels partModels()
|
||||
{
|
||||
return partModels;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user