Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

brok4d's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. Hello, this mod is the source, you have to get boredhttps://gitlab.com/Lycanite/LycanitesMobs
  2. I do not know if I explained well, what I try is to change the color of the water particles since my biome is all reddish, I have been looking at the classes of the forge particles and I do not see that it can be modified as I am doing, any Subjection, because you told me to update the forge version to give support, but so if I see that each time the private class is forge, and they cannot be accessed, and also the setParticleTextureIndex method with which it could be select the index of the texture of the particle, in the end I think it will get worse instead of better, if someone thinks otherwise than say it.
  3. Look at this guide from here, it helped me a lot. Guide
  4. Well, you should have it, since that's why you get the error, the .png files and the .mcmeta files since the .mcmeta files are for animation if I'm not mistaken. This is what the .mcmeta have. { "animation": { "frametime": 4 } }
  5. hello a question, do you have the .mcmeta files along with the textures?
  6. Hello good guys, I'm trying to change the texture of the particles for the biome, but it doesn't work for me, someone knows why, I've been with the same thing for days, I've debugged it and the Factory class doesn't stop and doesn't show messages with println, well Oh, I'll leave the code in case someone helps me, thanks. @Mod.EventBusSubscriber(modid = MainMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT) public class ParticleTextureColor extends SpriteTexturedParticle { public ParticleTextureColor(ClientWorld world, double x, double y, double z, double motionX, double motionY, double motionZ) { super ( world, x, y, z, motionX, motionY, motionZ ); } @SubscribeEvent public static TextureAtlasSprite textureAtlasSpriteEvent (TextureStitchEvent.Pre event) { System.out.println ("TextureAtlasSprite found"); return event.getMap ().getSprite (new ResourceLocation ( MainMod.MOD_ID, "sprite/particles" )); } @SubscribeEvent public static void onParticleFactoryRegistration(ParticleFactoryRegisterEvent event) { IParticleData.IDeserializer <IParticleData> particleData = new IParticleData.IDeserializer <IParticleData> () { @Override public IParticleData deserialize(ParticleType <IParticleData> particleTypeIn, @NotNull StringReader reader) throws CommandSyntaxException { return particleTypeIn.getDeserializer ().deserialize (particleTypeIn, reader); } @Override public IParticleData read(ParticleType <IParticleData> particleTypeIn, @NotNull PacketBuffer buffer) { return particleTypeIn.getDeserializer ().read ( particleTypeIn, buffer ); } }; ParticleType <IParticleData> particleType = new ParticleType <IParticleData> (true, particleData) { @Override public Codec <IParticleData> func_230522_e_() { return Codec.of ( Encoder.error ("Error Encode"), Decoder.error ( "Error Decode" ) ); } @Override public boolean getAlwaysShow() { return true; } }; Minecraft.getInstance().particles.registerFactory (particleType, new Factory()); System.out.println ( "Yes found particles!!!!" ); } @Override public void setSprite(@NotNull TextureAtlasSprite sprite) { super.setSprite ( Minecraft.getInstance().getAtlasSpriteGetter(new ResourceLocation(MainMod.MOD_ID, "sprite/particles" )) .apply (new ResourceLocation ( MainMod.MOD_ID, "sprite/particles" ) ) ); System.out.println ("TextureAtlasSprite found yes"); } @Override public @NotNull IParticleRenderType getRenderType() { return IParticleRenderType.PARTICLE_SHEET_TRANSLUCENT; } @Override public void setColor(float particleRedIn, float particleGreenIn, float particleBlueIn) { super.setColor ( 1.0F, 0.2F, 0.2F ); } @Override public void renderParticle(@NotNull IVertexBuilder buffer, @NotNull ActiveRenderInfo renderInfo, float partialTicks) { System.out.println ( "Yes found particles texture!!!!" ); Minecraft.getInstance().getAtlasSpriteGetter(new ResourceLocation(MainMod.MOD_ID, "sprite/particles")) .apply(new ResourceLocation(MainMod.MOD_ID, "sprite/particles")); super.renderParticle ( buffer, renderInfo, partialTicks ); } public static class Factory implements IParticleFactory<IParticleData> { @Nullable @Override public Particle makeParticle(@NotNull IParticleData typeIn, @NotNull ClientWorld world, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { System.out.println ( "Yes found particles Factory!!!!" ); return new ParticleTextureColor ( world, x, y, z, xSpeed, ySpeed, zSpeed ); } } }
  7. Thank you for everything, it has helped me a lot, thank you.
  8. Hello good, I am trying to move the entity of the vehicle, almost everything is ready but it does not move, someone can help me. package com.brok.brokmod.client.render.entity; import net.minecraft.block.BlockState; import net.minecraft.entity.*; import net.minecraft.entity.ai.attributes.AttributeModifierMap; import net.minecraft.entity.ai.attributes.Attributes; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.network.IPacket; import net.minecraft.util.*; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.vector.Vector3d; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.network.NetworkHooks; import javax.annotation.Nonnull; public class CarBrokEntity extends CreatureEntity{ public CarBrokEntity(EntityType<? extends CreatureEntity> type, World worldIn) { super(type, worldIn); experienceValue = 0; setNoAI(true); enablePersistence(); } @Override public void travel(@Nonnull Vector3d pos) { LivingEntity entity = this; float forward = entity.moveForward; float strafe = 0; pos = new Vector3d (strafe, 0 ,forward); if (this.isBeingRidden()) { entity.rotationYaw = this.rotationYaw; entity.prevRotationYaw = this.rotationYaw; entity.rotationPitch = this.rotationPitch * 0.5F; this.setRotation(entity.rotationYaw, entity.rotationPitch); entity.renderYawOffset = this.rotationYaw; entity.rotationYawHead = this.rotationYaw; entity.stepHeight = 1.0F; this.move(MoverType.PLAYER, pos); super.travel(pos); entity.prevLimbSwingAmount = this.limbSwingAmount; double d1 = 1.0D; double d0 = 1.0D; float f1 = MathHelper.sqrt(d1 * d1 + d0 * d0) * 4.0F; if (f1 > 1.0F) f1 = 1.0F; entity.limbSwingAmount += (f1 - this.limbSwingAmount) * 0.4F; entity.limbSwing += this.limbSwingAmount; return; } entity.stepHeight = 0.5F; super.travel(pos); } @Nonnull @Override public ActionResultType func_230254_b_(@Nonnull PlayerEntity sourcePlayer, @Nonnull Hand hand) { ActionResultType resultType = ActionResultType.func_233537_a_(this.world.isRemote()); super.func_230254_b_(sourcePlayer, hand); sourcePlayer.startRiding(this); return resultType; } @Override public boolean canDespawn(double distanceToClosestPlayer) { return false; } @Nonnull @Override public IPacket<?> createSpawnPacket() { return NetworkHooks.getEntitySpawningPacket(this); } @OnlyIn(Dist.CLIENT) public static AttributeModifierMap.MutableAttribute mutableAttributeCarBrok(){ return CreatureEntity.func_233666_p_().createMutableAttribute(Attributes.MAX_HEALTH, 10.0D) .createMutableAttribute(Attributes.ATTACK_DAMAGE, 2.0D) .createMutableAttribute(Attributes.ATTACK_SPEED, 1.0D) .createMutableAttribute(Attributes.ATTACK_KNOCKBACK, 1.0D) .createMutableAttribute(Attributes.MOVEMENT_SPEED, 1.0D); } @Nonnull @Override public CreatureAttribute getCreatureAttribute() { return CreatureAttribute.UNDEFINED; } @Override protected int getExperiencePoints(@Nonnull PlayerEntity player) { return 1 + this.world.rand.nextInt(5); } @Override public void playStepSound(@Nonnull BlockPos pos, @Nonnull BlockState blockIn) { this.playSound(SoundEvents.BLOCK_METAL_STEP, 0.25F, 1.0F); } @Override public SoundEvent getHurtSound(@Nonnull DamageSource ds) { return SoundEvents.BLOCK_METAL_BREAK; } @Override public SoundEvent getDeathSound() { return SoundEvents.BLOCK_METAL_BREAK; } @Override protected SoundEvent getAmbientSound() { return SoundEvents.AMBIENT_WARPED_FOREST_LOOP; } }
  9. It is 1.12.2 but I switched to 1.16.4 and I will have it when I need it, thanks anyway.
  10. Hello good, first of all a greeting to all, I have been programming the mod for a few weeks and I am stuck. I need the water particles to only run in the init method in the Main of the mod, I've been looking at the forum for 3 days and I decided to register and ask for help, because I can't get it. The structure is a biome, so I am trying with a condition that executes only when it is in the biome and not in the normal game, from a method that is within the condition. But I don't know what to put in the condition so that it only runs in the biome and not in the 2. Class WaterColorParticles. public static void onWaterColor() { if (BiomeRuby.getBiomeForId(1) == BiomeRuby.getBiomeForId(1)) { ParticlesWaterColorRubyBubble.Registery(); } } Class BiomeRuby. public BiomeRuby() { super(new BiomeProperties("ruby_biome").setBaseHeight(1.5F).setHeightVariation(1.2F).setTemperature(6F).setWaterColor(ColorRubyBiomeWater.original)); Biome.REGISTRY.getObjectById(1); } As you can see I do not know what to put and try everything and nothing. Thanks first and greetings to all.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.