|
@ -24,15 +24,13 @@ import de.blazemcworld.blazinggames.items.CustomItems;
|
|||
import de.blazemcworld.blazinggames.items.CustomSlabs;
|
||||
import de.blazemcworld.blazinggames.utils.TextLocation;
|
||||
import de.blazemcworld.blazinggames.utils.TomeAltarStorage;
|
||||
import io.papermc.paper.datacomponent.DataComponentTypes;
|
||||
import io.papermc.paper.datacomponent.item.CustomModelData;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.CreatureSpawner;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Orientable;
|
||||
import org.bukkit.block.structure.StructureRotation;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
|
@ -42,10 +40,7 @@ import org.bukkit.inventory.meta.BlockStateMeta;
|
|||
import org.bukkit.persistence.PersistentDataContainer;
|
||||
import org.bukkit.persistence.PersistentDataType;
|
||||
import org.bukkit.util.RayTraceResult;
|
||||
import org.bukkit.util.Transformation;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.joml.Quaternionf;
|
||||
import org.joml.Vector3f;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
|
@ -83,49 +78,10 @@ public class BlockPlaceEventListener implements Listener {
|
|||
event.getBlock().getLocation().getBlock().setType(Material.BARRIER);
|
||||
|
||||
Location loc = event.getBlock().getLocation().toCenterLocation();
|
||||
loc.setY(loc.getY() - 0.5);
|
||||
loc.setX(loc.getX() - 0.3125);
|
||||
loc.setZ(loc.getZ() - 0.3125);
|
||||
|
||||
BlockData basePlateBlock = Material.POLISHED_DEEPSLATE.createBlockData();
|
||||
BlockDisplay basePlate = (BlockDisplay) event.getBlock().getWorld().spawnEntity(loc, EntityType.BLOCK_DISPLAY);
|
||||
basePlate.setBlock(basePlateBlock);
|
||||
Transformation transformation = new Transformation(new Vector3f(), new Quaternionf(),new Vector3f(0.625f, 0.0625f, 0.625f),new Quaternionf());
|
||||
basePlate.setTransformation(transformation);
|
||||
|
||||
loc.setY(loc.getY() + 0.0625);
|
||||
loc.setX(loc.getX() + 0.125);
|
||||
loc.setZ(loc.getZ() + 0.125);
|
||||
BlockData mainPillarBlock = Material.POLISHED_BLACKSTONE.createBlockData();
|
||||
BlockDisplay mainPillar = (BlockDisplay) event.getBlock().getWorld().spawnEntity(loc, EntityType.BLOCK_DISPLAY);
|
||||
mainPillar.setBlock(mainPillarBlock);
|
||||
transformation = new Transformation(new Vector3f(), new Quaternionf(),new Vector3f(0.375f, 0.625f, 0.375f),new Quaternionf());
|
||||
mainPillar.setTransformation(transformation);
|
||||
|
||||
BlockData subPillarBlock = Material.POLISHED_BLACKSTONE_BRICKS.createBlockData();
|
||||
|
||||
loc.setY(loc.getY() + 0.5625);
|
||||
loc.setX(loc.getX() - 0.0625);
|
||||
loc.setZ(loc.getZ() - 0.0625);
|
||||
BlockDisplay subPillar = (BlockDisplay) event.getBlock().getWorld().spawnEntity(loc, EntityType.BLOCK_DISPLAY);
|
||||
subPillar.setBlock(subPillarBlock);
|
||||
transformation = new Transformation(new Vector3f(), new Quaternionf(),new Vector3f(0.125f, 0.25f, 0.125f),new Quaternionf());
|
||||
subPillar.setTransformation(transformation);
|
||||
|
||||
loc.setX(loc.getX() + 0.375);
|
||||
subPillar = (BlockDisplay) event.getBlock().getWorld().spawnEntity(loc, EntityType.BLOCK_DISPLAY);
|
||||
subPillar.setBlock(subPillarBlock);
|
||||
subPillar.setTransformation(transformation);
|
||||
|
||||
loc.setZ(loc.getZ() + 0.375);
|
||||
subPillar = (BlockDisplay) event.getBlock().getWorld().spawnEntity(loc, EntityType.BLOCK_DISPLAY);
|
||||
subPillar.setBlock(subPillarBlock);
|
||||
subPillar.setTransformation(transformation);
|
||||
|
||||
loc.setX(loc.getX() - 0.375);
|
||||
subPillar = (BlockDisplay) event.getBlock().getWorld().spawnEntity(loc, EntityType.BLOCK_DISPLAY);
|
||||
subPillar.setBlock(subPillarBlock);
|
||||
subPillar.setTransformation(transformation);
|
||||
ItemDisplay display = (ItemDisplay) event.getBlock().getWorld().spawnEntity(loc, EntityType.ITEM_DISPLAY);
|
||||
ItemStack altarItem = CustomItems.TOME_ALTAR.create();
|
||||
display.setItemStack(altarItem);
|
||||
});
|
||||
} else {
|
||||
boolean isSlab = CustomItem.getCustomItem(event.getItemInHand()) instanceof CustomSlabs.CustomSlab;
|
||||
|
@ -257,49 +213,54 @@ public class BlockPlaceEventListener implements Listener {
|
|||
boolean isTop = isTop(originalLoc.getY());
|
||||
Location loc = originalLoc.clone().toCenterLocation();
|
||||
loc.getBlock().setType(Material.MOVING_PISTON);
|
||||
loc.setX(loc.getX() - 0.5);
|
||||
loc.setZ(loc.getZ() - 0.5);
|
||||
loc.setY(loc.getY() - (isTop ? 0 : 0.5));
|
||||
loc.setY(loc.getY() + (isTop ? 0.5 : 0));
|
||||
|
||||
BlockData blockData = item.material.createBlockData();
|
||||
BlockDisplay blockDisplay = (BlockDisplay) loc.getBlock().getWorld().spawnEntity(loc, EntityType.BLOCK_DISPLAY);
|
||||
if (blockData instanceof Directional || blockData instanceof Orientable) {
|
||||
double yaw = direction.getYaw();
|
||||
BlockFace face = BlockFace.SOUTH;
|
||||
StructureRotation rotation = StructureRotation.CLOCKWISE_90;
|
||||
if (yaw >= -135 && yaw < -45) {
|
||||
face = BlockFace.WEST;
|
||||
rotation = StructureRotation.NONE;
|
||||
}
|
||||
if (yaw >= -45 && yaw < 45) {
|
||||
face = BlockFace.NORTH;
|
||||
rotation = StructureRotation.COUNTERCLOCKWISE_90;
|
||||
}
|
||||
if (yaw >= 45 && yaw < 135) {
|
||||
face = BlockFace.EAST;
|
||||
rotation = StructureRotation.CLOCKWISE_180;
|
||||
}
|
||||
if (blockData instanceof Directional directional) directional.setFacing(face);
|
||||
if (blockData instanceof Orientable orientable) {
|
||||
orientable.setAxis((blockFace == BlockFace.UP || blockFace == BlockFace.DOWN) ? Axis.Y : Axis.X);
|
||||
orientable.rotate(rotation);
|
||||
}
|
||||
Sound breakSound = item.material.createBlockData().getSoundGroup().getBreakSound();
|
||||
location.getWorld().playSound(loc, breakSound, 1, 1);
|
||||
|
||||
// BlockData blockData = item.material.createBlockData();
|
||||
ItemDisplay itemDisplay = (ItemDisplay) loc.getBlock().getWorld().spawnEntity(loc, EntityType.ITEM_DISPLAY);
|
||||
ItemStack itemStack = item.create();
|
||||
if (isTop) {
|
||||
itemStack.setData(DataComponentTypes.CUSTOM_MODEL_DATA, CustomModelData.customModelData().addFlag(true).build());
|
||||
}
|
||||
blockDisplay.setBlock(blockData);
|
||||
Transformation transformation = new Transformation(new Vector3f(), new Quaternionf(), new Vector3f(1f, 0.5f, 1f), new Quaternionf());
|
||||
blockDisplay.setTransformation(transformation);
|
||||
itemDisplay.setItemStack(itemStack);
|
||||
loc.subtract(0.5, 0.5, 0.5);
|
||||
// if (blockData instanceof Directional || blockData instanceof Orientable) {
|
||||
// double yaw = direction.getYaw();
|
||||
// BlockFace face = BlockFace.SOUTH;
|
||||
// StructureRotation rotation = StructureRotation.CLOCKWISE_90;
|
||||
// if (yaw >= -135 && yaw < -45) {
|
||||
// face = BlockFace.WEST;
|
||||
// rotation = StructureRotation.NONE;
|
||||
// }
|
||||
// if (yaw >= -45 && yaw < 45) {
|
||||
// face = BlockFace.NORTH;
|
||||
// rotation = StructureRotation.COUNTERCLOCKWISE_90;
|
||||
// }
|
||||
// if (yaw >= 45 && yaw < 135) {
|
||||
// face = BlockFace.EAST;
|
||||
// rotation = StructureRotation.CLOCKWISE_180;
|
||||
// }
|
||||
// if (blockData instanceof Directional directional) directional.setFacing(face);
|
||||
// if (blockData instanceof Orientable orientable) {
|
||||
// orientable.setAxis((blockFace == BlockFace.UP || blockFace == BlockFace.DOWN) ? Axis.Y : Axis.X);
|
||||
// orientable.rotate(rotation);
|
||||
// }
|
||||
// }
|
||||
// blockDisplay.setBlock(blockData);
|
||||
|
||||
loc = loc.add(0.25, 0, 0.25);
|
||||
summonArmorstand(loc, item.name, blockDisplay.getUniqueId());
|
||||
summonArmorstand(loc, item.name, itemDisplay.getUniqueId());
|
||||
|
||||
loc = loc.add(0.5, 0, 0);
|
||||
summonArmorstand(loc, item.name, blockDisplay.getUniqueId());
|
||||
summonArmorstand(loc, item.name, itemDisplay.getUniqueId());
|
||||
|
||||
loc = loc.add(0, 0, 0.5);
|
||||
summonArmorstand(loc, item.name, blockDisplay.getUniqueId());
|
||||
summonArmorstand(loc, item.name, itemDisplay.getUniqueId());
|
||||
|
||||
loc = loc.add(-0.5, 0, 0);
|
||||
summonArmorstand(loc, item.name, blockDisplay.getUniqueId());
|
||||
summonArmorstand(loc, item.name, itemDisplay.getUniqueId());
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -95,11 +95,11 @@ public class EntityDamagedByEventListener implements Listener {
|
|||
event.setCancelled(true);
|
||||
UUID displayBlockUUID = UUID.fromString(Objects.requireNonNull(container.get(BlazingGames.get().key("slab"), PersistentDataType.STRING)));
|
||||
String slabType = container.get(BlazingGames.get().key("slab_type"), PersistentDataType.STRING);
|
||||
BlockDisplay displayBlock = (BlockDisplay) p.getWorld().getEntity(displayBlockUUID);
|
||||
ItemDisplay displayBlock = (ItemDisplay) p.getWorld().getEntity(displayBlockUUID);
|
||||
|
||||
if (displayBlock == null) return;
|
||||
Location blockLocation = displayBlock.getLocation().toCenterLocation();
|
||||
Sound breakSound = displayBlock.getBlock().getSoundGroup().getBreakSound();
|
||||
Location blockLocation = victim.getLocation().toCenterLocation();
|
||||
Sound breakSound = displayBlock.getItemStack().getType().createBlockData().getSoundGroup().getBreakSound();
|
||||
displayBlock.remove();
|
||||
|
||||
double y = victim.getY();
|
||||
|
|
|
@ -206,8 +206,16 @@ public class InteractEventListener implements Listener {
|
|||
|
||||
if(block != null && event.getAction() == Action.RIGHT_CLICK_BLOCK && event.useInteractedBlock() != Event.Result.DENY) {
|
||||
if (block.getType() == Material.ENCHANTING_TABLE) {
|
||||
player.openInventory(new AltarInterface(BlazingGames.get(), block.getState()).getInventory());
|
||||
event.setCancelled(true);
|
||||
if (CustomItems.BLUEPRINT.matchItem(eventItem)) {
|
||||
event.setCancelled(true);
|
||||
if (!player.hasCooldown(eventItem)) {
|
||||
CustomItems.BLUEPRINT.outputMultiBlockProgress(player, block.getLocation());
|
||||
player.setCooldown(eventItem, 40);
|
||||
}
|
||||
} else {
|
||||
player.openInventory(new AltarInterface(BlazingGames.get(), block.getState()).getInventory());
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -254,12 +262,6 @@ public class InteractEventListener implements Listener {
|
|||
}
|
||||
}
|
||||
}
|
||||
if(CustomItems.BLUEPRINT.matchItem(eventItem)) {
|
||||
if(!player.hasCooldown(eventItem)) {
|
||||
CustomItems.BLUEPRINT.outputMultiBlockProgress(player, block.getLocation());
|
||||
player.setCooldown(eventItem, 40);
|
||||
}
|
||||
}
|
||||
if (block.getType() == Material.SPAWNER)
|
||||
spawnerInteractions(player, hand, eventItem, (CreatureSpawner) block.getState());
|
||||
}
|
||||
|
@ -300,7 +302,6 @@ public class InteractEventListener implements Listener {
|
|||
if (TomeAltarStorage.isTomeAltar(block.getLocation())) {
|
||||
event.setCancelled(true);
|
||||
ItemStack tomeItem = TomeAltarStorage.getItem(block.getLocation());
|
||||
BlazingGames.get().log(tomeItem);
|
||||
if (tomeItem == null) tomeItem = new ItemStack(Material.AIR);
|
||||
ItemStack finalTomeItem = tomeItem;
|
||||
TomeAltarStorage.removeTomeAltar(block.getLocation());
|
||||
|
@ -345,8 +346,11 @@ public class InteractEventListener implements Listener {
|
|||
for (Entity e : player.getWorld().getEntities()) {
|
||||
Location eLoc = e.getLocation().toCenterLocation();
|
||||
if (eLoc.getX() == bLoc.getX() && eLoc.getY() == bLoc.getY() && eLoc.getZ() == bLoc.getZ() && e.getType() == EntityType.ITEM_DISPLAY) {
|
||||
display = (ItemDisplay) e;
|
||||
break;
|
||||
PersistentDataContainer container = e.getPersistentDataContainer();
|
||||
if (container.has(BlazingGames.get().key("spin"), PersistentDataType.BOOLEAN)) {
|
||||
display = (ItemDisplay) e;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (display == null) {
|
||||
|
@ -356,6 +360,8 @@ public class InteractEventListener implements Listener {
|
|||
loc.setZ(loc.getZ());
|
||||
|
||||
display = (ItemDisplay) block.getWorld().spawnEntity(loc, EntityType.ITEM_DISPLAY);
|
||||
PersistentDataContainer container = display.getPersistentDataContainer();
|
||||
container.set(BlazingGames.get().key("spin"), PersistentDataType.BOOLEAN, true);
|
||||
display.setItemStack(setItem);
|
||||
Transformation transformation = new Transformation(new Vector3f(), new Quaternionf(),new Vector3f(0.25f, 0.25f, 0.25f),new Quaternionf());
|
||||
display.setTransformation(transformation);
|
||||
|
@ -374,6 +380,7 @@ public class InteractEventListener implements Listener {
|
|||
}
|
||||
|
||||
if (event.getAction() == Action.RIGHT_CLICK_BLOCK && block != null && hand != null) {
|
||||
if (player.getTargetEntity(5) != null) return;
|
||||
Vector v = face.getDirection();
|
||||
Location nextBlock = block.getLocation().add(v).toCenterLocation();
|
||||
Collection<Shulker> shulkers = nextBlock.getNearbyEntitiesByType(Shulker.class, 0.5);
|
||||
|
|
|
@ -20,8 +20,6 @@ import de.blazemcworld.blazinggames.computing.ComputerRegistry;
|
|||
import de.blazemcworld.blazinggames.enchantments.sys.CustomEnchantments;
|
||||
import de.blazemcworld.blazinggames.enchantments.sys.EnchantmentHelper;
|
||||
import de.blazemcworld.blazinggames.userinterfaces.UserInterface;
|
||||
import de.blazemcworld.blazinggames.utils.TextLocation;
|
||||
import de.blazemcworld.blazinggames.utils.TomeAltarStorage;
|
||||
import io.papermc.paper.scoreboard.numbers.NumberFormat;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
|
@ -30,15 +28,19 @@ import org.bukkit.*;
|
|||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.CreatureSpawner;
|
||||
import org.bukkit.block.data.type.Campfire;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.ItemDisplay;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.EntityEquipment;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.persistence.PersistentDataContainer;
|
||||
import org.bukkit.persistence.PersistentDataType;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
import org.bukkit.scoreboard.*;
|
||||
import org.bukkit.util.RayTraceResult;
|
||||
import org.bukkit.util.Vector;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class TickEventListener {
|
||||
|
@ -49,14 +51,12 @@ public class TickEventListener {
|
|||
stupidrotate += 8;
|
||||
|
||||
for(World world : Bukkit.getServer().getWorlds()) {
|
||||
ArrayList<Location> altars = new ArrayList<>(TomeAltarStorage.getAll(world));
|
||||
for(Entity entity : world.getEntities()) {
|
||||
// rotate the altars
|
||||
if (entity instanceof ItemDisplay display) {
|
||||
for (Location location : altars) {
|
||||
if (TextLocation.serializeRounded(location).equals(TextLocation.serializeRounded(display.getLocation()))) {
|
||||
display.setRotation(stupidrotate, 0);
|
||||
}
|
||||
PersistentDataContainer container = display.getPersistentDataContainer();
|
||||
if (container.has(BlazingGames.get().key("spin"), PersistentDataType.BOOLEAN)) {
|
||||
display.setRotation(stupidrotate, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,19 +15,28 @@
|
|||
*/
|
||||
package de.blazemcworld.blazinggames.items;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import de.blazemcworld.blazinggames.BlazingGames;
|
||||
import de.blazemcworld.blazinggames.packs.HookContext;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.block.data.Directional;
|
||||
import org.bukkit.block.data.Orientable;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.Recipe;
|
||||
import org.bukkit.inventory.ShapedRecipe;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static de.blazemcworld.blazinggames.BlazingGames.gson;
|
||||
|
||||
public class CustomSlabs implements ItemProvider {
|
||||
private static final List<Material> blockedMaterials = List.of(
|
||||
Material.COMMAND_BLOCK,
|
||||
|
@ -40,7 +49,36 @@ public class CustomSlabs implements ItemProvider {
|
|||
Material.BEDROCK,
|
||||
Material.SUSPICIOUS_GRAVEL,
|
||||
Material.SUSPICIOUS_SAND,
|
||||
Material.REINFORCED_DEEPSLATE
|
||||
Material.REINFORCED_DEEPSLATE,
|
||||
|
||||
// Temporarily Disabled
|
||||
Material.TARGET,
|
||||
Material.WAXED_EXPOSED_CHISELED_COPPER,
|
||||
Material.SNOW_BLOCK,
|
||||
Material.MANGROVE_ROOTS,
|
||||
Material.INFESTED_CHISELED_STONE_BRICKS,
|
||||
Material.SCULK_CATALYST,
|
||||
Material.WAXED_COPPER_BLOCK,
|
||||
Material.MYCELIUM,
|
||||
Material.WAXED_OXIDIZED_COPPER,
|
||||
Material.WAXED_OXIDIZED_CHISELED_COPPER,
|
||||
Material.INFESTED_MOSSY_STONE_BRICKS,
|
||||
Material.INFESTED_STONE,
|
||||
Material.INFESTED_STONE_BRICKS,
|
||||
Material.INFESTED_CRACKED_STONE_BRICKS,
|
||||
Material.MAGMA_BLOCK,
|
||||
Material.DRIED_KELP_BLOCK,
|
||||
Material.MELON,
|
||||
Material.WAXED_EXPOSED_COPPER,
|
||||
Material.ANCIENT_DEBRIS,
|
||||
Material.GRASS_BLOCK,
|
||||
Material.PODZOL,
|
||||
Material.QUARTZ_BLOCK,
|
||||
Material.WAXED_CHISELED_COPPER,
|
||||
Material.INFESTED_COBBLESTONE,
|
||||
Material.WAXED_WEATHERED_COPPER,
|
||||
Material.WAXED_WEATHERED_CHISELED_COPPER,
|
||||
Material.LODESTONE
|
||||
);
|
||||
|
||||
public final ArrayList<CustomSlab> slabs = new ArrayList<>();
|
||||
|
@ -49,11 +87,16 @@ public class CustomSlabs implements ItemProvider {
|
|||
List<String> materialNames = Arrays.stream(Material.values()).map(Material::name).toList();
|
||||
for (Material material : Material.values()) {
|
||||
if (!blockedMaterials.contains(material) && material.isBlock() && material.isItem() && !material.isInteractable() && material.isOccluding() && material.isCollidable() && material.isSolid() && !material.name().contains("_PLANKS") && !material.name().contains("_SLAB") && !materialNames.contains(material.name() + "_SLAB")) {
|
||||
if (material.name().endsWith("S")) {
|
||||
if (materialNames.contains(material.name().substring(0, material.name().length() - 1) + "_SLAB"))
|
||||
continue;
|
||||
BlockData blockData = material.createBlockData();
|
||||
|
||||
//Temporarily Disabled
|
||||
if (!(blockData instanceof Directional) && !(blockData instanceof Orientable)) {
|
||||
if (material.name().endsWith("S")) {
|
||||
if (materialNames.contains(material.name().substring(0, material.name().length() - 1) + "_SLAB"))
|
||||
continue;
|
||||
}
|
||||
slabs.add(new CustomSlab(material));
|
||||
}
|
||||
slabs.add(new CustomSlab(material));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -137,6 +180,66 @@ public class CustomSlabs implements ItemProvider {
|
|||
|
||||
@Override
|
||||
public void runHook(Logger logger, HookContext context) {
|
||||
// TBD
|
||||
String customSlab = null, customTopSlab = null, customBottomSlab = null;
|
||||
try {
|
||||
InputStream customSlabStream = this.getClass().getResourceAsStream("/customitems/custom_slab.json");
|
||||
customSlab = new String(customSlabStream.readAllBytes(), StandardCharsets.UTF_8);
|
||||
customSlabStream.close();
|
||||
|
||||
InputStream customTopSlabStream = this.getClass().getResourceAsStream("/customitems/custom_slab_top.json");
|
||||
customTopSlab = new String(customTopSlabStream.readAllBytes(), StandardCharsets.UTF_8);
|
||||
customTopSlabStream.close();
|
||||
|
||||
InputStream customBottomSlabStream = this.getClass().getResourceAsStream("/customitems/custom_slab_bottom.json");
|
||||
customBottomSlab = new String(customBottomSlabStream.readAllBytes(), StandardCharsets.UTF_8);
|
||||
customBottomSlabStream.close();
|
||||
} catch (IOException e) {
|
||||
BlazingGames.get().log(e);
|
||||
}
|
||||
if (customSlab == null || customTopSlab == null || customBottomSlab == null) {
|
||||
logger.warning("Failed to load custom slab models");
|
||||
return;
|
||||
}
|
||||
for (CustomItem<?> item : getItems()) {
|
||||
CustomSlab slab = (CustomSlab) item;
|
||||
// install slab models
|
||||
String[] jsons = new String[]{
|
||||
customBottomSlab,
|
||||
customTopSlab
|
||||
};
|
||||
for (int i = 0; i < jsons.length; i++) {
|
||||
String json = jsons[i];
|
||||
|
||||
JsonObject jsonObject = gson.fromJson(json, JsonObject.class);
|
||||
|
||||
JsonObject textures = jsonObject.get("textures").getAsJsonObject();
|
||||
textures.addProperty("bottom", "minecraft:block/" + slab.material.name().toLowerCase());
|
||||
textures.addProperty("side", "minecraft:block/" + slab.material.name().toLowerCase());
|
||||
textures.addProperty("top", "minecraft:block/" + slab.material.name().toLowerCase());
|
||||
|
||||
json = gson.toJson(jsonObject);
|
||||
|
||||
byte[] bytes = json.getBytes(StandardCharsets.UTF_8);
|
||||
|
||||
context.installModel(BlazingGames.get().key(slab.name + "_slab" + (i == 0 ? "_bottom" : "_top")), bytes);
|
||||
}
|
||||
|
||||
//create item data
|
||||
JsonObject jsonObject = gson.fromJson(customSlab, JsonObject.class);
|
||||
|
||||
JsonObject model = jsonObject.get("model").getAsJsonObject();
|
||||
|
||||
JsonObject onTrue = new JsonObject();
|
||||
onTrue.addProperty("type", "minecraft:model");
|
||||
onTrue.addProperty("model", "blazinggames:" + slab.material.name().toLowerCase() + "_slab_top");
|
||||
model.add("on_true", onTrue);
|
||||
|
||||
JsonObject onFalse = new JsonObject();
|
||||
onFalse.addProperty("type", "minecraft:model");
|
||||
onFalse.addProperty("model", "blazinggames:" + slab.material.name().toLowerCase() + "_slab_bottom");
|
||||
model.add("on_false", onFalse);
|
||||
|
||||
context.writeFile("/assets/" + item.getKey().getNamespace() + "/items/" + item.getKey().getKey() + ".json", jsonObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,10 +19,9 @@ import de.blazemcworld.blazinggames.data.DataStorage;
|
|||
import de.blazemcworld.blazinggames.data.compression.GZipCompressionProvider;
|
||||
import de.blazemcworld.blazinggames.data.name.ArbitraryNameProvider;
|
||||
import de.blazemcworld.blazinggames.data.storage.GsonStorageProvider;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class TomeAltarStorage {
|
||||
|
@ -54,12 +53,6 @@ public class TomeAltarStorage {
|
|||
dataStorage.deleteData(TextLocation.serializeRounded(location));
|
||||
}
|
||||
|
||||
public static List<Location> getAll(World world) {
|
||||
return dataStorage.queryIdentifiers(i -> {
|
||||
return world.equals(TextLocation.deserialize(i).getWorld());
|
||||
}).stream().map(TextLocation::deserialize).toList();
|
||||
}
|
||||
|
||||
public static List<Location> getNear(Location loc, int radius) {
|
||||
int radiusSquared = radius * radius;
|
||||
return dataStorage.queryIdentifiers(i -> {
|
||||
|
|
BIN
src/main/resources/computeritems/circuit_board.png
Normal file
After Width: | Height: | Size: 334 B |
1359
src/main/resources/computeritems/computer.json
Normal file
BIN
src/main/resources/computeritems/computer_default.png
Normal file
After Width: | Height: | Size: 222 B |
BIN
src/main/resources/computeritems/computer_front.png
Normal file
After Width: | Height: | Size: 265 B |
BIN
src/main/resources/computeritems/computer_front_inside.png
Normal file
After Width: | Height: | Size: 192 B |
BIN
src/main/resources/computeritems/computer_side.png
Normal file
After Width: | Height: | Size: 310 B |
BIN
src/main/resources/computeritems/cpu.png
Normal file
After Width: | Height: | Size: 79 B |
BIN
src/main/resources/computeritems/gpu.png
Normal file
After Width: | Height: | Size: 325 B |
6
src/main/resources/customitems/bind_tome.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "blazinggames:item/bind_tome"
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/bind_tome.png
Normal file
After Width: | Height: | Size: 439 B |
6
src/main/resources/customitems/black_tome.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "blazinggames:item/black_tome"
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/black_tome.png
Normal file
After Width: | Height: | Size: 547 B |
6
src/main/resources/customitems/blueprint.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "blazinggames:item/blueprint"
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/blueprint.png
Normal file
After Width: | Height: | Size: 284 B |
6
src/main/resources/customitems/chill_tome.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "blazinggames:item/chill_tome"
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/chill_tome.png
Normal file
After Width: | Height: | Size: 498 B |
14
src/main/resources/customitems/custom_slab.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"model": {
|
||||
"type": "condition",
|
||||
"property": "custom_model_data",
|
||||
"on_false": {
|
||||
"type": "minecraft:model",
|
||||
"model": "blazinggames:netherite_block_slab_bottom"
|
||||
},
|
||||
"on_true": {
|
||||
"type": "minecraft:model",
|
||||
"model": "blazinggames:netherite_block_slab_top"
|
||||
}
|
||||
}
|
||||
}
|
8
src/main/resources/customitems/custom_slab_bottom.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"parent": "minecraft:block/slab",
|
||||
"textures": {
|
||||
"bottom": "minecraft:block/oak_planks",
|
||||
"side": "minecraft:block/oak_planks",
|
||||
"top": "minecraft:block/oak_planks"
|
||||
}
|
||||
}
|
74
src/main/resources/customitems/custom_slab_top.json
Normal file
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
"parent": "minecraft:block/slab",
|
||||
"textures": {},
|
||||
"elements": [
|
||||
{
|
||||
"from": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"to": [
|
||||
16,
|
||||
8,
|
||||
16
|
||||
],
|
||||
"faces": {
|
||||
"north": {
|
||||
"uv": [
|
||||
0,
|
||||
0,
|
||||
16,
|
||||
8
|
||||
],
|
||||
"texture": "#side"
|
||||
},
|
||||
"east": {
|
||||
"uv": [
|
||||
0,
|
||||
0,
|
||||
16,
|
||||
8
|
||||
],
|
||||
"texture": "#side"
|
||||
},
|
||||
"south": {
|
||||
"uv": [
|
||||
0,
|
||||
0,
|
||||
16,
|
||||
8
|
||||
],
|
||||
"texture": "#side"
|
||||
},
|
||||
"west": {
|
||||
"uv": [
|
||||
0,
|
||||
0,
|
||||
16,
|
||||
8
|
||||
],
|
||||
"texture": "#side"
|
||||
},
|
||||
"up": {
|
||||
"uv": [
|
||||
0,
|
||||
0,
|
||||
16,
|
||||
16
|
||||
],
|
||||
"texture": "#top"
|
||||
},
|
||||
"down": {
|
||||
"uv": [
|
||||
0,
|
||||
0,
|
||||
16,
|
||||
16
|
||||
],
|
||||
"texture": "#bottom"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
6
src/main/resources/customitems/death_crate_key.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "blazinggames:item/death_crate_key"
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/death_crate_key.png
Normal file
After Width: | Height: | Size: 431 B |
6
src/main/resources/customitems/dim_tome.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "blazinggames:item/dim_tome"
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/dim_tome.png
Normal file
After Width: | Height: | Size: 528 B |
6
src/main/resources/customitems/echo_tome.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "blazinggames:item/echo_tome"
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/echo_tome.png
Normal file
After Width: | Height: | Size: 496 B |
6
src/main/resources/customitems/fuse_tome.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "blazinggames:item/fuse_tome"
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/fuse_tome.png
Normal file
After Width: | Height: | Size: 554 B |
6
src/main/resources/customitems/greed_tome.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "blazinggames:item/greed_tome"
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/greed_tome.png
Normal file
After Width: | Height: | Size: 441 B |
6
src/main/resources/customitems/gust_tome.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "blazinggames:item/gust_tome"
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/gust_tome.png
Normal file
After Width: | Height: | Size: 504 B |
6
src/main/resources/customitems/nether_star_chunk.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "blazinggames:item/nether_star_chunk"
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/nether_star_chunk.png
Normal file
After Width: | Height: | Size: 154 B |
6
src/main/resources/customitems/nether_tome.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "blazinggames:item/nether_tome"
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/nether_tome.png
Normal file
After Width: | Height: | Size: 503 B |
281
src/main/resources/customitems/portable_crafting_table.json
Normal file
|
@ -0,0 +1,281 @@
|
|||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"textures": {
|
||||
"1": "minecraft:block/crafting_table_side",
|
||||
"2": "minecraft:block/crafting_table_top",
|
||||
"3": "minecraft:block/crafting_table_front",
|
||||
"4": "minecraft:block/oak_planks",
|
||||
"5": "minecraft:block/oak_log",
|
||||
"6": "minecraft:block/oak_log_top",
|
||||
"particle": "minecraft:block/crafting_table_front"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [
|
||||
3,
|
||||
13,
|
||||
3
|
||||
],
|
||||
"to": [
|
||||
13,
|
||||
23,
|
||||
13
|
||||
],
|
||||
"rotation": {
|
||||
"angle": 0,
|
||||
"axis": "y",
|
||||
"origin": [
|
||||
0,
|
||||
10,
|
||||
0
|
||||
]
|
||||
},
|
||||
"faces": {
|
||||
"north": {
|
||||
"uv": [
|
||||
0,
|
||||
0,
|
||||
16,
|
||||
16
|
||||
],
|
||||
"texture": "#3"
|
||||
},
|
||||
"east": {
|
||||
"uv": [
|
||||
0,
|
||||
0,
|
||||
16,
|
||||
16
|
||||
],
|
||||
"texture": "#1"
|
||||
},
|
||||
"south": {
|
||||
"uv": [
|
||||
0,
|
||||
0,
|
||||
16,
|
||||
16
|
||||
],
|
||||
"texture": "#3"
|
||||
},
|
||||
"west": {
|
||||
"uv": [
|
||||
0,
|
||||
0,
|
||||
16,
|
||||
16
|
||||
],
|
||||
"texture": "#1"
|
||||
},
|
||||
"up": {
|
||||
"uv": [
|
||||
0,
|
||||
0,
|
||||
16,
|
||||
16
|
||||
],
|
||||
"texture": "#2"
|
||||
},
|
||||
"down": {
|
||||
"uv": [
|
||||
0,
|
||||
0,
|
||||
16,
|
||||
16
|
||||
],
|
||||
"texture": "#4"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [
|
||||
7,
|
||||
0,
|
||||
7
|
||||
],
|
||||
"to": [
|
||||
9,
|
||||
13,
|
||||
9
|
||||
],
|
||||
"rotation": {
|
||||
"angle": 0,
|
||||
"axis": "y",
|
||||
"origin": [
|
||||
6,
|
||||
0,
|
||||
5
|
||||
]
|
||||
},
|
||||
"faces": {
|
||||
"north": {
|
||||
"uv": [
|
||||
6,
|
||||
0,
|
||||
8,
|
||||
16
|
||||
],
|
||||
"texture": "#5"
|
||||
},
|
||||
"east": {
|
||||
"uv": [
|
||||
6,
|
||||
0,
|
||||
8,
|
||||
16
|
||||
],
|
||||
"texture": "#5"
|
||||
},
|
||||
"south": {
|
||||
"uv": [
|
||||
6,
|
||||
0,
|
||||
8,
|
||||
16
|
||||
],
|
||||
"texture": "#5"
|
||||
},
|
||||
"west": {
|
||||
"uv": [
|
||||
6,
|
||||
0,
|
||||
8,
|
||||
16
|
||||
],
|
||||
"texture": "#5"
|
||||
},
|
||||
"up": {
|
||||
"uv": [
|
||||
0,
|
||||
0,
|
||||
16,
|
||||
16
|
||||
],
|
||||
"texture": "#6"
|
||||
},
|
||||
"down": {
|
||||
"uv": [
|
||||
0,
|
||||
0,
|
||||
16,
|
||||
16
|
||||
],
|
||||
"texture": "#6"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"display": {
|
||||
"thirdperson_righthand": {
|
||||
"translation": [
|
||||
0,
|
||||
0.5,
|
||||
1.75
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
},
|
||||
"thirdperson_lefthand": {
|
||||
"translation": [
|
||||
0,
|
||||
0.5,
|
||||
1.75
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [
|
||||
-25,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"translation": [
|
||||
0,
|
||||
1.5,
|
||||
0
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
},
|
||||
"firstperson_lefthand": {
|
||||
"rotation": [
|
||||
-25,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"translation": [
|
||||
0,
|
||||
1.5,
|
||||
0
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
},
|
||||
"ground": {
|
||||
"rotation": [
|
||||
45,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"translation": [
|
||||
0,
|
||||
3.5,
|
||||
-3.5
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [
|
||||
0,
|
||||
0,
|
||||
45
|
||||
],
|
||||
"translation": [
|
||||
3,
|
||||
-2.75,
|
||||
0
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
},
|
||||
"head": {
|
||||
"translation": [
|
||||
0,
|
||||
1.5,
|
||||
0
|
||||
]
|
||||
},
|
||||
"fixed": {
|
||||
"translation": [
|
||||
0,
|
||||
-2.5,
|
||||
0
|
||||
],
|
||||
"scale": [
|
||||
0.75,
|
||||
0.75,
|
||||
0.75
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
11
src/main/resources/customitems/skeleton_key.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "blazinggames:item/skeleton_key"
|
||||
},
|
||||
"display": {
|
||||
"firstperson_righthand": {
|
||||
"rotation": [0, 0, 270]
|
||||
}
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/skeleton_key.png
Normal file
After Width: | Height: | Size: 431 B |
6
src/main/resources/customitems/storm_tome.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "blazinggames:item/storm_tome"
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/storm_tome.png
Normal file
After Width: | Height: | Size: 525 B |
6
src/main/resources/customitems/teleport_anchor.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "blazinggames:item/teleport_anchor"
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/teleport_anchor.png
Normal file
After Width: | Height: | Size: 551 B |
53
src/main/resources/customitems/to_go_box.json
Normal file
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"texture_size": [64, 64],
|
||||
"textures": {
|
||||
"0": "blazinggames:item/to_go_box",
|
||||
"particle": "blazinggames:item/to_go_box"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [0, 0, 0],
|
||||
"to": [16, 16, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 4, 4], "texture": "#0"},
|
||||
"east": {"uv": [0, 4, 4, 8], "texture": "#0"},
|
||||
"south": {"uv": [4, 0, 8, 4], "texture": "#0"},
|
||||
"west": {"uv": [4, 4, 8, 8], "texture": "#0"},
|
||||
"up": {"uv": [4, 12, 0, 8], "texture": "#0"},
|
||||
"down": {"uv": [12, 0, 8, 4], "texture": "#0"}
|
||||
}
|
||||
}
|
||||
],
|
||||
"display": {
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [75, 45, 0],
|
||||
"translation": [0, 2.5, 0],
|
||||
"scale": [0.375, 0.375, 0.375]
|
||||
},
|
||||
"thirdperson_lefthand": {
|
||||
"rotation": [75, 135, 0],
|
||||
"translation": [0, 2.5, 0],
|
||||
"scale": [0.375, 0.375, 0.375]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [0, 45, 0],
|
||||
"scale": [0.4, 0.4, 0.4]
|
||||
},
|
||||
"firstperson_lefthand": {
|
||||
"rotation": [0, 225, 0],
|
||||
"scale": [0.4, 0.4, 0.4]
|
||||
},
|
||||
"ground": {
|
||||
"translation": [0, 3, 0],
|
||||
"scale": [0.25, 0.25, 0.25]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [30, 225, 0],
|
||||
"scale": [0.625, 0.625, 0.625]
|
||||
},
|
||||
"fixed": {
|
||||
"scale": [0.5, 0.5, 0.5]
|
||||
}
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/to_go_box.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
121
src/main/resources/customitems/tome_altar.json
Normal file
|
@ -0,0 +1,121 @@
|
|||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"textures": {
|
||||
"0": "block/polished_blackstone",
|
||||
"1": "block/polished_blackstone_bricks",
|
||||
"2": "block/polished_deepslate",
|
||||
"particle": "block/polished_blackstone"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [3, 0, 3],
|
||||
"to": [13, 1, 13],
|
||||
"faces": {
|
||||
"north": {"uv": [6, 14, 16, 15], "texture": "#2"},
|
||||
"east": {"uv": [6, 13, 16, 14], "texture": "#2"},
|
||||
"south": {"uv": [6, 12, 16, 13], "texture": "#2"},
|
||||
"west": {"uv": [6, 11, 16, 12], "texture": "#2"},
|
||||
"up": {"uv": [2, 2, 12, 12], "texture": "#2"},
|
||||
"down": {"uv": [2, 2, 12, 12], "texture": "#2"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [5, 1, 5],
|
||||
"to": [11, 11, 11],
|
||||
"faces": {
|
||||
"north": {"uv": [9, 3, 15, 13], "texture": "#0"},
|
||||
"east": {"uv": [3, 3, 9, 13], "texture": "#0"},
|
||||
"south": {"uv": [9, 3, 15, 13], "texture": "#0"},
|
||||
"west": {"uv": [3, 3, 9, 13], "texture": "#0"},
|
||||
"up": {"uv": [3, 3, 9, 9], "texture": "#0"},
|
||||
"down": {"uv": [9, 3, 15, 9], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4, 10, 4],
|
||||
"to": [6, 14, 6],
|
||||
"faces": {
|
||||
"north": {"uv": [13, 4, 15, 8], "texture": "#1"},
|
||||
"east": {"uv": [15, 4, 13, 8], "texture": "#1"},
|
||||
"south": {"uv": [13, 4, 15, 8], "texture": "#1"},
|
||||
"west": {"uv": [15, 4, 13, 8], "texture": "#1"},
|
||||
"up": {"uv": [2, 2, 4, 4], "rotation": 180, "texture": "#1"},
|
||||
"down": {"uv": [2, 2, 4, 4], "rotation": 90, "texture": "#1"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [10, 10, 4],
|
||||
"to": [12, 14, 6],
|
||||
"faces": {
|
||||
"north": {"uv": [15, 4, 13, 8], "texture": "#1"},
|
||||
"east": {"uv": [13, 4, 15, 8], "texture": "#1"},
|
||||
"south": {"uv": [15, 4, 13, 8], "texture": "#1"},
|
||||
"west": {"uv": [13, 4, 15, 8], "texture": "#1"},
|
||||
"up": {"uv": [2, 2, 4, 4], "rotation": 270, "texture": "#1"},
|
||||
"down": {"uv": [4, 4, 2, 2], "rotation": 180, "texture": "#1"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4, 10, 10],
|
||||
"to": [6, 14, 12],
|
||||
"faces": {
|
||||
"north": {"uv": [15, 4, 13, 8], "texture": "#1"},
|
||||
"east": {"uv": [13, 4, 15, 8], "texture": "#1"},
|
||||
"south": {"uv": [15, 4, 13, 8], "texture": "#1"},
|
||||
"west": {"uv": [13, 4, 15, 8], "texture": "#1"},
|
||||
"up": {"uv": [2, 2, 4, 4], "rotation": 90, "texture": "#1"},
|
||||
"down": {"uv": [2, 2, 4, 4], "rotation": 180, "texture": "#1"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [10, 10, 10],
|
||||
"to": [12, 14, 12],
|
||||
"faces": {
|
||||
"north": {"uv": [13, 4, 15, 8], "texture": "#1"},
|
||||
"east": {"uv": [15, 4, 13, 8], "texture": "#1"},
|
||||
"south": {"uv": [13, 4, 15, 8], "texture": "#1"},
|
||||
"west": {"uv": [15, 4, 13, 8], "texture": "#1"},
|
||||
"up": {"uv": [2, 2, 4, 4], "texture": "#1"},
|
||||
"down": {"uv": [2, 2, 4, 4], "rotation": 270, "texture": "#1"}
|
||||
}
|
||||
}
|
||||
],
|
||||
"display": {
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [55, 45, 0],
|
||||
"translation": [0, 1.25, 0.75],
|
||||
"scale": [0.375, 0.375, 0.375]
|
||||
},
|
||||
"thirdperson_lefthand": {
|
||||
"rotation": [55, 45, 0],
|
||||
"translation": [0, 1.25, 0.75],
|
||||
"scale": [0.375, 0.375, 0.375]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [-15, 0, 0],
|
||||
"translation": [0, 2.25, -0.5],
|
||||
"scale": [0.75, 0.75, 0.75]
|
||||
},
|
||||
"firstperson_lefthand": {
|
||||
"rotation": [-15, 0, 0],
|
||||
"translation": [0, 2.25, -0.5],
|
||||
"scale": [0.75, 0.75, 0.75]
|
||||
},
|
||||
"ground": {
|
||||
"translation": [0, 4, 0],
|
||||
"scale": [0.75, 0.75, 0.75]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [30, -135, 0],
|
||||
"translation": [0, 1, 0],
|
||||
"scale": [0.625, 0.625, 0.625]
|
||||
},
|
||||
"head": {
|
||||
"translation": [0, 14.5, 0]
|
||||
},
|
||||
"fixed": {
|
||||
"translation": [0, 1, 0],
|
||||
"scale": [0.75, 0.75, 0.75]
|
||||
}
|
||||
}
|
||||
}
|
6
src/main/resources/customitems/vanish_tome.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "blazinggames:item/vanish_tome"
|
||||
}
|
||||
}
|
BIN
src/main/resources/customitems/vanish_tome.png
Normal file
After Width: | Height: | Size: 398 B |