Skip to content

Commit

Permalink
[1.20.4] Ported the particle mod element (MCreator#4585)
Browse files Browse the repository at this point in the history
* ported

* forgot to update the copyright
  • Loading branch information
NerdyPuzzle authored Feb 4, 2024
1 parent 5828e80 commit eea4dd1
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion plugins/generator-1.20.4/neoforge-1.20.4/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ structures_dir: "@MODDATAROOT/structures"
#item_textures_dir: "@MODASSETSROOT/textures/item"
#entity_textures_dir: "@MODASSETSROOT/textures/entities"
#effect_textures_dir: "@MODASSETSROOT/textures/mob_effect"
#particle_textures_dir: "@MODASSETSROOT/textures/particle"
particle_textures_dir: "@MODASSETSROOT/textures/particle"
screen_textures_dir: "@MODASSETSROOT/textures/screens"
#armor_textures_dir: "@MODASSETSROOT/textures/models/armor"
other_textures_dir: "@MODASSETSROOT/textures"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<#--
# MCreator (https://mcreator.net/)
# Copyright (C) 2012-2020, Pylo
# Copyright (C) 2020-2023, Pylo, opensource contributors
# Copyright (C) 2020-2024, Pylo, opensource contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<#--
# MCreator (https://mcreator.net/)
# Copyright (C) 2012-2020, Pylo
# Copyright (C) 2020-2023, Pylo, opensource contributors
# Copyright (C) 2020-2024, Pylo, opensource contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -38,10 +38,10 @@ package ${package}.init;

public class ${JavaModName}ParticleTypes {

public static final DeferredRegister<ParticleType<?>> REGISTRY = DeferredRegister.create(ForgeRegistries.PARTICLE_TYPES, ${JavaModName}.MODID);
public static final DeferredRegister<ParticleType<?>> REGISTRY = DeferredRegister.create(Registries.PARTICLE_TYPE, ${JavaModName}.MODID);

<#list particles as particle>
public static final RegistryObject<SimpleParticleType> ${particle.getModElement().getRegistryNameUpper()} =
public static final DeferredHolder<ParticleType<?>, SimpleParticleType> ${particle.getModElement().getRegistryNameUpper()} =
REGISTRY.register("${particle.getModElement().getRegistryName()}", () -> new SimpleParticleType(${particle.alwaysShow}));
</#list>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import org.apache.logging.log4j.Logger;
<#if w.hasElementsOfType("potion")>${JavaModName}Potions.REGISTRY.register(modEventBus);</#if>
<#if w.hasElementsOfType("enchantment")>${JavaModName}Enchantments.REGISTRY.register(modEventBus);</#if>
<#if w.hasElementsOfType("gui")>${JavaModName}Menus.REGISTRY.register(modEventBus);</#if>
<#if w.hasElementsOfType("particle")>${JavaModName}ParticleTypes.REGISTRY.register(modEventBus);</#if>
}

<#-- Networking support below -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<#--
# MCreator (https://mcreator.net/)
# Copyright (C) 2012-2020, Pylo
# Copyright (C) 2020-2023, Pylo, opensource contributors
# Copyright (C) 2020-2024, Pylo, opensource contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down

0 comments on commit eea4dd1

Please sign in to comment.