Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(event): FishingRodCastEvent.Pre
- Loading branch information
1 parent
38fecf4
commit c4eb51d
Showing
2 changed files
with
65 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
56 changes: 56 additions & 0 deletions
56
src/main/java/org/auioc/mcmod/arnicalib/server/event/impl/FishingRodCastEvent.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,56 @@ | ||
package org.auioc.mcmod.arnicalib.server.event.impl; | ||
|
||
import org.auioc.mcmod.arnicalib.api.game.event.ServerPlayerEvent; | ||
import net.minecraft.server.level.ServerLevel; | ||
import net.minecraft.server.level.ServerPlayer; | ||
import net.minecraft.world.item.ItemStack; | ||
|
||
public class FishingRodCastEvent extends ServerPlayerEvent { | ||
|
||
private final ServerLevel level; | ||
private final ItemStack fishingRod; | ||
|
||
public FishingRodCastEvent(ServerPlayer player, ServerLevel level, ItemStack fishingRod) { | ||
super(player); | ||
this.level = level; | ||
this.fishingRod = fishingRod; | ||
} | ||
|
||
public ServerLevel getLevel() { | ||
return this.level; | ||
} | ||
|
||
public ItemStack getFishingRod() { | ||
return this.fishingRod; | ||
} | ||
|
||
public static class Pre extends FishingRodCastEvent { | ||
|
||
private int speedBonus; | ||
private int luckBonus; | ||
|
||
public Pre(ServerPlayer player, ServerLevel level, ItemStack fishingRod, int speedBonus, int luckBonus) { | ||
super(player, level, fishingRod); | ||
this.speedBonus = speedBonus; | ||
this.luckBonus = luckBonus; | ||
} | ||
|
||
public int getSpeedBonus() { | ||
return this.speedBonus; | ||
} | ||
|
||
public void setSpeedBonus(int speedBonus) { | ||
this.speedBonus = speedBonus; | ||
} | ||
|
||
public int getLuckBonus() { | ||
return this.luckBonus; | ||
} | ||
|
||
public void setLuckBonus(int luckBonus) { | ||
this.luckBonus = luckBonus; | ||
} | ||
|
||
} | ||
|
||
} |