samjviana
Members-
Posts
82 -
Joined
-
Last visited
-
Days Won
1
Everything posted by samjviana
-
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!
-
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
-
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
-
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
-
thanks, just tried it out and works just fine
-
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)
-
i'll try to create a new render, if it works i'll come back here with it.
-
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
-
Hi, did you achieve something?
-
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.
-
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)
-
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)
-
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
-
Done ... https://github.com/samjviana/bunchofthings i think it's the default one, but it's the 1.17.1 branch
-
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()); });
-
@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.
-
have to admit that i don't have an Block Registration 😳, thought that only the item registration was necessary. But the block works fine.
-
@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
-
Block class: The registration:
-
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.
-
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