net.minecraft.entity.mob.AbstractSkeletonEntity Java Examples
The following examples show how to use
net.minecraft.entity.mob.AbstractSkeletonEntity.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractSkeletonEntityMixin.java From the-hallow with MIT License | 5 votes |
@Inject(method = "initEquipment(Lnet/minecraft/world/LocalDifficulty;)V", at = @At(value = "TAIL")) protected void initEquipment(LocalDifficulty ld, CallbackInfo cb) { Random random = new Random(); if (HallowedConfig.TrumpetSkeleton.enabled && random.nextInt(HallowedConfig.TrumpetSkeleton.chance) == 0) { //noinspection ConstantConditions ((AbstractSkeletonEntity) (Object) this).equipStack(EquipmentSlot.MAINHAND, new ItemStack(HallowedItems.TRUMPET)); } }
Example #2
Source File: AbstractSkeletonEntityMixin.java From the-hallow with MIT License | 4 votes |
@Redirect(method = "initialize(Lnet/minecraft/world/IWorld;Lnet/minecraft/world/LocalDifficulty;Lnet/minecraft/entity/SpawnType;Lnet/minecraft/entity/EntityData;Lnet/minecraft/nbt/CompoundTag;)Lnet/minecraft/entity/EntityData;", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/mob/AbstractSkeletonEntity;getEquippedStack(Lnet/minecraft/entity/EquipmentSlot;)Lnet/minecraft/item/ItemStack;")) private ItemStack getStack(AbstractSkeletonEntity entity, EquipmentSlot equipmentSlot) { return MixinHelpers.getEquippedOrPumpkin(entity, equipmentSlot); }
Example #3
Source File: SkeletonEntityMixin.java From carpet-extra with GNU Lesser General Public License v3.0 | 4 votes |
protected SkeletonEntityMixin(EntityType<? extends AbstractSkeletonEntity> type, World world) { super(type, world); }