1package com.runehive.content.skill.impl.crafting.impl;
3import com.runehive.Config;
4import com.runehive.net.packet.out.SendInputAmount;
5import com.runehive.net.packet.out.SendMessage;
6import com.runehive.game.Animation;
7import com.runehive.game.action.Action;
8import com.runehive.game.action.policy.WalkablePolicy;
9import com.runehive.game.world.entity.mob.player.Player;
10import com.runehive.game.world.entity.skill.Skill;
11import com.runehive.game.world.items.Item;
12import com.runehive.game.world.items.ItemDefinition;
13import com.runehive.util.Utility;
15import java.util.Arrays;
16import java.util.Optional;
27 VIAL(229, 33, 35.0D, 1775),
58 public static Optional<GlassData>
forGlass(
int item) {
59 return Arrays.stream(values()).filter(g -> g.material == item).findFirst();
141 player.
send(
new SendMessage(
"You need a crafting level of " + glass.
level +
" to craft this!"));
146 player.
send(
new SendMessage(
"You need a glassblowing pipe to do this!"));
166 public void execute() {
170 player.
send(
new SendMessage(
"You need a bucket of sand and soda ash to make molten glass!"));
176 player.
send(
new SendMessage(
"You need a glassblowing pipe to do this!"));
200 if (++ticks == amount) {
207 public String getName() {
212 public boolean prioritized() {
The class that contains setting-related constants for the server.
static final double CRAFTING_MODIFICATION
The experience modification for crafting.
Handles the glass crafting.
static boolean click(Player player, int button)
Handles clicking on the interface.
static Action< Player > blow(Player player, GlassData glass, int amount)
Handles blowing the glass data.
static void craft(Player player, GlassData glass, int amount)
Handles crafting the glass.
static void open(Player player)
Handles opening the glass crafting interface.
Class that models a single animation used by an entity.
Represents an action an entity can execute.
public< A extends Action<?> > void execute(A action)
final SkillManager skills
void animate(int animation)
void close(int interfaceId)
void open(int identification)
Opens an interface for the player.
This class represents a character controlled by a player.
final Inventory inventory
final InterfaceManager interfaceManager
void send(OutgoingPacket encoder)
Represents a trainable and usable skill.
static final int CRAFTING
The crafting skill id.
void addExperience(int id, double experience)
Adds experience to a given skill.
int getMaxLevel(int id)
Gets the highest possible level of a skill.
Represents all of an in-game Item's attributes.
static ItemDefinition get(int id)
Gets an item definition.
String getName()
Gets the item name.
The container class that represents an item that can be interacted with.
boolean remove(Item item)
Attempts to withdraw item from this container.
boolean add(Item item)
Attempts to deposit item into this container.
final boolean replace(int oldId, int newId, int index, boolean refresh)
Replaces the first occurrence of the Item having the identifier oldId with newId.
boolean contains(int id)
Determines if this container contains id.
The OutgoingPacket that sends a message to a Players chatbox in the client.
Handles miscellaneous methods.
static String getAOrAn(String nextWord)
A or an.
Holds all the glass data.
final int material
The material required.
final int level
The level required.
final int product
The glass product.
static Optional< GlassData > forGlass(int item)
Gets the glass data based on the material item.
final double experience
The experienced rewarded.
GlassData(int product, int level, double experience, int material)
Constructs a new GlassData.
A queue policy determines whether the action can occur while walking.
NON_WALKABLE
This indicates actions cannot occur while walking.