Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Nozzomi

  • Rank
    Tree Puncher
  1. I'm trying to render a custom helmet and the helmet rotates fine horizontally but it seems that it rotates on the x/z as well when I look vertically. Here's a picture of what's happening: https://imgur.com/a/TOYUDqb Item class: public class MythusArmorVar2 extends ArmorItem { public MythusArmorVar2(IArmorMaterial mat, EquipmentSlotType slot) { super(mat, slot, new Properties().group(Mythus.MYTHUS_TAB)); } @Nullable @Override public <A extends BipedModel<?>> A getArmorModel(LivingEntity ent, ItemStack stack, Equipment
  2. Huh, I couldn't reproduce it either... I ended up fixing the problem in the original code by creating a new world since I figured that if it worked in the git clone, it must've had something to do with the run folder. In hindsight, I probably should've created a new world in the first place since I was attaching a capability to the player. Thank you for helping me through!
  3. Also, I changed the orElse into an orElseThrow and it hasn't given me any errors (though I'm not sure whether or not to be happy since the problem isn't any clearer...) public static final RegistryObject<ContainerType<CoreStorageContainer>> CORE_STORAGE_CONTAINER = CONTAINERS.register("core_storage_container", () -> new ContainerType<>((id, inv) -> new CoreStorageContainer(id, inv, inv.player.getCapability(CapabilityCoreStorage.CORE_STORAGE_CAPABILITY).orElseThrow(() -> new NullPointerException("Core Storage Capability not found!")))));
  4. Wait, but don't I? I have e.addCapability(CapabilityCoreStorage.LOCATION, new CapabilityCoreStorage()); where LOCATION is just the ResourceLocation needed to attach the capability, right?
  5. Video The sword is placed in according to the server but the breakpoint doesn't stop me when I click with the sword. The setStackInSlot part is because the item is already recognized as in there...? (It's definitely your word over mine, I'm a little lost)
  6. I think what I've found is that inserItem and setStackInSlot isn't called when I try to ghost insert my item in the custom inventory, but the item somehow still ends up in the slot it's not supposed to be in. I also tried sticking an extra isItemValid() check in the setStackInSlot method before the super, but it ended up not showing the items, but if I clicked on the slot, the item would still be there, just no longer showing.
  7. Is it possible for me to extend on the player's regular ItemStackHandler capability? Maybe if I add the container through an already existing capability, it'll go more smoothly. How would I extend upon that capability?
  8. That's super weird, I guess the only option now is to...reinstantiate (is that the correct term or even a word?!?!) the forge project and will see what happens Was there anything that might've royally screwed me over in terms of adding the inventory?
  9. No, they aren't for(int i = 0; i < cores.getSlots(); i++) { this.addSlot(new SlotItemHandler(cores, i, slotCoords.get(i).left, slotCoords.get(i).right)); } I didn't think that they'd affect the player inventory because they're using the indices for a different IItemHandler...it seems I might be wrong though...?
  10. for (int i = 0; i < 3; ++i) { for (int j = 0; j < 9; ++j) { Mythus.LOG.info(j + i * 9 + 9); this.addSlot(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 132 + i * 18)); } } for (int i = 0; i < 9; ++i) { Mythus.LOG.info(i); this.addSlot(new Slot(inventory, i, 8 + i * 18, 190)); } What would be wrong with this? No numbers are repeating in the logs I think
  11. Here's a video of me showing what I'm having problems with. First, I'm showing the clicking the item into the slot that's doesn't allow it, then opening and closing that inventory, where the item ends up in the slot. After that, I'm switching between the vanilla inventory and the custom inventory quickly and the items eventually start to pile up in my inventory.
  12. I tried using the capability, but the result is the same. The inventory is saving properly though, but so at least that's not a problem. This is what I have now instead public static final RegistryObject<ContainerType<CoreStorageContainer>> CORE_STORAGE_CONTAINER = CONTAINERS.register("core_storage_container", () -> new ContainerType<>((id, inv) -> new CoreStorageContainer(id, inv, inv.player.getCapability(CapabilityCoreStorage.CORE_STORAGE_CAPABILITY).orElse(new CoreStorageInstance()))));
  13. I open the gui in the container by using ClientTickEvent Then in the packet I just use the NetworkHooks#openGui And uhhh, I just register the container type using the DeferredRegister public static final RegistryObject<ContainerType<CoreStorageContainer>> CORE_STORAGE_CONTAINER = CONTAINERS.register("core_storage_container", () -> new ContainerType<CoreStorageContainer>((id, inv) -> new CoreStorageContainer(id, inv, new CoreStorageInstance())));
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.