Jump to content

Kozz

Members
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Kozz's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Solid documentation is what I'd expect. Detailed descriptions of every class and method... It's pretty standard. Beta is no excuse not to have this. They don't provide it for old methods either. Honestly, their documentation is more like a wiki page. An outdated one at that. I followed the docs step-by-step for setting up the workspace, only to find the steps they provide on the FIRST PAGE are outdated, so I had to turn to the forums for that too.
  2. Let me know if you figure anything out please!
  3. I'm currently reading this thread, this user is facing the same issue as me. Apparently my issue is simply trying to use a server side event on client-side only. Even with a client side proxy, or a "@Mod(clientSideOnly = true)", it appears this wouldn't work (although I may be wrong.) I need a client-side event I can use in order to determine how much of a specific item I have gathered.
  4. You're looking at all the source code It's just the default example mod (hence class ExampleMod) with one new class added, which is listed. I started simple... which is still too complicated for me I guess. No point in me adding any more until I can get this figured out.
  5. This is the kind of stuff that stresses me out! It seems any new modder like me has come into a rough time... heck, it seems like a lot of experienced modders are even having trouble ATM. Do you have any recommendation for how I can figure this out?
  6. When I call "@Mod", the only parameter it will accept is a String. This works fine: @Mod("test") If I try: @Mod(modid="test") Or @Mod(clientSideOnly = true) I get a "Cannot resolve method 'modid'" or "Cannot resolve method 'clientSideOnly'" Why is this?
  7. I'm attempting to implement a very simple mod for use (by myself) on a multiplayer server. It's purpose: Keep a count of specific blocks I've acquired, render that information on the screen. Event: Player has picked up a block Check if the block is a nether quartz (I'm using silk touch). Add it to a totalNetherQuartz variable, which is later rendered to the screen. Simple, right? The problem: Runs fine on single-player; doesn't run on multiplayer. I understand server-side vs. client-side; however, I am unable to find a way to avoid using the server-side. Yes, I have looked at the docs and tutorials. The docs are sparse; tutorials are outdated (MC modding seems to have changed quite significantly in 1.13). The code: ExampleMod.java @Mod("Profit Counter") public class ExampleMod { public ExampleMod() { MinecraftForge.EVENT_BUS.register(this); // Register my custom event handler. EventHandler handler = new EventHandler(); MinecraftForge.EVENT_BUS.register(handler); } } EventHandler.java public class EventHandler { private int totalNetherQuartz = 0; @SubscribeEvent public void onPlayerPickup(EntityItemPickupEvent event) { EntityItem item = event.getItem(); if (item.getName().toString().contains("nether_quartz_ore")) { // I'm sure there's a better way to check for this, but this functions. totalNetherQuartz += 1; } } @SubscribeEvent public void onRender(TickEvent.RenderTickEvent event) { if (Minecraft.getInstance().isGameFocused()) { Minecraft.getInstance().fontRenderer.drawStringWithShadow("Testing", 5, 5, 0xffFFFFFF); // This runs client-side, before even connecting. Minecraft.getInstance().fontRenderer.drawStringWithShadow(Integer.toString(totalNetherQuartz), 15, 5, 0xffFFFFFF); // Changes in single-player; does not work in multiplayer. } } } What steps must I take in order to get this working on a multiplayer server? Before you scream "client-side proxy" at me - please explain (or show me where I can find) how to set this up, since the tutorials for doing this in 1.12 no longer work, and the docs explain absolutely nothing other than the fact that you need one.
×
×
  • Create New...

Important Information

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