188 questions
2
votes
0
answers
65
views
How do I prevent a PlayerEntity from making sounds in Minecraft Fabric 1.21.1?
I'm trying to make a mod that adds a new material which can be made into armor, tools, and at some point some other stuff. The material is called Vibral, and it's found in the deep dark and ancient ...
0
votes
0
answers
70
views
RenderLayer.getTranslucent() in fabric 1.21.1 overrides/hides the block breaking animation
I want do add a block to minecraft 1.21.1 with fabric that is partially transparent. While testing I found out, that the braking animation (cracks on the block) is missing. I later found out, that the ...
0
votes
2
answers
126
views
How to access a private nested record
The MinecraftServer.class has a private Record named ReloadableResources that is used to hold managers for resource managing.
...
record ReloadableResources(CloseableResourceManager resourceManager, ...
0
votes
1
answer
97
views
Can't create any .jar on IntelliJ Fabric Minecraft modding
So lately I've been trying to make a little custom mod for Minecraft 1.21.1 with Fabric Kotlin and after checking everything working completely I wanted to create the .jar to share with a friend but ...
1
vote
2
answers
421
views
How to include external (non-mod) dependencies inside the .jar of a Minecraft Fabric mod (1.21.4)?
I'm developing a Minecraft mod for version 1.21.4 using the Fabric mod loader and Gradle as the build system.
I've added a regular Java library as a dependency using implementation in my build.gradle. ...
0
votes
0
answers
205
views
minecraft fabric 1.21.5 mixin how to send message as Player
How to replace one message to other in minecraft fabric 1.21.5
I writed simple Mixin that insert code into writen method
package org.emil.chatmod.mixin;
import net.minecraft.client.gui.hud.ChatHud;
...
0
votes
0
answers
40
views
What is the fastest way to turn off caps lock on windows [duplicate]
I want to make a program that disables caps lock as soon as it is detected so I can use it as a keybind without worrying about my typing being in caps (in java)
I've done this
new ProcessBuilder("...
0
votes
1
answer
226
views
Error running data generation for fabric 1.21
I'm working on a Minecraft 1.21 Fabric mod and encountering an error while running DataGen. Initially, I was getting the following error:
Error: Could not find or load main class net.fabricmc....
2
votes
0
answers
165
views
How to access @Unique field using @Accessor in Minecraft Modding Fabric 1.20.1?
Here's my Accessor:
@Mixin(targets = "com.trongthang.bettercampfires.mixin.CampfireBlockEntityMixin")
public interface CampfireBlockEntityAccessor {
@Accessor(value = "...
0
votes
2
answers
1k
views
Custom Recipe Parsing Error when developing mod with fabric in Minecraft 1.21.4
I was following this tutorial and I was trying to create a custom recipe.
However it seems that recipe jsons cannot be parsed and read properly.
[23:41:37] [Render thread/INFO] (Minecraft) Created: ...
2
votes
1
answer
931
views
'Identifier(java.lang.String, java.lang.String)' has private access in 'net.minecraft.util.Identifier'
I'm getting the following error while registering a texture:
'Identifier(java.lang.String, java.lang.String)' has private access in 'net.minecraft.util.Identifier'
Error occurs at line 18
private ...
0
votes
1
answer
112
views
Scoreboard Team update does not show for Players (Fabric MC)
I am currently programming a server-sided Lifesteal Mod for Fabric and want to display the amount of lives a player has left using colors in the scoreboard.
I am currently struggling to do so since I ...
2
votes
0
answers
290
views
How can I make an item's texture change based on its model state?
Here are my predicate overrides, inside of weather_cycle_device.json:
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "rafaels-...
0
votes
0
answers
77
views
Gradle says JAVA_HOME is the wrong version of Java even though it is correct while Im generating sources
I was trying to make a mod using Fabric for Java Minecraft and when I used ./gradlew genSources to get access to the default code of Minecraft it said
ERROR: JAVA_HOME is set to an invalid directory: ...
1
vote
1
answer
1k
views
How to Send Data from Client to Server in Minecraft Fabric 1.21.1?
I'm working with Minecraft Fabric 1.21.1 and I need to send data from the client to the server. Could anyone provide guidance on the correct way to accomplish this? I understand that I need to use ...
0
votes
1
answer
129
views
"Can only iterate over an array or an instance of java.lang.Iterable" error when I create a fabric mod minecraft 1.20.6?
I've begun fabric modding, and I want for my mod to load a resource pack when the mod is loaded.
Then I found in the fabric api a code snippet which I imported into my mod here:
package com.name....
0
votes
1
answer
197
views
Best data structure for storing 2048 minecraft ItemTags? [closed]
Context, I'm working on a Minecraft mod (1.21, so Java 21), the purpose of which is to:
Use the max_stack_size data component to drive the apparent default max-stack-size of items in an straight-...
0
votes
1
answer
371
views
(fabricmc) Does someone know how I'm able to run some code after the player has respawned in a client side mod?
I have a client side fabric mod. It uses SimpleConfig to store it's configuration and the state of the inbuilt client-side night vision. I want to re-enable the client side night vision as soon as the ...
0
votes
0
answers
64
views
is there a way to use generic types in graaljs?
it seems that in graaljs you cannot simply go Java.type("Foo<Bar>")
using Java.type("com.mojang.brigadier.Command<com.mojang.brigadier.ServerCommandSource>"), it says ...
0
votes
0
answers
231
views
problem with importing library of minecraft
import net.fabricmc.fabric.api.client.command.v1.ClientCommandManager;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keybinding.v1....
-1
votes
1
answer
43
views
I have 2 different packages with different names
I have been trying minecraft modding recently, but while importing needed packages (via changing build.gradle), I got 2 packages with same ,,name".
2 packages and java importing failure
So, I can'...
0
votes
1
answer
22
views
projectileEntity.setProperties(player, player.getPitch(), player.yaw, 0.0F, 3.0F, 1.0F);
setProperties is error!
player.yaw what yaw should i use?
Make Projectile Entity from Item
...
0
votes
1
answer
776
views
I am working on a fabric mod and I have issues with the ClientOnInitialize method
simply put nothing inside th oninitialise method runs the public class TutorialModClient appears grey in IntelliJ .I have all the necessary entries in my fabric.mod.json :
the json entries are
"...
0
votes
1
answer
699
views
MinecraftClient.getInstance().player returns null
I have just started with trying to make a simple minecraft mod that returns the PlayerEntity DisplayName property and logs it to the console. The Code goes as follows:
SimpleMod.java
package net....
2
votes
2
answers
2k
views
Minecraft fabric overriding existing blocks 1.20
I have been trying to find a way online to find any way to modify existing blocks in minecraft fabric and there properties, and yet all I could find was how to create new blocks.
Any that I do find a ...