-
Recently Browsing
No registered users viewing this page.
-
Posts
-
By Turtledove · Posted
Solved it myself: when handle() is called it's (in the context of server->client) called on the logical client, ctx.getSender() is going to return null. So just use Minecraft.instance.player. -
Bonjour a tous Je me demandais, comment on pouvais enlever les particule de neige qui tombent sur le modpack Winter is Here
-
Why did you create two lazy optionals, then unbox them to pass into the CombinedInvWrapper? (Not to mention using an array to store the local results? Why!?) return LazyOptional.of(() -> (T)new CombinedInvWrapper(getHandler(), new EntityArmorInvWrapper(entity)));
-
Okay, so I've been trying to install Forge to mod my minecraft game for a while, but every time I try, the installer doesn't install it and prompts me with this error "Unable to Install Java there are errors in the following switches: "C:\User\*****\AppData\roaming\.minecraft\forge-1.14.4-28. 2.23-installer.jar";. Check that the commands are valid and try again." I have Java istalled, but I don't think that it has anything to do with it. I need help fixing this, please.
-
I created now. public MyEntity(EntityType<? extends MyEntity> type, World worldIn) { super(type, worldIn); handler = getHandler(); optional = create(this); } do i need this? public <T> LazyOptional<T> create(LivingEntity entity) { LazyOptional<IItemHandlerModifiable>[] ret = new LazyOptional[2]; ret[0] = LazyOptional.of(() -> getHandler()); ret[1] = LazyOptional.of(() -> new EntityArmorInvWrapper(entity)); return LazyOptional.of(() -> (T)new CombinedInvWrapper(ret[0].orElse(null), ret[1].orElse(null))); } here i got default handler public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) { if(cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { defHandler = (ItemStackHandler) super.getCapability(cap,side).orElse(null); return create(this); } return super.getCapability(cap, side); } public ItemStack func_213803_dV() { return this.getItemStackFromSlot(EquipmentSlotType.CHEST); } Am i going right?
-
-
Topics
-
Who's Online (See full list)