-
Posts
1830 -
Joined
-
Last visited
-
Days Won
12
Everything posted by DavidM
-
It's basically the same in Java as in C++; just invoke the constructor of BlockPos. BlockPos pos = new BlockPos(x, y, z); Note that everything in Java apart from primitive values is a pointer. However, you should learn Java before making a mod, as the Forge API can be a bit confusing for new modders, and not knowing Java will greatly increase the difficulty of learning to mod. if(Minecraft.getInstance().gameSettings.keyBindSprint.isKeyDown()) { worldIn.setBlockState(pos, Blocks.NOTE_BLOCK.getDefaultState().with(NOTE, _new)); } else { worldIn.setBlockState(pos, ModBlocks.noteblock_low.getDefaultState().with(NOTE, _new)); } You are reaching across logical sides. This will crash on a dedicated server, as the Minecraft class only exists on the client, while all World interactions should be done on the server. You should send a packet to the server about the pressing of the key bind and set the BlockState on the server side.
-
This thread is not relevant to your problem. Please make your own thread.
-
You can try building the mod and running a Forge server with it. This would cause a crash once the class referencing client-only components are loaded. I am not sure why servers started with runServer do not remove client-specific classes, but those classes will be removed on server side outside of development, thus causing a crash.
-
Electroblob Wizardry is crashing. Remove it and report to its author. You can download mods at curseforge.com
-
No. You are still reaching across logical sides. Use packets.
-
Damaging the Entity (and all Entity related operations in general) must be done on the server side, yet your code is executing on the client (indicated by the usage of Minecraft class). You would need to send a packet to the server to inform it about the action, then damage the Entity on the server.
-
my mods aren't appearing only forge does
DavidM replied to Mylystra's topic in Support & Bug Reports
You clicked on an advertisement instead of the download link. After clicking on the download link on Forge site, you will be redirected to AdFoc. Wait a few seconds and click on the “Skip Ad” button on the top right corner. -
my mods aren't appearing only forge does
DavidM replied to Mylystra's topic in Support & Bug Reports
Only download Forge from https://files.minecraftforge.net. -
TheOneProbe's problem. Remove it and report to its author.
-
Please read the EAQ and post the appropiate log(s).
-
1. Please don’t use that font. 2. BetweenOres’ problem. Remove it and report to its author.
-
[1.14-newer] deprecated method onBlockActivated
DavidM replied to matt1999rd's topic in Modder Support
Please make your own thread. -
[1.14] moving item assignment to a separate function
DavidM replied to JetCobblestone's topic in Modder Support
Learning Java via modding is not a good method, as it will bring a lot of unnecessary confusions. Please learn Java before making a mod. -
No, it does not. Your block will break once there are multiple instance of your blocks in your world, as all of them use the same value stored in a singleton of your block. Use TileEntity instead.
-
It will cause the server to crash, as such class does not exist on the server side.
-
That code from the original mod is not going to work regardless of the side it is on, as spawning ItemEntity in the world must be done on the server side. However, the Minecraft class (used in your if statement) is client side only. In your case, you might want to look at how proxies work.
-
I am updating one of my mod to 1.14.4. I obtained the CompoundNBT of an Entity and stored it, and would like to spawn the Entity again based on the stored CompoundNBT. In 1.13.2, I created an Entity from CompoundNBT via EntityType#create. What is the 1.14.4 equivalent of this?
-
Your world is corrupted. Restore from backup.
-
Use a lower resolution texture pack.
-
EnigmaticLegacy's problem. Remove it and report to its author.
-
[1.12.2] Smooth Velocity for Client-Side Entity
DavidM replied to Solitary_Knight's topic in Modder Support
I think OP wants to create a visual effect of an armor stand. There is no need for interaction or synchronizing to other clients. Entities are not meant to be used as client-side rendering techniques. Instead of spawning the entity in the client world, you should subscribe to RenderWorldLastEvent and manually render the armor stand there. One approach would be to create a static list of all the visual armor stand's data, and render ArmorStandEntity in RenderWorldLastEvent according to the list. Then, instead of creating another thread to handle the updating, simply subscribe to ClientTickEvent and make a timer to determine when movements should be applied to the rendered armor stand. -
I have another problem loading up Forge
DavidM replied to Nicidical's topic in Support & Bug Reports
Your mods add too much items. Remove some of your mods.