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

Pickle_Face5

Members
  • Posts

    54
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • URL
    https://www.curseforge.com/members/pickle_face5/
  • Location
    Milky Way Galaxy
  • Personal Text
    Axolotl Supremacy

Recent Profile Visitors

1132 profile views

Pickle_Face5's Achievements

Stone Miner

Stone Miner (3/8)

1

Reputation

  1. Hey, I was messing around with Biomes and Carvers, when after trying to run the client, the Carver was not present when loading. I attached the log to this post. I have a GitHub link to the code here: https://github.com/PickleFace5/Oceans-Compound Any help is appreciated. Thanks. latest.log
  2. So, I'm having issues on understanding how to register attributes for my entity. Here's the error: https://pastebin.com/8YGzE6L4 Entity Class: Registry and EntityAttributeCreationEvent: And heres the model: Any help is appreciated, thanks.
  3. Yes, that would be a great idea. https://pastebin.com/yK48irm0
  4. You need to Override registerGoals() in your entity. Since you seem to be creating a custom sheep, the code for the normal sheep in minecraft is: protected void registerGoals() { this.eatBlockGoal = new EatGrassGoal(this); this.goalSelector.addGoal(0, new SwimGoal(this)); this.goalSelector.addGoal(1, new PanicGoal(this, 1.25D)); this.goalSelector.addGoal(2, new BreedGoal(this, 1.0D)); this.goalSelector.addGoal(3, new TemptGoal(this, 1.1D, Ingredient.of(Items.WHEAT), false)); this.goalSelector.addGoal(4, new FollowParentGoal(this, 1.1D)); this.goalSelector.addGoal(5, this.eatBlockGoal); this.goalSelector.addGoal(6, new WaterAvoidingRandomWalkingGoal(this, 1.0D)); this.goalSelector.addGoal(7, new LookAtGoal(this, PlayerEntity.class, 6.0F)); this.goalSelector.addGoal(8, new LookRandomlyGoal(this)); } What this is doing is telling the sheep what to do, based on priority (the lower the number, the higher the priority.). For example, the Sheep's highest priority goal is to float in water when its in water.
  5. Hi, I was trying to add a piranha entity in the game. Very similar to Cod, and when testing it out, I realised that I was getting a NullPointerException. I guess that I'm forgetting something important like a function thats required or such, so I'm reaching out to see if someone can point me in the right direction. Piranha Entity class: Registering the Entity: Piranha Rendering: Finally, Piranha Model: Any help in the right direction is appreciated, thanks.
  6. Make sure he has all the mods and the configs needed that he needs on his side of Minecraft.
  7. Alright, so I decided to add particles to my Rube Ore (basically Redstone Ore but 24 /7) and while testing the particle data, I get these errors (same as title) about it being cast to RedstoneParticleData, even though I don't see it anywhere. It says the errors in the Ore Block itself, so heres the code for that: package com.pickleface.ruby.blocks; import com.pickleface.ruby.particles.RubyParticleData; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.OreBlock; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.ToolType; import java.util.Random; public class RubyOre extends OreBlock { public RubyOre() { super(Block.Properties.create(Material.ROCK) .hardnessAndResistance(3.0f, 3.5f) .sound(SoundType.STONE) .harvestLevel(2) .harvestTool(ToolType.PICKAXE) .setRequiresTool() ); } @Override public int getExpDrop(BlockState state, IWorldReader reader, BlockPos pos, int fortune, int silktouch) { return 1; } public boolean ticksRandomly(BlockState state) { return true; } @OnlyIn(Dist.CLIENT) public void animateTick(BlockState stateIn, World worldIn, BlockPos pos, Random rand) { spawnParticles(worldIn, pos); } private static void spawnParticles(World world, BlockPos worldIn) { Random random = world.rand; for(Direction direction : Direction.values()) { BlockPos blockpos = worldIn.offset(direction); if (!world.getBlockState(blockpos).isOpaqueCube(world, blockpos)) { Direction.Axis direction$axis = direction.getAxis(); double d1 = direction$axis == Direction.Axis.X ? 0.5D + 0.5625D * (double)direction.getXOffset() : (double)random.nextFloat(); double d2 = direction$axis == Direction.Axis.Y ? 0.5D + 0.5625D * (double)direction.getYOffset() : (double)random.nextFloat(); double d3 = direction$axis == Direction.Axis.Z ? 0.5D + 0.5625D * (double)direction.getZOffset() : (double)random.nextFloat(); world.addParticle(new RubyParticleData(1.0F, 0F, 0F, 1.0F), (double)worldIn.getX() + d1, (double)worldIn.getY() + d2, (double)worldIn.getZ() + d3, 0.0D, 0.0D, 0.0D); } } } } and if its needed, heres the particle data: package com.pickleface.ruby.particles; import com.mojang.brigadier.StringReader; import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; import java.util.Locale; import net.minecraft.network.PacketBuffer; import net.minecraft.particles.*; import net.minecraft.util.math.MathHelper; import net.minecraft.util.registry.Registry; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; public class RubyParticleData implements IParticleData { public static final Codec<RubyParticleData> field_239802_b_ = RecordCodecBuilder.create((p_239803_0_) -> { return p_239803_0_.group(Codec.FLOAT.fieldOf("r").forGetter((p_239807_0_) -> { return p_239807_0_.red; }), Codec.FLOAT.fieldOf("g").forGetter((p_239806_0_) -> { return p_239806_0_.green; }), Codec.FLOAT.fieldOf("b").forGetter((p_239805_0_) -> { return p_239805_0_.blue; }), Codec.FLOAT.fieldOf("scale").forGetter((p_239804_0_) -> { return p_239804_0_.alpha; })).apply(p_239803_0_, RubyParticleData::new); }); private final float red; private final float green; private final float blue; private final float alpha; public RubyParticleData(float red, float green, float blue, float alpha) { this.red = red; this.green = green; this.blue = blue; this.alpha = MathHelper.clamp(alpha, 0.01F, 4.0F); } public void write(PacketBuffer buffer) { buffer.writeFloat(this.red); buffer.writeFloat(this.green); buffer.writeFloat(this.blue); buffer.writeFloat(this.alpha); } public String getParameters() { return String.format(Locale.ROOT, "%s %.2f %.2f %.2f %.2f", Registry.PARTICLE_TYPE.getKey(this.getType()), this.red, this.green, this.blue, this.alpha); } public ParticleType<RedstoneParticleData> getType() { return ParticleTypes.DUST; } } Any help is appreciated, thanks.
  8. Idk what this means. heres the latest.log though. Here's the registry: package com.pickleface.ruby.util; import com.pickleface.ruby.Ruby; import com.pickleface.ruby.armor.ModArmorMaterial; import com.pickleface.ruby.blocks.*; import com.pickleface.ruby.items.*; import com.pickleface.ruby.tools.ModItemTier; import net.minecraft.block.Block; import net.minecraft.block.OreBlock; import net.minecraft.inventory.EquipmentSlotType; import net.minecraft.item.*; import net.minecraft.particles.BasicParticleType; import net.minecraft.particles.ParticleType; import net.minecraft.util.ResourceLocation; import net.minecraft.util.SoundEvent; import net.minecraft.util.SoundEvents; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; public class RegistryHandler { public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, Ruby.MOD_ID); public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, Ruby.MOD_ID); public static final DeferredRegister<SoundEvent> SOUNDS = DeferredRegister.create(ForgeRegistries.SOUND_EVENTS, Ruby.MOD_ID); public static final DeferredRegister<ParticleType<?>> PARTICLES = DeferredRegister.create(ForgeRegistries.PARTICLE_TYPES, Ruby.MOD_ID); public static void init() { IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); ITEMS.register(modEventBus); BLOCKS.register(modEventBus); SOUNDS.register(modEventBus); PARTICLES.register(modEventBus); } // Items public static final RegistryObject<Item> RUBY = ITEMS.register("ruby", RubyItem::new); public static final RegistryObject<RubyApple> RUBY_APPLE = ITEMS.register("ruby_apple", RubyApple::new); public static final RegistryObject<MusicDiscItem> MUSIC_DISC_P_A_T = ITEMS.register("music_disc_peace_and_tranquility", RubyMusicDisc::new); // Tools public static final RegistryObject<SwordItem> RUBY_SWORD = ITEMS.register("ruby_sword", () -> new SwordItem(ModItemTier.RUBY, 7, -2.4F, new Item.Properties().group(ItemGroup.COMBAT))); public static final RegistryObject<AxeItem> RUBY_AXE = ITEMS.register("ruby_axe", () -> new AxeItem(ModItemTier.RUBY, 8, -3.0F, new Item.Properties().group(ItemGroup.TOOLS))); public static final RegistryObject<PickaxeItem> RUBY_PICKAXE = ITEMS.register("ruby_pickaxe", () -> new PickaxeItem(ModItemTier.RUBY, 4, -2.8F, new Item.Properties().group(ItemGroup.TOOLS))); public static final RegistryObject<ShovelItem> RUBY_SHOVEL = ITEMS.register("ruby_shovel", () -> new ShovelItem(ModItemTier.RUBY, 6, -3.0F, new Item.Properties().group(ItemGroup.TOOLS))); public static final RegistryObject<HoeItem> RUBY_HOE = ITEMS.register("ruby_hoe", () -> new HoeItem(ModItemTier.RUBY, 0, 0, new Item.Properties().group(ItemGroup.TOOLS))); // Armor public static final RegistryObject<ArmorItem> RUBY_HELMET = ITEMS.register("ruby_helmet", () -> new ArmorItem(ModArmorMaterial.RUBY, EquipmentSlotType.HEAD, new Item.Properties().group(ItemGroup.COMBAT))); public static final RegistryObject<ArmorItem> RUBY_CHESTPLATE = ITEMS.register("ruby_chestplate", () -> new ArmorItem(ModArmorMaterial.RUBY, EquipmentSlotType.CHEST, new Item.Properties().group(ItemGroup.COMBAT))); public static final RegistryObject<ArmorItem> RUBY_LEGGINGS = ITEMS.register("ruby_leggings", () -> new ArmorItem(ModArmorMaterial.RUBY, EquipmentSlotType.LEGS, new Item.Properties().group(ItemGroup.COMBAT))); public static final RegistryObject<ArmorItem> RUBY_BOOTS = ITEMS.register("ruby_boots", () -> new ArmorItem(ModArmorMaterial.RUBY, EquipmentSlotType.FEET, new Item.Properties().group(ItemGroup.COMBAT))); public static final RegistryObject<HorseArmorItem> RUBY_HORSE_ARMOR = ITEMS.register("ruby_horse_armor", () -> new HorseArmorItem(15, new ResourceLocation(Ruby.MOD_ID + ":textures/entity/horse/armor/horse_armor_ruby.png"), new Item.Properties().group(ItemGroup.COMBAT))); // Blocks public static final RegistryObject<Block> BLOCK_OF_RUBY = BLOCKS.register("ruby_block", RubyBlock::new); public static final RegistryObject<OreBlock> RUBY_ORE = BLOCKS.register("ruby_ore", RubyOre::new); // Block Items public static final RegistryObject<Item> BLOCK_OF_RUBY_ITEM = ITEMS.register("ruby_block", () -> new BlockItemBase(BLOCK_OF_RUBY.get())); public static final RegistryObject<Item> RUBY_ORE_ITEM = ITEMS.register("ruby_ore", () -> new BlockItemBase(RUBY_ORE.get())); // Sound Events public static final RegistryObject<SoundEvent> MUSIC_DISC_PEACE_AND_TRANQUILITY = SOUNDS.register("music_disc.peace_and_tranquility", () -> new SoundEvent(new ResourceLocation("ruby", "music_disc.peace_and_tranquility"))); // Particles public static final RegistryObject<ParticleType<BasicParticleType>> RUBY_SHINE = PARTICLES.register("ruby_shine", () -> new BasicParticleType(false)); } Any help is appreciated. latest.log
  9. I'm trying to make a berry bush that generates in forests and plains (more common in forests), and now it doesn't generate at all. Here's the code: package com.pickleface.lifecraft.world.gen; import com.google.common.collect.ImmutableSet; import com.pickleface.lifecraft.LifeCraft; import com.pickleface.lifecraft.blocks.BlueberryBush; import com.pickleface.lifecraft.util.Registry; import net.minecraft.block.Blocks; import net.minecraft.world.biome.Biome; import net.minecraft.world.gen.GenerationStage; import net.minecraft.world.gen.blockplacer.SimpleBlockPlacer; import net.minecraft.world.gen.blockstateprovider.SimpleBlockStateProvider; import net.minecraft.world.gen.feature.*; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.event.world.BiomeLoadingEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(modid = LifeCraft.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class VeganGen { @SubscribeEvent public static void generateBushes(BiomeLoadingEvent event) { BlockClusterFeatureConfig BLUEBERRY_BUSH_PATCH_CONFIG = (new BlockClusterFeatureConfig.Builder(new SimpleBlockStateProvider(Registry.BLUEBERRY_BUSH.get().getDefaultState().with(BlueberryBush.AGE, 3)), SimpleBlockPlacer.PLACER)).tries(64).whitelist(ImmutableSet.of(Blocks.GRASS_BLOCK.getDefaultState().getBlock())).func_227317_b_().build(); ConfiguredFeature<?, ?> PATCH_BLUEBERRY_BUSH = Feature.RANDOM_PATCH.withConfiguration(BLUEBERRY_BUSH_PATCH_CONFIG); ConfiguredFeature<?, ?> PATCH_BLUEBERRY_DECORATED = PATCH_BLUEBERRY_BUSH.withPlacement(Features.Placements.PATCH_PLACEMENT).chance(24); if (event.getCategory().getString().equals("forest")) { event.getGeneration().withFeature(GenerationStage.Decoration.VEGETAL_DECORATION, PATCH_BLUEBERRY_DECORATED); } else if (event.getCategory().getString().equals("plains")) { event.getGeneration().withFeature(GenerationStage.Decoration.VEGETAL_DECORATION, PATCH_BLUEBERRY_BUSH); } } } Any help is appreciated.
  10. I'm trying to make a bush block spawn in a certain biome, but how would I do that with BiomeLoadingEvent?
  11. I'm making a custom particle to ake the game more "alive", but I've never done particles, so this is fun. Anyway, heres the code for the part where I register the factory: @Mod.EventBusSubscriber(modid = WildCraft.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT) public class ParticleUtil { @SubscribeEvent() public static void registerParticles(ParticleFactoryRegisterEvent event) { Minecraft.getInstance().particles.registerFactory(Registry.SPIDER_PARTICLE.get(), SpiderParticle.Factory::new); } } I'm assuming there something wrong with the particle class itself also, so I'll put its code here also: @OnlyIn(Dist.CLIENT) public class SpiderParticle extends SpriteTexturedParticle { public SpiderParticle(ClientWorld world, double x, double y, double z, double motionX, double motionY, double motionZ) { super(world, x, y, z, motionX, motionY, motionZ); float f = this.rand.nextFloat() * 1.0F; this.particleRed = f; this.particleGreen = f; this.particleBlue = f; this.setSize(0.02F, 0.02F); this.particleScale *= this.rand.nextFloat() * 1.1F; this.motionX *= (double)0.02F; this.motionY *= (double)0.02F; this.motionZ *= (double)0.02F; this.maxAge = (int)(20.0D / (Math.random() * 1.0D)); } @Override public IParticleRenderType getRenderType() { return IParticleRenderType.PARTICLE_SHEET_OPAQUE; } @Override public void tick() { this.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ = this.posZ; if(this.maxAge-- <= 0) { this.setExpired(); } else { this.move(this.motionX, this.motionY, this.motionZ); this.motionX *= 1.0D; this.motionY *= 1.0D; this.motionZ *= 1.0D; } } @OnlyIn(Dist.CLIENT) public static class Factory implements IParticleFactory<BasicParticleType> { private final IAnimatedSprite spriteSet; public Factory(IAnimatedSprite sprite) { this.spriteSet = sprite; } @Override public Particle makeParticle(BasicParticleType typeIn, ClientWorld worldIn, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { SpiderParticle spiderParticle = new SpiderParticle(worldIn, x, y, z, xSpeed, ySpeed, zSpeed); spiderParticle.setColor(1.0F, 1.0F, 1.0F); spiderParticle.selectSpriteRandomly(spriteSet); return spiderParticle; } } } Any help is appreciated, thanks.
  12. 1.16.2 ore generation is broken, and is very difficult to do ore generation in that version. In 1.16.3, there's a new event called BiomeLoadingEvent. Use that event, and inside the event make a ConfiguredFeature for your ore you want to generate (to see how to do this, look how Minecraft does it in minecraft\world\gen\feature\Features). Then in your event, do .getGeneration().withFeature(GenerationStage.Decoration.UNDERGROUND_ORES, <Configured Feature Name Here> Heres an Example from one of my mods: public static void generateOres(BiomeLoadingEvent event) { ConfiguredFeature<?, ?> ORE_SAPPHIRE = Feature.ORE.withConfiguration(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.field_241882_a, Registry.SAPPHIRE_ORE.get().getDefaultState(), 6)).withPlacement(Placement.field_242910_o.configure(new DepthAverageConfig(15, 16))).func_242728_a(); event.getGeneration().withFeature(GenerationStage.Decoration.UNDERGROUND_ORES, ORE_SAPPHIRE); }
  13. I finished setting up my creative inventory tab, but now it's crashing. Heres the minecraft crash log: https://pastebin.com/NBuWDnhV Heres where I'm making my itemGroup (it's also my main mod class): https://pastebin.com/8mjmgLPs I probably made a dumb mistake, but I'm not sure where. Any help is appreciated.
  14. Oh, okay, I thought there was an override I could do to set it to full power.
×
×
  • Create New...

Important Information

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