From b6b73d96e8b80c9228d25f364c19c441a223e01a Mon Sep 17 00:00:00 2001 From: Jkibbels Date: Sat, 21 Dec 2024 02:07:14 -0500 Subject: [PATCH] [finish-factions-and-banking] A few QOL commands. Block entity with working model & textures and screen handler. UPDATED MOD TO 1.20.2 IN THIS --- .gitignore | 2 + Doxyfile | 4 +- build.gradle | 12 +- gradle.properties | 12 +- gradle/wrapper/gradle-wrapper.jar | Bin 43453 -> 43583 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 5 +- gradlew.bat | 2 + build_and_run.sh => run.sh | 16 +- .../keeblarcraft/KeeblarcraftClient.java | 8 +- .../Shortcuts/ShortcutManager.java | 8 +- .../keeblarcraft/gui/ClientHandlers.java | 4 +- .../keeblarcraft/gui/FactionBlockScreen.java | 46 ++ .../jesse/keeblarcraft/gui/ScreenManager.java | 692 +++++++++--------- .../keeblarcraft/gui/widgets/TreeWidget.java | 304 ++++---- .../27b8b1d6af601e15f202616061490ff2b85aa40c | 2 +- .../keeblarcraft/BankMgr/BankManager.java | 2 - .../keeblarcraft/Commands/MiscCommands.java | 35 +- .../keeblarcraft/Commands/ShopCommands.java | 18 + .../Commands/ShortcutCommands.java | 58 +- .../BlockEntityRegistration.java | 27 + .../BlockEntities/FactionBlockEntity.java | 104 +++ .../keeblarcraft/CustomBlocks/BlockList.java | 3 +- .../CustomBlocks/Blocks/FactionBaseBlock.java | 77 ++ .../FactionMgr/FactionManager.java | 2 +- .../GuiMgr/FactionBlockScreenHandler.java | 75 ++ .../GuiMgr/ScreenHandlerRegistration.java | 18 + .../java/jesse/keeblarcraft/Keeblarcraft.java | 6 + .../datagen/KeeblarModelProvider.java | 25 + .../blockstates/faction_base_block.json | 7 + .../assets/keeblarcraft/lang/en_us.json | 1 + .../models/block/faction_base_block.json | 232 ++++++ .../models/item/faction_base_block.json | 3 + .../textures/block/faction_base_block.png | Bin 0 -> 361 bytes .../textures/item/faction_base_block.png | Bin 0 -> 361 bytes 35 files changed, 1233 insertions(+), 579 deletions(-) rename build_and_run.sh => run.sh (92%) create mode 100644 src/client/java/jesse/keeblarcraft/gui/FactionBlockScreen.java create mode 100644 src/main/java/jesse/keeblarcraft/Commands/ShopCommands.java create mode 100644 src/main/java/jesse/keeblarcraft/CustomBlocks/BlockEntities/BlockEntityRegistration.java create mode 100644 src/main/java/jesse/keeblarcraft/CustomBlocks/BlockEntities/FactionBlockEntity.java create mode 100644 src/main/java/jesse/keeblarcraft/CustomBlocks/Blocks/FactionBaseBlock.java create mode 100644 src/main/java/jesse/keeblarcraft/GuiMgr/FactionBlockScreenHandler.java create mode 100644 src/main/java/jesse/keeblarcraft/GuiMgr/ScreenHandlerRegistration.java create mode 100644 src/main/java/jesse/keeblarcraft/datagen/KeeblarModelProvider.java create mode 100644 src/main/resources/assets/keeblarcraft/blockstates/faction_base_block.json create mode 100644 src/main/resources/assets/keeblarcraft/models/block/faction_base_block.json create mode 100644 src/main/resources/assets/keeblarcraft/models/item/faction_base_block.json create mode 100644 src/main/resources/assets/keeblarcraft/textures/block/faction_base_block.png create mode 100644 src/main/resources/assets/keeblarcraft/textures/item/faction_base_block.png diff --git a/.gitignore b/.gitignore index 6d45023..18d48d3 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ build/ out/ classes/ +remappedSrc/ + # eclipse *.launch diff --git a/Doxyfile b/Doxyfile index 526a071..eb3b8fd 100644 --- a/Doxyfile +++ b/Doxyfile @@ -32,13 +32,13 @@ DOXYFILE_ENCODING = UTF-8 # title of most generated pages and in a few other places. # The default value is: My Project. -PROJECT_NAME = "My Project" +PROJECT_NAME = "Keeblarcraft" # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = 1.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/build.gradle b/build.gradle index be194d8..01a698c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.7-SNAPSHOT' + id 'fabric-loom' version '1.9-SNAPSHOT' id 'maven-publish' } @@ -51,9 +51,9 @@ dependencies { modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" //modCompileOnly "cc.tweaked:cc-tweaked-1.20-fabric-api:1.105.0" //modRuntimeOnly "cc.tweaked:cc-tweaked-1.20-fabric-api:1.105.0" - modImplementation 'net.kyrptonaught:customportalapi:0.0.1-beta65-1.20' - include 'net.kyrptonaught:customportalapi:0.0.1-beta65-1.20' - modImplementation 'com.github.glitchfiend:TerraBlender-fabric:1.20.1-3.0.1.7' + modImplementation 'net.kyrptonaught:customportalapi:0.0.1-beta64.5-1.20.2' + include 'net.kyrptonaught:customportalapi:0.0.1-beta64.5-1.20.2' + modImplementation 'com.github.glitchfiend:TerraBlender-fabric:1.20.2-3.2.0.14' } processResources { @@ -72,10 +72,10 @@ java { // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task // if it is present. // If you remove this line, sources will not be generated. - withSourcesJar() - sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 + + withSourcesJar() } jar { diff --git a/gradle.properties b/gradle.properties index 5ffa868..772fce7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,17 +1,17 @@ # Done to increase the memory available to gradle. -org.gradle.jvmargs=-Xmx1G +org.gradle.jvmargs=-Xmx2G org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.20 -yarn_mappings=1.20+build.1 -loader_version=0.15.11 +minecraft_version=1.20.2 +yarn_mappings=1.20.2+build.4 +loader_version=0.16.9 # Mod Properties -mod_version=0.0.1 +mod_version=1.0.0 maven_group=jesse.keeblarcraft archives_base_name=keeblarcraft # Dependencies -fabric_version=0.83.0+1.20 \ No newline at end of file +fabric_version=0.91.6+1.20.2 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e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xx3t+VK+!keE#} z;(Uf&89as9k8{$nkLbuB!-d7TP`_VJpL^Xs8OKB~ri$YUbW8fch64}7|0EWoT(TRj{ z*GT<7Y<7DsrCi79ZsM)z#c(!nNOGySOCkY1fAuQOq12&iUVC!a`#O;dBLf=d?&4*B zI~LgAO7E0qxK(uRTM;IgJ}+z^gD+bi-6I!3x{r9`l~%8TRP%UE0V8E*Sz>Nl1NVG<<7(wDHZ+HcOkQm$O&k+vyx)y)x{Pz!U8hS$*m zByc0h6BUI*BOpuL==P+H|Hx%`>7!W+1H!l9vi&)`V zyn2o9{z=lc+VX*!Vh~SF=)L}Z40XeG>LF6cP^b+R$NxSeUqbK^Q*UTalKzP8X%{9@RSCXm_NhF>{=S2 zi}ezam_^P`S!!-cyEW9y7DBbK93roz@Raccy*v}?mKXScU9E_4g;hBU7}zSofAFda zKYEe?{{I54 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a441313..94113f2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index b740cf1..f5feea6 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/gradlew.bat b/gradlew.bat index 25da30d..9d21a21 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## diff --git a/build_and_run.sh b/run.sh similarity index 92% rename from build_and_run.sh rename to run.sh index b439fe7..c32511b 100755 --- a/build_and_run.sh +++ b/run.sh @@ -1,18 +1,20 @@ +#!/bin/bash + BASH_PATH=$(which bash) -#!BASH_PATH ######### # GLOBALS ######### -SCRIPT_NAME=$0 -PRINT_NAME=${SCRIPT_NAME:2} +REPO_TOP=$(dirname $(readlink -f "${BASH_SOURCE[0]}")) +SCRIPT_NAME=$(basename $0) SERVER_MODE=0 # 1=true, 0=false CLIENT_MODE=0 # 1=true, 0=false LOG_LEVEL=1 BUILD_PATH="build" RUN_PATH="run" RESET_ALL=0 -GRADLEW_PATH="gradlew" +GRADLEW_PATH=${REPO_TOP}/gradlew + # $1 is text level # LEVELS: @@ -22,14 +24,14 @@ GRADLEW_PATH="gradlew" function TermWrite() { textLevel=$1 text="${2}" - prefix="[\033[34m"${PRINT_NAME}"\033[0m]: " + prefix="[\033[34m"${SCRIPT_NAME}"\033[0m]: " if [[ "${textLevel}" == "2" ]]; then - prefix="[\033[33m"${PRINT_NAME}"\033[0m]:" + prefix="[\033[33m"${SCRIPT_NAME}"\033[0m]:" fi if [[ "${textLevel}" == "3" ]]; then - prefix="[\033[31m"${PRINT_NAME}"\033[0m]:" + prefix="[\033[31m"${SCRIPT_NAME}"\033[0m]:" fi if [[ ${LOG_LEVEL} -ge ${textLevel} ]]; then diff --git a/src/client/java/jesse/keeblarcraft/KeeblarcraftClient.java b/src/client/java/jesse/keeblarcraft/KeeblarcraftClient.java index 1cc4ad0..0ba3dbc 100644 --- a/src/client/java/jesse/keeblarcraft/KeeblarcraftClient.java +++ b/src/client/java/jesse/keeblarcraft/KeeblarcraftClient.java @@ -1,8 +1,8 @@ package jesse.keeblarcraft; import jesse.keeblarcraft.gui.ClientHandlers; -import jesse.keeblarcraft.gui.ScreenManager; -import jesse.keeblarcraft.gui.widgets.TreeWidget; +// import jesse.keeblarcraft.gui.ScreenManager; +// import jesse.keeblarcraft.gui.widgets.TreeWidget; import jesse.keeblarcraft.Shortcuts.ShortcutManager; import net.fabricmc.api.ClientModInitializer; @@ -14,8 +14,8 @@ public class KeeblarcraftClient implements ClientModInitializer { ShortcutManager.RegisterKeybinds(); ClientHandlers.RegisterHandlers(); - ScreenManager.GetInstance(); - ScreenManager.AddWidget(TreeWidget.class, 10); + // ScreenManager.GetInstance(); + // ScreenManager.AddWidget(TreeWidget.class, 10); } } diff --git a/src/client/java/jesse/keeblarcraft/Shortcuts/ShortcutManager.java b/src/client/java/jesse/keeblarcraft/Shortcuts/ShortcutManager.java index d79f7c3..218ceb7 100644 --- a/src/client/java/jesse/keeblarcraft/Shortcuts/ShortcutManager.java +++ b/src/client/java/jesse/keeblarcraft/Shortcuts/ShortcutManager.java @@ -12,7 +12,7 @@ package jesse.keeblarcraft.Shortcuts; import org.lwjgl.glfw.GLFW; // import jesse.keeblarcraft.Keeblarcraft; -import jesse.keeblarcraft.gui.ScreenManager; +// import jesse.keeblarcraft.gui.ScreenManager; import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents; import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; import net.minecraft.client.MinecraftClient; @@ -83,10 +83,10 @@ public class ShortcutManager { // treeGui = new ScreenManager(Keeblarcraft.TREE_HANDLER.create(0, client.player.getInventory()), client.player.getInventory(), Text.of("Test")); // treeGui.AddParent(currentScreen); ///TODO: Put this in the constructor when you figure out how the hell the magic is happening with registration - ScreenManager treeGui = ScreenManager.GetInstance(); - treeGui.AddParent(currentScreen); + // ScreenManager treeGui = ScreenManager.GetInstance(); + // treeGui.AddParent(currentScreen); - MinecraftClient.getInstance().setScreen(treeGui); + // MinecraftClient.getInstance().setScreen(treeGui); // toggleTreeGui intentionally never bit-flipped to false as a slight implementation bug exists such that pressing the keybind again // does NOT call this callback function until the previous screen is CLOSED (which is why this isn't resource leaking...). This will diff --git a/src/client/java/jesse/keeblarcraft/gui/ClientHandlers.java b/src/client/java/jesse/keeblarcraft/gui/ClientHandlers.java index 7c95213..079ca75 100644 --- a/src/client/java/jesse/keeblarcraft/gui/ClientHandlers.java +++ b/src/client/java/jesse/keeblarcraft/gui/ClientHandlers.java @@ -1,11 +1,13 @@ package jesse.keeblarcraft.gui; import jesse.keeblarcraft.Keeblarcraft; +import jesse.keeblarcraft.GuiMgr.ScreenHandlerRegistration; import net.minecraft.client.gui.screen.ingame.HandledScreens; public class ClientHandlers { public static void RegisterHandlers() { System.out.println("Registering tree handler screen"); - HandledScreens.register(Keeblarcraft.TREE_HANDLER, ScreenManager::new); + // HandledScreens.register(Keeblarcraft.TREE_HANDLER, ScreenManager::new); + HandledScreens.register(ScreenHandlerRegistration.FACTION_BLOCK_SCREEN_HANDLER, FactionBlockScreen::new); } } diff --git a/src/client/java/jesse/keeblarcraft/gui/FactionBlockScreen.java b/src/client/java/jesse/keeblarcraft/gui/FactionBlockScreen.java new file mode 100644 index 0000000..842518e --- /dev/null +++ b/src/client/java/jesse/keeblarcraft/gui/FactionBlockScreen.java @@ -0,0 +1,46 @@ +package jesse.keeblarcraft.gui; + + +import com.mojang.blaze3d.systems.RenderSystem; + +import jesse.keeblarcraft.Keeblarcraft; +import jesse.keeblarcraft.GuiMgr.FactionBlockScreenHandler; +import net.minecraft.client.gui.DrawContext; +import net.minecraft.client.gui.screen.ingame.HandledScreen; +import net.minecraft.client.render.GameRenderer; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.text.Text; +import net.minecraft.util.Identifier; + +public class FactionBlockScreen extends HandledScreen { + private static final Identifier TEXTURE = new Identifier(Keeblarcraft.MOD_ID, "textures/gui/attribute_flight.png"); + + public FactionBlockScreen(FactionBlockScreenHandler handler, PlayerInventory inventory, Text title) { + super(handler, inventory, title); + } + + @Override + protected void init() { + super.init(); + titleY = 1000; //begone from screen + playerInventoryTitleY = 1000; //begone from screen + } + + @Override + protected void drawBackground(DrawContext context, float delta, int mouseX, int mouseY) { + RenderSystem.setShader(GameRenderer::getPositionTexProgram); + RenderSystem.setShaderColor(1f, 1f, 1f, 1f); + RenderSystem.setShaderTexture(0, TEXTURE); + int x = (width - backgroundWidth) / 2; + int y = (height - backgroundHeight) / 2; + + context.drawTexture(TEXTURE, x, y, 0, 0, backgroundWidth, backgroundHeight); + } + + @Override + public void render(DrawContext context, int mouseX, int mouseY, float delta) { + renderBackground(context, mouseX, mouseY, delta); + super.render(context, mouseX, mouseY, delta); + drawMouseoverTooltip(context, mouseX, mouseY); + } +} diff --git a/src/client/java/jesse/keeblarcraft/gui/ScreenManager.java b/src/client/java/jesse/keeblarcraft/gui/ScreenManager.java index e61fa4e..26688e3 100644 --- a/src/client/java/jesse/keeblarcraft/gui/ScreenManager.java +++ b/src/client/java/jesse/keeblarcraft/gui/ScreenManager.java @@ -1,381 +1,381 @@ -/* - * - * ScreenManager - * - * This is the screen manager for the global screen handler of `TreeHandler` type - * Please note: `TreeHandler` is suited for a more broad range of things; however - * its initial implementation is for the skill tree. It will be renamed to a more - * generic name so this class is more obviously re-usable after its implementation - * is complete AND we verify this class can be made more generic for it. Since this - * is unknown, it will remain the name it has currently. - * - * -*/ +// /* +// * +// * ScreenManager +// * +// * This is the screen manager for the global screen handler of `TreeHandler` type +// * Please note: `TreeHandler` is suited for a more broad range of things; however +// * its initial implementation is for the skill tree. It will be renamed to a more +// * generic name so this class is more obviously re-usable after its implementation +// * is complete AND we verify this class can be made more generic for it. Since this +// * is unknown, it will remain the name it has currently. +// * +// * +// */ -package jesse.keeblarcraft.gui; +// package jesse.keeblarcraft.gui; -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map.Entry; +// import java.lang.reflect.InvocationTargetException; +// import java.util.ArrayList; +// import java.util.HashMap; +// import java.util.List; +// import java.util.Map.Entry; -import jesse.keeblarcraft.Keeblarcraft; -import jesse.keeblarcraft.GuiMgr.TreeHandler; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.gui.DrawContext; -import net.minecraft.client.gui.screen.Screen; -import net.minecraft.client.gui.screen.ingame.HandledScreen; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.text.Text; +// import jesse.keeblarcraft.Keeblarcraft; +// import jesse.keeblarcraft.GuiMgr.TreeHandler; +// import net.minecraft.client.MinecraftClient; +// import net.minecraft.client.gui.DrawContext; +// import net.minecraft.client.gui.screen.Screen; +// import net.minecraft.client.gui.screen.ingame.HandledScreen; +// import net.minecraft.entity.player.PlayerInventory; +// import net.minecraft.text.Text; -// Client side renderer -public class ScreenManager extends HandledScreen { - private static ScreenManager static_inst; - @SuppressWarnings("resource") - private static PlayerInventory static_inventory = new PlayerInventory(null);// = MinecraftClient.getInstance().player.getInventory(); +// // Client side renderer +// public class ScreenManager extends HandledScreen { +// private static ScreenManager static_inst; +// @SuppressWarnings("resource") +// private static PlayerInventory static_inventory = new PlayerInventory(null);// = MinecraftClient.getInstance().player.getInventory(); - public static ScreenManager GetInstance() { - if (static_inst == null) { - static_inst = new ScreenManager(Keeblarcraft.TREE_HANDLER.create(0, static_inventory), static_inventory, Text.of("Test")); - } - return static_inst; - } +// public static ScreenManager GetInstance() { +// if (static_inst == null) { +// static_inst = new ScreenManager(Keeblarcraft.TREE_HANDLER.create(0, static_inventory), static_inventory, Text.of("Test")); +// } +// return static_inst; +// } - private static HashMap>> layerMap = new HashMap>>(); - private static HashMap> layers = new HashMap>(); // key: layer id; value: list of classes to draw +// private static HashMap>> layerMap = new HashMap>>(); +// private static HashMap> layers = new HashMap>(); // key: layer id; value: list of classes to draw - // private TreeWidget treeWidget = null; - private Screen parent; +// // private TreeWidget treeWidget = null; +// private Screen parent; - ///////////////////////////////////////////////////////////////////////////// - /// @fn ScreenManager - /// - /// @arg[in] handler is the TreeHandler (ScreenHandler) object - /// - /// @arg[in] inventory is the players inventory. Required by HandledScreen - /// object however is unused currently in this Screen - /// - /// @arg[in] title is the title of the screen window - /// - /// @brief Class constructor - ///////////////////////////////////////////////////////////////////////////// - public ScreenManager(TreeHandler handler, PlayerInventory inventory, Text title) { - super(handler, inventory, title); - System.out.println("Called constructor of screen manager!"); +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn ScreenManager +// /// +// /// @arg[in] handler is the TreeHandler (ScreenHandler) object +// /// +// /// @arg[in] inventory is the players inventory. Required by HandledScreen +// /// object however is unused currently in this Screen +// /// +// /// @arg[in] title is the title of the screen window +// /// +// /// @brief Class constructor +// ///////////////////////////////////////////////////////////////////////////// +// public ScreenManager(TreeHandler handler, PlayerInventory inventory, Text title) { +// super(handler, inventory, title); +// System.out.println("Called constructor of screen manager!"); - // Initialize layers in map - // for (int i = 0; i < NUMBER_DRAW_LAYERS; i++) { - // layers.put(i, new ArrayList>()); - // } - } +// // Initialize layers in map +// // for (int i = 0; i < NUMBER_DRAW_LAYERS; i++) { +// // layers.put(i, new ArrayList>()); +// // } +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn AddParent - /// - /// @arg[in] parent is the parent screen object - /// - /// @brief Add a parent screen to the screen object. This is useful if - /// you want to return to the previous screen when this one gets - /// closed by the user - ///////////////////////////////////////////////////////////////////////////// - public void AddParent(Screen parent) { - this.parent = parent; - } +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn AddParent +// /// +// /// @arg[in] parent is the parent screen object +// /// +// /// @brief Add a parent screen to the screen object. This is useful if +// /// you want to return to the previous screen when this one gets +// /// closed by the user +// ///////////////////////////////////////////////////////////////////////////// +// public void AddParent(Screen parent) { +// this.parent = parent; +// } - public static void AddWidget(Class widget, int drawLayer) { - if (layerMap.containsKey(drawLayer)) { - // Just append the widget to the draw layer - var layerList = layerMap.get(drawLayer); - layerList.add(widget); - } else { - // Brand new layer! - layerMap.put(drawLayer, new ArrayList<>(List.of(widget))); - } - } +// public static void AddWidget(Class widget, int drawLayer) { +// if (layerMap.containsKey(drawLayer)) { +// // Just append the widget to the draw layer +// var layerList = layerMap.get(drawLayer); +// layerList.add(widget); +// } else { +// // Brand new layer! +// layerMap.put(drawLayer, new ArrayList<>(List.of(widget))); +// } +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn init - /// - /// @brief Initialize method; called one-time to setup class variables - ///////////////////////////////////////////////////////////////////////////// - @Override - public void init() { - // initialize screen size to the global background picture - this.width = MinecraftClient.getInstance().getWindow().getScaledWidth(); - this.height = MinecraftClient.getInstance().getWindow().getScaledHeight(); +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn init +// /// +// /// @brief Initialize method; called one-time to setup class variables +// ///////////////////////////////////////////////////////////////////////////// +// @Override +// public void init() { +// // initialize screen size to the global background picture +// this.width = MinecraftClient.getInstance().getWindow().getScaledWidth(); +// this.height = MinecraftClient.getInstance().getWindow().getScaledHeight(); - // Let's go through and initialize all the screen types now in our active memory - for (Entry>> layerEntry : layerMap.entrySet()) { - var layerList = layerEntry.getValue(); +// // Let's go through and initialize all the screen types now in our active memory +// for (Entry>> layerEntry : layerMap.entrySet()) { +// var layerList = layerEntry.getValue(); - layers.put(layerEntry.getKey(), new ArrayList<>()); - var activeLayerList = layers.get(layerEntry.getKey()); - for (int i = 0; i < layerList.size(); i++) { - try { - System.out.println("Attempting to initialize widget with information: LAYER I-VAL W H: " + layerEntry.getKey() + " " + i + " " + this.width + " " + this.height); - GenericLayerT initializedWidget = layerList.get(i).getDeclaredConstructor(int.class, int.class, int.class, int.class, Text.class).newInstance(0, 0, this.width, this.height, Text.of("")); - activeLayerList.add(initializedWidget); - } catch (InstantiationException e) { - System.out.println("Could not initialize GenericLayerT class (" + layerList.get(i).getClass().toString() + ") because of IntantiationException"); - e.printStackTrace(); - } catch (IllegalAccessException e) { - System.out.println("Could not initialize GenericLayerT class (" + layerList.get(i).getClass().toString() + ") because of IllegalAccessException"); - e.printStackTrace(); - } catch (IllegalArgumentException e) { - System.out.println("Could not initialize GenericLayerT class (" + layerList.get(i).getClass().toString() + ") because of IllegalArgumentException"); - e.printStackTrace(); - } catch (InvocationTargetException e) { - System.out.println("Could not initialize GenericLayerT class (" + layerList.get(i).getClass().toString() + ") because of InvocationTargetException"); - e.printStackTrace(); - } catch (NoSuchMethodException e) { - System.out.println("Could not initialize GenericLayerT class (" + layerList.get(i).getClass().toString() + ") because of NoSuchMethodException"); - e.printStackTrace(); - } catch (SecurityException e) { - System.out.println("Could not initialize GenericLayerT class (" + layerList.get(i).getClass().toString() + ") because of SecurityException"); - e.printStackTrace(); - } - } - } +// layers.put(layerEntry.getKey(), new ArrayList<>()); +// var activeLayerList = layers.get(layerEntry.getKey()); +// for (int i = 0; i < layerList.size(); i++) { +// try { +// System.out.println("Attempting to initialize widget with information: LAYER I-VAL W H: " + layerEntry.getKey() + " " + i + " " + this.width + " " + this.height); +// GenericLayerT initializedWidget = layerList.get(i).getDeclaredConstructor(int.class, int.class, int.class, int.class, Text.class).newInstance(0, 0, this.width, this.height, Text.of("")); +// activeLayerList.add(initializedWidget); +// } catch (InstantiationException e) { +// System.out.println("Could not initialize GenericLayerT class (" + layerList.get(i).getClass().toString() + ") because of IntantiationException"); +// e.printStackTrace(); +// } catch (IllegalAccessException e) { +// System.out.println("Could not initialize GenericLayerT class (" + layerList.get(i).getClass().toString() + ") because of IllegalAccessException"); +// e.printStackTrace(); +// } catch (IllegalArgumentException e) { +// System.out.println("Could not initialize GenericLayerT class (" + layerList.get(i).getClass().toString() + ") because of IllegalArgumentException"); +// e.printStackTrace(); +// } catch (InvocationTargetException e) { +// System.out.println("Could not initialize GenericLayerT class (" + layerList.get(i).getClass().toString() + ") because of InvocationTargetException"); +// e.printStackTrace(); +// } catch (NoSuchMethodException e) { +// System.out.println("Could not initialize GenericLayerT class (" + layerList.get(i).getClass().toString() + ") because of NoSuchMethodException"); +// e.printStackTrace(); +// } catch (SecurityException e) { +// System.out.println("Could not initialize GenericLayerT class (" + layerList.get(i).getClass().toString() + ") because of SecurityException"); +// e.printStackTrace(); +// } +// } +// } - // Initialize child widgets with correct screen values so they can draw themselves in the right area on the screen (duh!) - // treeWidget = new TreeWidget(GLOBAL_SCREEN_START_X + 24, GLOBAL_SCREEN_START_Y + 24, GLOBAL_SCREEN_WIDTH - 24, GLOBAL_SCREEN_HEIGHT - 24); - // this.addDrawableChild(treeWidget); - } +// // Initialize child widgets with correct screen values so they can draw themselves in the right area on the screen (duh!) +// // treeWidget = new TreeWidget(GLOBAL_SCREEN_START_X + 24, GLOBAL_SCREEN_START_Y + 24, GLOBAL_SCREEN_WIDTH - 24, GLOBAL_SCREEN_HEIGHT - 24); +// // this.addDrawableChild(treeWidget); +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn render - /// - /// @arg[in] context is the drawing context of super class - /// - /// @arg[in] mouseX is passed to parent class but unused here - /// - /// @arg[in] mouseY is passed to parent class but unused here - /// - /// @brief Render is called every frame while the screen is open - /// - /// @note This is a pure abstract in parent and is required - ///////////////////////////////////////////////////////////////////////////// - @Override - public void render(DrawContext context, int mouseX, int mouseY, float delta) { - super.render(context, mouseX, mouseY, delta); // This takes care of calling drawBackground which calls DrawMainScreen - } +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn render +// /// +// /// @arg[in] context is the drawing context of super class +// /// +// /// @arg[in] mouseX is passed to parent class but unused here +// /// +// /// @arg[in] mouseY is passed to parent class but unused here +// /// +// /// @brief Render is called every frame while the screen is open +// /// +// /// @note This is a pure abstract in parent and is required +// ///////////////////////////////////////////////////////////////////////////// +// @Override +// public void render(DrawContext context, int mouseX, int mouseY, float delta) { +// super.render(context, mouseX, mouseY, delta); // This takes care of calling drawBackground which calls DrawMainScreen +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn drawForeground - /// - /// @arg[in] context is the drawing context of super class - /// - /// @arg[in] mouseX is unused - /// - /// @arg[in] mouseY is unused - /// - /// @brief Draw foreground exists to draw the titles; however we - /// intentionally override it so the superclass object does not - /// draw the overlay over the background screen - ///////////////////////////////////////////////////////////////////////////// - @Override - public void drawForeground(DrawContext context, int mouseX, int mouseY) { - // We override this function to intentionally do nothing - // If in the future we want, we would draw the foreground and TITLES with this! - } +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn drawForeground +// /// +// /// @arg[in] context is the drawing context of super class +// /// +// /// @arg[in] mouseX is unused +// /// +// /// @arg[in] mouseY is unused +// /// +// /// @brief Draw foreground exists to draw the titles; however we +// /// intentionally override it so the superclass object does not +// /// draw the overlay over the background screen +// ///////////////////////////////////////////////////////////////////////////// +// @Override +// public void drawForeground(DrawContext context, int mouseX, int mouseY) { +// // We override this function to intentionally do nothing +// // If in the future we want, we would draw the foreground and TITLES with this! +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn close - /// - /// @brief Called when the screen closes - /// - /// @note This is a pure abstract in parent and is required - ///////////////////////////////////////////////////////////////////////////// - @Override - public void close() { - this.client.setScreen(parent); // return to previous screen or null - } +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn close +// /// +// /// @brief Called when the screen closes +// /// +// /// @note This is a pure abstract in parent and is required +// ///////////////////////////////////////////////////////////////////////////// +// @Override +// public void close() { +// this.client.setScreen(parent); // return to previous screen or null +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn mouseDragged - /// - /// @arg[in] mouseX is x-axis position of original mouse click - /// - /// @arg[in] mouseY is y-axis position of original mouse click - /// - /// @arg[in] button is the int value of button pressed for mouse dragging - /// - /// @arg[in] deltaX is the change in the X position from the previous - /// mouse click - /// - /// @arg[in] deltaY is the change in the Y position from the previous - /// mouse click - /// - /// @brief The drag event is called on all widgets on the screen so - /// long as the initial position of the drag is within the - /// bounds of the widget box itself. Widgets themselves will need - /// to handle any sub-widgets since the bound check is only - /// there to verify if the event happened ANYWHERE within a - /// widget box - ///////////////////////////////////////////////////////////////////////////// - @Override - public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) { - super.mouseDragged(mouseX, mouseY, button, deltaX, deltaY); - // UpdateAnchorValues(); +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn mouseDragged +// /// +// /// @arg[in] mouseX is x-axis position of original mouse click +// /// +// /// @arg[in] mouseY is y-axis position of original mouse click +// /// +// /// @arg[in] button is the int value of button pressed for mouse dragging +// /// +// /// @arg[in] deltaX is the change in the X position from the previous +// /// mouse click +// /// +// /// @arg[in] deltaY is the change in the Y position from the previous +// /// mouse click +// /// +// /// @brief The drag event is called on all widgets on the screen so +// /// long as the initial position of the drag is within the +// /// bounds of the widget box itself. Widgets themselves will need +// /// to handle any sub-widgets since the bound check is only +// /// there to verify if the event happened ANYWHERE within a +// /// widget box +// ///////////////////////////////////////////////////////////////////////////// +// @Override +// public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) { +// super.mouseDragged(mouseX, mouseY, button, deltaX, deltaY); +// // UpdateAnchorValues(); - for (Entry> layerEntry : layers.entrySet()) { - var layerList = layerEntry.getValue(); +// for (Entry> layerEntry : layers.entrySet()) { +// var layerList = layerEntry.getValue(); - for (var layerListIterator = 0; layerListIterator < layerList.size(); layerListIterator++) { - var layer = layerList.get(layerListIterator); +// for (var layerListIterator = 0; layerListIterator < layerList.size(); layerListIterator++) { +// var layer = layerList.get(layerListIterator); - // Check to make sure scroll is within the context of the widget then deliver information - if (InBounds(layer.startX, layer.startY, layer.endX, layer.endY, (int) mouseX, (int) mouseY)) { - layer.mouseDragged(mouseX, mouseY, button, deltaX, deltaY); - } - } - } - return true; - } +// // Check to make sure scroll is within the context of the widget then deliver information +// if (InBounds(layer.startX, layer.startY, layer.endX, layer.endY, (int) mouseX, (int) mouseY)) { +// layer.mouseDragged(mouseX, mouseY, button, deltaX, deltaY); +// } +// } +// } +// return true; +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn mouseScrolled - /// - /// @arg[in] mouseX is the initial X position of the cursor on a scroll - /// - /// @arg[in] mouseY is the initial Y position of the cursor on a scroll - /// - /// @arg[in] amount is a normalized value that indicates scroll direction - /// - /// @brief The scroll event is called on all widgets on the screen so - /// long as the initial position of the scroll is within the - /// bounds of the widget box itself. Widgets themselves will need - /// to handle any sub-widgets since the bound check is only - /// there to verify if the event happened ANYWHERE within a - /// widget box - /// - ///////////////////////////////////////////////////////////////////////////// - @Override - public boolean mouseScrolled(double mouseX, double mouseY, double amount) { - super.mouseScrolled(mouseX, mouseY, amount); +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn mouseScrolled +// /// +// /// @arg[in] mouseX is the initial X position of the cursor on a scroll +// /// +// /// @arg[in] mouseY is the initial Y position of the cursor on a scroll +// /// +// /// @arg[in] amount is a normalized value that indicates scroll direction +// /// +// /// @brief The scroll event is called on all widgets on the screen so +// /// long as the initial position of the scroll is within the +// /// bounds of the widget box itself. Widgets themselves will need +// /// to handle any sub-widgets since the bound check is only +// /// there to verify if the event happened ANYWHERE within a +// /// widget box +// /// +// ///////////////////////////////////////////////////////////////////////////// +// @Override +// public boolean mouseScrolled(double mouseX, double mouseY, double amount) { +// super.mouseScrolled(mouseX, mouseY, amount); - for (Entry> layerEntry : layers.entrySet()) { - var layerList = layerEntry.getValue(); +// for (Entry> layerEntry : layers.entrySet()) { +// var layerList = layerEntry.getValue(); - for (var layerListIterator = 0; layerListIterator < layerList.size(); layerListIterator++) { - var layer = layerList.get(layerListIterator); +// for (var layerListIterator = 0; layerListIterator < layerList.size(); layerListIterator++) { +// var layer = layerList.get(layerListIterator); - // Check to make sure scroll is within the context of the widget then deliver information - if (InBounds(layer.startX, layer.startY, layer.endX, layer.endY, (int) mouseX, (int) mouseY)) { - layer.mouseScrolled(mouseX, mouseY, amount); - } - } - } - return true; // The parent function defines this to be boolean; but I have no idea when I would want to return false from this - } +// // Check to make sure scroll is within the context of the widget then deliver information +// if (InBounds(layer.startX, layer.startY, layer.endX, layer.endY, (int) mouseX, (int) mouseY)) { +// layer.mouseScrolled(mouseX, mouseY, amount); +// } +// } +// } +// return true; // The parent function defines this to be boolean; but I have no idea when I would want to return false from this +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn mouseClicked - /// - /// @arg[in] mouseX is the initial X position of the mouse click event - /// - /// @arg[in] mouseY is the initial Y position of the mouse click event - /// - /// @arg[in] button is the mouse click button (left/right click value) - /// - /// @brief The mouse click is called on all widgets on the screen so - /// long as the initial position of the click is within the - /// bounds of the widget box itself. Widgets themselves will need - /// to handle any sub-widgets since the bound check is only - /// there to verify if the event happened ANYWHERE within a - /// widget box - /// - ///////////////////////////////////////////////////////////////////////////// - @Override - public boolean mouseClicked(double mouseX, double mouseY, int button) { - super.mouseClicked(mouseX, mouseY, button); +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn mouseClicked +// /// +// /// @arg[in] mouseX is the initial X position of the mouse click event +// /// +// /// @arg[in] mouseY is the initial Y position of the mouse click event +// /// +// /// @arg[in] button is the mouse click button (left/right click value) +// /// +// /// @brief The mouse click is called on all widgets on the screen so +// /// long as the initial position of the click is within the +// /// bounds of the widget box itself. Widgets themselves will need +// /// to handle any sub-widgets since the bound check is only +// /// there to verify if the event happened ANYWHERE within a +// /// widget box +// /// +// ///////////////////////////////////////////////////////////////////////////// +// @Override +// public boolean mouseClicked(double mouseX, double mouseY, int button) { +// super.mouseClicked(mouseX, mouseY, button); - for (Entry> layerEntry : layers.entrySet()) { - var layerList = layerEntry.getValue(); +// for (Entry> layerEntry : layers.entrySet()) { +// var layerList = layerEntry.getValue(); - for (var layerListIterator = 0; layerListIterator < layerList.size(); layerListIterator++) { - var layer = layerList.get(layerListIterator); +// for (var layerListIterator = 0; layerListIterator < layerList.size(); layerListIterator++) { +// var layer = layerList.get(layerListIterator); - // Check to make sure scroll is within the context of the widget then deliver information - if (InBounds(layer.startX, layer.startY, layer.endX, layer.endY, (int) mouseX, (int) mouseY)) { - layer.mouseClicked(mouseX, mouseY, button); - } - } - } - return true; - } +// // Check to make sure scroll is within the context of the widget then deliver information +// if (InBounds(layer.startX, layer.startY, layer.endX, layer.endY, (int) mouseX, (int) mouseY)) { +// layer.mouseClicked(mouseX, mouseY, button); +// } +// } +// } +// return true; +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn DrawLayers - /// - /// @arg[in] context is the global drawing context for the screen - /// - /// @arg[in] delta is passed in from background draw - /// - /// @brief This is the primary drawing function so that all the texture - /// draws can be done in one place in this class. We want as - /// little distance as possible between redraws when possible! - /// - /// @note Currently the foreground is not drawn in the custom screen - /// manager. This is because the foreground features the general - /// inventory manager that this screen handler is based on and we - /// do not want to see those text pop ups. - ///////////////////////////////////////////////////////////////////////////// - public void DrawLayers(DrawContext context, float delta) { - for (Entry> layerEntry : layers.entrySet()) { - var layerList = layerEntry.getValue(); +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn DrawLayers +// /// +// /// @arg[in] context is the global drawing context for the screen +// /// +// /// @arg[in] delta is passed in from background draw +// /// +// /// @brief This is the primary drawing function so that all the texture +// /// draws can be done in one place in this class. We want as +// /// little distance as possible between redraws when possible! +// /// +// /// @note Currently the foreground is not drawn in the custom screen +// /// manager. This is because the foreground features the general +// /// inventory manager that this screen handler is based on and we +// /// do not want to see those text pop ups. +// ///////////////////////////////////////////////////////////////////////////// +// public void DrawLayers(DrawContext context, float delta) { +// for (Entry> layerEntry : layers.entrySet()) { +// var layerList = layerEntry.getValue(); - for (var layerListIterator = 0; layerListIterator < layerList.size(); layerListIterator++) { - var layer = layerList.get(layerListIterator); - System.out.println("Drawing layer " + layerEntry.getKey() + " for class type " + layer.getClass().toString()); - layer.DrawLayer(context, layerEntry.getKey()); - } - } - } +// for (var layerListIterator = 0; layerListIterator < layerList.size(); layerListIterator++) { +// var layer = layerList.get(layerListIterator); +// System.out.println("Drawing layer " + layerEntry.getKey() + " for class type " + layer.getClass().toString()); +// layer.DrawLayer(context, layerEntry.getKey()); +// } +// } +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn InBounds - /// - /// @arg[in] initX is initial position of X axis - /// - /// @arg[in] initY is initial position of Y axis - /// - /// @arg[in] endX is the end position of X axis - /// - /// @arg[in] endY is the end position of Y axis - /// - /// @arg[in] x is the current X value we are comparing in the X axis - /// - /// @arg[in] y is the current Y value we are comparing in the Y axis - /// - /// @brief Checks if an x,y coordinate position falls within the bounds - /// of a bounded box - ///////////////////////////////////////////////////////////////////////////// - private boolean InBounds(int initX, int initY, int endX, int endY, int x, int y) { - return (x >= initX && x <= endX) && (y >= initY && y <= endY); - } +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn InBounds +// /// +// /// @arg[in] initX is initial position of X axis +// /// +// /// @arg[in] initY is initial position of Y axis +// /// +// /// @arg[in] endX is the end position of X axis +// /// +// /// @arg[in] endY is the end position of Y axis +// /// +// /// @arg[in] x is the current X value we are comparing in the X axis +// /// +// /// @arg[in] y is the current Y value we are comparing in the Y axis +// /// +// /// @brief Checks if an x,y coordinate position falls within the bounds +// /// of a bounded box +// ///////////////////////////////////////////////////////////////////////////// +// private boolean InBounds(int initX, int initY, int endX, int endY, int x, int y) { +// return (x >= initX && x <= endX) && (y >= initY && y <= endY); +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn drawBackground - /// - /// @arg[in] context is the drawing context of super class - /// - /// @arg[in] delta is the change in background draw - /// - /// @arg[in] mouseX is the mouse x-axis position - /// - /// @arg[in] mouseY is the mouse y-axis position - /// - /// @brief This function is an abstract parent class and must be - /// implemented. This is "hijacked" and just being used as our - /// main drawing method of all the background images. There isn't - /// a huge difference of drawing our stuff in background vs the - /// foreground - except possibly foreground is drawn first. - ///////////////////////////////////////////////////////////////////////////// - @Override - protected void drawBackground(DrawContext context, float delta, int mouseX, int mouseY) { - DrawLayers(context, delta); - } -} +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn drawBackground +// /// +// /// @arg[in] context is the drawing context of super class +// /// +// /// @arg[in] delta is the change in background draw +// /// +// /// @arg[in] mouseX is the mouse x-axis position +// /// +// /// @arg[in] mouseY is the mouse y-axis position +// /// +// /// @brief This function is an abstract parent class and must be +// /// implemented. This is "hijacked" and just being used as our +// /// main drawing method of all the background images. There isn't +// /// a huge difference of drawing our stuff in background vs the +// /// foreground - except possibly foreground is drawn first. +// ///////////////////////////////////////////////////////////////////////////// +// @Override +// protected void drawBackground(DrawContext context, float delta, int mouseX, int mouseY) { +// DrawLayers(context, delta); +// } +// } diff --git a/src/client/java/jesse/keeblarcraft/gui/widgets/TreeWidget.java b/src/client/java/jesse/keeblarcraft/gui/widgets/TreeWidget.java index 7c05aee..39e5318 100644 --- a/src/client/java/jesse/keeblarcraft/gui/widgets/TreeWidget.java +++ b/src/client/java/jesse/keeblarcraft/gui/widgets/TreeWidget.java @@ -1,165 +1,165 @@ -/* - * - * TreeWidget - * - * Handles the skill tree widget - * - * -*/ +// /* +// * +// * TreeWidget +// * +// * Handles the skill tree widget +// * +// * +// */ -package jesse.keeblarcraft.gui.widgets; +// package jesse.keeblarcraft.gui.widgets; -import jesse.keeblarcraft.Keeblarcraft; -import jesse.keeblarcraft.Utils.CommonStructures.Position2d; -import jesse.keeblarcraft.gui.GenericLayerT; -import net.minecraft.client.gui.DrawContext; -import net.minecraft.client.gui.screen.narration.NarrationMessageBuilder; -import net.minecraft.text.Text; -import net.minecraft.util.Identifier; +// import jesse.keeblarcraft.Keeblarcraft; +// import jesse.keeblarcraft.Utils.CommonStructures.Position2d; +// import jesse.keeblarcraft.gui.GenericLayerT; +// import net.minecraft.client.gui.DrawContext; +// import net.minecraft.client.gui.screen.narration.NarrationMessageBuilder; +// import net.minecraft.text.Text; +// import net.minecraft.util.Identifier; -public class TreeWidget extends GenericLayerT { - private static Identifier BACKGROUND_TEXTURE = new Identifier(Keeblarcraft.MOD_ID + ":" + "textures/gui/attribute_tree_background.png"); - private static int maxHeight = 320; - private static int maxLength = 640; - private int zoomScale = 1; - // private static Identifier FLIGHT_ATTRIBUTE = new Identifier(Keeblarcraft.MOD_ID + ":" + "textures/gui/attribute_flight.png"); +// public class TreeWidget extends GenericLayerT { +// private static Identifier BACKGROUND_TEXTURE = new Identifier(Keeblarcraft.MOD_ID + ":" + "textures/gui/attribute_tree_background.png"); +// private static int maxHeight = 320; +// private static int maxLength = 640; +// private int zoomScale = 1; +// // private static Identifier FLIGHT_ATTRIBUTE = new Identifier(Keeblarcraft.MOD_ID + ":" + "textures/gui/attribute_flight.png"); - ///TODO: Make this THE root node in the attribute tree! Rename in future - // private static Identifier EXAMPLE_NODE = new Identifier(Keeblarcraft.MOD_ID + ":" + "textures/gui/attribute_tree_example_node.png"); ///TODO: Make a way to make this programmatic (Proabably extend AbstractNode to carry this var) +// ///TODO: Make this THE root node in the attribute tree! Rename in future +// // private static Identifier EXAMPLE_NODE = new Identifier(Keeblarcraft.MOD_ID + ":" + "textures/gui/attribute_tree_example_node.png"); ///TODO: Make a way to make this programmatic (Proabably extend AbstractNode to carry this var) - ///////////////////////////////////////////////////////////////////////////// - /// @fn TreeWidget - /// - /// @brief Class constructor for constructing a tree widget. This will - /// be deprecated in a future version but exists for testing - ///////////////////////////////////////////////////////////////////////////// - public TreeWidget() { - this(0, 0, 0, 0, Text.of("Test")); - System.out.println("Calling empty tree constructor"); - } +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn TreeWidget +// /// +// /// @brief Class constructor for constructing a tree widget. This will +// /// be deprecated in a future version but exists for testing +// ///////////////////////////////////////////////////////////////////////////// +// public TreeWidget() { +// this(0, 0, 0, 0, Text.of("Test")); +// System.out.println("Calling empty tree constructor"); +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn TreeWidget - /// - /// @brief Class constructor for constructing a tree widget - ///////////////////////////////////////////////////////////////////////////// - public TreeWidget(int x, int y, int width, int height, Text message) { - super(x, y, width, height, message); +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn TreeWidget +// /// +// /// @brief Class constructor for constructing a tree widget +// ///////////////////////////////////////////////////////////////////////////// +// public TreeWidget(int x, int y, int width, int height, Text message) { +// super(x, y, width, height, message); - this.startX = x; - this.startY = y; - this.endX = x + width; - this.endY = y + height; - } +// this.startX = x; +// this.startY = y; +// this.endX = x + width; +// this.endY = y + height; +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn renderButton - /// - /// @param[in] context is the drawing pane - /// - /// @param[in] x is the X position to draw at - /// - /// @param[in] y is the Y position to draw at - /// - /// @param[in] delta is unused in this version - /// - /// @brief Primary call to draw the GUI for this widget - ///////////////////////////////////////////////////////////////////////////// - @Override - public void renderButton(DrawContext context, int x, int y, float delta) { - context.drawTexture(BACKGROUND_TEXTURE, x, y, 0, 0, maxLength, maxHeight, maxLength, maxHeight); - } +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn renderButton +// /// +// /// @param[in] context is the drawing pane +// /// +// /// @param[in] x is the X position to draw at +// /// +// /// @param[in] y is the Y position to draw at +// /// +// /// @param[in] delta is unused in this version +// /// +// /// @brief Primary call to draw the GUI for this widget +// ///////////////////////////////////////////////////////////////////////////// +// @Override +// public void renderButton(DrawContext context, int x, int y, float delta) { +// context.drawTexture(BACKGROUND_TEXTURE, x, y, 0, 0, maxLength, maxHeight, maxLength, maxHeight); +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn appendClickableNarrations - /// - /// @param[in] builder is the narration builder. This is pure virtual in - /// the parent but is unused in this widget currently - /// - /// @brief Handles the narrator - ///////////////////////////////////////////////////////////////////////////// - @Override - protected void appendClickableNarrations(NarrationMessageBuilder builder) { - return; - } +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn appendClickableNarrations +// /// +// /// @param[in] builder is the narration builder. This is pure virtual in +// /// the parent but is unused in this widget currently +// /// +// /// @brief Handles the narrator +// ///////////////////////////////////////////////////////////////////////////// +// @Override +// protected void appendClickableNarrations(NarrationMessageBuilder builder) { +// return; +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn mouseClicked - /// - /// @param[in] mouseX is where on the x-axis the mouse was clicked - /// - /// @param[in] mouseY is where on the y-axis the mouse was clicked - /// - /// @param[in] button is the button clicked with (think of a mouse...) - /// - /// @brief Handler for mouse click events - ///////////////////////////////////////////////////////////////////////////// - @Override - public boolean mouseClicked(double mouseX, double mouseY, int button) { - return true; - } +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn mouseClicked +// /// +// /// @param[in] mouseX is where on the x-axis the mouse was clicked +// /// +// /// @param[in] mouseY is where on the y-axis the mouse was clicked +// /// +// /// @param[in] button is the button clicked with (think of a mouse...) +// /// +// /// @brief Handler for mouse click events +// ///////////////////////////////////////////////////////////////////////////// +// @Override +// public boolean mouseClicked(double mouseX, double mouseY, int button) { +// return true; +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn mouseDragged - /// - /// @param[in] mouseX is where on the x-axis the mouse was dragged - /// - /// @param[in] mouseY is where on the y-axis the mouse was dragged - /// - /// @param[in] button is the button dragged with (think of a mouse...) - /// - /// @brief Handler for mouse drag events. delta's unused currently - ///////////////////////////////////////////////////////////////////////////// - @Override - public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) { - boolean ret = false; - if (this.isValidClickButton(button)) { - // Do camera panning magic stuff here - ret = true; - } - return ret; - } +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn mouseDragged +// /// +// /// @param[in] mouseX is where on the x-axis the mouse was dragged +// /// +// /// @param[in] mouseY is where on the y-axis the mouse was dragged +// /// +// /// @param[in] button is the button dragged with (think of a mouse...) +// /// +// /// @brief Handler for mouse drag events. delta's unused currently +// ///////////////////////////////////////////////////////////////////////////// +// @Override +// public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) { +// boolean ret = false; +// if (this.isValidClickButton(button)) { +// // Do camera panning magic stuff here +// ret = true; +// } +// return ret; +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn mouseDragged - /// - /// @param[in] mouseX is where on the x-axis the mouse was dragged - /// - /// @param[in] mouseY is where on the y-axis the mouse was dragged - /// - /// @param[in] amount represents scroll direction. If the value is negative - /// we scale out. If positive, we scale in - /// - /// @brief Handler for mouse scroll events - ///////////////////////////////////////////////////////////////////////////// - @Override - public boolean mouseScrolled(double mouseX, double mouseY, double amount) { - // Zooming INWARDS on scroll wheel produces 1.0 (which means zoom in) - // Zooming BACKWARDS on scroll wheel produces -1.0 (which means zoom out) - // We enforce a max scroll of 10 in either direction here - if (amount > 0 && zoomScale <= 10) { - // Zoom in - zoomScale++; - } else if (amount < 0 && zoomScale >= -10) { - // Zoom out - zoomScale--; - } - return true; - } +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn mouseDragged +// /// +// /// @param[in] mouseX is where on the x-axis the mouse was dragged +// /// +// /// @param[in] mouseY is where on the y-axis the mouse was dragged +// /// +// /// @param[in] amount represents scroll direction. If the value is negative +// /// we scale out. If positive, we scale in +// /// +// /// @brief Handler for mouse scroll events +// ///////////////////////////////////////////////////////////////////////////// +// @Override +// public boolean mouseScrolled(double mouseX, double mouseY, double amount) { +// // Zooming INWARDS on scroll wheel produces 1.0 (which means zoom in) +// // Zooming BACKWARDS on scroll wheel produces -1.0 (which means zoom out) +// // We enforce a max scroll of 10 in either direction here +// if (amount > 0 && zoomScale <= 10) { +// // Zoom in +// zoomScale++; +// } else if (amount < 0 && zoomScale >= -10) { +// // Zoom out +// zoomScale--; +// } +// return true; +// } - ///////////////////////////////////////////////////////////////////////////// - /// @fn DrawLayer - /// - /// @param[in] context is the drawing pane - /// - /// @param[in] layer is the layer in which this widget is being drawn in - /// - /// @brief This calls renderButton and gives it the valid drawing - /// context to use. This function is called by a ScreenManager - ///////////////////////////////////////////////////////////////////////////// - @Override - public void DrawLayer(DrawContext context, int layer) { - Position2d pos = GetScreenCenter(); - this.renderButton(context, pos.x - (maxLength / 2), pos.y - (maxHeight / 2), 0); - } -} +// ///////////////////////////////////////////////////////////////////////////// +// /// @fn DrawLayer +// /// +// /// @param[in] context is the drawing pane +// /// +// /// @param[in] layer is the layer in which this widget is being drawn in +// /// +// /// @brief This calls renderButton and gives it the valid drawing +// /// context to use. This function is called by a ScreenManager +// ///////////////////////////////////////////////////////////////////////////// +// @Override +// public void DrawLayer(DrawContext context, int layer) { +// Position2d pos = GetScreenCenter(); +// this.renderButton(context, pos.x - (maxLength / 2), pos.y - (maxHeight / 2), 0); +// } +// } diff --git a/src/main/generated/.cache/27b8b1d6af601e15f202616061490ff2b85aa40c b/src/main/generated/.cache/27b8b1d6af601e15f202616061490ff2b85aa40c index 0a694d0..d66f8f9 100644 --- a/src/main/generated/.cache/27b8b1d6af601e15f202616061490ff2b85aa40c +++ b/src/main/generated/.cache/27b8b1d6af601e15f202616061490ff2b85aa40c @@ -1,3 +1,3 @@ -// 1.20 2024-12-05T22:38:15.935314478 keeblarcraft/Keeblarcraft World Generation +// 1.20.2 2024-12-21T01:52:28.294091413 keeblarcraft/Keeblarcraft World Generation afc3340283d1101601bd4d2ca96341a58eceaf83 data/keeblarcraft/dimension_type/keeblarcraftdim_type.json 4398eda2b0c28b2c754c45f5805534bf1921b243 data/keeblarcraft/worldgen/biome/test_biome.json diff --git a/src/main/java/jesse/keeblarcraft/BankMgr/BankManager.java b/src/main/java/jesse/keeblarcraft/BankMgr/BankManager.java index 8f79099..e547af6 100644 --- a/src/main/java/jesse/keeblarcraft/BankMgr/BankManager.java +++ b/src/main/java/jesse/keeblarcraft/BankMgr/BankManager.java @@ -5,8 +5,6 @@ import java.util.List; import java.util.ArrayList; import java.util.Map.Entry; -import org.apache.logging.log4j.core.jmx.Server; - import jesse.keeblarcraft.ConfigMgr.ConfigManager; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.text.Text; diff --git a/src/main/java/jesse/keeblarcraft/Commands/MiscCommands.java b/src/main/java/jesse/keeblarcraft/Commands/MiscCommands.java index 917f7a6..d3c3d45 100644 --- a/src/main/java/jesse/keeblarcraft/Commands/MiscCommands.java +++ b/src/main/java/jesse/keeblarcraft/Commands/MiscCommands.java @@ -1,35 +1,16 @@ package jesse.keeblarcraft.Commands; -import org.apache.logging.log4j.core.jmx.Server; - import com.mojang.brigadier.arguments.StringArgumentType; -import jesse.keeblarcraft.Keeblarcraft; import jesse.keeblarcraft.ConfigMgr.ConfigManager; import jesse.keeblarcraft.ConfigMgr.GeneralConfig; -import jesse.keeblarcraft.EventMgr.DimensionLoadingEvent; import jesse.keeblarcraft.Utils.DirectionalVec; import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.block.ChestBlock; -import net.minecraft.block.entity.BlockEntity; -import net.minecraft.command.argument.EntityArgumentType; -import net.minecraft.inventory.EnderChestInventory; -import net.minecraft.item.ItemPlacementContext; -import net.minecraft.nbt.NbtList; -import net.minecraft.registry.RegistryKey; -import net.minecraft.registry.RegistryKeys; import net.minecraft.server.command.CommandManager; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.world.ServerWorld; import net.minecraft.text.Text; -import net.minecraft.util.Identifier; -import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; -import net.minecraft.world.World; -import net.minecraft.world.dimension.DimensionType; public class MiscCommands { ConfigManager config = new ConfigManager(); @@ -75,6 +56,17 @@ public class MiscCommands { dispatcher.getRoot().addChild(warp); warp.addChild(warpLoc); }); + + CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> { + + var warp = CommandManager.literal("nick").build(); + + var warpLoc = CommandManager.argument("CUSTOM_NICKNAME", StringArgumentType.string()) + .executes(context -> SetNickname(context.getSource().getPlayer(), StringArgumentType.getString(context, "CUSTOM_NICKNAME"))).build(); + + dispatcher.getRoot().addChild(warp); + warp.addChild(warpLoc); + }); } public int Warp(ServerPlayerEntity player, String location) { @@ -132,6 +124,11 @@ public class MiscCommands { return 0; } + public int SetNickname(ServerPlayerEntity player, String name) { + player.setCustomName(Text.of(name)); + return 0; + } + public int GetEnderchestOfPlayer(ServerPlayerEntity cmdInitiator, ServerPlayerEntity targetPlayer) { // if (cmdInitiator.hasPermissionLevel(4)) { diff --git a/src/main/java/jesse/keeblarcraft/Commands/ShopCommands.java b/src/main/java/jesse/keeblarcraft/Commands/ShopCommands.java new file mode 100644 index 0000000..a32a672 --- /dev/null +++ b/src/main/java/jesse/keeblarcraft/Commands/ShopCommands.java @@ -0,0 +1,18 @@ +package jesse.keeblarcraft.Commands; + +import com.mojang.brigadier.arguments.StringArgumentType; + +import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback; +import net.minecraft.server.command.CommandManager; + +public class ShopCommands { + public void RegisterShopCommands() { + CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> { + var shopCmd = CommandManager.literal("shop").build(); + + var shopCreate = CommandManager.literal("create").build(); + + dispatcher.getRoot().addChild(shopCmd); + }); + } +} diff --git a/src/main/java/jesse/keeblarcraft/Commands/ShortcutCommands.java b/src/main/java/jesse/keeblarcraft/Commands/ShortcutCommands.java index a3bc392..971a729 100644 --- a/src/main/java/jesse/keeblarcraft/Commands/ShortcutCommands.java +++ b/src/main/java/jesse/keeblarcraft/Commands/ShortcutCommands.java @@ -16,6 +16,7 @@ import com.mojang.brigadier.context.CommandContext; import jesse.keeblarcraft.Utils.ChatUtil; import jesse.keeblarcraft.Utils.ChatUtil.CONSOLE_COLOR; import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback; +import net.minecraft.command.argument.EntityArgumentType; import net.minecraft.entity.player.PlayerAbilities; import net.minecraft.server.command.CommandManager; import net.minecraft.server.command.ServerCommandSource; @@ -61,11 +62,17 @@ public class ShortcutCommands { CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> { dispatcher.register(CommandManager.literal("heal") - .executes(context -> { HealShortcut(context); + .executes(context -> { HealShortcut(context, null); return 0; })); }); + CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> { + var healNode = CommandManager.literal("heal").build(); + var targetPlayer = CommandManager.argument("targetPlayer", EntityArgumentType.player()) + .executes(context -> HealShortcut(context, EntityArgumentType.getPlayer(context, "targetPlayer"))); + }); + CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> { dispatcher.register(CommandManager.literal("day") .executes(context -> { DayShortcut(context); @@ -194,33 +201,34 @@ public class ShortcutCommands { // return retValue; // } - // TODO: Add when we can find where in the API to fill players hunger level - // private int FeedShortcut(CommandContext context) { - // int retValue = -1; - // if (context.getSource().isExecutedByPlayer()) { - // ServerPlayerEntity player = context.getSource().getPlayer(); + private int FeedShortcut(CommandContext context, ServerPlayerEntity target) { - // if (player.hasPermissionLevel(4)) { - - // } else { - // player.sendMessage(Text.literal("You do not have permission for this command")); - // } - // } - - // return retValue; - // } - - private int HealShortcut(CommandContext context) { - int retValue = -1; - if (context.getSource().isExecutedByPlayer()) { + // if target is null, feed ourselves + if (target == null) { ServerPlayerEntity player = context.getSource().getPlayer(); + player.getHungerManager().setExhaustion(0.0f); + player.getHungerManager().setFoodLevel(20); // 20 is hardcoded inside class + player.getHungerManager().setSaturationLevel(10.0f); // 5 is set in constructor, but let's try 10! + ChatUtil.SendPlayerMsg(player, "You were just super fed!"); + } else { + target.getHungerManager().setExhaustion(0.0f); + target.getHungerManager().setFoodLevel(20); // 20 is hardcoded inside class + target.getHungerManager().setSaturationLevel(10.0f); // 5 is set in constructor, but let's try 10! + ChatUtil.SendPlayerMsg(target, "You were just super fed!"); + } + return 0; + } - if (player.hasPermissionLevel(4)) { - player.setHealth(player.getMaxHealth()); - ChatUtil.SendPlayerMsg(player, "Healed!"); - } else { - player.sendMessage(Text.literal("You do not have permission for this command")); - } + private int HealShortcut(CommandContext context, ServerPlayerEntity target) { + int retValue = -1; + // If no player specified; then heal ourself full HP + if (target == null) { + context.getSource().getPlayer().setHealth(context.getSource().getPlayer().getMaxHealth()); + ChatUtil.SendPlayerMsg(context.getSource().getPlayer(), "Healed!"); + } else { + target.setHealth(target.getMaxHealth()); + ChatUtil.SendPlayerMsg(target, "You were just healed!"); + ChatUtil.SendPlayerMsg(context.getSource().getPlayer(), "You healed " + target.getDisplayName()); } return retValue; diff --git a/src/main/java/jesse/keeblarcraft/CustomBlocks/BlockEntities/BlockEntityRegistration.java b/src/main/java/jesse/keeblarcraft/CustomBlocks/BlockEntities/BlockEntityRegistration.java new file mode 100644 index 0000000..c86e887 --- /dev/null +++ b/src/main/java/jesse/keeblarcraft/CustomBlocks/BlockEntities/BlockEntityRegistration.java @@ -0,0 +1,27 @@ +package jesse.keeblarcraft.CustomBlocks.BlockEntities; + +import jesse.keeblarcraft.Keeblarcraft; +import jesse.keeblarcraft.CustomBlocks.BlockManager; +import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder; +import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; +import net.minecraft.util.Identifier; + +// EVENTUALLY THIS CLASS WILL GET COLLAPSED UNDER @ref BlockManager.java +// However; I don't have the time to figure out how to do this dynamically this second (I'm lazy and doing this +// all in one sitting) +public class BlockEntityRegistration { + // PLEASE STICK A COMMENT ABOVE EACH REGISTRATION FOR LATER REFERENCE + + + + // FactionBlockEntity + public static final BlockEntityType FACTION_BLOCK_ENTITY = + Registry.register(Registries.BLOCK_ENTITY_TYPE, new Identifier(Keeblarcraft.MOD_ID, "faction_block_entity"), + FabricBlockEntityTypeBuilder.create(FactionBlockEntity::new, BlockManager.GetBlock("faction_base_block")).build()); + + public static void RegisterBlockEntities() { + Keeblarcraft.LOGGER.info("Registering block entities for " + Keeblarcraft.MOD_ID); + } +} diff --git a/src/main/java/jesse/keeblarcraft/CustomBlocks/BlockEntities/FactionBlockEntity.java b/src/main/java/jesse/keeblarcraft/CustomBlocks/BlockEntities/FactionBlockEntity.java new file mode 100644 index 0000000..494e6e9 --- /dev/null +++ b/src/main/java/jesse/keeblarcraft/CustomBlocks/BlockEntities/FactionBlockEntity.java @@ -0,0 +1,104 @@ +package jesse.keeblarcraft.CustomBlocks.BlockEntities; + +import jesse.keeblarcraft.GuiMgr.FactionBlockScreenHandler; +import jesse.keeblarcraft.world.ImplementedInventory; +import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerFactory; +import net.minecraft.block.BlockState; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.Inventories; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NbtCompound; +import net.minecraft.network.PacketByteBuf; +import net.minecraft.screen.PropertyDelegate; +import net.minecraft.screen.ScreenHandler; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.text.Text; +import net.minecraft.util.collection.DefaultedList; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class FactionBlockEntity extends BlockEntity implements ExtendedScreenHandlerFactory, ImplementedInventory { + private final DefaultedList inventory = DefaultedList.ofSize(4, ItemStack.EMPTY); + + private static final int DEFENSE_SLOT_ONE = 0; + private static final int DEFENSE_SLOT_TWO = 1; + private static final int OFFENSE_SLOT_ONE = 2; + private static final int OFFENSE_SLOT_TWO = 3; + private static int power = 0; + + protected final PropertyDelegate propertyDelegate; + + public FactionBlockEntity(BlockPos pos, BlockState state) { + super(BlockEntityRegistration.FACTION_BLOCK_ENTITY, pos, state); + this.propertyDelegate = new PropertyDelegate() { + + @Override + public int get(int index) { + return switch(index) { + default -> power; + }; + } + + @Override + public void set(int index, int value) { + switch(index) { + default -> power = value; + }; + } + + @Override + public int size() { + return 1; + } + + }; + } + + @Override + public Text getDisplayName() { + return Text.literal("Faction Home Base Station"); // Replace with proper en_us format later + } + + @Override + public ScreenHandler createMenu(int syncId, PlayerInventory playerInventory, PlayerEntity player) { + return new FactionBlockScreenHandler(syncId, playerInventory, this, this.propertyDelegate); + } + + @Override + public void readNbt(NbtCompound nbt) { + super.readNbt(nbt); + Inventories.readNbt(nbt, inventory); + power = nbt.getInt("faction_block_entity.power"); + } + + @Override + public void writeNbt(NbtCompound nbt) { + super.writeNbt(nbt); + Inventories.writeNbt(nbt, inventory); // Write our inventory when world is saved; etc + nbt.putInt("faction_block_entity.power", power); + } + + @Override + public DefaultedList getItems() { + return inventory; + } + + @Override + public void writeScreenOpeningData(ServerPlayerEntity player, PacketByteBuf buf) { + // Send position of this block entity from server->client->server etc + buf.writeBlockPos(this.pos); + } + + // Tick method is called 20 times a second + public void tick(World world, BlockPos pos, BlockState state) { + // For reasons unknown to me and only to Kaupenjoe (youtube video) - we never want to call this on a client. + if (world.isClient()) { + return; + } + + // Do stuff here that we need to do on a per tick basis. Probably check the items inside the slots and do stuff? + } +} diff --git a/src/main/java/jesse/keeblarcraft/CustomBlocks/BlockList.java b/src/main/java/jesse/keeblarcraft/CustomBlocks/BlockList.java index 574b179..2547c67 100644 --- a/src/main/java/jesse/keeblarcraft/CustomBlocks/BlockList.java +++ b/src/main/java/jesse/keeblarcraft/CustomBlocks/BlockList.java @@ -1,7 +1,7 @@ package jesse.keeblarcraft.CustomBlocks; +import jesse.keeblarcraft.CustomBlocks.Blocks.FactionBaseBlock; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; -import net.minecraft.block.AbstractBlock; import net.minecraft.block.Block; import net.minecraft.block.Blocks; import net.minecraft.block.ExperienceDroppingBlock; @@ -20,5 +20,6 @@ public class BlockList { BlockManager.RegisterBlock("example_block_ore", new Block(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).sounds(BlockSoundGroup.AMETHYST_BLOCK).requiresTool().breakInstantly())); BlockManager.RegisterBlock("example_block", new ExperienceDroppingBlock(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).sounds(BlockSoundGroup.ANCIENT_DEBRIS).requiresTool(), UniformIntProvider.create(4, 20))); BlockManager.RegisterBlock("example_statue", new Block(FabricBlockSettings.copyOf(Blocks.BELL))); + BlockManager.RegisterBlock("faction_base_block", new FactionBaseBlock(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).nonOpaque())); } } diff --git a/src/main/java/jesse/keeblarcraft/CustomBlocks/Blocks/FactionBaseBlock.java b/src/main/java/jesse/keeblarcraft/CustomBlocks/Blocks/FactionBaseBlock.java new file mode 100644 index 0000000..b4f423d --- /dev/null +++ b/src/main/java/jesse/keeblarcraft/CustomBlocks/Blocks/FactionBaseBlock.java @@ -0,0 +1,77 @@ +package jesse.keeblarcraft.CustomBlocks.Blocks; + +import javax.swing.text.html.BlockView; + +import jesse.keeblarcraft.CustomBlocks.BlockEntities.BlockEntityRegistration; +import jesse.keeblarcraft.CustomBlocks.BlockEntities.FactionBlockEntity; +import net.minecraft.block.*; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.block.entity.BlockEntityTicker; +import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.screen.NamedScreenHandlerFactory; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.ItemScatterer; +import net.minecraft.util.hit.BlockHitResult; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.shape.VoxelShape; +import net.minecraft.world.World; + +public class FactionBaseBlock extends BlockWithEntity implements BlockEntityProvider { + // public static final VoxelShape SHAPE = Block.createCuboidShape(0, 0, 0, 16, 12, 16); + + public FactionBaseBlock(Settings settings) { + super(settings); + } + + // @Override + // protected VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { + // return SHAPE; + // } + + @Override + public BlockRenderType getRenderType(BlockState state) { + return BlockRenderType.MODEL; + } + + @Override + public BlockEntity createBlockEntity(BlockPos pos, BlockState state) { + return new FactionBlockEntity(pos, state); + } + + // If block is destroyed; drop inventory + @Override + public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) { + if (state.getBlock() != newState.getBlock()) { + BlockEntity blockEntity = world.getBlockEntity(pos); + if (blockEntity != null && blockEntity instanceof FactionBlockEntity) { + ItemScatterer.spawn(world, pos, (FactionBlockEntity) blockEntity); + world.updateComparators(pos, this); + } + super.onStateReplaced(state, world, pos, newState, moved); + } + } + + // Open the inventory + // Calls ScreenHandler inside createMenu of entity class + @Override + public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { + // Server side handling is different than that of client side handling; we MUST check if we are on a server first because then we must + // request information about this block entity from the server + if (!world.isClient()) { + NamedScreenHandlerFactory screenHandlerFactory = (FactionBlockEntity) world.getBlockEntity(pos); + + if (screenHandlerFactory != null) { + player.openHandledScreen(screenHandlerFactory); + } + } + return ActionResult.SUCCESS; + } + + @Override + public BlockEntityTicker getTicker(World world, BlockState state, BlockEntityType type) { + return validateTicker(type, BlockEntityRegistration.FACTION_BLOCK_ENTITY, + (world1, pos, state1, blockEntity) -> blockEntity.tick(world1, pos, state1)); + } +} diff --git a/src/main/java/jesse/keeblarcraft/FactionMgr/FactionManager.java b/src/main/java/jesse/keeblarcraft/FactionMgr/FactionManager.java index e46e4b7..dd1ccac 100644 --- a/src/main/java/jesse/keeblarcraft/FactionMgr/FactionManager.java +++ b/src/main/java/jesse/keeblarcraft/FactionMgr/FactionManager.java @@ -19,7 +19,7 @@ import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.text.Text; public class FactionManager { - private static String FACTION_CFG_FILE = "config/keeblarcraft/factions/factions.json"; + private static String FACTION_CFG_FILE = "factions/factions.json"; ConfigManager config = new ConfigManager(); private static FactionManager static_inst; diff --git a/src/main/java/jesse/keeblarcraft/GuiMgr/FactionBlockScreenHandler.java b/src/main/java/jesse/keeblarcraft/GuiMgr/FactionBlockScreenHandler.java new file mode 100644 index 0000000..29a5186 --- /dev/null +++ b/src/main/java/jesse/keeblarcraft/GuiMgr/FactionBlockScreenHandler.java @@ -0,0 +1,75 @@ +package jesse.keeblarcraft.GuiMgr; + +import jesse.keeblarcraft.CustomBlocks.BlockEntities.FactionBlockEntity; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.Inventory; +import net.minecraft.item.ItemStack; +import net.minecraft.network.PacketByteBuf; +import net.minecraft.screen.ArrayPropertyDelegate; +import net.minecraft.screen.PropertyDelegate; +import net.minecraft.screen.ScreenHandler; +import net.minecraft.screen.slot.Slot; + +public class FactionBlockScreenHandler extends ScreenHandler { + private final Inventory inventory; + private final PropertyDelegate propertyDelegate; + public final FactionBlockEntity blockEntity; + + public FactionBlockScreenHandler(int syncId, PlayerInventory inventory, PacketByteBuf buf) { + this(syncId, inventory, inventory.player.getWorld().getBlockEntity(buf.readBlockPos()), new ArrayPropertyDelegate(4)); + } + + public FactionBlockScreenHandler(int syncId, PlayerInventory playerInventory, BlockEntity blockEntity, PropertyDelegate arrayPropertyDelegate) { + super(ScreenHandlerRegistration.FACTION_BLOCK_SCREEN_HANDLER, syncId); + checkSize((Inventory) blockEntity, 4); + this.inventory = (Inventory) blockEntity; + inventory.onOpen(playerInventory.player); + this.propertyDelegate = arrayPropertyDelegate; + this.blockEntity = (FactionBlockEntity) blockEntity; + + // TODO: These positions need to be redrawn with an actual GUI + this.addSlot(new Slot(inventory, 0, 60, 11)); + this.addSlot(new Slot(inventory, 1, 70, 11)); + this.addSlot(new Slot(inventory, 2, 80, 11)); + this.addSlot(new Slot(inventory, 3, 90, 11)); + + // Need to reference Kaupendim tutorial again; but we could theoretically just add the player inventory + // right here so that they can drag items in and whatnot (I assume). I am unsure if I am taking that + // direction with this block RIGHT NOW - so for now I am NOT doing that + + // Remainder stuff + addProperties(arrayPropertyDelegate); + } + + // This is just for SHIFT+CLICK moving + @Override + public ItemStack quickMove(PlayerEntity player, int invSlot) { + ItemStack newStack = ItemStack.EMPTY; + Slot slot = this.slots.get(invSlot); + if (slot != null && slot.hasStack()) { + ItemStack originalStack = slot.getStack(); + newStack = originalStack.copy(); + + // TODO: This is from the YT video and it looks atrocious. Refactor this later + if ( (invSlot < this.inventory.size() && !this.insertItem(originalStack, this.inventory.size(), this.slots.size(), true) ) || + (!this.insertItem(originalStack, 0, this.inventory.size(), false))) { + return ItemStack.EMPTY; + } + + if (originalStack.isEmpty()) { + slot.setStack(ItemStack.EMPTY); + } else { + slot.markDirty();; + } + } + + return newStack; + } + + @Override + public boolean canUse(PlayerEntity player) { + return this.inventory.canPlayerUse(player); + } +} diff --git a/src/main/java/jesse/keeblarcraft/GuiMgr/ScreenHandlerRegistration.java b/src/main/java/jesse/keeblarcraft/GuiMgr/ScreenHandlerRegistration.java new file mode 100644 index 0000000..945e2ee --- /dev/null +++ b/src/main/java/jesse/keeblarcraft/GuiMgr/ScreenHandlerRegistration.java @@ -0,0 +1,18 @@ +package jesse.keeblarcraft.GuiMgr; + +import jesse.keeblarcraft.Keeblarcraft; +import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerType; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; +import net.minecraft.screen.ScreenHandlerType; +import net.minecraft.util.Identifier; + +public class ScreenHandlerRegistration { + public static final ScreenHandlerType FACTION_BLOCK_SCREEN_HANDLER = + Registry.register(Registries.SCREEN_HANDLER, new Identifier(Keeblarcraft.MOD_ID, "faction_block"), + new ExtendedScreenHandlerType<>(FactionBlockScreenHandler::new)); + + public static void registerScreenHandlers() { + Keeblarcraft.LOGGER.info("Registering screen handlers for " + Keeblarcraft.MOD_ID); + } +} diff --git a/src/main/java/jesse/keeblarcraft/Keeblarcraft.java b/src/main/java/jesse/keeblarcraft/Keeblarcraft.java index 5360ce4..fdb121a 100644 --- a/src/main/java/jesse/keeblarcraft/Keeblarcraft.java +++ b/src/main/java/jesse/keeblarcraft/Keeblarcraft.java @@ -41,12 +41,14 @@ import jesse.keeblarcraft.AttributeMgr.AttributeTree; import jesse.keeblarcraft.BankMgr.BankManager; import jesse.keeblarcraft.Commands.CustomCommandManager; import jesse.keeblarcraft.CustomBlocks.BlockList; +import jesse.keeblarcraft.CustomBlocks.BlockEntities.BlockEntityRegistration; // import jesse.keeblarcraft.CustomBlocks.BlockEntities.MagicChestBlockEntity; // import jesse.keeblarcraft.CustomBlocks.Blocks.MagicChestBlock; import jesse.keeblarcraft.CustomItems.ItemManager; import jesse.keeblarcraft.EventMgr.DimensionLoadingEvent; import jesse.keeblarcraft.EventMgr.PlayerJoinListener; import jesse.keeblarcraft.EventMgr.ServerTickListener; +import jesse.keeblarcraft.GuiMgr.ScreenHandlerRegistration; import jesse.keeblarcraft.GuiMgr.TreeHandler; import jesse.keeblarcraft.Utils.CustomExceptions.SETUP_FAILED_EXCEPTION; import jesse.keeblarcraft.Utils.ChatUtil; @@ -140,6 +142,7 @@ public class Keeblarcraft implements ModInitializer { // Register blocks BlockList.RegisterBlocks(); + BlockEntityRegistration.RegisterBlockEntities(); // World generation @@ -152,6 +155,9 @@ public class Keeblarcraft implements ModInitializer { .tintColor(234, 183, 8) .registerPortal(); + // Screen handlers + ScreenHandlerRegistration.registerScreenHandlers(); + } catch (SETUP_FAILED_EXCEPTION e) { System.out.println(ChatUtil.ColoredString("ERROR. Setup failed to initialize environment. Mod likely does not have read/write permissions inside area. Mod will now close out.", CONSOLE_COLOR.RED)); diff --git a/src/main/java/jesse/keeblarcraft/datagen/KeeblarModelProvider.java b/src/main/java/jesse/keeblarcraft/datagen/KeeblarModelProvider.java new file mode 100644 index 0000000..9200a53 --- /dev/null +++ b/src/main/java/jesse/keeblarcraft/datagen/KeeblarModelProvider.java @@ -0,0 +1,25 @@ +package jesse.keeblarcraft.datagen; + +import jesse.keeblarcraft.CustomBlocks.BlockManager; +import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; +import net.fabricmc.fabric.api.datagen.v1.provider.FabricModelProvider; +import net.minecraft.data.client.BlockStateModelGenerator; +import net.minecraft.data.client.ItemModelGenerator; + +public class KeeblarModelProvider extends FabricModelProvider { + + public KeeblarModelProvider(FabricDataOutput output) { + super(output); + } + + @Override + public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGenerator) { + blockStateModelGenerator.registerSimpleState(BlockManager.GetBlock("faction_base_block")); + } + + @Override + public void generateItemModels(ItemModelGenerator itemModelGenerator) { + + } + +} diff --git a/src/main/resources/assets/keeblarcraft/blockstates/faction_base_block.json b/src/main/resources/assets/keeblarcraft/blockstates/faction_base_block.json new file mode 100644 index 0000000..7231351 --- /dev/null +++ b/src/main/resources/assets/keeblarcraft/blockstates/faction_base_block.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "keeblarcraft:block/faction_base_block" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/keeblarcraft/lang/en_us.json b/src/main/resources/assets/keeblarcraft/lang/en_us.json index bbdf2ed..ddd3162 100644 --- a/src/main/resources/assets/keeblarcraft/lang/en_us.json +++ b/src/main/resources/assets/keeblarcraft/lang/en_us.json @@ -9,6 +9,7 @@ "block.keeblarcraft.example_block": "Keeblarcraft example block", "block.keeblarcraft.example_block_ore": "Keeblarcraft example block ore", "block.keeblarcraft.example_statue": "Keeblarcraft example statue", + "block.keeblarcraft.faction_base_block": "Factions Base Block", "category.keeblarcraft.test": "Keeblarcraft bindings", "key.keeblarcraft.treemap": "Tree GUI", diff --git a/src/main/resources/assets/keeblarcraft/models/block/faction_base_block.json b/src/main/resources/assets/keeblarcraft/models/block/faction_base_block.json new file mode 100644 index 0000000..02fed89 --- /dev/null +++ b/src/main/resources/assets/keeblarcraft/models/block/faction_base_block.json @@ -0,0 +1,232 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [64, 64], + "textures": { + "0": "keeblarcraft:block/faction_base_block", + "particle": "keeblarcraft:block/faction_base_block" + }, + "elements": [ + { + "from": [12, 0, 2], + "to": [14, 3, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 0, 2]}, + "faces": { + "north": {"uv": [2, 6, 2.5, 6.75], "texture": "#0"}, + "east": {"uv": [2.5, 2, 5.5, 2.75], "texture": "#0"}, + "south": {"uv": [6, 3.25, 6.5, 4], "texture": "#0"}, + "west": {"uv": [2.5, 2.75, 5.5, 3.5], "texture": "#0"}, + "up": {"uv": [3, 8, 2.5, 5], "texture": "#0"}, + "down": {"uv": [3.5, 5, 3, 8], "texture": "#0"} + } + }, + { + "from": [2, 0, 2], + "to": [4, 3, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [-8, 0, 2]}, + "faces": { + "north": {"uv": [5.75, 6, 6.25, 6.75], "texture": "#0"}, + "east": {"uv": [2.5, 3.5, 5.5, 4.25], "texture": "#0"}, + "south": {"uv": [0, 6.25, 0.5, 7], "texture": "#0"}, + "west": {"uv": [0, 4.25, 3, 5], "texture": "#0"}, + "up": {"uv": [4, 8, 3.5, 5], "texture": "#0"}, + "down": {"uv": [4.5, 5, 4, 8], "texture": "#0"} + } + }, + { + "from": [7, 0, 5], + "to": [9, 2, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [-3, 0, 3]}, + "faces": { + "north": {"uv": [1.5, 6.25, 2, 6.75], "texture": "#0"}, + "east": {"uv": [4.5, 5, 6, 5.5], "texture": "#0"}, + "south": {"uv": [6.25, 4.5, 6.75, 5], "texture": "#0"}, + "west": {"uv": [5.5, 2, 7, 2.5], "texture": "#0"}, + "up": {"uv": [6, 4, 5.5, 2.5], "texture": "#0"}, + "down": {"uv": [5, 5.5, 4.5, 7], "texture": "#0"} + } + }, + { + "from": [3, 5, 4], + "to": [13, 7, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 5, 7]}, + "faces": { + "north": {"uv": [5, 0, 7.5, 0.5], "texture": "#0"}, + "east": {"uv": [5, 1, 7, 1.5], "texture": "#0"}, + "south": {"uv": [5, 0.5, 7.5, 1], "texture": "#0"}, + "west": {"uv": [5, 1.5, 7, 2], "texture": "#0"}, + "up": {"uv": [2.5, 2, 0, 0], "texture": "#0"}, + "down": {"uv": [2.5, 2, 0, 4], "texture": "#0"} + } + }, + { + "from": [3, 1, 4], + "to": [13, 5, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 5]}, + "faces": { + "north": {"uv": [2.5, 0, 5, 1], "texture": "#0"}, + "east": {"uv": [5.5, 4, 6.25, 5], "texture": "#0"}, + "south": {"uv": [2.5, 1, 5, 2], "texture": "#0"}, + "west": {"uv": [5, 5.5, 5.75, 6.5], "texture": "#0"}, + "up": {"uv": [5.5, 5, 3, 4.25], "texture": "#0"}, + "down": {"uv": [2.5, 5, 0, 5.75], "texture": "#0"} + } + }, + { + "from": [3, 7, 4], + "to": [13, 8, 5], + "rotation": {"angle": 0, "axis": "y", "origin": [5, 7, 3]}, + "faces": { + "north": {"uv": [0, 4, 2.5, 4.25], "texture": "#0"}, + "east": {"uv": [2, 7.25, 2.25, 7.5], "texture": "#0"}, + "south": {"uv": [0, 5.75, 2.5, 6], "texture": "#0"}, + "west": {"uv": [2.25, 7.25, 2.5, 7.5], "texture": "#0"}, + "up": {"uv": [8.25, 5.75, 5.75, 5.5], "texture": "#0"}, + "down": {"uv": [8.25, 5.75, 5.75, 6], "texture": "#0"} + } + }, + { + "from": [3.001, 6.999, 4.001], + "to": [4.001, 7.999, 9.001], + "rotation": {"angle": 0, "axis": "y", "origin": [5, 7, 6]}, + "faces": { + "north": {"uv": [4.5, 7.25, 4.75, 7.5], "texture": "#0"}, + "east": {"uv": [6, 5, 7.25, 5.25], "texture": "#0"}, + "south": {"uv": [7.25, 4.5, 7.5, 4.75], "texture": "#0"}, + "west": {"uv": [6, 5.25, 7.25, 5.5], "texture": "#0"}, + "up": {"uv": [0.75, 7.5, 0.5, 6.25], "texture": "#0"}, + "down": {"uv": [1, 6.25, 0.75, 7.5], "texture": "#0"} + } + }, + { + "from": [11.99, 6.999, 4.001], + "to": [12.99, 7.999, 9.001], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 7, 6]}, + "faces": { + "north": {"uv": [4.75, 7.25, 5, 7.5], "texture": "#0"}, + "east": {"uv": [6.25, 4, 7.5, 4.25], "texture": "#0"}, + "south": {"uv": [7.25, 4.75, 7.5, 5], "texture": "#0"}, + "west": {"uv": [6.25, 4.25, 7.5, 4.5], "texture": "#0"}, + "up": {"uv": [1.25, 7.5, 1, 6.25], "texture": "#0"}, + "down": {"uv": [1.5, 6.25, 1.25, 7.5], "texture": "#0"} + } + }, + { + "from": [5, 7, 6], + "to": [7, 8, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 7, 5]}, + "faces": { + "north": {"uv": [6.5, 3.75, 7, 4], "texture": "#0"}, + "east": {"uv": [6.75, 6, 7.25, 6.25], "texture": "#0"}, + "south": {"uv": [6.75, 6.25, 7.25, 6.5], "texture": "#0"}, + "west": {"uv": [6.75, 6.5, 7.25, 6.75], "texture": "#0"}, + "up": {"uv": [6.75, 6.5, 6.25, 6], "texture": "#0"}, + "down": {"uv": [7, 3.25, 6.5, 3.75], "texture": "#0"} + } + }, + { + "from": [9, 7, 6], + "to": [11, 8, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [11, 7, 5]}, + "faces": { + "north": {"uv": [6.75, 6.75, 7.25, 7], "texture": "#0"}, + "east": {"uv": [0, 7, 0.5, 7.25], "texture": "#0"}, + "south": {"uv": [7, 1, 7.5, 1.25], "texture": "#0"}, + "west": {"uv": [7, 1.25, 7.5, 1.5], "texture": "#0"}, + "up": {"uv": [5.5, 7, 5, 6.5], "texture": "#0"}, + "down": {"uv": [6.75, 6.5, 6.25, 7], "texture": "#0"} + } + }, + { + "from": [9, 7, 9], + "to": [11, 8, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [11, 7, 8]}, + "faces": { + "north": {"uv": [7, 1.5, 7.5, 1.75], "texture": "#0"}, + "east": {"uv": [7, 1.75, 7.5, 2], "texture": "#0"}, + "south": {"uv": [7, 2, 7.5, 2.25], "texture": "#0"}, + "west": {"uv": [7, 2.25, 7.5, 2.5], "texture": "#0"}, + "up": {"uv": [2, 7.25, 1.5, 6.75], "texture": "#0"}, + "down": {"uv": [2.5, 6.75, 2, 7.25], "texture": "#0"} + } + }, + { + "from": [5, 7, 9], + "to": [7, 8, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 7, 8]}, + "faces": { + "north": {"uv": [7, 3.25, 7.5, 3.5], "texture": "#0"}, + "east": {"uv": [7, 3.5, 7.5, 3.75], "texture": "#0"}, + "south": {"uv": [7, 3.75, 7.5, 4], "texture": "#0"}, + "west": {"uv": [4.5, 7, 5, 7.25], "texture": "#0"}, + "up": {"uv": [7.25, 5, 6.75, 4.5], "texture": "#0"}, + "down": {"uv": [6, 6.75, 5.5, 7.25], "texture": "#0"} + } + }, + { + "from": [11, 7, 2], + "to": [12, 8, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 6, 2]}, + "faces": { + "north": {"uv": [5, 7.25, 5.25, 7.5], "texture": "#0"}, + "east": {"uv": [5, 7, 5.5, 7.25], "texture": "#0"}, + "south": {"uv": [7.25, 5, 7.5, 5.25], "texture": "#0"}, + "west": {"uv": [6, 7, 6.5, 7.25], "texture": "#0"}, + "up": {"uv": [6.75, 7.5, 6.5, 7], "texture": "#0"}, + "down": {"uv": [7, 7, 6.75, 7.5], "texture": "#0"} + } + }, + { + "from": [4, 7, 2], + "to": [5, 8, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [3, 6, 2]}, + "faces": { + "north": {"uv": [5.25, 7.25, 5.5, 7.5], "texture": "#0"}, + "east": {"uv": [7, 7, 7.5, 7.25], "texture": "#0"}, + "south": {"uv": [7.25, 5.25, 7.5, 5.5], "texture": "#0"}, + "west": {"uv": [0, 7.25, 0.5, 7.5], "texture": "#0"}, + "up": {"uv": [1.75, 7.75, 1.5, 7.25], "texture": "#0"}, + "down": {"uv": [2, 7.25, 1.75, 7.75], "texture": "#0"} + } + }, + { + "from": [4, 7, 1], + "to": [12, 8, 2], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 6, 0]}, + "faces": { + "north": {"uv": [0, 6, 2, 6.25], "texture": "#0"}, + "east": {"uv": [5.5, 6.5, 5.75, 6.75], "texture": "#0"}, + "south": {"uv": [6, 2.5, 8, 2.75], "texture": "#0"}, + "west": {"uv": [6, 6.75, 6.25, 7], "texture": "#0"}, + "up": {"uv": [8, 3, 6, 2.75], "texture": "#0"}, + "down": {"uv": [8, 3, 6, 3.25], "texture": "#0"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [-138.53, -0.13, 178.31], + "translation": [-0.25, 2.75, -2.5], + "scale": [0.77734, 0.5625, 0.76172] + }, + "thirdperson_lefthand": { + "rotation": [-173.23, 0.42, -179.8], + "translation": [0.25, 0, -3.5], + "scale": [0.60156, 0.42188, 0.58984] + }, + "gui": { + "rotation": [44.5, 31.22, -19.39], + "translation": [1.75, 3, 0], + "scale": [0.88281, 0.87109, 1.02539] + }, + "head": { + "rotation": [180, 0.5, 180], + "translation": [0, 10, 0], + "scale": [1.94141, 1.45703, 2.06641] + }, + "fixed": { + "rotation": [90, 40, -180], + "translation": [0, 0, -7], + "scale": [1.17188, 1, 1] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/keeblarcraft/models/item/faction_base_block.json b/src/main/resources/assets/keeblarcraft/models/item/faction_base_block.json new file mode 100644 index 0000000..1fd0a2a --- /dev/null +++ b/src/main/resources/assets/keeblarcraft/models/item/faction_base_block.json @@ -0,0 +1,3 @@ +{ + "parent": "keeblarcraft:block/faction_base_block" +} \ No newline at end of file diff --git a/src/main/resources/assets/keeblarcraft/textures/block/faction_base_block.png b/src/main/resources/assets/keeblarcraft/textures/block/faction_base_block.png new file mode 100644 index 0000000000000000000000000000000000000000..cd8de0119375f87bff82339046effca1f13e8850 GIT binary patch literal 361 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D%zl|5Y?Ln`LH zz2V5$tRT>um{HZdu2=l!$GskhZy9gV7It;R56~BUa<6<+-J53Tc-TBj05rVP2ryHiTha3y}HU&&a2^DQr~;Y zaR>K;CC?=n{Lsz&S;>o$Mjm2mAp zYs+GWEn)X&{mA{05t^MGX?F09xc@p7um{HZdu2=l!$GskhZy9gV7It;R56~BUa<6<+-J53Tc-TBj05rVP2ryHiTha3y}HU&&a2^DQr~;Y zaR>K;CC?=n{Lsz&S;>o$Mjm2mAp zYs+GWEn)X&{mA{05t^MGX?F09xc@p7