Everything posted by Skyriis
-
[1.18.1] Check if Hoe could be used on a given Block
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)?
-
3D Armor Model
This thread might help you:
-
[1.18.1] Loading a area around an entity
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?
-
[CLOSED][1.18.1] Prevent Mob from being pushed away
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.
-
[CLOSED][1.18.1] Prevent Mob from being pushed away
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?
-
[1.18.1] Animated Item with ItemStack NBT Value
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?
-
Better Minecraft Keeps crashing when I get near a specific entity
That's a mod you've (not) installed. It causes this exception. Try installing / uninstalling it or contact the Mod Author.
-
[1.18.1] Creating an Entity with its own inventory
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?
-
[1.18.1] Creating an Entity with its own inventory
oh... well how do i do that?
-
[1.18.1] Creating an Entity with its own inventory
I've uploaded a video how to trigger the exception but i got no idea how to fix that
-
[1.18.1] Creating an Entity with its own inventory
okay that should be fixed now but the issue still remains
-
[1.18.1] Creating an Entity with its own inventory
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
-
[1.18.1] Creating an Entity with its own inventory
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.
-
[1.18.1] Creating an Entity with its own inventory
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?
-
[1.18.1] Creating an Entity with its own inventory
ah shit. It works now ^^ thank you!
-
[1.18.1] Creating an Entity with its own inventory
https://pastebin.com/xPeYSTgi
-
[1.18.1] Creating an Entity with its own inventory
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
-
[1.18.1] Creating an Entity with its own inventory
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()));
-
[1.18.1] Creating an Entity with its own inventory
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?
-
[1.18.1] Creating an Entity with its own inventory
Okay this seems to work but how do i open a screen with the player & entity inventory?
-
[1.18.1] Creating an Entity with its own inventory
How would i use the ItemStackHandler?
-
[1.18.1] Creating an Entity with its own inventory
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?
-
[1.18.1] Creating multiple Entities Bases on a Tag
alright thank you
-
[1.18.1] Creating multiple Entities Bases on a Tag
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?
-
[1.17.1] Creating an animated obj model for a BlockEntity
bump. Still struggling on that
IPS spam blocked by CleanTalk.