Package com.hbm_m.blockentity.machines
Class TurretBaseBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
com.hbm_m.blockentity.BaseMachineBlockEntity
com.hbm_m.blockentity.machines.TurretBaseBlockEntity
- All Implemented Interfaces:
IEnergyConnector,IEnergyProvider,IEnergyReceiver,net.minecraft.world.inventory.MenuConstructor,net.minecraft.world.MenuProvider,net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>,net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>,net.minecraftforge.common.extensions.IForgeBlockEntity,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
MVP-Port aller Turret-Varianten aus der 1.7.10-Originalmod (TileEntityTurretBaseNT-Familie).
Eine gemeinsame Klasse fuer alle 11 Varianten, parametrisiert per
TurretStats.
Feuerlogik ist eigenstaendig (direkter Schaden statt des vollen, noch nicht portierten
Waffen-/Munitionssystems) - siehe ModItems.TURRET_AMMO.-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>>Nested classes/interfaces inherited from interface com.hbm_m.interfaces.IEnergyReceiver
IEnergyReceiver.Priority -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intFeuermodus (aktuell nur Arty: 0=Artillerie/indirekt, 1=Kanone/direkt+LOS, 2=Manuell/vereinfacht=Artillerie).static final intstatic final intfloatRueckstoss-Animation der beiden Sentry-Laeufe (abwechselnd, Original:RenderTurretSentry).floatfloatfloatfloatKran-Ladeanimation (Himars, Original:crane-Fortschritt vor jedem Schuss).floatfloatRueckstoss-Animation der beiden Sentry-Laeufe (abwechselnd, Original:RenderTurretSentry).floatfloatfloatfloatKran-Ladeanimation (Himars, Original:crane-Fortschritt vor jedem Schuss).floatfloatYaw/Pitch der Zielverfolgung in Grad, synchronisiert fuer die clientseitige Animation.floatYaw/Pitch der Zielverfolgung in Grad, synchronisiert fuer die clientseitige Animation.Fields inherited from class com.hbm_m.blockentity.BaseMachineBlockEntity
capacity, energy, inventory, itemHandler, maxExtract, maxReceive, networkInitializedFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
ConstructorsConstructorDescriptionTurretBaseBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, TurretStats stats) -
Method Summary
Modifier and TypeMethodDescriptionstatic TurretBaseBlockEntitycreateArty(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) static TurretBaseBlockEntitycreateChekhov(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) static TurretBaseBlockEntitycreateFriendly(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) static TurretBaseBlockEntitycreateFritz(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) static TurretBaseBlockEntitycreateHimars(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) static TurretBaseBlockEntitycreateHoward(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) static TurretBaseBlockEntitycreateJeremy(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) static TurretBaseBlockEntitycreateMaxwell(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) net.minecraft.world.inventory.AbstractContainerMenucreateMenu(int id, net.minecraft.world.entity.player.Inventory inv, net.minecraft.world.entity.player.Player player) static TurretBaseBlockEntitycreateRichard(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) static TurretBaseBlockEntitycreateSentry(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) static TurretBaseBlockEntitycreateTauon(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) protected net.minecraft.network.chat.Componentnet.minecraft.network.chat.Componentintnet.minecraft.resources.ResourceLocationgetStats()voidhandleButtonPress(int action) Verarbeitet Klicks auf die GUI-Buttons (sieheTurretControlPacket).booleanbooleanisAcceptedAmmoPublic(net.minecraft.world.item.ItemStack stack) protected booleanisItemValidForSlot(int slot, net.minecraft.world.item.ItemStack stack) booleanisOn()booleanbooleanbooleanbooleanvoidload(net.minecraft.nbt.CompoundTag tag) protected voidsaveAdditional(net.minecraft.nbt.CompoundTag tag) static voidtick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, TurretBaseBlockEntity be) Methods inherited from class com.hbm_m.blockentity.BaseMachineBlockEntity
canConnectEnergy, canExtract, canReceive, chargeFromBatterySlot, chargeItemInSlot, clearRemoved, createGhostItemsFromIngredients, createInventoryHandler, dropInventoryContents, ensureNetworkInitialized, extractEnergy, getCapability, getEnergyDelta, getEnergyStored, getGhostItems, getInventory, getMaxEnergyStored, getPriority, getProvideSpeed, getReceiveSpeed, getRenderBoundingBox, getUpdatePacket, getUpdateTag, handleUpdateTag, invalidateCaps, isCriticalSlot, isEnergyProviderItem, isEnergyReceiverItem, onDataPacket, onLoad, receiveEnergy, sendUpdateToClient, setEnergyCapacity, setEnergyStored, setLevel, setRemoved, setupFluidCapability, updateEnergyDeltaMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, hasCustomOutlineRendering, requestModelDataUpdate, serializeNBT
-
Field Details
-
yaw
public float yawYaw/Pitch der Zielverfolgung in Grad, synchronisiert fuer die clientseitige Animation. -
prevYaw
public float prevYawYaw/Pitch der Zielverfolgung in Grad, synchronisiert fuer die clientseitige Animation. -
pitch
public float pitch -
prevPitch
public float prevPitch -
barrelLeftOffset
public float barrelLeftOffsetRueckstoss-Animation der beiden Sentry-Laeufe (abwechselnd, Original:RenderTurretSentry). -
prevBarrelLeftOffset
public float prevBarrelLeftOffsetRueckstoss-Animation der beiden Sentry-Laeufe (abwechselnd, Original:RenderTurretSentry). -
barrelRightOffset
public float barrelRightOffset -
prevBarrelRightOffset
public float prevBarrelRightOffset -
barrelSpinAngle
public float barrelSpinAngle -
prevBarrelSpinAngle
public float prevBarrelSpinAngle -
himarsCraneProgress
public float himarsCraneProgressKran-Ladeanimation (Himars, Original:crane-Fortschritt vor jedem Schuss). -
prevHimarsCraneProgress
public float prevHimarsCraneProgressKran-Ladeanimation (Himars, Original:crane-Fortschritt vor jedem Schuss). -
ARTY_MODE_ARTILLERY
public static final int ARTY_MODE_ARTILLERYFeuermodus (aktuell nur Arty: 0=Artillerie/indirekt, 1=Kanone/direkt+LOS, 2=Manuell/vereinfacht=Artillerie).- See Also:
-
ARTY_MODE_CANNON
public static final int ARTY_MODE_CANNON- See Also:
-
ARTY_MODE_MANUAL
public static final int ARTY_MODE_MANUAL- See Also:
-
barrelRecoilOffset
public float barrelRecoilOffset -
prevBarrelRecoilOffset
public float prevBarrelRecoilOffset
-
-
Constructor Details
-
TurretBaseBlockEntity
public TurretBaseBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, TurretStats stats)
-
-
Method Details
-
createSentry
public static TurretBaseBlockEntity createSentry(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
createChekhov
public static TurretBaseBlockEntity createChekhov(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
createFriendly
public static TurretBaseBlockEntity createFriendly(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
createJeremy
public static TurretBaseBlockEntity createJeremy(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
createTauon
public static TurretBaseBlockEntity createTauon(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
createRichard
public static TurretBaseBlockEntity createRichard(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
createHoward
public static TurretBaseBlockEntity createHoward(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
createMaxwell
public static TurretBaseBlockEntity createMaxwell(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
createFritz
public static TurretBaseBlockEntity createFritz(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
createArty
public static TurretBaseBlockEntity createArty(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
createHimars
public static TurretBaseBlockEntity createHimars(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
tick
public static void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, TurretBaseBlockEntity be) -
isAcceptedAmmoPublic
public boolean isAcceptedAmmoPublic(net.minecraft.world.item.ItemStack stack) -
hasTarget
public boolean hasTarget() -
getGuiTexture
public net.minecraft.resources.ResourceLocation getGuiTexture() -
getStats
-
isOn
public boolean isOn() -
isTargetingPlayers
public boolean isTargetingPlayers() -
isTargetingAnimals
public boolean isTargetingAnimals() -
isTargetingMobs
public boolean isTargetingMobs() -
isTargetingMachines
public boolean isTargetingMachines() -
handleButtonPress
public void handleButtonPress(int action) Verarbeitet Klicks auf die GUI-Buttons (sieheTurretControlPacket). -
getFireMode
public int getFireMode() -
saveAdditional
protected void saveAdditional(net.minecraft.nbt.CompoundTag tag) - Overrides:
saveAdditionalin classBaseMachineBlockEntity
-
load
public void load(net.minecraft.nbt.CompoundTag tag) - Overrides:
loadin classBaseMachineBlockEntity
-
getDefaultName
protected net.minecraft.network.chat.Component getDefaultName()- Specified by:
getDefaultNamein classBaseMachineBlockEntity
-
getDisplayName
public net.minecraft.network.chat.Component getDisplayName() -
isItemValidForSlot
protected boolean isItemValidForSlot(int slot, net.minecraft.world.item.ItemStack stack) - Specified by:
isItemValidForSlotin classBaseMachineBlockEntity
-
createMenu
@Nullable public net.minecraft.world.inventory.AbstractContainerMenu createMenu(int id, net.minecraft.world.entity.player.Inventory inv, net.minecraft.world.entity.player.Player player)
-