Jump to content

XsistOrder

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by XsistOrder

  1. I am new to modding and I wanted to make a custom particle for my mod I made the and I got the error Caused by: java.lang.IllegalStateException: Redundant texture list for particle and I don't know how to fix it. everything I have made relating to the particle if need to fix it: package net.XO.echoing_void.particle; import net.XO.echoing_void.Echoing_Void; import net.minecraft.core.particles.ParticleType; import net.minecraft.core.particles.SimpleParticleType; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; public class ModParticles { public static final DeferredRegister<ParticleType<?>> PARTICLE_TYPES = DeferredRegister.create(ForgeRegistries.PARTICLE_TYPES, Echoing_Void.MODID); public static final RegistryObject<SimpleParticleType> VOID_BUBBLES = PARTICLE_TYPES.register("void_bubbles", () -> new SimpleParticleType(true)); public static void register(IEventBus eventBus) { PARTICLE_TYPES.register(eventBus); } } package net.XO.echoing_void.particle.custom; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.particle.*; import net.minecraft.core.particles.SimpleParticleType; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; public class VoidBubbles extends TextureSheetParticle { protected VoidBubbles(ClientLevel level, double xCoord, double yCoord, double zCoord, SpriteSet spriteSet, double xd, double yd, double zd) { super(level, xCoord, yCoord, zCoord, xd, yd, zd); this.friction = 0.8F; this.xd = xd; this.yd = yd; this.zd = zd; this.quadSize *= 0.85F; this.lifetime = 20; this.setSpriteFromAge(spriteSet); this.rCol = 1f; this.gCol = 1f; this.bCol = 1f; } @Override public void tick() { super.tick(); fadeOut(); } private void fadeOut() { this.alpha = (-(1/(float)lifetime) * age + 1); } @Override public ParticleRenderType getRenderType() { return ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT; } @OnlyIn(Dist.CLIENT) public static class Provider implements ParticleProvider<SimpleParticleType> { private final SpriteSet sprites; public Provider(SpriteSet spriteSet) { this.sprites = spriteSet; } public Particle createParticle(SimpleParticleType particleType, ClientLevel level, double x, double y, double z, double dx, double dy, double dz) { return new VoidBubbles(level, x, y, z, this.sprites, dx, dy, dz); } } } { "textures": [ "echoing_void:void_bubble" ] }
  2. I have been making a double plant block that needs the light level property but I get the error Caused by: java.lang.IllegalArgumentException: Cannot set property EnumProperty{name=half, clazz=class net.minecraft.world.level.block.state.properties.DoubleBlockHalf, values=[upper, lower]} as it does not exist in Block{minecraft:air} and I don't how to fix it. code for the block registry: public static final RegistryObject<Block> TALL_INVERTED_END_FERN = registerBlock("tall_inverted_end_fern", () -> new ModTallInvertedEndFern(BlockBehaviour.Properties.of(Material.REPLACEABLE_PLANT).instabreak() .noCollission().sound(SoundType.GRASS).lightLevel(state -> state.getValue(ModTallInvertedEndFern.LIT) ? 15 : 0)), ModCreativeModeTab.ECHOING_VOID_TAB); code for the block class: package net.XO.echoing_void.blocks.custom; import net.XO.echoing_void.blocks.ModBlocks; import net.minecraft.core.BlockPos; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.DoublePlantBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BooleanProperty; public class ModTallInvertedEndFern extends DoublePlantBlock { public ModTallInvertedEndFern(Properties pProperties) { super(pProperties); } @Override protected boolean mayPlaceOn(BlockState p_55920_, BlockGetter p_55921_, BlockPos p_55922_) { return p_55920_.is(ModBlocks.INVERTED_END_STONE_GRASS_BLOCK.get()) || p_55920_.is(ModBlocks.INVERTED_GREEN_END_STONE_GRASS_BLOCK.get()) || p_55920_.is(ModBlocks.INVERTED_END_DIRT_GRASS_BLOCK.get()) || super.mayPlaceOn(p_55920_, p_55921_, p_55922_); } public static final BooleanProperty LIT = BooleanProperty.create("lit"); @Override protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) { builder.add(LIT); } }
  3. I have been making a custom block that acts like powder snow and I have gotten every to work except there is no fog and I have no idea how or what is needed to add fog.
  4. for a few days I have been trying to find out how to make a custom grass block placeable on blocks like end stone but I don't know how to make it happen.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.