Jump to content

BlockyPenguin

Members
  • Posts

    138
  • Joined

  • Last visited

Converted

  • URL
    https://pixelorangedev.github.io
  • Location
    United Kingdom
  • Personal Text
    https://www.discord.gg/XmSZGjn

Recent Profile Visitors

12136 profile views

BlockyPenguin's Achievements

Creeper Killer

Creeper Killer (4/8)

4

Reputation

  1. I've got my workspace laid out as such: [workspace root] | |-- LabKore | | | |-- build.gradle | |-- src, etc.. | |-- PowerKit | | | |-- build.gradle | |-- src, etc.. | |-- build.gradle |-- settings.gradle |-- etc.. PowerKit and LabKore are two individual mods. I wish for PowerKit to have a dependency on LabKore, and although everything looks fine in Eclipse, when I run runClient, Minecraft crashes with a InvocationTargetException. Looking in the logs, I see the following lines of interest: Exception message: java.lang.NoSuchMethodError: 'net.minecraft.world.item.Item$Properties net.minecraft.world.item.Item$Properties.m_41491_(net.minecraft.world.item.CreativeModeTab)' Cannot deobfuscate dependency of type DefaultProjectDependency_Decorated, using obfuscated version! In PowerKit's build.gradle, I have added LabKore as a dependency like so: dependencies { implementation fg.deobf(project(':labkore')) } Why can ForgeGradle not deobfuscate LabKore? How can I fix it? Thanks
  2. So, I need to be able to read custom json files stored in a mod's modid/data folder, or in a datapack, like recipes or models. How would I go about doing this? Thanks
  3. Modifying vanilla with Mixins, no Forge, no Fabric, just plain old vanilla. I know, it's not recommended, but it's a personal project of mine, just to see where it could lead. I have no intentions of making anything fancy, i.e. "real" modified servers like paper or sponge, it's more of a testing ground. Any ideas as to how to fix this?
  4. I'm attempting to use FG to download the vanilla Minecraft server. Gradle throws this massive error: hastebin build.gradle:
  5. Okay, so what would I set the seed to? I already have a public static final Random instance in my main class, would that do the job?
  6. That's strange, because I'm definitely calling it on a World object, unless World implements IWorldReader. So this is what I've got: @Override public ActionResult<ItemStack> onItemRightClick(World world, PlayerEntity player, Hand hand) { IChunk ichunk = world.getChunk(player.getPosition()); if(ichunk instanceof Chunk) { Chunk chunk = (Chunk)ichunk; long seed = MathHelper.getCoordinateRandom(player.getPosition().getX(), player.getPosition().getY(), player.getPosition().getZ()); seed += chunk.getInhabitedTime() * Config.RIFT_MULTIPLICATION_FACTOR.get(); player.sendStatusMessage(new StringTextComponent(seed + ""), false); } return ActionResult.resultSuccess(player.getHeldItem(hand)); } But how would I turn that into value between 0 and 1? or at least 0 and 100, or some other easily measurable number. Then I've also got to worry about the boolean dictating whether or not a chunk is a rift or not.
  7. Okay, thanks Here is the source code of World#getChunk: default IChunk getChunk(BlockPos pos) { return this.getChunk(pos.getX() >> 4, pos.getZ() >> 4); } So what do you suggest I do then?
  8. Because World#getChunk() returns an IChunk. Ah, thanks. TBH, I'm a little concerned about changing over to Mojang mappings, I know there are a few legality issues still. What would be the right place to ask about this?
  9. Okay, so, let's say that I want to get this data when an item is right clicked, it would be something like this, right? @Override public ActionResult<ItemStack> onItemRightClick(World world, PlayerEntity player, Hand hand) { ItemStack stack = player.getHeldItem(hand); Chunk c = (Chunk)world.getChunk(player.getPosition()); c.getInhabitedTime(); return ActionResult.resultSuccess(stack); } But MathHelper.getSeed doesn't seem to exist...
  10. Okay... so how would i get the chunk then? Would it help if i uploaded my code to github?
  11. But wouldn't it be incremented at a different rate? I think I forgot to mention as well, that I have the float set to a random value between 0.0 and 0.2 in the capability's default implementation's constructor.
  12. Okay, I'm thinking we're not quite on the same page here, so I'll start again: I've made a capability for chunks, which contains a float value. I would like the float to increase by 0.1 every x amount of time. My thought is that if I get all the loaded chunks, I can iterate over them and increase this value. As to how I would implement a timer without a tick() method, I am at a loss, but one problem at a time.
  13. Yes, but how do I get the instance of Chunk? That's what's confusing me...
×
×
  • Create New...

Important Information

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