feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a4399472.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
This commit is contained in:
37
Minecraft.Client/AbstractProjectileDispenseBehavior.cpp
Normal file
37
Minecraft.Client/AbstractProjectileDispenseBehavior.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "stdafx.h"
|
||||
#include "..\Minecraft.World\net.minecraft.core.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.entity.projectile.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.tile.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.h"
|
||||
#include "AbstractProjectileDispenseBehavior.h"
|
||||
|
||||
shared_ptr<ItemInstance> AbstractProjectileDispenseBehavior::execute(BlockSource *source, shared_ptr<ItemInstance> dispensed)
|
||||
{
|
||||
Level *world = source->getWorld();
|
||||
Position position = DispenserTile::getDispensePosition(source);
|
||||
FacingEnum *facing = DispenserTile::getFacing(source->getData());
|
||||
|
||||
shared_ptr<Projectile> arrow = getProjectile(world, position);
|
||||
arrow->shoot(facing->getStepX(), facing->getStepY() + .1f, facing->getStepZ(), getPower(), getUncertainty());
|
||||
world->addEntity(arrow);
|
||||
|
||||
dispensed->remove(1);
|
||||
|
||||
return dispensed;
|
||||
}
|
||||
|
||||
void AbstractProjectileDispenseBehavior::playSound(BlockSource *source)
|
||||
{
|
||||
source->getWorld()->levelEvent(LevelEvent::SOUND_LAUNCH, source->getBlockX(), source->getBlockY(), source->getBlockZ(), 0);
|
||||
}
|
||||
|
||||
|
||||
float AbstractProjectileDispenseBehavior::getUncertainty()
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
||||
float AbstractProjectileDispenseBehavior::getPower()
|
||||
{
|
||||
return 1.1f;
|
||||
}
|
||||
Reference in New Issue
Block a user