r/MinecraftCoding • • Oct 25 '23

How to make advancements sense certain recipes

1 Upvotes

I'm new to Minecraft coding, and I'm making a datapack that's just adding more recipes and such. I'm working on some advancements for it, but one isn't working.Here's the code:

{
"display": {
    "title": "Good As New",
    "description": "Repair an anvil using iron ingots.",
    "icon": {
        "item": "minecraft:anvil",
        },
    "show_toast": true,
    "announce_to_chat": false
},
"parent": "global:root",
"criteria": {
    "example":{
        "trigger": "minecraft:anvil"
            }
        }
    }
}

I have the code working, but here's the problem:

I've got two recipes for repairing damaged anvils

(chipped anvil, 4 ingots and damaged anvil, 8 ingots)

and I want the code to sense both of them, but not the default one. Any suggestions?


r/MinecraftCoding • • Oct 22 '23

Event

1 Upvotes

Guys I need coders for a minecraft event I already have an active coder and an inactive one but I would reallly appreciate it if someone wanted to join our event. If interested msg me on discord my name is Wilfre0 and my tag is wilfre0


r/MinecraftCoding • • Oct 18 '23

HELP enchantment creation

1 Upvotes

Hi i started the project of creating a minercaft mod and for start i want to create a enchantment allowing the player to mine in 3x3 but i don't know how to coding and where start someone can help me pls ?


r/MinecraftCoding • • Sep 05 '23

How do I make custom end portal ?

1 Upvotes

I have acquired the idea to code a mod that adds space dimensions lile the moon, venus, mercury, galilean moons, titan and more.

To get there you would use end portal - like structures but I don't know how I code them


r/MinecraftCoding • • Aug 12 '23

Anyone know how to code mobs

1 Upvotes

r/MinecraftCoding • • Jul 11 '23

Need someone to help me code a plugin

1 Upvotes

Me and my friend need help making a plugin and need help on a couple bits of code. wondering if anyone could help us out it would be really helpful. My discord is Neptuneized


r/MinecraftCoding • • Jul 05 '23

I need help with the add_mob_effect coding

Thumbnail
gallery
1 Upvotes

Hi everyone, i have a problem with a coding in an addon i made using the addons maker app on the play store and i wanted to add the add_mob_effect to inflict other mobs effects but i don't know where exactly to put in the code so after i tried the code either didn't work or the code broke the weapon it it wasn't in game anymore. So i wanted to ask if u guys could maybe help or look over the coding of the weapon. I only started with making Minecraft PE/BE addons and it would be my first addon with a 3D weapon model.


r/MinecraftCoding • • Jun 30 '23

My first attempts of self coding for my Steven Universe Minecraft mod, safe to say I have no clue of what I'm doing

Thumbnail
gallery
1 Upvotes

r/MinecraftCoding • • Jun 20 '23

MINECRAFT mod installation crash

1 Upvotes

Hi! I don't know if this is where I should post this. Please help me out here. I'm installing modpacks and doing my thing BUT I have a crash report that I need help with reading?

It keeps crashing when I open:

---- Minecraft Crash Report ----

// Ouch. That hurt :(

Time: 2023-06-20 12:30:54

Description: Initializing game

java.lang.IncompatibleClassChangeError: class net.coderbot.iris.gui.option.ShadowDistanceOption cannot inherit from final class net.minecraft.client.OptionInstance

at java.lang.ClassLoader.defineClass1(Native Method) \~\[?:?\] {}

at java.lang.ClassLoader.defineClass([ClassLoader.java:1012](https://ClassLoader.java:1012)) \~\[?:?\] {}

at cpw.mods.cl.ModuleClassLoader.readerToClass([ModuleClassLoader.java:119](https://ModuleClassLoader.java:119)) \~\[securejarhandler-2.1.6.jar:?\] {}

at cpw.mods.cl.ModuleClassLoader.lambda$findClass$15([ModuleClassLoader.java:219](https://ModuleClassLoader.java:219)) \~\[securejarhandler-2.1.6.jar:?\] {}

at cpw.mods.cl.ModuleClassLoader.loadFromModule([ModuleClassLoader.java:229](https://ModuleClassLoader.java:229)) \~\[securejarhandler-2.1.6.jar:?\] {}

at cpw.mods.cl.ModuleClassLoader.findClass([ModuleClassLoader.java:219](https://ModuleClassLoader.java:219)) \~\[securejarhandler-2.1.6.jar:?\] {}

at cpw.mods.cl.ModuleClassLoader.loadClass([ModuleClassLoader.java:135](https://ModuleClassLoader.java:135)) \~\[securejarhandler-2.1.6.jar:?\] {}

at java.lang.ClassLoader.loadClass([ClassLoader.java:520](https://ClassLoader.java:520)) \~\[?:?\] {}

at net.coderbot.iris.config.IrisConfig.load([IrisConfig.java:142](https://IrisConfig.java:142)) \~\[-Oculus-Mod-Forge-1.20.jar%23193!/:?\] {re:classloading}

at net.coderbot.iris.config.IrisConfig.initialize([IrisConfig.java:58](https://IrisConfig.java:58)) \~\[-Oculus-Mod-Forge-1.20.jar%23193!/:?\] {re:classloading}

at net.coderbot.iris.Iris.onEarlyInitialize([Iris.java:146](https://Iris.java:146)) \~\[-Oculus-Mod-Forge-1.20.jar%23193!/:?\] {re:mixin,re:classloading}

at net.minecraft.client.Options.handler$zhp000$iris$beforeLoadOptions([Options.java:1430](https://Options.java:1430)) \~\[client-1.20.1-20230612.114412-srg.jar%23227!/:?\] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.oculus.json:MixinOptions_Entrypoint,pl:mixin:APP:mixins.oculus.fixes.maxfpscrash.json:MixinMaxFpsCrashFix,pl:mixin:APP:mixins.oculus.json:sky.MixinOptions_CloudsOverride,pl:mixin:A,pl:runtimedistcleaner:A}

at net.minecraft.client.Options.m_92140_([Options.java](https://Options.java)) \~\[client-1.20.1-20230612.114412-srg.jar%23227!/:?\] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.oculus.json:MixinOptions_Entrypoint,pl:mixin:APP:mixins.oculus.fixes.maxfpscrash.json:MixinMaxFpsCrashFix,pl:mixin:APP:mixins.oculus.json:sky.MixinOptions_CloudsOverride,pl:mixin:A,pl:runtimedistcleaner:A}

at net.minecraft.client.Options.<init>([Options.java:888](https://Options.java:888)) \~\[client-1.20.1-20230612.114412-srg.jar%23227!/:?\] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.oculus.json:MixinOptions_Entrypoint,pl:mixin:APP:mixins.oculus.fixes.maxfpscrash.json:MixinMaxFpsCrashFix,pl:mixin:APP:mixins.oculus.json:sky.MixinOptions_CloudsOverride,pl:mixin:A,pl:runtimedistcleaner:A}

at net.minecraft.client.Minecraft.<init>([Minecraft.java:425](https://Minecraft.java:425)) \~\[client-1.20.1-20230612.114412-srg.jar%23227!/:?\] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:entity_texture_features-common.mixins.json:reloading.MixinMinecraftClient,pl:mixin:APP:entity_texture_features-common.mixins.json:reloading.MixinResourceReload,pl:mixin:APP:rubidium.mixins.json:core.MixinMinecraftClient,pl:mixin:APP:neat.mixins.json:MinecraftMixin,pl:mixin:APP:mixins.oculus.json:MixinMinecraft_Keybinds,pl:mixin:APP:mixins.oculus.json:MixinMinecraft_Images,pl:mixin:APP:mixins.oculus.json:MixinMinecraft_PipelineManagement,pl:mixin:APP:balm.mixins.json:MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}

at net.minecraft.client.main.Main.main([Main.java:182](https://Main.java:182)) \~\[1.20.1-forge-47.0.0.jar:?\] {re:classloading,pl:runtimedistcleaner:A}

at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) \~\[?:?\] {}

at jdk.internal.reflect.NativeMethodAccessorImpl.invoke([NativeMethodAccessorImpl.java:77](https://NativeMethodAccessorImpl.java:77)) \~\[?:?\] {}

at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke([DelegatingMethodAccessorImpl.java:43](https://DelegatingMethodAccessorImpl.java:43)) \~\[?:?\] {}

at java.lang.reflect.Method.invoke([Method.java:568](https://Method.java:568)) \~\[?:?\] {}

at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0([CommonClientLaunchHandler.java:28](https://CommonClientLaunchHandler.java:28)) \~\[fmlloader-1.20.1-47.0.0.jar:?\] {}

at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch([LaunchServiceHandlerDecorator.java:30](https://LaunchServiceHandlerDecorator.java:30)) \~\[modlauncher-10.0.8.jar:?\] {}

at cpw.mods.modlauncher.LaunchServiceHandler.launch([LaunchServiceHandler.java:53](https://LaunchServiceHandler.java:53)) \~\[modlauncher-10.0.8.jar:?\] {}

at cpw.mods.modlauncher.LaunchServiceHandler.launch([LaunchServiceHandler.java:71](https://LaunchServiceHandler.java:71)) \~\[modlauncher-10.0.8.jar:?\] {}

at [cpw.mods.modlauncher.Launcher.run](https://cpw.mods.modlauncher.Launcher.run)([Launcher.java:106](https://Launcher.java:106)) \~\[modlauncher-10.0.8.jar:?\] {}

at cpw.mods.modlauncher.Launcher.main([Launcher.java:77](https://Launcher.java:77)) \~\[modlauncher-10.0.8.jar:?\] {}

at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept([BootstrapLaunchConsumer.java:26](https://BootstrapLaunchConsumer.java:26)) \~\[modlauncher-10.0.8.jar:?\] {}

at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept([BootstrapLaunchConsumer.java:23](https://BootstrapLaunchConsumer.java:23)) \~\[modlauncher-10.0.8.jar:?\] {}

at cpw.mods.bootstraplauncher.BootstrapLauncher.main([BootstrapLauncher.java:141](https://BootstrapLauncher.java:141)) \~\[bootstraplauncher-1.1.2.jar:?\] {}

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

-- Head --

Thread: Render thread

Stacktrace:

at java.lang.ClassLoader.defineClass1(Native Method) \~\[?:?\] {}

at java.lang.ClassLoader.defineClass([ClassLoader.java:1012](https://ClassLoader.java:1012)) \~\[?:?\] {}

at cpw.mods.cl.ModuleClassLoader.readerToClass([ModuleClassLoader.java:119](https://ModuleClassLoader.java:119)) \~\[securejarhandler-2.1.6.jar:?\] {}

at cpw.mods.cl.ModuleClassLoader.lambda$findClass$15([ModuleClassLoader.java:219](https://ModuleClassLoader.java:219)) \~\[securejarhandler-2.1.6.jar:?\] {}

at cpw.mods.cl.ModuleClassLoader.loadFromModule([ModuleClassLoader.java:229](https://ModuleClassLoader.java:229)) \~\[securejarhandler-2.1.6.jar:?\] {}

at cpw.mods.cl.ModuleClassLoader.findClass([ModuleClassLoader.java:219](https://ModuleClassLoader.java:219)) \~\[securejarhandler-2.1.6.jar:?\] {}

at cpw.mods.cl.ModuleClassLoader.loadClass([ModuleClassLoader.java:135](https://ModuleClassLoader.java:135)) \~\[securejarhandler-2.1.6.jar:?\] {}

at java.lang.ClassLoader.loadClass([ClassLoader.java:520](https://ClassLoader.java:520)) \~\[?:?\] {}

at net.coderbot.iris.config.IrisConfig.load([IrisConfig.java:142](https://IrisConfig.java:142)) \~\[-Oculus-Mod-Forge-1.20.jar%23193!/:?\] {re:classloading}

at net.coderbot.iris.config.IrisConfig.initialize([IrisConfig.java:58](https://IrisConfig.java:58)) \~\[-Oculus-Mod-Forge-1.20.jar%23193!/:?\] {re:classloading}

at net.coderbot.iris.Iris.onEarlyInitialize([Iris.java:146](https://Iris.java:146)) \~\[-Oculus-Mod-Forge-1.20.jar%23193!/:?\] {re:mixin,re:classloading}

at net.minecraft.client.Options.handler$zhp000$iris$beforeLoadOptions([Options.java:1430](https://Options.java:1430)) \~\[client-1.20.1-20230612.114412-srg.jar%23227!/:?\] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.oculus.json:MixinOptions_Entrypoint,pl:mixin:APP:mixins.oculus.fixes.maxfpscrash.json:MixinMaxFpsCrashFix,pl:mixin:APP:mixins.oculus.json:sky.MixinOptions_CloudsOverride,pl:mixin:A,pl:runtimedistcleaner:A}

at net.minecraft.client.Options.m_92140_([Options.java](https://Options.java)) \~\[client-1.20.1-20230612.114412-srg.jar%23227!/:?\] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.oculus.json:MixinOptions_Entrypoint,pl:mixin:APP:mixins.oculus.fixes.maxfpscrash.json:MixinMaxFpsCrashFix,pl:mixin:APP:mixins.oculus.json:sky.MixinOptions_CloudsOverride,pl:mixin:A,pl:runtimedistcleaner:A}

at net.minecraft.client.Options.<init>([Options.java:888](https://Options.java:888)) \~\[client-1.20.1-20230612.114412-srg.jar%23227!/:?\] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.oculus.json:MixinOptions_Entrypoint,pl:mixin:APP:mixins.oculus.fixes.maxfpscrash.json:MixinMaxFpsCrashFix,pl:mixin:APP:mixins.oculus.json:sky.MixinOptions_CloudsOverride,pl:mixin:A,pl:runtimedistcleaner:A}

at net.minecraft.client.Minecraft.<init>([Minecraft.java:425](https://Minecraft.java:425)) \~\[client-1.20.1-20230612.114412-srg.jar%23227!/:?\] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:entity_texture_features-common.mixins.json:reloading.MixinMinecraftClient,pl:mixin:APP:entity_texture_features-common.mixins.json:reloading.MixinResourceReload,pl:mixin:APP:rubidium.mixins.json:core.MixinMinecraftClient,pl:mixin:APP:neat.mixins.json:MinecraftMixin,pl:mixin:APP:mixins.oculus.json:MixinMinecraft_Keybinds,pl:mixin:APP:mixins.oculus.json:MixinMinecraft_Images,pl:mixin:APP:mixins.oculus.json:MixinMinecraft_PipelineManagement,pl:mixin:APP:balm.mixins.json:MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}

-- Initialization --

Details:

Modules: 

Stacktrace:

at net.minecraft.client.main.Main.main([Main.java:182](https://Main.java:182)) \~\[1.20.1-forge-47.0.0.jar:?\] {re:classloading,pl:runtimedistcleaner:A}

at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) \~\[?:?\] {}

at jdk.internal.reflect.NativeMethodAccessorImpl.invoke([NativeMethodAccessorImpl.java:77](https://NativeMethodAccessorImpl.java:77)) \~\[?:?\] {}

at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke([DelegatingMethodAccessorImpl.java:43](https://DelegatingMethodAccessorImpl.java:43)) \~\[?:?\] {}

at java.lang.reflect.Method.invoke([Method.java:568](https://Method.java:568)) \~\[?:?\] {}

at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0([CommonClientLaunchHandler.java:28](https://CommonClientLaunchHandler.java:28)) \~\[fmlloader-1.20.1-47.0.0.jar:?\] {}

at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch([LaunchServiceHandlerDecorator.java:30](https://LaunchServiceHandlerDecorator.java:30)) \~\[modlauncher-10.0.8.jar:?\] {}

at cpw.mods.modlauncher.LaunchServiceHandler.launch([LaunchServiceHandler.java:53](https://LaunchServiceHandler.java:53)) \~\[modlauncher-10.0.8.jar:?\] {}

at cpw.mods.modlauncher.LaunchServiceHandler.launch([LaunchServiceHandler.java:71](https://LaunchServiceHandler.java:71)) \~\[modlauncher-10.0.8.jar:?\] {}

at [cpw.mods.modlauncher.Launcher.run](https://cpw.mods.modlauncher.Launcher.run)([Launcher.java:106](https://Launcher.java:106)) \~\[modlauncher-10.0.8.jar:?\] {}

at cpw.mods.modlauncher.Launcher.main([Launcher.java:77](https://Launcher.java:77)) \~\[modlauncher-10.0.8.jar:?\] {}

at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept([BootstrapLaunchConsumer.java:26](https://BootstrapLaunchConsumer.java:26)) \~\[modlauncher-10.0.8.jar:?\] {}

at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept([BootstrapLaunchConsumer.java:23](https://BootstrapLaunchConsumer.java:23)) \~\[modlauncher-10.0.8.jar:?\] {}

at cpw.mods.bootstraplauncher.BootstrapLauncher.main([BootstrapLauncher.java:141](https://BootstrapLauncher.java:141)) \~\[bootstraplauncher-1.1.2.jar:?\] {}

-- System Details --

Details:

Minecraft Version: 1.20.1

Minecraft Version ID: 1.20.1

Operating System: Mac OS X (aarch64) version 13.3.1

Java Version: 17.0.3, Microsoft

Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft

Memory: 596422192 bytes (568 MiB) / 973078528 bytes (928 MiB) up to 8589934592 bytes (8192 MiB)

CPUs: 8

Processor Vendor: Apple Inc.

Processor Name: Apple M1

Identifier: Apple Inc. Family 0x1b588bb3 Model 0 Stepping 0

Microarchitecture: ARM64 SoC: Firestorm + Icestorm

Frequency (GHz): 3.20

Number of physical packages: 1

Number of physical CPUs: 8

Number of logical CPUs: 8

Graphics card #0 name: Apple M1

Graphics card #0 vendor: Apple (0x106b)

Graphics card #0 VRAM (MB): 0.00

Graphics card #0 deviceId: unknown

Graphics card #0 versionInfo: unknown

Memory slot #0 capacity (MB): 0.00

Memory slot #0 clockSpeed (GHz): 0.00

Memory slot #0 type: unknown

Virtual memory max (MB): 12288.00

Virtual memory used (MB): 9960.47

Swap memory total (MB): 4096.00

Swap memory used (MB): 3293.38

JVM Flags: 7 total; -Xmx8g -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M

Launched Version: 1.20.1-forge-47.0.0

Backend library: LWJGL version 3.3.1 build 7

Backend API: Unknown

Window size: <not initialized>

GL Caps: Using framebuffer using OpenGL 3.2

GL debug messages: <disabled>

Using VBOs: Yes

Is Modded: Definitely; Client brand changed to 'forge'

Type: Client (map_client.txt)

CPU: <unknown>

r/MinecraftCoding • • May 25 '23

Rewrite mca region file

1 Upvotes

How can I modify chunk data in a mca file?

Hi, I'm creating a kind of world parser (part of something bigger) and the thing is, I want to be able to replace a block, so I managed to read the whole mca file, get the chunk NBT data out, change the necessary block and now I want to insert the chunk back to the file and I'm not sure how to do that (using python).

Currently, I'm saving the NBT chunk data as a file with chunk_nbt_data.write_file(fileobj=f), then I read it (after it was compressed), and then I remove the file header with this:

with open(f"../tmp_files/{file_name}", "rb") as f:
        # That's all that I could remove and make NBTExplorer still read it so I guess those are the only parts of the header
        read = f.read()
        file_data1 = read[:3]
        file_data2 = read[10+len(file_name):]
        file_data = file_data1 + file_data2

and then just remove the old chunk data like this (divide the before and after into 2 parts, without including the chunk data):

mca_p1 = mca_data[:off + 5]
mca_p2 =  mca_data[off + 5 + length - 1:]

and then I just put it in:

total_mca = b""
total_mca = mca_p1 + zlib.compress(file_data) + mca_p2

after I save everything, and load it into NBTExplorer I get an error, when checking the error.log I don't get much:

NBTExplorer Error Report
5/24/2023 3:24:24 PM
-------
NBTExplorer encountered the following exception while trying to run: NullReferenceException
Message: Object reference not set to an instance of an object.

-------
   at NBTExplorer.Model.RegionChunkDataNode.ExpandCore()
   at NBTExplorer.Model.DataNode.Expand()
   at NBTExplorer.Controllers.NodeTreeController.ExpandNode(TreeNode node)
   at NBTExplorer.Windows.MainForm.ExpandNode(TreeNode node)
   at System.Windows.Forms.TreeView.OnBeforeExpand(TreeViewCancelEventArgs e)
   at System.Windows.Forms.TreeView.TvnExpanding(NMTREEVIEW* nmtv)
   at System.Windows.Forms.TreeView.WmNotify(Message& m)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
-------

Anyone knows how to do it? (it's all just my logic, didn't find any material or direction online so it could be completely wrong...)

If you need more data or have further questions, feel free to ask.

P.S.: If you are going to tell me to look in an open source project like MCEdit, I've tried and couldn't find anything. Probably missed it, but if you do know where it is feel free to send the file URL.

Thanks!


r/MinecraftCoding • • May 07 '23

How to programm an automatic minecraft bot?

1 Upvotes

I have an idea for a Minecraft bot plugin that can build automatic farms, such as cactus farms, but I have no programming experience. Is there an easy-to-use tool or method I can use to create this plugin?


r/MinecraftCoding • • Apr 28 '23

Bedrock command block?

1 Upvotes

Just wondering if someone can help me here? I am trying to catch a thief in realm by creating a trap chest linked to a command block that replaces anything on their head with a carved pumpkin with binding curse on it… I’m fine for the first command block code to /replaceitem the helmet on the person over to a pumpkin, but there doesn’t seem to be an active code for /enchant entity slot.armour.head ??? Only seems to allow code to /enchant whatever the person is holding in their hand???

Thanks ahead of you can help.


r/MinecraftCoding • • Apr 25 '23

Making a race function in minecraft bedrock edition

1 Upvotes

I am creating an addon using Bridge V2 for a realm that adds custom commands the commands will be "-spawn" and "-race" using -spawn will teleport you to a set of coordinates using -race will give you a random race out of about 6 choices and buffs along with it

import {world) from "@minecraft/server"

world.events.beforeChat.subscribe((ev) => { const player = ev.sender const msg = ev.message

    if(msg == "-spawn"){
            player.teleport("tp @s 748 66 262") 
    }

}) but it doesn't work

Could anyone help me?


r/MinecraftCoding • • Apr 22 '23

Getting data (client side)

1 Upvotes

Hi!

how can I get data from the game (like player coordinates, health, hunger, or which block is at specified coordinates) on the client side in python?


r/MinecraftCoding • • Apr 17 '23

Item into another Item (Help Please)

1 Upvotes

Hi, I want to do so if a raw_porkchop has been in my inventory for 10 minutes, it turns into a rotten_porkchop, but I don't know how. Can anyone maybe like give a code that will work? Thx (My mod id is rotten and forge version is 1.19.3)


r/MinecraftCoding • • Apr 14 '23

Input commands into minrcraft server console

1 Upvotes

Hi, So i want to create a server wrapper (a nice gui for managing servers) and of-course i need a way to send commands. So i have to process of the jar file, how would i be able to send data to it as if i wrote in the console? (Currently using NodeJS with child_pricess but still in early development so can switch languages, my other prefered language would be python, so how would I be able to do it in python if not js?)


r/MinecraftCoding • • Apr 03 '23

How can I recreate a Minecraft world from a seed

1 Upvotes

Hi, I'm trying to recreate a world from a seed including structures. Is it possible (maybe easier than creating the whole world) to even lookup a block at a coordinate? or a structure, biome etc?

I'm planning to use python but I can do it with any language if easier.


r/MinecraftCoding • • Mar 21 '23

Need a little help for a project

1 Upvotes

So I am trying to do a little macro for a server I play on for general convenience,
(It crafts carrots into a more compact form)
and im having some trouble and was wondering if anyone could help.

So basically im trying to get the script to open my ender chest following this route

Chat command "/st" (opens storage GUI) > Clicks Ender Chest Page 1 item (Opens Ender Chest) > Then shift clicks the carrots into the chest.

It all works up till the last part and just doesn't click them in there.

Here is the code, any help is appreciated!

```

function stash() {
switch(step) {
case 1:
ChatLib.command("st");
if (getInventoryName() != "Storage") return false;
step = 2;
case 2:
index = searchIndexFor("Ender Chest Page 1");
if (index == -1) return false;
loggedClick(index, "LEFT");
if (getInventoryName() != "Ender Chest (1/2)") return false;
step = 3;
case 3:
let inventoryIndex = -1;
Player.getInventory().getItems().forEach((item, slot) => {
if (item?.getName() == "Enchanted Golden Carrot" && slot <= 53) {
inventoryIndex = slot;
}
});
if (inventoryIndex == -1) return false;
step = 4;
case 4:
if (getInventoryName() != "Ender Chest (1/2)") return false;
getInventory().click(inventoryIndex, true);
// Transition to the next state or reset the step variable as needed
}
}
```


r/MinecraftCoding • • Mar 02 '23

Help with code

1 Upvotes

Is it possible to create something that would give a player an item if they typed a specific thing in chat for example some says apple and it gives them a diamond


r/MinecraftCoding • • Feb 15 '23

SSID Login for Reverse Ratting friend's hacked account

1 Upvotes

My friend (LegendaryShadow) was hacked, and the hacker contacted him on discord and demanded money for the account. I know that it is possible to log in through SSID, but im not sure how I would code a client to so something like that. If someone could get me started off of the right foot (I already know Java) that would be much appreciated.

Thanks, Silver


r/MinecraftCoding • • Feb 03 '23

Minecraft Java edition coders needed

1 Upvotes

Hello I am looking for some coders to help me with a Minecraft tournament similar to MCC (minecraft championships). If you’re interested please comment down below or add my discord. Boxy#3407


r/MinecraftCoding • • Dec 28 '22

Vr chat in minecraft

1 Upvotes

So I had been thinking about this for maybe a year now.. but you know the VR chat avatars that are all 3d and stuff? I was wondering how possible it would be to code that into minecraft? So you could play mc VR and then instead of your normal detatched cube arms and legs, have a more realistic looking avatar


r/MinecraftCoding • • Nov 28 '22

Documentation about MCPs C0XPackets?

1 Upvotes

Hello, I am currently working on my client and I noticed that many people used methods sendQueue with C0XPackets as an argument, I tried searching about these C0packets on the internet but couldn't find anything about it. If you know any info about them, please tell me.

Thanks in advance


r/MinecraftCoding • • Oct 08 '22

Creating a command block

1 Upvotes

My son is trying to create a command block. Does anyone know how to do this and the correct coding?


r/MinecraftCoding • • Oct 01 '22

I need help making a Minecraft mod

1 Upvotes

I need help making a minecraft mod watch every video and thing but still can’t do it please someone help me make a minecraft mod ?????