Relative Content

Tag Archive for minecraft-forge

Is there a way to apply an entity tag to a method that it cannot be applied to?

public static boolean isHuman(Entity pEntity) { return pEntity.is(ModEntityTags.HUMANS); } im trying to use a custom tag i made for this method however the ‘is’ method from the Entity class can only be applied on entities and not tags, the error says ‘is(net.minecraft.world.entity.Entity)’ in ‘net.minecraft.world.entity.Entity’ cannot be applied to ‘(net.minecraft.tags.TagKey<net.minecraft.world.entity.EntityType<?>>)’ i tried casting ModEntityTags.HUMANS to Entity […]

Minecraft forge 1.20.1 prevent hopper taking item from input slot

I made a block entity in forge 1.20.1, I want to prevent hopper from taking input slot item, i tried to override the extractItem method, it prevented hopper from taking input slot item, but the player also unable to take/change the item in input slot unless the slot is empty.