Jump to content

DavidM

Members
  • Posts

    1830
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by DavidM

  1. 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.
  2. This thread is not relevant to your problem. Please make your own thread.
  3. 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.
  4. Electroblob Wizardry is crashing. Remove it and report to its author. You can download mods at curseforge.com
  5. No. You are still reaching across logical sides. Use packets.
  6. 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.
  7. 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.
  8. Only download Forge from https://files.minecraftforge.net.
  9. TheOneProbe's problem. Remove it and report to its author.
  10. Please read the EAQ and post the appropiate log(s).
  11. 1. Please don’t use that font. 2. BetweenOres’ problem. Remove it and report to its author.
  12. 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.
  13. 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.
  14. It will cause the server to crash, as such class does not exist on the server side.
  15. 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.
  16. 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?
  17. Your world is corrupted. Restore from backup.
  18. EnigmaticLegacy's problem. Remove it and report to its author.
  19. 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.
  20. Your mods add too much items. Remove some of your mods.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.