mirror of
https://github.com/neoforged/NeoForge.git
synced 2026-10-12 02:19:42 +00:00
Co-authored-by: XFactHD <[email protected]> Co-authored-by: Technici4n <[email protected]> Co-authored-by: sciwhiz12 <[email protected]> Co-authored-by: Matyrobbrt <[email protected]> Co-authored-by: Marc Hermans <[email protected]> Co-authored-by: Sara Freimer <[email protected]>
42 lines
2.1 KiB
Diff
42 lines
2.1 KiB
Diff
--- a/net/minecraft/client/particle/ParticleResources.java
|
|
+++ b/net/minecraft/client/particle/ParticleResources.java
|
|
@@ -44,7 +_,7 @@
|
|
private static final Logger LOGGER = LogUtils.getLogger();
|
|
private static final FileToIdConverter PARTICLE_LISTER = FileToIdConverter.json("particles");
|
|
private final Map<Identifier, ParticleResources.MutableSpriteSet> spriteSets = Maps.newHashMap();
|
|
- private final Int2ObjectMap<ParticleProvider<?>> providers = new Int2ObjectOpenHashMap<>();
|
|
+ private final Map<Identifier, ParticleProvider<?>> providers = new java.util.HashMap<>();
|
|
private @Nullable Runnable onReload;
|
|
|
|
public ParticleResources() {
|
|
@@ -186,14 +_,18 @@
|
|
this.register(ParticleTypes.SULFUR_CUBE_GOO, BreakingItemParticle.SulfurCubeProvider::new);
|
|
}
|
|
|
|
+ /** @deprecated Register via {@link net.neoforged.neoforge.client.event.RegisterParticleProvidersEvent} */
|
|
+ @Deprecated
|
|
public <T extends ParticleOptions> void register(ParticleType<T> type, ParticleProvider<T> provider) {
|
|
- this.providers.put(BuiltInRegistries.PARTICLE_TYPE.getId(type), provider);
|
|
+ this.providers.put(BuiltInRegistries.PARTICLE_TYPE.getKey(type), provider);
|
|
}
|
|
|
|
+ /** @deprecated Register via {@link net.neoforged.neoforge.client.event.RegisterParticleProvidersEvent} */
|
|
+ @Deprecated
|
|
public <T extends ParticleOptions> void register(ParticleType<T> type, ParticleResources.SpriteParticleRegistration<T> provider) {
|
|
ParticleResources.MutableSpriteSet spriteSet = new ParticleResources.MutableSpriteSet();
|
|
this.spriteSets.put(BuiltInRegistries.PARTICLE_TYPE.getKey(type), spriteSet);
|
|
- this.providers.put(BuiltInRegistries.PARTICLE_TYPE.getId(type), provider.create(spriteSet));
|
|
+ this.providers.put(BuiltInRegistries.PARTICLE_TYPE.getKey(type), provider.create(spriteSet));
|
|
}
|
|
|
|
@Override
|
|
@@ -283,7 +_,7 @@
|
|
}
|
|
}
|
|
|
|
- public Int2ObjectMap<ParticleProvider<?>> getProviders() {
|
|
+ public Map<Identifier, ParticleProvider<?>> getProviders() {
|
|
return this.providers;
|
|
}
|
|
|