809 questions
Best practices
0
votes
9
replies
116
views
Is it better to store data for a modular system in sets of arrays or to use reflection to get the data straight from a class?
I am self-taught, so I apologize if the title uses terms incorrectly.
I am trying to write a Minecraft mod that adds some RPG mechanics to the game.
BUT more importantly, for this question, it ...
0
votes
0
answers
120
views
Why my mod not breaks visual blocks on the server minecraft
Good afternoon/evening. I encountered a problem in the mod: why, when I try to visually break a block on a spawn, does it return it back, even though it shouldn't?
package com.example.visualbreakmod;
...
0
votes
0
answers
66
views
gradlew build - FAILURE: Build failed with an exception
Unable to launch Gradlew build. I've tried everything, but it won't launch. It works fine, but as soon as I want to create a mod for Minecraft, it doesn't work.
I'm attaching a Google Drive link with ...
2
votes
1
answer
117
views
Is there a way to shift mixin injection after a return opcode
I am writing an injector for a method that looks like this:
protected ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, ...
0
votes
0
answers
65
views
How to make my block (extending to BaseEntityBlock) face to the player when placed?
The thing is, I already know how to make a simple block having a single texture on every side, but what i want is a block, like a furnace, which has a front, a top, 3 sides, and a bottom. however, i ...
1
vote
1
answer
130
views
Minecraft Forge 1.8.9 Mod Works In Dev Env (Run in IntelliJ Idea) but Not when exported In-Game
When launching my minecraft forge 1.8.9 mod in a dev env (Intellij Idea) it launches perfectly fine but when exporting the mod and using it In-Game it crashes on start-up with this error:
Description: ...
0
votes
0
answers
148
views
Applying transparency to entities in 1.20.1 (MC Forge)
I've been fighting to find ways to get transparency to work in my custom entities whilst updating my code from 1.16.5 to 1.20.1. I can not for the life of me figure this out. I've tried mimicking the ...
0
votes
0
answers
57
views
Forge 1.12.2: ContainerATM class mysteriously duplicates to thousands of lines during build — what causes this and how do I stop it?
I'm working on a Minecraft Forge 1.12.2 mod and running into an extremely strange issue during the build process.
I have a class called ContainerATM.java, which is a typical Forge container for a ...
0
votes
1
answer
113
views
Minecraft lamp texture not texturing 1.19-41.1.0
I'm making a backrooms inspired minecraft mod, but i've run into a problem: all my textures load, apart from the textures for my lamp. the lighting works as intended though.
ModBlocks.java
package net....
2
votes
0
answers
62
views
minecraft 1.16.5 Datapack smelting recipie type only working if forge is installed despite not using forge tags
I'm making a datapack for 1.16.5 minecraft. I want it to be compatible with both vanilla and forge. I made smelting and blasting recipes and they only work in forge (I removed all other mods to test ...
0
votes
1
answer
86
views
What do you use instead of onBlockActivated for Minecraft Forge 1.16.5?
I'm trying to make a block that sends me to a new dimension, but when I try right clicking it, nothing happens.
I've put a few debug messages to send a message to the chat or to show up in the logs ...
0
votes
0
answers
101
views
Macos Launching Minecraft Forge with a custom game directory and mods via Bash script
I’m trying to automate the setup and launch of a Minecraft Forge instance on macOS entirely through the terminal, without using the official launcher or CurseForge. My goal is to:
• Automatically ...
1
vote
1
answer
713
views
When developing with Minecraft Forge 1.20.1, the external implementation dependencies are not being recognized with Java17 Gradle8
I want to add an ES6 JavaScript executor to my mod. I've tried GraalVM and currently org.mozilla:rhino, which work fine in an external main() entry point, but in-game, they always throw a java.lang....
0
votes
0
answers
220
views
Minecraft Mod gives this error: java.lang.reflect.InvocationTargetException
So was creating the datagen folders for a minecraft mod and when i try to run my code it shows me this error: java.lang.reflect.InvocationTargetException
I created every datagen folder:
package ...
0
votes
1
answer
563
views
KubeJS container item insertion
I have a rather simple problem:
Given the x, y and z coordinates of a barrel/chest, in a PlayerChatDecorateEventJS, I want to insert an ItemStack into it.
I have read through the generated docs for ...
-2
votes
1
answer
107
views
Is there any way to send a code to a batch file via Java?
I've been trying to run a batch file (run.bat for a minecraft server) via Java console.
while i did manage to figure out a way to run the batch script on java, it seems that i cannot send commands ...
0
votes
0
answers
38
views
Class Map declarations not finding items
I am creating a simple crafting block (not using block entities) and ran into some issues.
I would like to use the onstep method inherent to the Blocks class to check whether an instanceof ItemEntity ...
1
vote
1
answer
1k
views
Item texture blank in Minecraft 1.21.4 forge mod
I am writing my first Minecraft mod. My first item, Creeper Meat is successfully added and named in the creative inventory, but is not using the texture I placed into src/main/resources/assets/...
1
vote
0
answers
60
views
Failed to apply plugin [id 'forge'] I don't know what to do
when i try sysns gradle changes in intellij idea i get this error:
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\dimam\Downloads\forge-1.7.10-10.13.4.1614-1.7.10-src\...
0
votes
1
answer
907
views
NeoForge: Mod's item models are not found
I have a mod for NeoForge version 21.4.38-beta which has some items:
public static final class _Items {
private _Items() {
throw new AssertionError();
}
private ...
0
votes
1
answer
276
views
Creating a Minecraft mod with JSON files for block loot tables but it doesn't register files
I'm creating a minecraft mod with a block named Ruby Block, I setup the JSON files for the block data but they don't seem to work. When I test it in game, I'm able to place the blocks but when I try ...
1
vote
1
answer
179
views
How can I teleport a player to the Nether?
I'm new at Minecraft Modding and I created a simple mod that checks if the player is in The End when they log in, if not they are teleported to a random coordinate there. I was trying to develop the ...
0
votes
0
answers
230
views
How do I fix this "need arm64e or arm64" error in IntelliJ for Minecraft Forge modding? (MacOS)
Edit: I have an M1 MacBook Air
I have been following a Kaupenjoe tutorial for making a Minecraft Forge 1.18.2 mod but haven't been able to run the runClient task as I keep getting an error:
java.lang....
1
vote
1
answer
2k
views
Item register causes my game to error while loading
I am using NeoForge to make a Minecraft mod, following this tutorial
I noticed that when I add ModItems.register(modEventBus); my game crashes with the following error:
Minecraft Error
Main class:
...
2
votes
1
answer
883
views
How to run "gradlew runClient" in debug mode?
I am writing a mod for Minecraft.
I use neoforged/NeoGradle. I can run Minecraft client with my mod by
gradlew runClient
I know that the mod works, because I can see it in the game.
I use ...
0
votes
1
answer
114
views
Level.setBlock() places invisible blocks
I'm trying to create an item that places blocks that are in another hand above the block on which the item is used, but it only places the first block normally, and the others are invisible, which ...
0
votes
0
answers
1k
views
Cannot resolve import net.minecraft.entity
This may sound like a noob question, but I've browsed the web for several hours now and haven't found any satisfying explanation.
I'm completely new to Minecraft modding and Forge, and I'm trying to ...
-1
votes
1
answer
319
views
How can i convert this NBT data string to a valid native javascript object or JSON, and why can the chrome console do it?
So i'm trying to get it so you can export NBT data from minecraft so it can be used in this online tool i'm making. Here is an example of the NBT data I am trying to convert:
const NbtString = "{...
0
votes
1
answer
2k
views
Forge 1.21.1 mod not loading correctly error
According to IntelliJ forge 1.21.1 has deprecated .get() and .get().getModEventBus(), I am wondering if this is why my code is running into errors. If so, how do I now write it? I have tried asking ...
1
vote
1
answer
66
views
Minecraft getClickedPos().GetY() is read as zero only in first statement of for loop, among other things
I'm trying to make an item in Minecraft that detects a block to a maximum of six blocks beneath the block selected with said item. So, if a block that is right-clicked with the item in hand has a Y-...
0
votes
1
answer
226
views
Minecraft Forge 1.8.9 - Need to create custom command arguments
ive been trying to make a custom command on forge 1.8.9, but I couldnt find any guide or ducumentation on how to create argumens for the commands, the thing I want to do is for example "/settext ...
0
votes
1
answer
562
views
Error with Texture File and Mod Metadata When Registering Item in Minecraft Mod Using NeoForge 1.21
I'm currently developing a Minecraft mod using NeoForge, and I've encountered an issue when registering a custom item. After adding my texture file for the item, I receive the following error when ...
0
votes
1
answer
70
views
Minecraft crashes when RageMode is enabled by pressing the U key
I will say right away, in the logs error does not appear, I use forge version 2859 for minecraft 1.12.2, I wrote a couple of classes one of which is responsible for RageMode, the essence is that the ...
-2
votes
1
answer
105
views
Broader Issue with Exception Execution [closed]
I'm currently coding a Minecraft Mod in Java and I have some issues about implementing the Exception correctly.
I tried in the Class below different things:
Before I used Maps instead of List
using ...
0
votes
0
answers
119
views
SIGSEGV, problematic frame V libjvm.so, Program terminated with signal SIGABRT
So I have been trying to host a minecraft forge server from a dedicated PC running on Debian 12 and using java 17.0.11
Java Runtime Error:
# A fatal error has been detected by the Java Runtime ...
0
votes
1
answer
3k
views
Minecraft 1.20 modding - [Render thread/ERROR] [minecraft/RecipeManager]: Parsing error loading recipe: No key id in MapLike[{}]
I am making a Minecraft Forge mod with custom recipes, one of which is the following
{
"type": "minecraft:crafting_shaped",
"pattern": [
"E",
"...
0
votes
0
answers
52
views
Is there a way to apply an entity tag to a method that it cannot be applied to?
public static boolean isHuman(Entity pEntity) {
return pEntity.is(ModEntityTags.HUMANS);
}
im trying to use a custom tag i made for this method however the 'is' method from the Entity ...
0
votes
1
answer
1k
views
How do I change a method of an interface using mixins? using Spongepowered on Minecraft Forge 1.18.2
So I am using IntelliJ IDEA to mod Minecraft Forge 1.18.2 and I am trying to change the isEmptyBlock method of the LevelReader class using SpongePowered mixins.
But LevelReader is an interface, and ...
0
votes
1
answer
469
views
Gradle dependencies are not installed when building in .jar | Minecraft Forge 1.16.5
I download MDK from https://files.minecraftforge.net/net/minecraftforge/forge/index_1.16.5.html
After building my forge mod in .jar and starting the minecraft, it gives me an error that the dependency ...
1
vote
0
answers
85
views
smooth transition of the fog color from the current value, to the set minecraft 1.12.2
so I have a code that is not working properly, which every tick with the main event handler checks if it is raining or not, if it is raining then the code in the body is executed, but it is executed ...
0
votes
1
answer
99
views
1.20 Minecraft Forge Bed Model not lining with Boundry box
Another issue. My Bed model is not lining up properly with the boundary box. IT works perfectly when facing south or east, but facing north or west puts the block one block towards east or south. So ...
1
vote
1
answer
869
views
1.20 Minecraft Forge Block Rotation
Trying to make a small personal mod for this server I'm in, using MC Forge for 1.20.1. We want to have custom bed models. I've got just about everything working except for a few things. For some ...
1
vote
0
answers
110
views
Custom guitar item not producing noise Forge 1.20.1 Java
I'm still very new to the Minecraft modding scene, and I'm trying to create a guitar that when right-clicked within the players hand, plays a short .ogg. The issue is that while the game and items ...
0
votes
0
answers
30
views
how to make the server not hang after activating the lever
when deleting blocks within a radius of 50 blocks minecraft suspends, and I need to play a sound before the deletion and after 120 seconds began to remove blocks
code:
@Override
public void ...
1
vote
0
answers
685
views
intellij runClient error minecraft forge 1.12.2
I have a problem when I try run the task runClient. My launcher minecraft start, but after crashed.
Below follow the error:
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from ...
2
votes
0
answers
239
views
How can I get the title of the currently open GUI in Minecraft Forge MDK 1.12.2?
I'm working on a Forge mod for Minecraft version 1.12.2 and I need to retrieve the title of the currently open GUI. In newer versions like Forge MDK 1.16.5, I can achieve this using mc.screen.getTitle(...
0
votes
1
answer
243
views
Bukkit -> Forge network messages
I send the packet via the Bukkit plugin. Package Send Code:
public static boolean sendPacket(Player player, String message) {
try {
String full_msg = "Text(" + message + ")&...
0
votes
1
answer
4k
views
Why does my Architectury Mod project keep crashing without writing code?
I've just started working on a Minecraft Mod using the Architectury framework, and for the first couple of days everything was fine, but recently my project started having various problems, such as ...
0
votes
0
answers
64
views
Minecraft doesn't launch on python
project on github: https://github.com/Sesdear/DristLauncher/tree/main
My code:
import json
import os
import subprocess
# Function to find the Java executable
def find_java_executable():
try:
...
0
votes
0
answers
83
views
The python script that installs minecraft doesn't work, how to fix?
my code
import os
import subprocess
import logging
installer_path = 'forge-1.12.2-14.23.5.2860-installer.jar'
forge_install_path = 'minecraft_direct'
install_command = ['java', '-jar', ...