Jump to content

uSkizzik

Members
  • Posts

    222
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by uSkizzik

  1. Basically, I want to have an orange boss bar (or gold as it's called in the ChatFormatting enum) but I can't set the color of that boss bar to anything that isn't in the BossBarColor enum. Is there any way to bypass that requirement and set it to, as I said, a custom color that already exists in ChatFormatting?
  2. No, not in the near future. Lex is working on Forge as his full-time job (it's stated in his Patreon) and the project is open-source, meaning that the community of developers contributes a lot to it via PRs and stuff. Forge has been a thing for a very long time and I doubt it will stop being a thing even if Minecraft itself dies. (Probably won't happen in the near future too because of Microsoft and the large community). Also, keep in mind that Forge is one of the first (if not the first) modding API for MC and is still, to this day, the biggest one.
  3. First, you'll need to learn Java (like you said). When you're done with that, you can check out this forum topic with guidance about where to start from.
  4. Well just try posting it somewhere else (like GitHub Gist or another paste site)
  5. Here's a very detailed tutorial step by step: 1. Download Forge installer 2. Open 3. Select directory 4. Click "Install Server" 5. Click "Ok" 6. Run the "run.bat" file that was generated in the selected directory
  6. Can you provide your log? (It's in the logs folder in .minecraft)
  7. So I need .get()? If I use that then I get an error since as far as I know fluids are registered before blocks. What exactly do I need to do in this case?
  8. public static final RegistryObject<FlowingFluid> MAPLE_SYRUP = PA_Registry.FLUIDS.register("maple_syrup", () -> new MapleSyrup.Source(MapleSyrup.createProperties()));
  9. So, my fluid used to work perfectly but ever since I updated to 1.17, it has been causing issues. Here's one of the errors: And here's how I register my fluid: The block for the fluid: public static final RegistryObject<LiquidBlock> MAPLE_SYRUP = registerNoItem("maple_syrup", () -> new LiquidBlock(PA_Fluids.MAPLE_SYRUP, BlockBehaviour.Properties.of(Material.WATER, MaterialColor.TERRACOTTA_RED).noCollission().strength(100.0F).noDrops())); The fluid: public static final RegistryObject<FlowingFluid> MAPLE_SYRUP = PA_Registry.FLUIDS.register("maple_syrup", () -> new MapleSyrup.Source(MapleSyrup.createProperties())); public static final RegistryObject<FlowingFluid> FLOWING_MAPLE_SYRUP = PA_Registry.FLUIDS.register("flowing_maple_syrup", () -> new MapleSyrup.Flowing(MapleSyrup.createProperties())); The fluid class: public class MapleSyrup extends ForgeFlowingFluid { protected MapleSyrup(Properties properties) { super(properties); } public static ForgeFlowingFluid.Properties createProperties() { return new ForgeFlowingFluid.Properties(PA_Fluids.MAPLE_SYRUP, PA_Fluids.FLOWING_MAPLE_SYRUP, FluidAttributes.builder(new ResourceLocation("skizzik:block/maple_syrup_still"), new ResourceLocation("skizzik:block/maple_syrup_flow")).overlay(new ResourceLocation("skizzik:block/maple_syrup_overlay")).density(1000).viscosity(1000).luminosity(0)).canMultiply().bucket(PA_Items.MAPLE_SYRUP_BUCKET).block(PA_Blocks.MAPLE_SYRUP); } @Override public boolean isSource(FluidState state) { return false; } @Override public int getAmount(FluidState state) { return state.getValue(LEVEL); } } Any ideas for what exactly is causing the issue?
  10. You can't really use DeferredRegsiter as far as I'm aware. To register a spawn egg you'll need to subscribe to RegistryEvent.Register<Item> and then do event.getRegistry().register(SpawnEgg). I recommend making the spawn egg a variable outside of the method you're using to register them just so you can use that variable for example when adding your SpawnEgg to a manually-ordered creative tab.
  11. I'll check it out. Thanks!
  12. Does this mean I shouldn't use DeferredRegister? Do you have any good examples I can use?
  13. Alright, how do I even start making ore gen? I have my ores ready and I just need to know how to register them properly. I've never dealt with world gen, so I don't know much about it.
  14. Alright, I have no idea of how to actually do this. Vanilla seems to have a Musics class for the different music events. The issue is that all music in the game is handled trough the Minecraft class. It uses this method: public Music getSituationalMusic() { if (this.screen instanceof WinScreen) { return Musics.CREDITS; } else if (this.player != null) { if (this.player.level.dimension() == Level.END) { return this.gui.getBossOverlay().shouldPlayMusic() ? Musics.END_BOSS : Musics.END; } else { Biome.BiomeCategory biome$biomecategory = this.player.level.getBiome(this.player.blockPosition()).getBiomeCategory(); if (!this.musicManager.isPlayingMusic(Musics.UNDER_WATER) && (!this.player.isUnderWater() || biome$biomecategory != Biome.BiomeCategory.OCEAN && biome$biomecategory != Biome.BiomeCategory.RIVER)) { return this.player.level.dimension() != Level.NETHER && this.player.getAbilities().instabuild && this.player.getAbilities().mayfly ? Musics.CREATIVE : this.level.getBiomeManager().getNoiseBiomeAtPosition(this.player.blockPosition()).getBackgroundMusic().orElse(Musics.GAME); } else { return Musics.UNDER_WATER; } } } else { return Musics.MENU; } } Only way I can think of making my boss theme functional is by somehow overriding this exact method and that will not work as far as I know...
  15. My issue isn't playing sounds, I already have that figured out. My issue is that I have no idea about how to loop the music properly and have it synchronized across all players who see the boss. I'll look deeper into vanilla code and try using my brain to figure it out. Any help is still appreciated.
  16. Hello! As some of my previous topics may suggest, I'm working on a boss and I'm almost done with it. Currently, I need a way to loop a sound file over and over again while the boss is alive. I also need this music to be synchronized between all players and I need it to play only when the players see the boss in render distance. Minecarts seem to be a good example for looped sound files, the end music seems to also be synchronized between players (I tested it out but I'm not 100% sure.) and also the vanilla Wither already has render distance-related functions (Darkened Sky, Boss Bar). Any ideas about how exactly I would go about combining these different sound classes and making my boss music?
  17. Bats don't have the registerGoals() method.
  18. I actually don't have any idea of how exactly you would go about adding the TemptGoal code to your updateAITasks...
  19. You aren't supposed to add the goal like the other entities. You literally have to use the code from that class and put it in the updateAITasks. Also, make sure to check if the bat isn't resting when you run the code to follow the player.
  20. Exactly. I hope that solves the issue. If you really need to extend BatEntity, you can extend it and override the customServerAiStep() method. Add super.customServerAiStep() to keep the bat AI or don't to make completely custom AI. If you override that method you will need to adapt the TemptGoal code to work. Also, according to forge-bot, customServerAiStep is updateAITasks for you but I'm not sure if that's accurate.
  21. Any living entity should be able to have TemptGoal. I looked a bit into the class and it requires a PathfinderMob which both MonsterEntity and CreatureEntity / AnimalEntity extend. Anyway, you can use luis's solution for making the entity follow the player when given the item. Edit: Turns out the bat is an "AmbientCreature" which is a class that doesn't extend PathfinderMob. Bats seem to not be able to have goals.
  22. Oh, so you're using MCP mappings, alright. Are you using the same line of code? Does Ingridient.fromItems give you a "Cannot resolve contructor" error?
  23. Are you sure? I just checked my old 1.16 project and the class name seems the same. Are you importing net.minecraft.item.crafting.Ingredient?
×
×
  • Create New...

Important Information

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