public class ItemMinigun extends ItemPressurizable implements IChargeableContainerProvider, IUpgradeAcceptor, IFOVModifierItem, IInventoryItem, IShiftScrollable
| Modifier and Type | Class and Description |
|---|---|
static class |
ItemMinigun.Listener |
static class |
ItemMinigun.MagazineHandler |
net.minecraft.item.Item.Propertiesnet.minecraftforge.registries.ForgeRegistryEntry.UncheckedRegistryEntry<V extends net.minecraftforge.registries.IForgeRegistryEntry<V>>IChargeableContainerProvider.Provider| Modifier and Type | Field and Description |
|---|---|
static int |
MAGAZINE_SIZE |
static java.lang.String |
NBT_LOCKED_SLOT |
static java.lang.String |
OWNING_PLAYER_ID |
| Constructor and Description |
|---|
ItemMinigun() |
| Modifier and Type | Method and Description |
|---|---|
net.minecraft.item.ItemStack |
finishUsingItem(net.minecraft.item.ItemStack stack,
net.minecraft.world.World worldIn,
net.minecraft.entity.LivingEntity entityLiving) |
java.util.Map<EnumUpgrade,java.lang.Integer> |
getApplicableUpgrades()
This method is called as soon as an instance of this interface is registered, be aware.
|
net.minecraft.inventory.container.INamedContainerProvider |
getContainerProvider(TileEntityChargingStation te)
Get a container provider for this item
|
float |
getFOVModifier(net.minecraft.item.ItemStack stack,
net.minecraft.entity.player.PlayerEntity player,
net.minecraft.inventory.EquipmentSlotType slot)
Get the FOV modifer for the given item stack.
|
net.minecraft.util.text.ITextComponent |
getInventoryHeader()
Get a header for the inventory list, for tooltip purposes.
|
static int |
getLockedSlot(net.minecraft.item.ItemStack stack) |
ItemMinigun.MagazineHandler |
getMagazine(net.minecraft.item.ItemStack stack) |
Minigun |
getMinigun(net.minecraft.item.ItemStack stack,
net.minecraft.entity.player.PlayerEntity player) |
void |
getStacksInItem(net.minecraft.item.ItemStack stack,
java.util.List<net.minecraft.item.ItemStack> curStacks) |
java.lang.String |
getUpgradeAcceptorTranslationKey()
Get a translation key for this upgrade acceptor.
|
int |
getUseDuration(net.minecraft.item.ItemStack stack) |
void |
inventoryTick(net.minecraft.item.ItemStack stack,
net.minecraft.world.World world,
net.minecraft.entity.Entity entity,
int slot,
boolean currentItem) |
void |
onEquipmentChange(net.minecraft.entity.player.ServerPlayerEntity player,
net.minecraft.item.ItemStack stack,
boolean equipping)
Called on server only, when player equips or unequips a minigun
|
void |
onShiftScrolled(net.minecraft.entity.player.PlayerEntity player,
boolean forward,
net.minecraft.util.Hand hand)
Called both client- and server-side when a player shift-scrolls the mouse wheel, while holding an item
(in main hand) which implements this interface.
|
void |
onUsingTick(net.minecraft.item.ItemStack stack,
net.minecraft.entity.LivingEntity entity,
int count) |
boolean |
shouldCauseReequipAnimation(net.minecraft.item.ItemStack oldStack,
net.minecraft.item.ItemStack newStack,
boolean slotChanged) |
net.minecraft.util.ActionResult<net.minecraft.item.ItemStack> |
use(net.minecraft.world.World world,
net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.Hand handIn) |
fillItemCategory, getAir, getBaseVolume, getDurabilityForDisplay, getEnchantmentValue, getRGBDurabilityForDisplay, getShareTag, getVolumeUpgrades, initCapabilities, isEnchantable, roundedPressure, showDurabilityBarallowdedIn, appendHoverText, asItem, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getFoodProperties, getHarvestLevel, getId, getItemCategory, getItemStackTileEntityRenderer, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getTags, getToolTypes, getUseAnimation, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, is, isComplex, isCorrectToolForDrops, isEdible, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onUseTick, releaseUsing, shouldOverrideMultiplayerNbt, toString, useOn, useOnRelease, verifyTagAfterLoadgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetStacks, getTooltipPrefixgetEffectiveVolume, getPressurecanApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canHarvestBlock, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getArmorModel, getArmorTexture, getAttributeModifiers, getBurnTime, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getEntityLifespan, getEquipmentSlot, getFontRenderer, getHighlightTip, getItem, getItemEnchantability, getItemStackLimit, getMaxDamage, getSmeltingExperience, getXpRepairRatio, hasContainerItem, hasCustomEntity, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isPiglinCurrency, isShield, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, readShareTag, renderHelmetOverlay, setDamage, shouldCauseBlockBreakResetpublic static final int MAGAZINE_SIZE
public static final java.lang.String NBT_LOCKED_SLOT
public static final java.lang.String OWNING_PLAYER_ID
@Nonnull public ItemMinigun.MagazineHandler getMagazine(net.minecraft.item.ItemStack stack)
public void onEquipmentChange(net.minecraft.entity.player.ServerPlayerEntity player,
net.minecraft.item.ItemStack stack,
boolean equipping)
player - the playerstack - the minigun itemequipping - true if equipping, false if unequippingpublic int getUseDuration(net.minecraft.item.ItemStack stack)
getUseDuration in class net.minecraft.item.Itempublic void inventoryTick(net.minecraft.item.ItemStack stack,
net.minecraft.world.World world,
net.minecraft.entity.Entity entity,
int slot,
boolean currentItem)
inventoryTick in class net.minecraft.item.Itempublic Minigun getMinigun(net.minecraft.item.ItemStack stack, net.minecraft.entity.player.PlayerEntity player)
public net.minecraft.util.ActionResult<net.minecraft.item.ItemStack> use(net.minecraft.world.World world,
net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.Hand handIn)
use in class net.minecraft.item.Itempublic void onUsingTick(net.minecraft.item.ItemStack stack,
net.minecraft.entity.LivingEntity entity,
int count)
onUsingTick in interface net.minecraftforge.common.extensions.IForgeItempublic net.minecraft.item.ItemStack finishUsingItem(net.minecraft.item.ItemStack stack,
net.minecraft.world.World worldIn,
net.minecraft.entity.LivingEntity entityLiving)
finishUsingItem in class net.minecraft.item.Itempublic boolean shouldCauseReequipAnimation(net.minecraft.item.ItemStack oldStack,
net.minecraft.item.ItemStack newStack,
boolean slotChanged)
shouldCauseReequipAnimation in interface net.minecraftforge.common.extensions.IForgeItemshouldCauseReequipAnimation in class ItemPressurizablepublic java.util.Map<EnumUpgrade,java.lang.Integer> getApplicableUpgrades()
IUpgradeAcceptorgetApplicableUpgrades in interface IUpgradeAcceptorpublic java.lang.String getUpgradeAcceptorTranslationKey()
IUpgradeAcceptorgetUpgradeAcceptorTranslationKey in interface IUpgradeAcceptorpublic float getFOVModifier(net.minecraft.item.ItemStack stack,
net.minecraft.entity.player.PlayerEntity player,
net.minecraft.inventory.EquipmentSlotType slot)
IFOVModifierItemgetFOVModifier in interface IFOVModifierItemstack - the equipped itemplayer - the player who has the item equippedslot - the equipment slotpublic void getStacksInItem(net.minecraft.item.ItemStack stack,
java.util.List<net.minecraft.item.ItemStack> curStacks)
getStacksInItem in interface IInventoryItemstack - Item that potentially has an inventory.curStacks - List of all currently added stacks for this item. Add more stacks in here in your implementation when found the right item.public net.minecraft.util.text.ITextComponent getInventoryHeader()
IInventoryItemgetInventoryHeader in interface IInventoryItempublic net.minecraft.inventory.container.INamedContainerProvider getContainerProvider(TileEntityChargingStation te)
IChargeableContainerProvidergetContainerProvider in interface IChargeableContainerProviderte - the charging station that the item is inpublic void onShiftScrolled(net.minecraft.entity.player.PlayerEntity player,
boolean forward,
net.minecraft.util.Hand hand)
IShiftScrollableonShiftScrolled in interface IShiftScrollableplayer - player doing the shift-scrollingforward - true if the mouse wheel was rotated up, false if rotated downpublic static int getLockedSlot(net.minecraft.item.ItemStack stack)