Yo! Here again.
I've made my third capability, is workin fine, but is not saving on logged out (or maybe not loadin on loggin)
I've made it exactly like my other capabilities (i think), so, idk y is not workin.
https://github.com/Zanckor/Dragon-Ball-Z/tree/main/src/main/java/com/zanckor/dataStorage/quests/master
Yo!
I'm trying to create a new custom biome, but I don't even know how to start.
I'm not trying to change blocks or ore generation from a vanilla biome, I want to change terraforming (and well, also blocks).
Here's the biome i want to reply: RockyBiome
It's literally what he said.
Where you added this line:
e.put(ModEntityTypes.YOUR_ENTITY.get(), EntityClass.setAttributes());
You need to add a @Mod.EventBusSubsriber
Like this:
@Mod.EventBusSubscriber(modid = baseMmod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
public class ModEventBusEvents {
@SubscribeEvent
public static void entityAttributeEvent(EntityAttributeCreationEvent event) {
event.put(ModEntityTypes.PENGUIN.get(), PenguinEntity.setAttributes());
}
}
If you don't add a @Mod.EventBusSubscriber your mod won't call this class
Then, I need to construct a new instance each time, but then how can I check if that instance isActive, I've asked on discord too, and diesieben07 told me that I need to track the instance, but idk how, or maybe is there any other way to do that?
Okay, my fail was when i construct it, now i only construct it on logged in, but, now my sound goes wrong when i play it on second time, like, it do not actually play it correctly, just a millisecond.
I figured why, but dont know how to fix it.
My problem is right here:
https://pastebin.com/HrhMiWwu
On stop, same if i try to stop it with SoundManager.stop(...)
Yo!
I've that code to start a sound:
TransformShoutInstance TransformShout = new TransformShoutInstance(CustomSounds.TRANSFORM_SHOUT.get(), SoundSource.VOICE, RandomSource.create());
if (keyEvents.counterTransforming > 0 && !(Minecraft.getInstance().getSoundManager().isActive(TransformShout))) { SoundManager.play(TransformShout); }
But is not working, I mean, on !isActive, if It's active it still return me true, any idea?
Okay, i gotcha, if anybody want to know:
I had my sounds registered as SoundEvent, so I've created a new class that extends "AbstractTickableSoundInstance", added a constructor and tick method (fn i do not need it) and then used:
SoundManager.play(new TransformShout(CustomSounds.TRANSFORM_SHOUT.get(), SoundSource.VOICE, RandomSource.create()));
I need to cast my sounds to SoundInstance, but I can't, there's any way to register my sounds on SoundInstance instead SoundEvent? Or any way to use SoundInstance inside SoundInstance
Yo, here again.
I'm creating a new VFX sounds so I need to manage to stop them.
They're working on ClientTickEvent cause I need to start them on press key, like, if player started pressing G, execute a 27s long sound, but I need a way to stop it if player stop pressing G.
Btw, that's not really necessary but I would like to know if there's any way to repeat sound on finish.
Tnks!