merged pokeballs into environmentex
Some checks failed
Gitea Actions Demo / Build-Gradle (push) Has been cancelled
Some checks failed
Gitea Actions Demo / Build-Gradle (push) Has been cancelled
This commit is contained in:
Binary file not shown.
@@ -1,2 +1,2 @@
|
||||
Command: /opt/homebrew/Cellar/openjdk/23.0.2/libexec/openjdk.jdk/Contents/Home/bin/java -Xmx1G -classpath /Users/janik/.gradle/caches/modules-2/files-2.1/net.fabricmc/tiny-remapper/0.11.1/6c1f29838864ba8f495855edfc8ef17706fedb5d/tiny-remapper-0.11.1-fat.jar net.fabricmc.tinyremapper.Main /Users/janik/Desktop/MCPlugins/environmentex-1.0-SNAPSHOT.jar /Users/janik/Desktop/MCPlugins/environmentex/build/libs/environmentex-1.0-SNAPSHOT-reobf.jar /Users/janik/Desktop/MCPlugins/environmentex/.gradle/caches/paperweight/taskCache/reobfMappings.tiny mojang spigot /Users/janik/Desktop/MCPlugins/environmentex/.gradle/caches/paperweight/taskCache/mappedServerJar.jar --threads=1
|
||||
[INFO] Finished after 1133,52 ms.
|
||||
[INFO] Finished after 1086,27 ms.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -25,9 +25,7 @@ import org.bukkit.inventory.RecipeChoice.MaterialChoice;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.inventory.meta.components.CustomModelDataComponent;
|
||||
import org.bukkit.persistence.PersistentDataType;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZonedDateTime;
|
||||
|
||||
import java.util.AbstractMap.SimpleEntry;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -59,7 +57,17 @@ public class App extends JavaPlugin {
|
||||
public static final String DIAMOND_DUST_RECIPE_KEY = "R3S_SR_DIAMONDDUST";
|
||||
public static final long TICKS_PER_SECOND = 20L;
|
||||
public static final long SECONDS_PER_DAY = 86400L;
|
||||
public NamespacedKey nskPokeball;
|
||||
public NamespacedKey nskUsedPokeball;
|
||||
public NamespacedKey nskEntityPokeball;
|
||||
public NamespacedKey nskEntVariantPokeball;
|
||||
public NamespacedKey nskEntStylePokeball;
|
||||
public NamespacedKey nskAgePokeball;
|
||||
|
||||
public ItemStack newPokeball;
|
||||
public ItemStack usedPokeball;
|
||||
public HashMap<Player, Boolean> isThrownHM = new HashMap<>();
|
||||
|
||||
public ArrayList<ItemStack> rewardList = new ArrayList<>();
|
||||
public ItemStack diamondDust;
|
||||
public NamespacedKey nskdiamondDust;
|
||||
@@ -113,7 +121,36 @@ public NamespacedKey nskHopper;
|
||||
|
||||
getServer().addRecipe(srHopper);
|
||||
}
|
||||
private ItemStack createPokeball() {
|
||||
ItemStack ball = new ItemStack(Material.SNOWBALL);
|
||||
ItemMeta meta = ball.getItemMeta();
|
||||
meta.displayName(Component.translatable(ChatColor.WHITE + "Pokéball"));
|
||||
meta.setCustomModelData(1000011);
|
||||
|
||||
CustomModelDataComponent cmd = meta.getCustomModelDataComponent();
|
||||
if (cmd != null) {
|
||||
cmd.setStrings(List.of("pokeball"));
|
||||
meta.setCustomModelDataComponent(cmd);
|
||||
}
|
||||
|
||||
meta.getPersistentDataContainer().set(nskPokeball, PersistentDataType.STRING, "R3S_Pokeball");
|
||||
ball.setItemMeta(meta);
|
||||
|
||||
return ball;
|
||||
}
|
||||
|
||||
private void registerPokeballRecipe(ItemStack item) {
|
||||
ShapedRecipe recipe = new ShapedRecipe(nskPokeball, item);
|
||||
recipe.shape("RRR", "SES", "WWW");
|
||||
recipe.setIngredient('R', Material.RED_CONCRETE);
|
||||
recipe.setIngredient('S', Material.BLACK_CONCRETE);
|
||||
recipe.setIngredient('E', Material.IRON_NUGGET);
|
||||
recipe.setIngredient('W', Material.WHITE_CONCRETE);
|
||||
|
||||
if (getServer().getRecipe(nskPokeball) == null) {
|
||||
getServer().addRecipe(recipe);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onEnable() {
|
||||
SquidPrevention.removeSquidReceipes();
|
||||
@@ -131,6 +168,18 @@ public NamespacedKey nskHopper;
|
||||
|
||||
|
||||
main = this;
|
||||
|
||||
nskPokeball = new NamespacedKey(this, "R3SPokeball");
|
||||
nskUsedPokeball = new NamespacedKey(this, "R3SUsedPokeball");
|
||||
nskEntityPokeball = new NamespacedKey(this, "R3SEntity");
|
||||
nskEntVariantPokeball = new NamespacedKey(this, "R3SEntityVariant");
|
||||
nskEntStylePokeball = new NamespacedKey(this, "R3SEntityStyle");
|
||||
nskAgePokeball = new NamespacedKey(this, "R3SEntityAge");
|
||||
newPokeball = createPokeball();
|
||||
registerPokeballRecipe(newPokeball);
|
||||
for (Player p : Bukkit.getOnlinePlayers()) {
|
||||
isThrownHM.put(p, false);
|
||||
}
|
||||
DailyQuests.getTodaysQuest();
|
||||
lockedChest = new ItemStack(Material.CHEST);
|
||||
ItemMeta imlockedChest = lockedChest.getItemMeta();
|
||||
@@ -535,6 +584,7 @@ public NamespacedKey nskHopper;
|
||||
pM.registerEvents(new DeathLoc(), this);
|
||||
pM.registerEvents(new BetterHoppers(), this);
|
||||
pM.registerEvents(new DailyQuests(), this);
|
||||
pM.registerEvents(new Pokeballs(), this);
|
||||
getCommand("test").setExecutor(new EnvironmentExCommands());
|
||||
getCommand("y").setExecutor(new EnvironmentExCommands());
|
||||
getCommand("n").setExecutor(new EnvironmentExCommands());
|
||||
|
||||
1215
environmentex/src/main/java/de/hessj/environmentex/Pokeballs.java
Normal file
1215
environmentex/src/main/java/de/hessj/environmentex/Pokeballs.java
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user