a few more lol

This commit is contained in:
lukasabbe
2025-10-02 19:41:48 +02:00
parent bfcea904ee
commit edfa2c65b3
6 changed files with 38 additions and 4 deletions
@@ -16,12 +16,21 @@ import java.util.Map;
* Config class, defines config values. * Config class, defines config values.
*/ */
public class Config { public class Config {
/**
* If lectern's inspection is turned on!
*/
public boolean lecternToggle = true; public boolean lecternToggle = true;
/**
* In game size for text
*/
public int scale = 10; public int scale = 10;
/**
* If enchantments should use roman numerals or normal numbers
*/
public boolean useRoman = false; public boolean useRoman = false;
/** /**
* Loads the config file in to mod * Loads the config into memory
*/ */
public void loadConfig(){ public void loadConfig(){
Path configPath = Services.PLATFORM.getConfigPath("bookshelfinspector-config.yml"); Path configPath = Services.PLATFORM.getConfigPath("bookshelfinspector-config.yml");
@@ -7,8 +7,17 @@ import net.minecraft.world.item.ItemStack;
* Data for a slot in a chiseled bookshelf * Data for a slot in a chiseled bookshelf
*/ */
public class BookData { public class BookData {
/**
* Item in that slot
*/
public ItemStack itemStack; public ItemStack itemStack;
/**
* Block position for bookshelf
*/
public BlockPos pos; public BlockPos pos;
/**
* Slot were the item is located in
*/
public int slotId; public int slotId;
/** /**
@@ -3,11 +3,23 @@ package com.lukasabbe.bookshelfinspector.data;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
/** /**
* Data for bookshelf * Data for mod
*/ */
public class BookShelfData { public class BookShelfData {
/**
* If mod should display text on the screen.
*/
public boolean isCurrentBookDataToggled = false; public boolean isCurrentBookDataToggled = false;
/**
* latest position of bookshelf, used for reducing requests to server
*/
public BlockPos latestPos = null; public BlockPos latestPos = null;
/**
* If a request has been sent, used to limit request to one at a time.
*/
public boolean requestSent = false; public boolean requestSent = false;
/**
* Last spot in bookshelf, used to limit requests.
*/
public int currentSlotInt = -1; public int currentSlotInt = -1;
} }
@@ -9,6 +9,12 @@ import net.minecraft.world.level.block.Block;
* Tags for blocks used in the mod * Tags for blocks used in the mod
*/ */
public class Tags { public class Tags {
/**
* Tag for chiseled bookshelves using the common tag, so inspection can work for modded bookshelf's
*/
public static final TagKey<Block> CHISELED_BOOKSHELVES = TagKey.create(Registries.BLOCK, ResourceLocation.fromNamespaceAndPath("c", "chiseled_bookshelves")); public static final TagKey<Block> CHISELED_BOOKSHELVES = TagKey.create(Registries.BLOCK, ResourceLocation.fromNamespaceAndPath("c", "chiseled_bookshelves"));
/**
* Tag for lecterns using the common tag, so inspection can work for modded lectern's
*/
public static final TagKey<Block> LECTERNS = TagKey.create(Registries.BLOCK, ResourceLocation.fromNamespaceAndPath("c", "lectern")); public static final TagKey<Block> LECTERNS = TagKey.create(Registries.BLOCK, ResourceLocation.fromNamespaceAndPath("c", "lectern"));
} }
@@ -1,6 +1,5 @@
package com.lukasabbe.bookshelfinspector.mixin; package com.lukasabbe.bookshelfinspector.mixin;
import com.lukasabbe.bookshelfinspector.Constants;
import com.lukasabbe.bookshelfinspector.renderer.Inspector; import com.lukasabbe.bookshelfinspector.renderer.Inspector;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.player.LocalPlayer; import net.minecraft.client.player.LocalPlayer;
@@ -1,6 +1,5 @@
package com.lukasabbe.bookshelfinspector.mixin; package com.lukasabbe.bookshelfinspector.mixin;
import com.lukasabbe.bookshelfinspector.Constants;
import com.lukasabbe.bookshelfinspector.renderer.HudRenderer; import com.lukasabbe.bookshelfinspector.renderer.HudRenderer;
import net.minecraft.client.DeltaTracker; import net.minecraft.client.DeltaTracker;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;