Jump to content

samjviana

Members
  • Posts

    82
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by samjviana

  1. hey did you manage to fix this, i'm having the same issue. fyi: running the client with `gradlew runClient` does not crashes the game
  2. Hello everyone, I'm the developer of the mod Bunch of Things. This mod introduces different colored slimes and, consequently, different colored sticky pistons to the game. After the 1.17 update, I tried tirelessly to update the pistons, but everything was significantly different. Frustration and laziness got the best of me, and I decided to put it aside. However, with the 1.20 update, I decided to give it another shot. This time, I'm trying to update to 1.19.4, but I simply can't get it to work. I've replicated the entire logic of the vanilla pistons, but it doesn't work. I suspect the issue might be that the "colored_sticky_piston_head" block isn't being registered properly, although the registration seems right to me, as I can't retrieve it using the /give command. When I "activate" the piston and it becomes a block entity, the texture bugs out and it doesn't revert back to being a block, as shown in this image: Interestingly, if I use the vanilla PistonHeadRenderer, the block works as expected. However, when the piston head expands, the texture changes and breaks, but it reverts back to normal when it retracts. I'm on the verge of removing these pistons from the mod... I would greatly appreciate it if someone could shed some light on this issue. The repository for the mod is https://github.com/samjviana/bunchofthings/tree/1.19.4. Any help would be greatly appreciated. Thank you in advance!
  3. isn't something in the gradle.build file? and, how do you do it in other IDE, maybe i can figure something out of it
  4. i'm using vscode. i use it since 1.15 and always worked just trying to build this one version, to publish it, the i'll move to 1.18.1
  5. this error occur when building the mod project method nextDouble in class Random cannot be applied to given types; this.alpha = (float)level.random.nextDouble(0.5d, 1.0d); when running the "runDebug" task the minecraft instance opens just fine, but when the command gradlew build is used it returns the error above. I think it is using Java 8 to build, and Java 16 to run the project, but how can i change the java version it will use on the build task
  6. thanks, just tried it out and works just fine
  7. really? how can i do that then. i tried to call Level$addParticles in LivingHurtEvent but nothing happens (i'm trying to trigger bonus damage with an enchantment, and have custom particles to it)
  8. i'll try to create a new render, if it works i'll come back here with it.
  9. i acctually found some projects in github that use mixins, but i couldn't make it work on my project, don't know why. If you look at the log, it seems that the mixin start booting but an error occur ([03jan.2022 00:15:17.659] [main/DEBUG] [mixin/]: Preparing mixins for MixinEnvironment[DEFAULT]" i'm trying to trigger particles in the LivingEntity$tick and LivingEntity$hurt
  10. Hi, did you achieve something?
  11. is mixin already working on 1.17.1? and if so, how can i achieve it to work, done some googling but not that i could find worked.
  12. Since i has just trying to change the damage that will be dealt to the entity, i just used LivingEntityHurt$setDamage instead of calling hurt function, and it worked. still, thanks
  13. Games crashes when calling LivingEntity$hurt inside LivingEntityHurt. I'm passing LivingEntityHurt$source and LivingEntityHurt$damage to it.
  14. Is there a way to get the current entity or block an entity (that isn't the player) is looking at? kinda like what Level$hitResult does. I thought of using Mob$hasLineOfSight but passing the player entity as test, even standing on back of the entity it returns true
  15. I asked before, but didn't get any responses I have an custom slime block that works exactly the same as the vanilla one, but it is visually different. The thing is, the vanilla block, don't render the face that is in contact with another block os same instance, i assume that the function HalfTransparentBlock$skipRendering is responsable for that. To make my block i just extended the SlimeBlock class but the render of the face keep getting rendered, i even override the skipRendering, but it is never called. Here's an screenshot: (left: modded slime block, right: vanilla's)
  16. I have an custom slime block that works exactly the same as the vanilla one, but it is visually different. The thing is, the vanilla block, don't render the face that is in contact with another block os same instance, i assume that the function HalfTransparentBlock$skipRendering is responsable for that. To make my block i just extended the SlimeBlock class but the render of the face keep getting rendered, i even override the skipRendering, but it is never called. Here's an screenshot: (left: modded slime block, right: vanilla's)
  17. I thought that it should be called, place some logs inside it, but it's never called. i could try to create an custom render, kinda copying the translucent, but i think is to much work
  18. Done ... https://github.com/samjviana/bunchofthings i think it's the default one, but it's the 1.17.1 branch
  19. public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, BunchOfThings.MODID); public static final RegistryObject<Block> BLACK_SLIME_BLOCK = BLOCKS.register("black_slime_block", () -> { return new ColoredSlimeBlock(BlockBehaviour.Properties.of(Material.CLAY).friction(0.8f).sound(SoundType.SLIME_BLOCK).noOcclusion()); });
  20. @SubscribeEvent public static void onRegisterBlock(final RegistryEvent.Register<Block> event) { final IForgeRegistry<Block> registry = event.getRegistry(); ModBlocks.BLOCKS.getEntries().stream().map(RegistryObject::get).forEach((block) -> { registry.register(block); }); } just did the block registration, but the block transparency remains the same.
  21. have to admit that i don't have an Block Registration 😳, thought that only the item registration was necessary. But the block works fine.
  22. @SubscribeEvent public static void onRegisterItem(final RegistryEvent.Register<Item> event) { final IForgeRegistry<Item> registry = event.getRegistry(); ModBlocks.BLOCKS.getEntries().stream().map(RegistryObject::get).forEach((block) -> { final Item.Properties properties; if (shouldHide(block)) { return; } else if (isBlockItem(block)) { properties = new Item.Properties().tab(ModCreativeTab.ITEMS); } else { properties = new Item.Properties().tab(ModCreativeTab.BLOCKS); } final BlockItem blockItem = new BlockItem(block, properties); blockItem.setRegistryName(block.getRegistryName()); registry.register(blockItem); }); } Did'n know about the OnlyIn thing, thanks
  23. Block class: The registration:
  24. How can i make the transparency of an block work just like the SlimeBlock, as shown in the image: By now i'm setting the RenderLayer of the block to RenderType.translucent() and also extending the HalfTransparentBlock in my block.
  25. Don't know if i am missing something but i spent the last hours trying to understand how to use getWeightedItem(List<T> p_146315_, int p_146316_) (as in 1.17.1), by looking in 1.16 i can assume that are the models and p_146316_ are the weight. The thing is that i could figure out how to get those values, but anyway, i'll give this up, and intead i'll rewrite the blockstate to use FACING, i think ... and HOPE, i will be better to work out. thanks anyway
×
×
  • Create New...

Important Information

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