• Recently Browsing

    No registered users viewing this page.

  • Posts

    • I completely understand the motivation behind your reply and you are correct.  Forge is amazing and the event hooks you have developed allow for so much.  But also... the three of you who have replied are modders at heart... perhaps even the kings of all modders.  Would you be happy to work within the confines of someone else's framework? 🙂  I am not asking for any help with CoreModding.  Its purely a rhetorical bit of fun and doesn't really need a response. Genuinely love your work.  You are truly the enablers of much joy in the world and I often wonder how much you should be owed by YouTube?
    • Hi i'm new to minecraft modding so i'm trying to learn. I'm having issues with an LazyOptional<IItemHandler> variable what i want to do is get the boolean from itemhandler.isItemValid and put it in an condition. but when i do  itemhandler.ifPresent(h -> h.isItemValid(1, state.getBlock().getItem(world, blockpos, state))); it says to me that itemhandler.ifPresent is a void method i understand but i can't find an other way to get to the return of h.isItemValid Thank u anyhelp would be cool and sry for bad english. here is the method: private void Looting(BlockState state, BlockPos blockpos, PlayerEntity player) { LazyOptional<IItemHandler> itemhandler; TileEntity chest; if(world.getBlockState(pos.add(0, 1, 0)) == BlockInit.harvest_chest.getDefaultState()) { chest = world.getTileEntity(pos.add(0, 1, 0)); itemhandler = chest.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null); //test itemhandler.ifPresent(h -> h.isItemValid(1, state.getBlock().getItem(world, blockpos, state))); //test for(io = 0; io < 36; io++) { //condition that needs test if(itemhandler) itemhandler.ifPresent(h -> h.insertItem(io, state.getBlock().getItem(world, blockpos, state), false)); //condition } } else if(getDistancetoBlock(player, pos)) { player.addItemStackToInventory(state.getBlock().getItem(world, blockpos, state)); player.sendStatusMessage(new StringTextComponent("HELLO"), true); } else { Block.spawnDrops(state, world, pos.add(0, 1, 0), this.getTileEntity(), null, ItemStack.EMPTY); } }  
    • My cap value is synced player max health. It's reset every time player join the world.
    • ClientPlayerEntity is the entity controlled by the player, on the client. RemoteClientPlayerEntity are other player entities, on the client. ServerPlayerEntity are player entities on the server.
    • I want to know the actual meaning of the several subclasses of PlayerEnity, what do they represent? I only have a vague understanding of this. For example, ServerPlayerEntity and AbstractClientEntity refer to server-side and local-side players, but what is the actual meaning of the two classes of ClientPlayerEntity and RemoteClientPlayerEntity? I hope everyone can help me, thank you. Edit: In Minecraft 1.16.1
  • Topics

  • Who's Online (See full list)