Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/21/20 in all areas

  1. I don't have a github. And yes, that's the tutorial. Forge documentation is effectively useless and there aren't really any 1.15 tutorials except cadiboo's unfinished one
    2 points
  2. Forge has a problem with fluids that isn't fixed yet
    2 points
  3. Take a look at your disenchanter block class: @Override public boolean onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult result) { if (!world.isRemote) { TileEntity tileEntity = world.getTileEntity(pos); if (tileEntity instanceof INamedContainerProvider){ NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) tileEntity, tileEntity.getPos()); } else { throw new IllegalStateException("Our named container provider is missing."); } return true; } return super.onBlockActivated(state, world, pos, player, hand, result); } If you follow the control flow, the client-side block will always return super.onBlockActivated(state, world, pos, player, hand, result); The effects you are describing seem to be caused by the client and server following different paths here, the server returning true after opening the gui, and the client returning super.onBlockActivated, which I'm pretty sure defaults to false.
    2 points
  4. By doing a little bit more digging, now that I'm not really tired today haha, I found that the PlayerRespawn event (when the player dies) actually also calls the PlayerClone event, helping me discover there was an option in PlayerEvent.Clone called "isWasDeath." By using this event, I was able to determine if the player died, and re-apply my health modifier appropriately, which allowed me to set the playerNew's health to the same as the playerOld's health, thereby keeping their health across dimension change. Here's my fixed code: @SubscribeEvent public static void onPlayerClone(PlayerEvent.Clone event) { debug("PlayerClone{Event}"); // Fetch & Copy Capability PlayerEntity playerOld = event.getOriginal(); PlayerEntity playerNew = event.getPlayer(); IMoreHealth capOld = MoreHealth.getFromPlayer(playerOld); IMoreHealth capNew = MoreHealth.getFromPlayer(playerNew); capNew.copy(capOld); // Copy Health on Dimension Change if (!event.isWasDeath()) { debug("PlayerClone{Event}: Cloning from dimension change, re-applying health modifier."); LevelHearts.applyHealthModifier(playerNew, capNew.getTrueModifier()); playerNew.setHealth(playerOld.getHealth()); } } @SubscribeEvent public static void onPlayerRespawn(PlayerRespawnEvent event) { // Ensure server-side only if (event.getPlayer().getEntityWorld().isRemote) { return; } debug("PlayerRespawn{Event}"); // Fetch Capability PlayerEntity player = event.getPlayer(); IMoreHealth cap = MoreHealth.getFromPlayer(player); // Handle "The End" if (event.isEndConquered()) { debug("PlayerRespawn{Event}: Coming from end, syncing!"); MoreHealth.updateClient((ServerPlayerEntity) player, cap); return; } // ... other stuff }
    1 point
  5. Hello guys, Ever since Minecraft/Forge 1.15 I get a crash while loading the game (no matter the forge version). The crash says: The game crashed whilst initializing game Error: java.lang.NoClassDefFoundError: net/minecraft/fluid/Fluid I attached crash-report and log Here are also pastebins: Crash-report: https://pastebin.com/2iuttYkt Log: https://pastebin.com/t6fPJS2C crash-2020-01-21_08.46.45-client.txt latest.log
    1 point
  6. Pretty sure this is a user rather than a dev
    1 point
  7. Hello there! I am here to ask how can I move certain cube (ModelRenderer) in x,y,z axis? In previous minecraft versions I was able to operate offsets of every part of the model, now these things are gone. Greetings, Krevik!
    1 point
  8. Post your full logs, and if you're fine with it the world save.
    1 point
  9. You really shouldn’t need this check. Please show your full code or link a GitHub.
    1 point
  10. You can use Minecraft#objectMouseOver. You can also look at the ray trading that the debug overlay does to show you your targeted block and block (at a surprisingly far range)
    1 point
  11. Its Github for the desktop: https://desktop.github.com/ or if you mean git it's a software that helps developers and makes different instalations easier for an example: https://git-scm.com/downloads
    1 point
  12. It is possible but leads to crashes if something tries to reference those items (even if it’s just a json recipe). So you shouldn’t do it. The best way to do this would be to remove the item from all creative tabs and remove its recipe. That way ops can still get the item with /give but normal players can’t get it. If you want to go a step further you can create an event handler that scans players inventories for the item and removes it (and hopefully tells the player about it).
    1 point
  13. Use a git client. GitHub desktop is good if you have limited experience in git/the command line
    1 point
  14. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    1 point
  15. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    1 point
  16. Make sure you only ever download Forge from https://files.minecraftforge.net
    1 point
  17. Since you already have a github, you should post your code there. Much easier to read on there than pasted here, and as long as you keep updating it, no need to post updated code here. Making a guess based on the crash without seeing code, you're trying to register something that has not been initialized, so it's trying to register something that is null. *edit: Pretty sure it's an item, since the crash looks to be coming from ModItems.
    1 point
  18. This may be helpful https://gist.github.com/Cadiboo/385211b732d09b707ff825246d71b2c1#dimensions
    1 point
  19. If you are trying to get the position of a block outside of the reach distance, you need to perform a raytrace to find that block position.
    1 point
  20. You can use a key bind to set a field somewhere (1.14.4 example). Rendering changed a lot in 1.15.1. Your best bet is to look the vanilla code.
    1 point
  21. The elytra flying code isn't handled by the elytra at all, but rather the player entity code (which checks for specifically the elytra item).
    1 point
  22. 1.11.2 is no longer supported on these forums due to age. Please update to a modern version to receive support. See the LTS link at the top of every page for more information.
    0 points
×
×
  • Create New...

Important Information

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