16.10.26-21:24
This commit is contained in:
@@ -25,9 +25,6 @@ public class ModItems {
|
|||||||
() -> new test_spawn_magic_tourch(new Item.Properties()));
|
() -> new test_spawn_magic_tourch(new Item.Properties()));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void register(IEventBus eventBus) {
|
public static void register(IEventBus eventBus) {
|
||||||
ITEMS.register(eventBus);
|
ITEMS.register(eventBus);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,5 @@ public class ModItemModelProvider extends ItemModelProvider {
|
|||||||
|
|
||||||
withExistingParent(ModItems.TEST_Spawn_LIGHT.getId().getPath(), mcLoc("item/stick"));
|
withExistingParent(ModItems.TEST_Spawn_LIGHT.getId().getPath(), mcLoc("item/stick"));
|
||||||
withExistingParent(ModItems.TEST_Spawn_MAGIC_TOURCH.getId().getPath(), mcLoc("item/stick"));
|
withExistingParent(ModItems.TEST_Spawn_MAGIC_TOURCH.getId().getPath(), mcLoc("item/stick"));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import foundry.veil.api.client.render.VeilRenderSystem;
|
|||||||
import foundry.veil.api.quasar.particle.ParticleEmitter;
|
import foundry.veil.api.quasar.particle.ParticleEmitter;
|
||||||
import foundry.veil.api.quasar.particle.ParticleSystemManager;
|
import foundry.veil.api.quasar.particle.ParticleSystemManager;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
|
|
||||||
public class CustomPartical {
|
public class CustomPartical {
|
||||||
@@ -16,6 +17,16 @@ public class CustomPartical {
|
|||||||
manager.addParticleSystem(emitter);
|
manager.addParticleSystem(emitter);
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void spawnParticleByEntity(Entity entity, ResourceLocation id){
|
||||||
|
try {
|
||||||
|
ParticleSystemManager manager = VeilRenderSystem.renderer().getParticleManager();
|
||||||
|
ParticleEmitter emitter = manager.createEmitter(id);
|
||||||
|
emitter.setAttachedEntity(entity);
|
||||||
|
manager.addParticleSystem(emitter);
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user