• Recently Browsing

    No registered users viewing this page.

  • Posts

    • Hi @TheGreyGhost! Sorry for the lengthy reply time! trackedInts haven't worked for me thus far -- an error in my implementation... After the lack of success with that, I decided to try packets (figured I'd have to learn eventually), but as yet, they too are evading me, this time by showering me in compiler errors... As I register the packet, I get this error on the ::onMessageRecieved and ::encode , though as far as I can see I give the correct args. I tried removing some of the arguments, as I thought they might be inferred from the method reference, but again to no avail.   I fiddled around with the ::decode method a bit more, and the error changed to this: ... which is even more perplexing. As MSG is a generic type specified in the SimpleChannel#register method, I thought perhaps this could be caused by the other compiler errors making the compiler unable to tell if AltarEnergyUpdateMessageToClient is a valid/consistant type?   I have been using @Draco18s's reasonable realism repository  for good-practise reference, as well as the forge docs and your MinecraftByExample  section on network messages for reference...   Again sorry for the slow reply, but at least I haven't been idle!   Many thanks.
    • Please make your own thread, and post your code and a debug.log.   Also, what are these spammy links at the bottom of your messages?
    • The problems seems to be that it can't get the protected field, but why? It keeps throwing a NoSuchFieldException on startup saying the ticksSinceLastSwing field does not exist... when it clearly does...  
    • whenever i tried to open the forge installer it would open with internet explorer and break but this fixes it i think that deserves a like. snaptube vidmate
    • Hey everybody, So I'm trying to change player's eye height to a given float value I've been trying to get the private value from Entity class called eyeHeight, but for some reason it won't recognize it   @SubscribeEvent public void onTicking(TickEvent.PlayerTickEvent e) { if (e.player.world.isRemote) { Class cls = e.player.getClass(); Field field = null; while (cls != null) { try { field = cls.getDeclaredField("field_213326_aJ"); field.setAccessible(true); field.set(e.player, 5.0f); } catch (NoSuchFieldException | IllegalAccessException ex){ cls = cls.getSuperclass(); Minecraft.getInstance().player.sendMessage(new TranslationTextComponent(ex.toString())); } } } }   I've noticed trying to get declaredField named "eyeHeight" throws an exception for some reason, while trying to get "field_213326_aJ" seems to crush the client, no error messages given tho What could be the issue? Am I getting something wrong?
  • Topics

  • Who's Online (See full list)