Class CustomChestBoatEntity

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.entity.Entity
net.minecraft.world.entity.vehicle.VehicleEntity
net.minecraft.world.entity.vehicle.Boat
tech.anonymoushacker1279.immersiveweapons.entity.vehicle.CustomBoatEntity
tech.anonymoushacker1279.immersiveweapons.entity.vehicle.CustomChestBoatEntity
All Implemented Interfaces:
net.minecraft.commands.CommandSource, net.minecraft.world.Clearable, net.minecraft.world.Container, net.minecraft.world.entity.HasCustomInventoryScreen, net.minecraft.world.entity.vehicle.ContainerEntity, net.minecraft.world.inventory.MenuConstructor, net.minecraft.world.level.entity.EntityAccess, net.minecraft.world.MenuProvider, net.minecraft.world.Nameable, net.minecraft.world.scores.ScoreHolder, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.client.extensions.IMenuProviderExtension, net.neoforged.neoforge.common.extensions.IBoatExtension, net.neoforged.neoforge.common.extensions.IEntityExtension, net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>

public class CustomChestBoatEntity extends CustomBoatEntity implements net.minecraft.world.entity.HasCustomInventoryScreen, net.minecraft.world.entity.vehicle.ContainerEntity
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.entity.vehicle.Boat

    net.minecraft.world.entity.vehicle.Boat.Status, net.minecraft.world.entity.vehicle.Boat.Type

    Nested classes/interfaces inherited from class net.minecraft.world.entity.Entity

    net.minecraft.world.entity.Entity.MoveFunction, net.minecraft.world.entity.Entity.MovementEmission, net.minecraft.world.entity.Entity.RemovalReason

    Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    net.neoforged.neoforge.attachment.AttachmentHolder.AsField
  • Field Summary

    Fields inherited from class net.minecraft.world.entity.vehicle.Boat

    BUBBLE_TIME, DATA_ID_TYPE, lastYd, PADDLE_LEFT, PADDLE_RIGHT, PADDLE_SOUND_TIME, status

    Fields inherited from class net.minecraft.world.entity.vehicle.VehicleEntity

    DATA_ID_DAMAGE, DATA_ID_HURT, DATA_ID_HURTDIR

    Fields inherited from class net.minecraft.world.entity.Entity

    BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, BREATHING_DISTANCE_BELOW_EYES, DATA_POSE, DATA_SHARED_FLAGS_ID, DEFAULT_BB_HEIGHT, DEFAULT_BB_WIDTH, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_2, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5, DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0, ENTITY_COUNTER, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, flyDist, forgeFluidTypeHeight, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, isInsidePortal, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, minorHorizontalCollision, moveDist, noCulling, noPhysics, PASSENGERS_TAG, portalEntrancePos, portalTime, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, verticalCollisionBelow, walkDist, walkDistO, wasEyeInWater, wasInPowderSnow, wasOnFire, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOld

    Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    ATTACHMENTS_NBT_KEY

    Fields inherited from interface net.minecraft.commands.CommandSource

    NULL

    Fields inherited from interface net.minecraft.world.Container

    DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE

    Fields inherited from interface net.minecraft.world.scores.ScoreHolder

    WILDCARD, WILDCARD_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    CustomChestBoatEntity(net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.vehicle.Boat> type, net.minecraft.world.level.Level level, net.minecraft.world.item.Item dropItem)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addAdditionalSaveData(net.minecraft.nbt.CompoundTag compound)
     
    void
     
    void
     
    @Nullable net.minecraft.world.inventory.AbstractContainerMenu
    createMenu(int containerId, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.world.entity.player.Player player)
     
    void
    destroy(net.minecraft.world.damagesource.DamageSource damageSource)
     
    int
    Returns the number of slots in the inventory.
    net.minecraft.world.item.ItemStack
    getItem(int index)
    Returns the stack in the given slot.
    net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack>
     
    @Nullable net.minecraft.resources.ResourceLocation
     
    long
     
    protected int
     
    protected float
     
    net.minecraft.world.entity.SlotAccess
    getSlot(int slot)
     
    net.minecraft.world.InteractionResult
    interact(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand)
     
    void
    openCustomInventoryScreen(net.minecraft.world.entity.player.Player player)
     
    protected void
    readAdditionalSaveData(net.minecraft.nbt.CompoundTag compound)
     
    void
    remove(net.minecraft.world.entity.Entity.RemovalReason removalReason)
     
    net.minecraft.world.item.ItemStack
    removeItem(int index, int count)
    Removes up to a specified number of items from an inventory slot and returns them in a new stack.
    net.minecraft.world.item.ItemStack
    removeItemNoUpdate(int index)
    Removes a stack from the given slot and returns it.
    void
     
    void
    setItem(int index, net.minecraft.world.item.ItemStack stack)
    Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
    void
    setLootTable(@Nullable net.minecraft.resources.ResourceLocation location)
     
    void
    setLootTableSeed(long seed)
     
    boolean
    stillValid(net.minecraft.world.entity.player.Player player)
     
    void
    unpackLootTable(@Nullable net.minecraft.world.entity.player.Player player)
     

    Methods inherited from class tech.anonymoushacker1279.immersiveweapons.entity.vehicle.CustomBoatEntity

    checkFallDamage, getCustomBoatType, getDropItem, setBoatType

    Methods inherited from class net.minecraft.world.entity.vehicle.Boat

    animateHurt, canAddPassenger, canBeCollidedWith, canCollideWith, canVehicleCollide, clampRotation, defineSynchedData, getBubbleAngle, getControllingPassenger, getDismountLocationForPassenger, getEyeHeight, getGroundFriction, getMotionDirection, getMovementEmission, getPaddleSound, getPaddleState, getPassengerAttachmentPoint, getPickResult, getRelativePortalPosition, getRowingTime, getTypeName, getVariant, getWaterLevelAbove, hasEnoughSpaceFor, isPickable, isPushable, isUnderWater, lerpTargetX, lerpTargetXRot, lerpTargetY, lerpTargetYRot, lerpTargetZ, lerpTo, onAboveBubbleCol, onPassengerTurned, positionRider, push, setInput, setPaddleState, setVariant, tick

    Methods inherited from class net.minecraft.world.entity.vehicle.VehicleEntity

    destroy, getDamage, getHurtDir, getHurtTime, hurt, setDamage, setHurtDir, setHurtTime

    Methods inherited from class net.minecraft.world.entity.Entity

    absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canBeHitByProjectile, canChangeDimensions, canControlVehicle, canFreeze, canRide, canSpawnSprintParticle, canSprint, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, causeFallDamage, changeDimension, changeDimension, checkBelowWorld, checkDespawn, checkInsideBlocks, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, couldAcceptPassenger, countPlayerPassengers, createCommandSourceStack, createHoverEvent, damageSources, dampensVibrations, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, fixupDimensions, gameEvent, gameEvent, getAddEntityPacket, getAirSupply, getAllSlots, getArmorSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getBoundingBoxForCulling, getCapability, getCapability, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDirection, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFeetBlockState, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getHandHoldingItemAngle, getHandSlots, getId, getIndirectPassengers, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMaxHeightFluidType, getMyRidingOffset, getName, getNameTagOffsetY, getOnPos, getOnPos, getOnPosLegacy, getPassengerRidingPosition, getPassengers, getPassengersAndSelf, getPercentFrozen, getPermissionLevel, getPersistentData, getPickRadius, getPistonPushReaction, getPortalCooldown, getPortalWaitTime, getPose, getPosition, getPositionCodec, getPrimaryStepSoundBlockPos, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRemovalReason, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getViewYRot, getVisualRotationYInDegrees, getX, getX, getXRot, getY, getY, getYHeadRot, getYRot, getZ, getZ, handleDamageEvent, handleEntityEvent, handleInsidePortal, handleNetherPortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, ignoreExplosion, interactAt, is, isAddedToWorld, isAlive, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCurrentlyGlowing, isCustomNameVisible, isDescending, isDiscrete, isEffectiveAi, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInFluidType, isInFluidType, isInLava, isInLiquid, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWall, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnPortalCooldown, isOnRails, isPassenger, isPassengerOfSameVehicle, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isSwimming, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, killedEntity, lavaHurt, lerpHeadTo, lerpMotion, lerpPositionAndRotationStep, level, limitPistonMovement, load, lookAt, makeBoundingBox, makeStuckInBlock, markHurt, maxUpStep, maybeBackOffFromEdge, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAddedToWorld, onBelowWorld, onClientRemoval, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onRemovedFromWorld, onSyncedDataUpdated, onSyncedDataUpdated, pick, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSound, playStepSound, playSwimSound, position, positionRider, processFlappingMovement, processPortalCooldown, push, reapplyPosition, recreateFromPacket, refreshDimensions, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, rideTick, ridingOffset, rotate, save, saveAsPassenger, saveWithoutId, sendSystemMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setData, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setItemSlot, setLevel, setLevelCallback, setMaxUpStep, setNoGravity, setOldPosAndRot, setOnGround, setOnGroundWithKnownMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemainingFireTicks, setRemoved, setRot, setSecondsOnFire, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSprinting, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYBodyRot, setYHeadRot, setYRot, shouldBeSaved, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, shouldShowName, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopRiding, stopSeenByPlayer, syncPacketPositionCodec, teleportRelative, teleportTo, teleportTo, teleportToWithTicket, thunderHit, toString, touchingUnloadedChunk, trackingPosition, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimming, waterSwimSound

    Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    areAttachmentsCompatible, deserializeAttachments, getData, hasAttachments, hasData, removeData, serializeAttachments

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.minecraft.commands.CommandSource

    alwaysAccepts

    Methods inherited from interface net.minecraft.world.Container

    canPlaceItem, canTakeItem, countItem, getMaxStackSize, hasAnyMatching, hasAnyOf, startOpen, stopOpen

    Methods inherited from interface net.minecraft.world.entity.vehicle.ContainerEntity

    addChestVehicleSaveData, chestVehicleDestroyed, clearChestVehicleContent, getChestVehicleItem, getChestVehicleSlot, interactWithContainerVehicle, isChestVehicleEmpty, isChestVehicleStillValid, isEmpty, isRemoved, level, position, readChestVehicleSaveData, removeChestVehicleItem, removeChestVehicleItemNoUpdate, setChestVehicleItem, unpackChestVehicleLootTable

    Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder

    getData, hasData, removeData, setData

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IBoatExtension

    canBoatInFluid, canBoatInFluid

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IEntityExtension

    canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canSwimInFluidType, deserializeNBT, getClassification, getFluidFallDistanceModifier, getFluidMotionScale, getParts, getPickedResult, getSoundFromFluidType, getStepHeight, hasCustomOutlineRendering, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, sendPairingData, serializeNBT, shouldRiderSit

    Methods inherited from interface net.neoforged.neoforge.client.extensions.IMenuProviderExtension

    shouldTriggerClientSideContainerClosingOnOpen

    Methods inherited from interface net.minecraft.world.MenuProvider

    getDisplayName

    Methods inherited from interface net.minecraft.world.scores.ScoreHolder

    getFeedbackDisplayName
  • Constructor Details

    • CustomChestBoatEntity

      public CustomChestBoatEntity(net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.vehicle.Boat> type, net.minecraft.world.level.Level level, net.minecraft.world.item.Item dropItem)
  • Method Details

    • getSinglePassengerXOffset

      protected float getSinglePassengerXOffset()
      Overrides:
      getSinglePassengerXOffset in class net.minecraft.world.entity.vehicle.Boat
    • getMaxPassengers

      protected int getMaxPassengers()
      Overrides:
      getMaxPassengers in class net.minecraft.world.entity.vehicle.Boat
    • addAdditionalSaveData

      protected void addAdditionalSaveData(net.minecraft.nbt.CompoundTag compound)
      Overrides:
      addAdditionalSaveData in class CustomBoatEntity
    • readAdditionalSaveData

      protected void readAdditionalSaveData(net.minecraft.nbt.CompoundTag compound)
      Overrides:
      readAdditionalSaveData in class CustomBoatEntity
    • destroy

      public void destroy(net.minecraft.world.damagesource.DamageSource damageSource)
      Overrides:
      destroy in class net.minecraft.world.entity.vehicle.VehicleEntity
    • remove

      public void remove(net.minecraft.world.entity.Entity.RemovalReason removalReason)
      Overrides:
      remove in class net.minecraft.world.entity.Entity
    • interact

      public net.minecraft.world.InteractionResult interact(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand)
      Overrides:
      interact in class net.minecraft.world.entity.vehicle.Boat
    • openCustomInventoryScreen

      public void openCustomInventoryScreen(net.minecraft.world.entity.player.Player player)
      Specified by:
      openCustomInventoryScreen in interface net.minecraft.world.entity.HasCustomInventoryScreen
    • clearContent

      public void clearContent()
      Specified by:
      clearContent in interface net.minecraft.world.Clearable
    • getContainerSize

      public int getContainerSize()
      Returns the number of slots in the inventory.
      Specified by:
      getContainerSize in interface net.minecraft.world.Container
    • getItem

      public net.minecraft.world.item.ItemStack getItem(int index)
      Returns the stack in the given slot.
      Specified by:
      getItem in interface net.minecraft.world.Container
    • removeItem

      public net.minecraft.world.item.ItemStack removeItem(int index, int count)
      Removes up to a specified number of items from an inventory slot and returns them in a new stack.
      Specified by:
      removeItem in interface net.minecraft.world.Container
    • removeItemNoUpdate

      public net.minecraft.world.item.ItemStack removeItemNoUpdate(int index)
      Removes a stack from the given slot and returns it.
      Specified by:
      removeItemNoUpdate in interface net.minecraft.world.Container
    • setItem

      public void setItem(int index, net.minecraft.world.item.ItemStack stack)
      Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
      Specified by:
      setItem in interface net.minecraft.world.Container
    • getSlot

      public net.minecraft.world.entity.SlotAccess getSlot(int slot)
      Overrides:
      getSlot in class net.minecraft.world.entity.Entity
    • setChanged

      public void setChanged()
      Specified by:
      setChanged in interface net.minecraft.world.Container
    • stillValid

      public boolean stillValid(net.minecraft.world.entity.player.Player player)
      Specified by:
      stillValid in interface net.minecraft.world.Container
    • createMenu

      @Nullable public @Nullable net.minecraft.world.inventory.AbstractContainerMenu createMenu(int containerId, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.world.entity.player.Player player)
      Specified by:
      createMenu in interface net.minecraft.world.inventory.MenuConstructor
    • unpackLootTable

      public void unpackLootTable(@Nullable @Nullable net.minecraft.world.entity.player.Player player)
    • getLootTable

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation getLootTable()
      Specified by:
      getLootTable in interface net.minecraft.world.entity.vehicle.ContainerEntity
    • setLootTable

      public void setLootTable(@Nullable @Nullable net.minecraft.resources.ResourceLocation location)
      Specified by:
      setLootTable in interface net.minecraft.world.entity.vehicle.ContainerEntity
    • getLootTableSeed

      public long getLootTableSeed()
      Specified by:
      getLootTableSeed in interface net.minecraft.world.entity.vehicle.ContainerEntity
    • setLootTableSeed

      public void setLootTableSeed(long seed)
      Specified by:
      setLootTableSeed in interface net.minecraft.world.entity.vehicle.ContainerEntity
    • getItemStacks

      public net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> getItemStacks()
      Specified by:
      getItemStacks in interface net.minecraft.world.entity.vehicle.ContainerEntity
    • clearItemStacks

      public void clearItemStacks()
      Specified by:
      clearItemStacks in interface net.minecraft.world.entity.vehicle.ContainerEntity