fix bush loot pool
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
8c530823e7
commit
fed342aa62
@ -19,7 +19,7 @@
|
||||
"tickets" : [
|
||||
{
|
||||
"itemId" : "Stick",
|
||||
"rarity" : 0.8,
|
||||
"rarity" : 1.0,
|
||||
"minQuantity" : 1,
|
||||
"maxQuantity" : 1
|
||||
}
|
||||
|
||||
@ -1429,6 +1429,7 @@ Break out interaction ray casting into dedicated collision engine object
|
||||
Bush hitbox
|
||||
Harvesting interaction happens on server
|
||||
Fix PoseActor position/rotation caching bug
|
||||
Bush drops sticks
|
||||
|
||||
|
||||
|
||||
|
||||
@ -128,8 +128,8 @@ public class ServerLifeTree implements BehaviorTree {
|
||||
Vector3d position = new Vector3d(EntityUtils.getPosition(parent));
|
||||
Realm realm = Globals.realmManager.getEntityRealm(parent);
|
||||
for(LootTicket ticket : this.healthSystem.getLootPool().getTickets()){
|
||||
if(random.nextDouble() < ticket.getRarity()){
|
||||
int numToGen = random.nextInt(ticket.getMinQuantity(), ticket.getMaxQuantity());
|
||||
if(random.nextDouble() <= ticket.getRarity()){
|
||||
int numToGen = random.nextInt(ticket.getMinQuantity(), ticket.getMaxQuantity()+1);
|
||||
for(int i = 0; i < numToGen; i++){
|
||||
ItemUtils.serverSpawnBasicItem(realm, position, ticket.getItemId());
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user