Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(event): CatMorningGiftChanceEvent
- Loading branch information
1 parent
0b3b77d
commit e981694
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/main/java/org/auioc/mcmod/arnicalib/server/event/impl/CatMorningGiftChanceEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.auioc.mcmod.arnicalib.server.event.impl; | ||
|
||
import net.minecraft.world.entity.animal.Cat; | ||
import net.minecraft.world.entity.player.Player; | ||
import net.minecraftforge.event.entity.living.LivingEvent; | ||
|
||
public class CatMorningGiftChanceEvent extends LivingEvent { | ||
|
||
private final Cat cat; | ||
private final Player ownerPlayer; | ||
private double chance = 0.7D; | ||
|
||
public CatMorningGiftChanceEvent(Cat cat, Player ownerPlayer) { | ||
super(cat); | ||
this.cat = cat; | ||
this.ownerPlayer = ownerPlayer; | ||
} | ||
|
||
public Cat getCat() { | ||
return this.cat; | ||
} | ||
|
||
public Player getOwnerPlayer() { | ||
return this.ownerPlayer; | ||
} | ||
|
||
public double getChance() { | ||
return this.chance; | ||
} | ||
|
||
public void setChance(double chance) { | ||
this.chance = chance; | ||
} | ||
|
||
} |