mirror of
https://github.com/lukasabbe/bookshelf-inspector.git
synced 2026-04-30 10:40:53 +00:00
a few more lol
This commit is contained in:
@@ -16,12 +16,21 @@ import java.util.Map;
|
||||
* Config class, defines config values.
|
||||
*/
|
||||
public class Config {
|
||||
/**
|
||||
* If lectern's inspection is turned on!
|
||||
*/
|
||||
public boolean lecternToggle = true;
|
||||
/**
|
||||
* In game size for text
|
||||
*/
|
||||
public int scale = 10;
|
||||
/**
|
||||
* If enchantments should use roman numerals or normal numbers
|
||||
*/
|
||||
public boolean useRoman = false;
|
||||
|
||||
/**
|
||||
* Loads the config file in to mod
|
||||
* Loads the config into memory
|
||||
*/
|
||||
public void loadConfig(){
|
||||
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
|
||||
*/
|
||||
public class BookData {
|
||||
/**
|
||||
* Item in that slot
|
||||
*/
|
||||
public ItemStack itemStack;
|
||||
/**
|
||||
* Block position for bookshelf
|
||||
*/
|
||||
public BlockPos pos;
|
||||
/**
|
||||
* Slot were the item is located in
|
||||
*/
|
||||
public int slotId;
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,11 +3,23 @@ package com.lukasabbe.bookshelfinspector.data;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
/**
|
||||
* Data for bookshelf
|
||||
* Data for mod
|
||||
*/
|
||||
public class BookShelfData {
|
||||
/**
|
||||
* If mod should display text on the screen.
|
||||
*/
|
||||
public boolean isCurrentBookDataToggled = false;
|
||||
/**
|
||||
* latest position of bookshelf, used for reducing requests to server
|
||||
*/
|
||||
public BlockPos latestPos = null;
|
||||
/**
|
||||
* If a request has been sent, used to limit request to one at a time.
|
||||
*/
|
||||
public boolean requestSent = false;
|
||||
/**
|
||||
* Last spot in bookshelf, used to limit requests.
|
||||
*/
|
||||
public int currentSlotInt = -1;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,12 @@ import net.minecraft.world.level.block.Block;
|
||||
* Tags for blocks used in the mod
|
||||
*/
|
||||
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"));
|
||||
/**
|
||||
* 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"));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.lukasabbe.bookshelfinspector.mixin;
|
||||
|
||||
import com.lukasabbe.bookshelfinspector.Constants;
|
||||
import com.lukasabbe.bookshelfinspector.renderer.Inspector;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.player.LocalPlayer;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.lukasabbe.bookshelfinspector.mixin;
|
||||
|
||||
import com.lukasabbe.bookshelfinspector.Constants;
|
||||
import com.lukasabbe.bookshelfinspector.renderer.HudRenderer;
|
||||
import net.minecraft.client.DeltaTracker;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
Reference in New Issue
Block a user