Jump to content

Skyriis

Members
  • Posts

    176
  • Joined

  • Last visited

Everything posted by Skyriis

  1. Hey Guys, i'm looking for a Methods which allows me to check if a Hoe could be used on a given block to till it. I know there is a field / map in the HoeItem class which provides vanilla values but it doesn't support blocks from other Mods. Is there any other way to check if a block is tillable or not (without actually doing changing anything in the world)?
  2. This thread might help you:
  3. Hey Guys, i would love to load a 5x5 area around my own entity but i got no idea how to load the given area. Would someone help?
  4. fixed by overriding the @Override public void push(Entity pEntity) { } @Override public void push(double pX, double pY, double pZ) { } @Override public boolean ignoreExplosion() { return true; } methods as well.
  5. Hey Guys, i've created a mob which souldn't be pushable by players (or any other mob) or explosions. i've tried overriding those methods in my entity class: @Override public boolean canCollideWith(Entity pEntity) { return false; } @Override public boolean canBeCollidedWith() { return false; } @Override public boolean isPushable() { return false; } @Override public boolean isPushedByFluid() { return false; } but the mob can still be pushed around by players. Is there any other method i need to override?
  6. Hey Guys, i would love to give my Item an animated Texture with a value displayed in the center of the texture based on a nbt tag value the item has. Is something like that possible?
  7. That's a mod you've (not) installed. It causes this exception. Try installing / uninstalling it or contact the Mod Author.
  8. i ran into a new problem on the same thing... shift-clicking a item in the player inventory results into a game freeze without any error message. any ideas what could cause such a behavior?
  9. oh... well how do i do that?
  10. I've uploaded a video how to trigger the exception but i got no idea how to fix that
  11. okay that should be fixed now but the issue still remains
  12. oh what. So every time the entity get's loaded -> it'll add 4 slots to the inventory? Well i guess i need to change that
  13. Those 4 slots are used for special items which are present in all types of my entity. I thought it's easier to always add them to the amount of slots, the entity has as inventory space instead of always remembering to add them.
  14. I got another problem. I'm running into a IndexOutOfBoundsException when opening the container of my entity. Entity ItemStackHandler Entity Container Stacktrace Any ideas what's going on there?
  15. ah shit. It works now ^^ thank you!
  16. https://pastebin.com/xPeYSTgi
  17. Okay i'm using if (pPlayer instanceof ServerPlayer serverPlayer) { NetworkHooks.openGui(serverPlayer, new SimpleMenuProvider((pContainerId, pInventory, pPlayer1) -> { return SkyblockRegistries.container.minerMinionMenu.get().create(pContainerId, pPlayer1.getInventory()); }, getCustomName()), buf -> buf.writeInt(getId())); } in my entity class now but i'm still running into the NPE
  18. but when i try to open the menu i'll get a NPE because `data` is null. I'm trying to open the menu using: pPlayer.openMenu(new SimpleMenuProvider((pContainerId, pInventory, pPlayer1) -> { return SkyblockRegistries.container.minerMinionMenu.get().create(pContainerId, pPlayer1.getInventory()); }, getCustomName()));
  19. I got the container class: public class MinerMinionMenu extends AbstractContainerMenu { private final InvWrapper playerInvWrapper; private final ItemStackHandler minionInventory; private final MinerEntity minerEntity; public MinerMinionMenu(int pContainerId, Inventory inventory, MinerEntity minerEntity) { super(SkyblockRegistries.container.minerMinionMenu.get(), pContainerId); this.playerInvWrapper = new InvWrapper(inventory); this.minionInventory = minerEntity.getInventory(); this.minerEntity = minerEntity; } @Override public boolean stillValid(Player pPlayer) { return false; } } and register it using public static final RegistryObject<MenuType<MinerMinionMenu>> minerMinionMenu = registry.register("miner_minion_menu", () -> IForgeMenuType.create( (windowId, inv, data) -> { Entity entity = Skyblock.getProxy().getLevel().getEntity(data.readInt()); if (entity instanceof MinerEntity minerEntity) { return new MinerMinionMenu(windowId, inv, minerEntity); } else { throw new IllegalStateException("Tried to open a miner minion inventory with a non miner minion entity!"); } })); but how do i provide the extra data (the entity Id) to open the container?
  20. Okay this seems to work but how do i open a screen with the player & entity inventory?
  21. How would i use the ItemStackHandler?
  22. Hey Guys, i'm trying to create an entity which has it's own inventory and a openable container. The entity breaks blocks and put the drops into the inventory. Upgrades and food impact the breaking speed and the drops from the entity. The container should look like this: I already created an Entity which can break and place blocks but i got no idea how to add such an inventory / container to my entity. How can i create such an container / inventory?
  23. Hey Guys, i'm trying to create a Mod which adds an Entity for each Block which has a certain tag. For example for each ore in the "ores" tag. What would be the best to do something like that?
  24. bump. Still struggling on that
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.