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" : [
|
"tickets" : [
|
||||||
{
|
{
|
||||||
"itemId" : "Stick",
|
"itemId" : "Stick",
|
||||||
"rarity" : 0.8,
|
"rarity" : 1.0,
|
||||||
"minQuantity" : 1,
|
"minQuantity" : 1,
|
||||||
"maxQuantity" : 1
|
"maxQuantity" : 1
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1429,6 +1429,7 @@ Break out interaction ray casting into dedicated collision engine object
|
|||||||
Bush hitbox
|
Bush hitbox
|
||||||
Harvesting interaction happens on server
|
Harvesting interaction happens on server
|
||||||
Fix PoseActor position/rotation caching bug
|
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));
|
Vector3d position = new Vector3d(EntityUtils.getPosition(parent));
|
||||||
Realm realm = Globals.realmManager.getEntityRealm(parent);
|
Realm realm = Globals.realmManager.getEntityRealm(parent);
|
||||||
for(LootTicket ticket : this.healthSystem.getLootPool().getTickets()){
|
for(LootTicket ticket : this.healthSystem.getLootPool().getTickets()){
|
||||||
if(random.nextDouble() < ticket.getRarity()){
|
if(random.nextDouble() <= ticket.getRarity()){
|
||||||
int numToGen = random.nextInt(ticket.getMinQuantity(), ticket.getMaxQuantity());
|
int numToGen = random.nextInt(ticket.getMinQuantity(), ticket.getMaxQuantity()+1);
|
||||||
for(int i = 0; i < numToGen; i++){
|
for(int i = 0; i < numToGen; i++){
|
||||||
ItemUtils.serverSpawnBasicItem(realm, position, ticket.getItemId());
|
ItemUtils.serverSpawnBasicItem(realm, position, ticket.getItemId());
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user