• Recently Browsing

    No registered users viewing this page.

  • Posts

    • I found the error: In the tile entity when i create the ccntainer in the method createMenu I have to pass the IInventory of the tile entity or the tile entity will not be notified   @Override protected Container createMenu(int id, PlayerInventory player) { LOGGER.info("HELLO FROM createMenu id=" + id + " player=" + player); //the third parameter "this" is the IInventory implemented by the tile entity // ChestContainer container = ChestContainer.createGeneric9X3(id, player, this); ContainerGcmBookshelf container2 = ContainerGcmBookshelf.createGeneric9X3(id, player, this); return container2; }  
    • I know this is somewhat of an older thread however I was wondering if this was ever resolved as i am getting this EXACT same error. It is kind of strange actually that it is literally the same.   Here is my latest: https://hastebin.com/oyebubawit.sql Here is my debug: https://hastebin.com/dehohefudo.md (only took the bottom piece of it where the actual Frozen state happened)   As for the reproduction - it is identical to above. It works flawlessly on Singleplayer. Only in the multiplayer environment does this occur. To be honest I wouldn't even know where to look for something like this? I mean are byte issues generally in networking and packet handling?
    • actually nevermind, tysm! it worked!
    • public class ModEffect extends InstantEffect { public ModEffect(EffectType typeIn, int liquidColorIn) { super(typeIn, liquidColorIn); } @Override public void performEffect(LivingEntity entityLivingBaseIn, int amplifier) { if (entityLivingBaseIn instanceof PlayerEntity) { LazyOptional<PlayerMentalInterface> cap = ((PlayerEntity)entityLivingBaseIn).getCapability(PlayerMentalCapabilityRegistry.PLAYER_MENTAL_CAPABILITY); int currentMental = cap.ifPresent(f -> f.getMental()); //<-here int _currentMental = currentMental + 3; //if (_currentMental > 20) { // _currentMental = 20; //} cap.ifPresent(f -> f.setMental(_currentMental)); } } @Override public void affectEntity(@Nullable Entity source, @Nullable Entity indirectSource, LivingEntity entityLivingBaseIn, int amplifier, double health) { this.performEffect(entityLivingBaseIn, amplifier); } } I've improved the code, but I don't know how to use ifPresent with getMental (). The code can be found at https://github.com/Zemelua/Depression-Mod . I haven't updated it yet, but I have a complete implementation of capability.
    • i'm sorry i'm not very knowledgeable on what im doing. can you go into a deeper explanation?
  • Topics

  • Who's Online (See full list)