1.3.6.1
Adds in item scrubber Fixes vault item highlight issue with new vault GUI Begin adding some functions from Tinkers Construct, as well as assets. Add a nether resource dimension
26
Roadmap.txt
|
@ -1,21 +1,7 @@
|
||||||
Eternium Ore [done]
|
Liquids
|
||||||
Eternium Fragment [done]
|
* Liquified Soul Energy
|
||||||
Eternium Dust [partial] [ smelt fragment into dust. 1x. crush/grind = 4x ]
|
* Liquified Experience
|
||||||
Ihan Crystal [partially] [XP is stored or retrieved. But is used by the mod as a charge. Eternium Dust will be used in the center]
|
|
||||||
Aurora Block [done/partial] [blasting > 4x dust]
|
|
||||||
Aurora Door [done]
|
|
||||||
Aurora Pressure Plate [not done]
|
|
||||||
Reinforced Auroran Compound [not done]
|
|
||||||
Aurora Portal Frame [not done] [stonecutting -> portal frame] [2 slots. 1 for eyes of ender, other reverse side for charged ihan crystals. portal verical. portal uses nether portal logic.]
|
|
||||||
|
|
||||||
* Dimension contents up in air
|
|
||||||
* Dimension will be timelocked, changes do not persist, and the world reverts itself after a period of time.
|
Super Furnace
|
||||||
* Natural structures within the fractured dimension can be a refinery which can refine materials you mine in the realm
|
* Melts materials into liquids. This is how to obtain the OTEMod liquids.
|
||||||
* Minerals not refined in the eternium dimension have a property where they will be destroyed from inventory if removed from dimension, and cannot be used in a normal crafting recipe.
|
|
||||||
* Dimension water acts like a fountain of youth
|
|
||||||
* As everything happening in the dimension canonically is happening all at once, the dimension will have a unique feature where server chat will not function
|
|
||||||
The player may also encounter other explorers, but they will be very glitched, their actions will make little sense, if they are mining, they may vanish into the ground like a ghost
|
|
||||||
The player cannot stay there too long as the ihan crystal charges will eventually run out
|
|
||||||
* Mekanism plugin machine: Skulk Extractor
|
|
||||||
This machine will rip skulk blocks apart atom by atom to get every last drop of XP stored within and can charge a crystal, or convert it into a single use ihan crystal with a lesser charge.
|
|
||||||
* Adventure system with unique villager NPC that gives quests. This could be within the Eternium Dimension, or it could be from village to village. Rewards not yet determined.
|
|
|
@ -3,9 +3,11 @@
|
||||||
org.gradle.jvmargs=-Xmx8G
|
org.gradle.jvmargs=-Xmx8G
|
||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
|
|
||||||
my_version=1.3.5.6
|
my_version=1.3.6.1
|
||||||
|
|
||||||
mc_version=1.19.2
|
mc_version=1.19.2
|
||||||
forge_version=43.2.3
|
forge_version=43.2.3
|
||||||
libz_version=1.0.2.4
|
libz_version=1.0.2.4
|
||||||
|
parchment_version=2022.11.27
|
||||||
|
jei_version=11.5.0.297
|
||||||
# luckperms_version=5.4
|
# luckperms_version=5.4
|
|
@ -40,6 +40,7 @@ import org.slf4j.Logger;
|
||||||
import dev.zontreck.libzontreck.chat.ChatColor;
|
import dev.zontreck.libzontreck.chat.ChatColor;
|
||||||
import dev.zontreck.libzontreck.vectors.Vector3;
|
import dev.zontreck.libzontreck.vectors.Vector3;
|
||||||
import dev.zontreck.otemod.blocks.ModBlocks;
|
import dev.zontreck.otemod.blocks.ModBlocks;
|
||||||
|
import dev.zontreck.otemod.blocks.entity.ModEntities;
|
||||||
import dev.zontreck.otemod.chat.ChatServerOverride;
|
import dev.zontreck.otemod.chat.ChatServerOverride;
|
||||||
import dev.zontreck.otemod.commands.CommandRegistry;
|
import dev.zontreck.otemod.commands.CommandRegistry;
|
||||||
import dev.zontreck.otemod.commands.teleport.TeleportContainer;
|
import dev.zontreck.otemod.commands.teleport.TeleportContainer;
|
||||||
|
@ -48,9 +49,10 @@ import dev.zontreck.otemod.configs.Profile;
|
||||||
import dev.zontreck.otemod.database.Database;
|
import dev.zontreck.otemod.database.Database;
|
||||||
import dev.zontreck.otemod.database.Database.DatabaseConnectionException;
|
import dev.zontreck.otemod.database.Database.DatabaseConnectionException;
|
||||||
import dev.zontreck.otemod.events.EventHandler;
|
import dev.zontreck.otemod.events.EventHandler;
|
||||||
import dev.zontreck.otemod.implementation.VaultScreen;
|
import dev.zontreck.otemod.implementation.inits.ModMenuTypes;
|
||||||
import dev.zontreck.otemod.implementation.VaultWatcher;
|
import dev.zontreck.otemod.implementation.scrubber.ScrubberScreen;
|
||||||
import dev.zontreck.otemod.implementation.inits.MenuInitializer;
|
import dev.zontreck.otemod.implementation.vault.VaultScreen;
|
||||||
|
import dev.zontreck.otemod.implementation.vault.VaultWatcher;
|
||||||
import dev.zontreck.otemod.items.ModItems;
|
import dev.zontreck.otemod.items.ModItems;
|
||||||
import dev.zontreck.otemod.ore.Modifier.ModifierOfBiomes;
|
import dev.zontreck.otemod.ore.Modifier.ModifierOfBiomes;
|
||||||
|
|
||||||
|
@ -106,10 +108,12 @@ public class OTEMod
|
||||||
MinecraftForge.EVENT_BUS.register(new CommandRegistry());
|
MinecraftForge.EVENT_BUS.register(new CommandRegistry());
|
||||||
MinecraftForge.EVENT_BUS.register(new VaultWatcher());
|
MinecraftForge.EVENT_BUS.register(new VaultWatcher());
|
||||||
MinecraftForge.EVENT_BUS.register(new dev.zontreck.otemod.zschem.EventHandler());
|
MinecraftForge.EVENT_BUS.register(new dev.zontreck.otemod.zschem.EventHandler());
|
||||||
MenuInitializer.CONTAINERS.register(bus);
|
ModMenuTypes.CONTAINERS.register(bus);
|
||||||
|
|
||||||
ModBlocks.register(bus);
|
ModBlocks.register(bus);
|
||||||
ModItems.register(bus);
|
ModItems.register(bus);
|
||||||
|
ModEntities.register(bus);
|
||||||
|
//MenuInitializer.register(bus);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setup(final FMLCommonSetupEvent event)
|
private void setup(final FMLCommonSetupEvent event)
|
||||||
|
@ -279,7 +283,8 @@ public class OTEMod
|
||||||
//LOGGER.info("HELLO FROM CLIENT SETUP");
|
//LOGGER.info("HELLO FROM CLIENT SETUP");
|
||||||
//LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName());
|
//LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName());
|
||||||
|
|
||||||
MenuScreens.register(MenuInitializer.VAULT.get(), VaultScreen::new);
|
MenuScreens.register(ModMenuTypes.VAULT.get(), VaultScreen::new);
|
||||||
|
MenuScreens.register(ModMenuTypes.SCRUBBER.get(), ScrubberScreen::new);
|
||||||
|
|
||||||
//ItemBlockRenderTypes.setRenderLayer(ModBlocks.AURORA_DOOR.get(), RenderType.translucent());
|
//ItemBlockRenderTypes.setRenderLayer(ModBlocks.AURORA_DOOR.get(), RenderType.translucent());
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,86 @@
|
||||||
|
package dev.zontreck.otemod.blocks;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import dev.zontreck.otemod.blocks.entity.ItemScrubberBlockEntity;
|
||||||
|
import dev.zontreck.otemod.blocks.entity.ModEntities;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
|
import net.minecraft.world.InteractionHand;
|
||||||
|
import net.minecraft.world.InteractionResult;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.minecraft.world.level.block.BaseEntityBlock;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||||
|
import net.minecraft.world.level.block.RenderShape;
|
||||||
|
import net.minecraft.world.level.block.Rotation;
|
||||||
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.world.level.block.entity.BlockEntityTicker;
|
||||||
|
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
|
import net.minecraft.world.level.block.state.properties.DirectionProperty;
|
||||||
|
import net.minecraft.world.phys.BlockHitResult;
|
||||||
|
import net.minecraftforge.network.NetworkHooks;
|
||||||
|
|
||||||
|
public class ItemScrubberBlock extends BaseEntityBlock
|
||||||
|
{
|
||||||
|
|
||||||
|
public ItemScrubberBlock(Properties p_54120_) {
|
||||||
|
super(p_54120_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RenderShape getRenderShape(BlockState state)
|
||||||
|
{
|
||||||
|
return RenderShape.MODEL;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRemove(BlockState state, Level lvl, BlockPos pos, BlockState newState, boolean isMoving)
|
||||||
|
{
|
||||||
|
if(state.getBlock()!=newState.getBlock())
|
||||||
|
{
|
||||||
|
BlockEntity bE = lvl.getBlockEntity(pos);
|
||||||
|
if(bE instanceof ItemScrubberBlockEntity)
|
||||||
|
{
|
||||||
|
((ItemScrubberBlockEntity)bE).doDrop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
super.onRemove(state, lvl, pos, newState, isMoving);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InteractionResult use(BlockState state, Level lvl, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit)
|
||||||
|
{
|
||||||
|
if(!lvl.isClientSide())
|
||||||
|
{
|
||||||
|
BlockEntity be = lvl.getBlockEntity(pos);
|
||||||
|
if(be instanceof ItemScrubberBlockEntity)
|
||||||
|
{
|
||||||
|
NetworkHooks.openScreen(((ServerPlayer)player), (ItemScrubberBlockEntity)be, pos);
|
||||||
|
}else{
|
||||||
|
throw new IllegalStateException("Our container is missing!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return InteractionResult.sidedSuccess(lvl.isClientSide);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Nullable
|
||||||
|
public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
|
||||||
|
return new ItemScrubberBlockEntity(pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level lvl, BlockState state, BlockEntityType<T> type)
|
||||||
|
{
|
||||||
|
return createTickerHelper(type, ModEntities.ITEM_SCRUBBER.get(), ItemScrubberBlockEntity::tick);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,15 +1,22 @@
|
||||||
package dev.zontreck.otemod.blocks;
|
package dev.zontreck.otemod.blocks;
|
||||||
|
|
||||||
import dev.zontreck.otemod.OTEMod;
|
import dev.zontreck.otemod.OTEMod;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.sounds.SoundEvents;
|
||||||
import net.minecraft.world.item.BlockItem;
|
import net.minecraft.world.item.BlockItem;
|
||||||
import net.minecraft.world.item.CreativeModeTab;
|
import net.minecraft.world.item.CreativeModeTab;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraft.world.level.BlockGetter;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.Blocks;
|
import net.minecraft.world.level.block.Blocks;
|
||||||
import net.minecraft.world.level.block.DoorBlock;
|
import net.minecraft.world.level.block.DoorBlock;
|
||||||
|
import net.minecraft.world.level.block.IronBarsBlock;
|
||||||
import net.minecraft.world.level.block.SoundType;
|
import net.minecraft.world.level.block.SoundType;
|
||||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||||
|
import net.minecraft.world.level.block.state.BlockBehaviour.StatePredicate;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.material.Material;
|
import net.minecraft.world.level.material.Material;
|
||||||
|
import net.minecraft.world.level.material.MaterialColor;
|
||||||
import net.minecraftforge.eventbus.api.IEventBus;
|
import net.minecraftforge.eventbus.api.IEventBus;
|
||||||
import net.minecraftforge.registries.DeferredRegister;
|
import net.minecraftforge.registries.DeferredRegister;
|
||||||
import net.minecraftforge.registries.ForgeRegistries;
|
import net.minecraftforge.registries.ForgeRegistries;
|
||||||
|
@ -25,10 +32,42 @@ public class ModBlocks {
|
||||||
OTEMod.LOGGER.info("Registering all blocks...");
|
OTEMod.LOGGER.info("Registering all blocks...");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final RegistryObject<Block> ETERNIUM_ORE_BLOCK = BLOCKS.register("eternium_ore_block", () -> new Block(BlockBehaviour.Properties.of(Material.METAL).requiresCorrectToolForDrops().strength(4f).explosionResistance(1200).destroyTime(6)));
|
public static final RegistryObject<Block> ETERNIUM_ORE_BLOCK = BLOCKS.register("eternium_ore_block", () -> new Block(BlockBehaviour.Properties.of(Material.METAL).requiresCorrectToolForDrops().strength(7F).explosionResistance(1200).destroyTime(6)));
|
||||||
|
|
||||||
public static final RegistryObject<Item> ETERNIUM_ORE_BLOCK_I = ITEMS.register("eternium_ore_block", () -> new BlockItem(ETERNIUM_ORE_BLOCK.get(), new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
|
public static final RegistryObject<Item> ETERNIUM_ORE_BLOCK_I = ITEMS.register("eternium_ore_block", () -> new BlockItem(ETERNIUM_ORE_BLOCK.get(), new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
|
||||||
|
|
||||||
|
//#region TINKERS BLOCKS
|
||||||
|
|
||||||
|
public static final RegistryObject<Block> COBALT_ORE_BLOCK = BLOCKS.register("cobalt_ore", () -> new Block(BlockBehaviour.Properties.of(Material.STONE, MaterialColor.NETHER).sound(SoundType.NETHER_ORE).requiresCorrectToolForDrops().strength(10.0F)));
|
||||||
|
|
||||||
|
public static final RegistryObject<Item> COBALT_ORE_ITEM = ITEMS.register("cobalt_ore", ()->new BlockItem(COBALT_ORE_BLOCK.get(), new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)));
|
||||||
|
|
||||||
|
public static final RegistryObject<Block> RAW_COBALT_ORE_BLOCK = BLOCKS.register("raw_cobalt_ore", () -> new Block(BlockBehaviour.Properties.of(Material.STONE, MaterialColor.COLOR_BLUE).sound(SoundType.NETHER_ORE).requiresCorrectToolForDrops().strength(6.0F, 7.0F)));
|
||||||
|
|
||||||
|
public static final RegistryObject<Item> RAW_COBALT_ORE_ITEM = ITEMS.register("raw_cobalt_ore", ()->new BlockItem(RAW_COBALT_ORE_BLOCK.get(), new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)));
|
||||||
|
|
||||||
|
public static final RegistryObject<Block> GOLD_BARS = BLOCKS.register("gold_bars", ()-> new IronBarsBlock(BlockBehaviour.Properties.of(Material.METAL, MaterialColor.NONE).requiresCorrectToolForDrops().strength(3.0F, 6.0F).sound(SoundType.METAL).noOcclusion()));
|
||||||
|
|
||||||
|
public static final RegistryObject<Item> GOLD_BARS_I = ITEMS.register("gold_bars", ()-> new BlockItem(GOLD_BARS.get(), new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)));
|
||||||
|
|
||||||
|
public static final RegistryObject<Block> COBALT_BLOCK = BLOCKS.register("cobalt_block", ()-> new Block(BlockBehaviour.Properties.of(Material.METAL, MaterialColor.COLOR_BLUE).requiresCorrectToolForDrops().strength(3.0F, 6.0F).sound(SoundType.METAL)));
|
||||||
|
|
||||||
|
public static final RegistryObject<Item> COBALT_BLOCK_I = ITEMS.register("cobalt_block", ()-> new BlockItem(COBALT_BLOCK.get(), new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)));
|
||||||
|
|
||||||
|
public static final RegistryObject<Block> NETHER_GROUT = BLOCKS.register("nether_grout", ()-> new Block(BlockBehaviour.Properties.of(Material.SAND, MaterialColor.NONE).strength(3.0F).friction(0.8F).sound(SoundType.SOUL_SOIL)));
|
||||||
|
|
||||||
|
public static final RegistryObject<Item> NETHER_GROUT_I = ITEMS.register("nether_grout", ()-> new BlockItem(NETHER_GROUT.get(), new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)));
|
||||||
|
|
||||||
|
public static final BlockBehaviour.Properties SCORCHED_BASE = BlockBehaviour.Properties.of(Material.STONE, MaterialColor.TERRACOTTA_BROWN).requiresCorrectToolForDrops().strength(2.5F, 8.0F);
|
||||||
|
public static final BlockBehaviour.Properties SCORCHED_BASE_NONSOLID = SCORCHED_BASE.noOcclusion();
|
||||||
|
|
||||||
|
public static final RegistryObject<Block> SCORCHED_TABLE = BLOCKS.register("scorched_table", ()-> new Block(SCORCHED_BASE_NONSOLID));
|
||||||
|
|
||||||
|
public static final RegistryObject<Item> SCORCHED_TABLE_I = ITEMS.register("scorched_table", ()-> new BlockItem(SCORCHED_TABLE.get(), new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)));
|
||||||
|
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
|
||||||
public static final RegistryObject<Block> DEEPSLATE_ETERNIUM_ORE_BLOCK = BLOCKS.register("deepslate_eternium_ore_block", () -> new Block(BlockBehaviour.Properties.of(Material.METAL).requiresCorrectToolForDrops().strength(5f).explosionResistance(1200).destroyTime(7)));
|
public static final RegistryObject<Block> DEEPSLATE_ETERNIUM_ORE_BLOCK = BLOCKS.register("deepslate_eternium_ore_block", () -> new Block(BlockBehaviour.Properties.of(Material.METAL).requiresCorrectToolForDrops().strength(5f).explosionResistance(1200).destroyTime(7)));
|
||||||
|
|
||||||
public static final RegistryObject<Item> DEEPSLATE_ETERNIUM_ORE_BLOCK_I = ITEMS.register("deepslate_eternium_ore_block", () -> new BlockItem(DEEPSLATE_ETERNIUM_ORE_BLOCK.get(), new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
|
public static final RegistryObject<Item> DEEPSLATE_ETERNIUM_ORE_BLOCK_I = ITEMS.register("deepslate_eternium_ore_block", () -> new BlockItem(DEEPSLATE_ETERNIUM_ORE_BLOCK.get(), new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
|
||||||
|
@ -43,8 +82,18 @@ public class ModBlocks {
|
||||||
public static final RegistryObject<Item> AURORA_DOOR_I = ITEMS.register("aurora_door", () -> new BlockItem(AURORA_DOOR.get(), new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
|
public static final RegistryObject<Item> AURORA_DOOR_I = ITEMS.register("aurora_door", () -> new BlockItem(AURORA_DOOR.get(), new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
|
||||||
|
|
||||||
|
|
||||||
public static final RegistryObject<Block> CLEAR_GLASS_BLOCK = BLOCKS.register("clear_glass_block", () -> new Block(BlockBehaviour.Properties.copy(Blocks.GLASS).strength(1f).destroyTime(6)));
|
public static final RegistryObject<Block> CLEAR_GLASS_BLOCK = BLOCKS.register("clear_glass_block", () -> new Block(BlockBehaviour.Properties.copy(Blocks.GLASS).strength(1f).destroyTime(6).noOcclusion().isViewBlocking(ModBlocks::never)));
|
||||||
|
|
||||||
public static final RegistryObject<Item> CLEAR_GLASS_BLOCK_I = ITEMS.register("clear_glass_block", () -> new BlockItem(CLEAR_GLASS_BLOCK.get(), new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
|
public static final RegistryObject<Item> CLEAR_GLASS_BLOCK_I = ITEMS.register("clear_glass_block", () -> new BlockItem(CLEAR_GLASS_BLOCK.get(), new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
|
||||||
|
|
||||||
|
|
||||||
|
public static final RegistryObject<Block> ITEM_SCRUBBER = BLOCKS.register("item_scrubber", ()->new ItemScrubberBlock(BlockBehaviour.Properties.copy(ModBlocks.AURORA_BLOCK.get()).noOcclusion().isViewBlocking(ModBlocks::never)));
|
||||||
|
|
||||||
|
public static final RegistryObject<Item> ITEM_SCRUBBER_I = ITEMS.register("item_scrubber", ()->new BlockItem(ITEM_SCRUBBER.get(), new Item.Properties().tab(CreativeModeTab.TAB_REDSTONE)));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private static boolean never(BlockState p_50806_, BlockGetter p_50807_, BlockPos p_50808_) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,247 @@
|
||||||
|
package dev.zontreck.otemod.blocks.entity;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import dev.zontreck.otemod.implementation.OutputItemStackHandler;
|
||||||
|
import dev.zontreck.otemod.implementation.scrubber.ScrubberMenu;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
|
import net.minecraft.world.Containers;
|
||||||
|
import net.minecraft.world.MenuProvider;
|
||||||
|
import net.minecraft.world.SimpleContainer;
|
||||||
|
import net.minecraft.world.entity.player.Inventory;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||||
|
import net.minecraft.world.inventory.ContainerData;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.Items;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import net.minecraftforge.common.capabilities.Capability;
|
||||||
|
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||||
|
import net.minecraftforge.common.util.LazyOptional;
|
||||||
|
import net.minecraftforge.items.IItemHandler;
|
||||||
|
import net.minecraftforge.items.ItemStackHandler;
|
||||||
|
|
||||||
|
public class ItemScrubberBlockEntity extends BlockEntity implements MenuProvider
|
||||||
|
{
|
||||||
|
|
||||||
|
protected final ItemStackHandler itemsHandler = new ItemStackHandler(1){
|
||||||
|
@Override
|
||||||
|
protected void onContentsChanged(int slot)
|
||||||
|
{
|
||||||
|
setChanged();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
protected final ItemStackHandler outputItems = new ItemStackHandler(1){
|
||||||
|
@Override
|
||||||
|
protected void onContentsChanged(int slot)
|
||||||
|
{
|
||||||
|
setChanged();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
private ItemStackHandler outputSlot;
|
||||||
|
|
||||||
|
private LazyOptional<IItemHandler> lazyItemHandler = LazyOptional.empty();
|
||||||
|
private LazyOptional<IItemHandler> lazyOutputItems = LazyOptional.empty();
|
||||||
|
|
||||||
|
public ItemScrubberBlockEntity(BlockPos pos, BlockState state) {
|
||||||
|
super(ModEntities.ITEM_SCRUBBER.get(), pos, state);
|
||||||
|
outputSlot = new OutputItemStackHandler(outputItems);
|
||||||
|
|
||||||
|
this.data = new ContainerData() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int get(int p_39284_) {
|
||||||
|
return switch(p_39284_){
|
||||||
|
case 0 -> ItemScrubberBlockEntity.this.progress;
|
||||||
|
default -> 0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void set(int p_39285_, int p_39286_) {
|
||||||
|
switch(p_39285_)
|
||||||
|
{
|
||||||
|
case 0 -> ItemScrubberBlockEntity.this.progress = p_39286_;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected final ContainerData data;
|
||||||
|
private int progress = 0;
|
||||||
|
|
||||||
|
public static final int MAXIMUM_PROCESSING_TICKS = 750;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Nullable
|
||||||
|
public AbstractContainerMenu createMenu(int id, Inventory inv, Player player) {
|
||||||
|
return new ScrubberMenu(id, inv, this, this.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Component getDisplayName() {
|
||||||
|
return Component.translatable("block.otemod.item_scrubber");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side)
|
||||||
|
{
|
||||||
|
if(side == Direction.DOWN && cap == ForgeCapabilities.ITEM_HANDLER)
|
||||||
|
{
|
||||||
|
// Return the output slot only
|
||||||
|
return lazyOutputItems.cast();
|
||||||
|
}
|
||||||
|
if(cap == ForgeCapabilities.ITEM_HANDLER)
|
||||||
|
{
|
||||||
|
return lazyItemHandler.cast();
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.getCapability(cap,side);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoad()
|
||||||
|
{
|
||||||
|
super.onLoad();
|
||||||
|
lazyItemHandler = LazyOptional.of(()->itemsHandler);
|
||||||
|
lazyOutputItems = LazyOptional.of(()->outputSlot);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void invalidateCaps()
|
||||||
|
{
|
||||||
|
super.invalidateCaps();
|
||||||
|
lazyItemHandler.invalidate();
|
||||||
|
lazyOutputItems.invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void saveAdditional(CompoundTag nbt)
|
||||||
|
{
|
||||||
|
nbt.put("inventory", itemsHandler.serializeNBT());
|
||||||
|
nbt.put("output", outputItems.serializeNBT());
|
||||||
|
nbt.putInt("prog", progress);
|
||||||
|
|
||||||
|
super.saveAdditional(nbt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void load(CompoundTag nbt){
|
||||||
|
super.load(nbt);
|
||||||
|
|
||||||
|
itemsHandler.deserializeNBT(nbt.getCompound("inventory"));
|
||||||
|
outputItems.deserializeNBT(nbt.getCompound("output"));
|
||||||
|
progress = nbt.getInt("prog");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void doDrop()
|
||||||
|
{
|
||||||
|
SimpleContainer cont = new SimpleContainer(itemsHandler.getSlots());
|
||||||
|
for (int i = 0; i < itemsHandler.getSlots(); i++) {
|
||||||
|
cont.setItem(i, itemsHandler.getStackInSlot(i));
|
||||||
|
}
|
||||||
|
cont = new SimpleContainer(outputItems.getSlots());
|
||||||
|
for (int i = 0; i < outputItems.getSlots(); i++) {
|
||||||
|
cont.setItem(i, outputItems.getStackInSlot(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
Containers.dropContents(this.level, this.worldPosition, cont);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void tick(Level lvl, BlockPos pos, BlockState state, ItemScrubberBlockEntity entity)
|
||||||
|
{
|
||||||
|
if(lvl.isClientSide())return;
|
||||||
|
|
||||||
|
if(hasRecipe(entity))
|
||||||
|
{
|
||||||
|
entity.progress++;
|
||||||
|
setChanged(lvl, pos, state);
|
||||||
|
|
||||||
|
if(entity.progress >= ItemScrubberBlockEntity.MAXIMUM_PROCESSING_TICKS)
|
||||||
|
{
|
||||||
|
craftItem(entity);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if(entity.progress>0){
|
||||||
|
entity.resetProgress();
|
||||||
|
setChanged(lvl, pos, state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void craftItem(ItemScrubberBlockEntity entity) {
|
||||||
|
if(hasRecipe(entity))
|
||||||
|
{
|
||||||
|
ItemStack existing = entity.outputItems.getStackInSlot(0);
|
||||||
|
existing.setCount(existing.getCount()+1);
|
||||||
|
if(existing.is(Items.AIR))
|
||||||
|
{
|
||||||
|
existing = makeOutputItem(entity.itemsHandler.getStackInSlot(0));
|
||||||
|
}
|
||||||
|
entity.itemsHandler.extractItem(0, 1, false);
|
||||||
|
entity.outputItems.setStackInSlot(0, existing);
|
||||||
|
|
||||||
|
entity.resetProgress();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean hasRecipe(ItemScrubberBlockEntity entity) {
|
||||||
|
SimpleContainer inventory = new SimpleContainer(entity.itemsHandler.getSlots());
|
||||||
|
for(int i=0;i<entity.itemsHandler.getSlots();i++)
|
||||||
|
{
|
||||||
|
inventory.setItem(i, entity.itemsHandler.getStackInSlot(i));
|
||||||
|
}
|
||||||
|
SimpleContainer output = new SimpleContainer(entity.outputItems.getSlots());
|
||||||
|
for(int i=0;i<entity.outputItems.getSlots();i++)
|
||||||
|
{
|
||||||
|
output.setItem(i, entity.outputItems.getStackInSlot(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
boolean hasAnItem = !entity.itemsHandler.getStackInSlot(0).isEmpty();
|
||||||
|
|
||||||
|
ItemStack result = null;
|
||||||
|
if(hasAnItem)
|
||||||
|
{
|
||||||
|
result = makeOutputItem(entity.itemsHandler.getStackInSlot(0));
|
||||||
|
|
||||||
|
}
|
||||||
|
return hasAnItem && canInsertIntoOutput(output, result);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean canInsertIntoOutput(SimpleContainer inventory, ItemStack result) {
|
||||||
|
ItemStack existing = inventory.getItem(0);
|
||||||
|
boolean stackCompat = (existing.getMaxStackSize() > existing.getCount());
|
||||||
|
boolean sameType = (existing.getItem() == result.getItem());
|
||||||
|
boolean outputEmpty = existing.isEmpty();
|
||||||
|
|
||||||
|
if(outputEmpty)return true;
|
||||||
|
return (stackCompat && sameType);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void resetProgress() {
|
||||||
|
progress=0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static ItemStack makeOutputItem(ItemStack original)
|
||||||
|
{
|
||||||
|
ItemStack newItem = new ItemStack(original.getItem(),1);
|
||||||
|
return newItem;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package dev.zontreck.otemod.blocks.entity;
|
||||||
|
|
||||||
|
import dev.zontreck.otemod.OTEMod;
|
||||||
|
import dev.zontreck.otemod.blocks.ModBlocks;
|
||||||
|
import dev.zontreck.otemod.implementation.vault.VaultMenu;
|
||||||
|
import net.minecraft.world.inventory.MenuType;
|
||||||
|
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||||
|
import net.minecraftforge.eventbus.api.IEventBus;
|
||||||
|
import net.minecraftforge.registries.DeferredRegister;
|
||||||
|
import net.minecraftforge.registries.ForgeRegistries;
|
||||||
|
import net.minecraftforge.registries.RegistryObject;
|
||||||
|
|
||||||
|
public class ModEntities {
|
||||||
|
|
||||||
|
public static final DeferredRegister<BlockEntityType<?>> ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, OTEMod.MOD_ID);
|
||||||
|
|
||||||
|
public static final RegistryObject <BlockEntityType <ItemScrubberBlockEntity>> ITEM_SCRUBBER = ENTITIES.register("item_scrubber", ()-> BlockEntityType.Builder.of(ItemScrubberBlockEntity::new, ModBlocks.ITEM_SCRUBBER.get()).build(null));
|
||||||
|
|
||||||
|
|
||||||
|
public static void register(IEventBus eventBus)
|
||||||
|
{
|
||||||
|
ENTITIES.register(eventBus);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
package dev.zontreck.otemod.blocks.types;
|
||||||
|
|
||||||
|
import java.util.EnumMap;
|
||||||
|
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.core.Direction.Plane;
|
||||||
|
import net.minecraft.world.level.block.IronBarsBlock;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||||
|
|
||||||
|
/** Pane block with sensible culling */
|
||||||
|
public class AlternatePaneBlock extends IronBarsBlock {
|
||||||
|
public static final EnumMap<Direction,BooleanProperty> DIRECTIONS;
|
||||||
|
static {
|
||||||
|
DIRECTIONS = new EnumMap<>(Direction.class);
|
||||||
|
DIRECTIONS.put(Direction.NORTH, NORTH);
|
||||||
|
DIRECTIONS.put(Direction.EAST, EAST);
|
||||||
|
DIRECTIONS.put(Direction.SOUTH, SOUTH);
|
||||||
|
DIRECTIONS.put(Direction.WEST, WEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AlternatePaneBlock(Properties builder) {
|
||||||
|
super(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean skipRendering(BlockState state, BlockState adjacentBlockState, Direction side) {
|
||||||
|
// cull top and bottom if all props that we have are contained in the above or below
|
||||||
|
if (adjacentBlockState.getBlock() == this && side.getAxis().isVertical()) {
|
||||||
|
for (Direction dir : Plane.HORIZONTAL) {
|
||||||
|
BooleanProperty prop = DIRECTIONS.get(dir);
|
||||||
|
if (state.getValue(prop) && !adjacentBlockState.getValue(prop)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return super.skipRendering(state, adjacentBlockState, side);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package dev.zontreck.otemod.commands.vaults;
|
||||||
|
|
||||||
import com.mojang.brigadier.CommandDispatcher;
|
import com.mojang.brigadier.CommandDispatcher;
|
||||||
|
|
||||||
import dev.zontreck.otemod.implementation.VaultContainer;
|
import dev.zontreck.otemod.implementation.vault.VaultContainer;
|
||||||
import net.minecraft.commands.CommandSourceStack;
|
import net.minecraft.commands.CommandSourceStack;
|
||||||
import net.minecraft.commands.Commands;
|
import net.minecraft.commands.Commands;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
|
|
|
@ -3,7 +3,7 @@ package dev.zontreck.otemod.commands.vaults;
|
||||||
import com.mojang.brigadier.CommandDispatcher;
|
import com.mojang.brigadier.CommandDispatcher;
|
||||||
import com.mojang.brigadier.arguments.IntegerArgumentType;
|
import com.mojang.brigadier.arguments.IntegerArgumentType;
|
||||||
|
|
||||||
import dev.zontreck.otemod.implementation.VaultContainer;
|
import dev.zontreck.otemod.implementation.vault.VaultContainer;
|
||||||
import net.minecraft.commands.CommandSourceStack;
|
import net.minecraft.commands.CommandSourceStack;
|
||||||
import net.minecraft.commands.Commands;
|
import net.minecraft.commands.Commands;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package dev.zontreck.otemod.commands.zschem;
|
package dev.zontreck.otemod.commands.zschem;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.mojang.brigadier.CommandDispatcher;
|
import com.mojang.brigadier.CommandDispatcher;
|
||||||
|
@ -50,6 +51,7 @@ public class Place {
|
||||||
|
|
||||||
Container cont = MemoryHolder.getContainer(play);
|
Container cont = MemoryHolder.getContainer(play);
|
||||||
List<StoredBlock> blocks = cont.blocks;
|
List<StoredBlock> blocks = cont.blocks;
|
||||||
|
Collections.shuffle(blocks);
|
||||||
|
|
||||||
if(cont.Pos1 != OTEMod.ZERO_VECTOR)
|
if(cont.Pos1 != OTEMod.ZERO_VECTOR)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package dev.zontreck.otemod.commands.zschem;
|
package dev.zontreck.otemod.commands.zschem;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -58,7 +59,9 @@ public class PlaceAsAir {
|
||||||
WorldProp system = WorldProp.acquire(cont.lvl);
|
WorldProp system = WorldProp.acquire(cont.lvl);
|
||||||
// Begin the process
|
// Begin the process
|
||||||
List<Vector3> positions = cont.Pos1.makeCube(cont.Pos2);
|
List<Vector3> positions = cont.Pos1.makeCube(cont.Pos2);
|
||||||
|
Collections.shuffle(positions);
|
||||||
Iterator<Vector3> v3 = positions.iterator();
|
Iterator<Vector3> v3 = positions.iterator();
|
||||||
|
|
||||||
while(v3.hasNext())
|
while(v3.hasNext())
|
||||||
{
|
{
|
||||||
Vector3 pos = v3.next();
|
Vector3 pos = v3.next();
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
package dev.zontreck.otemod.implementation;
|
||||||
|
|
||||||
|
import net.minecraft.core.NonNullList;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraftforge.items.ItemStackHandler;
|
||||||
|
|
||||||
|
public class OutputItemStackHandler extends ItemStackHandler {
|
||||||
|
private final ItemStackHandler internalSlot;
|
||||||
|
|
||||||
|
public OutputItemStackHandler(ItemStackHandler hidden) {
|
||||||
|
super();
|
||||||
|
internalSlot = hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setSize(int size) {
|
||||||
|
stacks = NonNullList.<ItemStack>withSize(size, ItemStack.EMPTY);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setStackInSlot(int slot, ItemStack stack) {
|
||||||
|
internalSlot.setStackInSlot(slot, stack);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getSlots() {
|
||||||
|
return internalSlot.getSlots();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack getStackInSlot(int slot) {
|
||||||
|
return internalSlot.getStackInSlot(slot);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) {
|
||||||
|
return stack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack extractItem(int slot, int amount, boolean simulate) {
|
||||||
|
return internalSlot.extractItem(slot, amount, simulate);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,114 +0,0 @@
|
||||||
package dev.zontreck.otemod.implementation;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import dev.zontreck.otemod.implementation.inits.MenuInitializer;
|
|
||||||
import net.minecraft.core.BlockPos;
|
|
||||||
import net.minecraft.world.entity.player.Inventory;
|
|
||||||
import net.minecraft.world.entity.player.Player;
|
|
||||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
|
||||||
import net.minecraft.world.inventory.MenuConstructor;
|
|
||||||
import net.minecraft.world.inventory.Slot;
|
|
||||||
import net.minecraft.world.item.ItemStack;
|
|
||||||
import net.minecraftforge.items.IItemHandler;
|
|
||||||
import net.minecraftforge.items.ItemStackHandler;
|
|
||||||
import net.minecraftforge.items.SlotItemHandler;
|
|
||||||
|
|
||||||
public class VaultMenu extends AbstractContainerMenu
|
|
||||||
{
|
|
||||||
//private final ContainerLevelAccess containerAccess;
|
|
||||||
public final UUID VaultMenuID;
|
|
||||||
|
|
||||||
public VaultMenu (int id, Inventory player)
|
|
||||||
{
|
|
||||||
this(id, player, new ItemStackHandler(54), BlockPos.ZERO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public VaultMenu (int id, Inventory player, IItemHandler slots, BlockPos pos)
|
|
||||||
{
|
|
||||||
super(MenuInitializer.VAULT.get(), id);
|
|
||||||
VaultMenuID=UUID.randomUUID();
|
|
||||||
//this.containerAccess = ContainerLevelAccess.create(player.player.level, pos);
|
|
||||||
|
|
||||||
final int slotSize = 16;
|
|
||||||
final int startX = 17;
|
|
||||||
final int startY = 133;
|
|
||||||
final int hotbarY = 184;
|
|
||||||
final int inventoryY = 26;
|
|
||||||
|
|
||||||
for (int row = 0; row < 6; row++)
|
|
||||||
{
|
|
||||||
for (int column = 0; column < 9; column++)
|
|
||||||
{
|
|
||||||
addSlot(new SlotItemHandler(slots, row*9 + column, startX+column * slotSize , inventoryY + row * slotSize));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int row=0;row<3;row++)
|
|
||||||
{
|
|
||||||
for(int col = 0; col< 9; col++)
|
|
||||||
{
|
|
||||||
addSlot(new Slot(player, 9+row * 9 + col, startX + col * slotSize, startY + row * slotSize));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(int col = 0; col<9; col++)
|
|
||||||
{
|
|
||||||
addSlot(new Slot(player, col, startX + col * slotSize, hotbarY));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ItemStack quickMoveStack(Player play, int index) {
|
|
||||||
ItemStack ret = ItemStack.EMPTY;
|
|
||||||
final Slot slot = getSlot(index);
|
|
||||||
boolean moveStack = false;
|
|
||||||
if(slot.hasItem()){
|
|
||||||
final ItemStack item = slot.getItem();
|
|
||||||
ret = item.copy();
|
|
||||||
|
|
||||||
if(index<54)
|
|
||||||
{
|
|
||||||
moveStack=moveItemStackTo(item, 54, this.slots.size(), true);
|
|
||||||
if(!moveStack) return ItemStack.EMPTY;
|
|
||||||
}else {
|
|
||||||
moveStack = moveItemStackTo(item, 0, 54, false);
|
|
||||||
|
|
||||||
if(!moveStack)return ItemStack.EMPTY;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(item.isEmpty()){
|
|
||||||
slot.set(ItemStack.EMPTY);
|
|
||||||
}else slot.setChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean stillValid(Player p_38874_) {
|
|
||||||
return true; // We have no block
|
|
||||||
}
|
|
||||||
|
|
||||||
public static MenuConstructor getServerMenu (ItemStackHandler inventory){
|
|
||||||
return (id, player, play) -> new VaultMenu(id, player, inventory, BlockPos.ZERO);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void doCommitAction()
|
|
||||||
{
|
|
||||||
|
|
||||||
// Locate the Vault in the Vault Registry and commit changes.
|
|
||||||
// Search for myself!
|
|
||||||
for(Map.Entry<UUID,VaultContainer> e : VaultContainer.VAULT_REGISTRY.entrySet())
|
|
||||||
{
|
|
||||||
if(e.getValue().VaultID.equals(VaultMenuID))
|
|
||||||
{
|
|
||||||
e.getValue().commit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
package dev.zontreck.otemod.implementation.inits;
|
|
||||||
|
|
||||||
import dev.zontreck.otemod.OTEMod;
|
|
||||||
import dev.zontreck.otemod.implementation.VaultMenu;
|
|
||||||
import net.minecraft.world.inventory.MenuType;
|
|
||||||
import net.minecraftforge.registries.DeferredRegister;
|
|
||||||
import net.minecraftforge.registries.ForgeRegistries;
|
|
||||||
import net.minecraftforge.registries.RegistryObject;
|
|
||||||
|
|
||||||
public final class MenuInitializer
|
|
||||||
{
|
|
||||||
public static final DeferredRegister<MenuType<?>> CONTAINERS = DeferredRegister.create(ForgeRegistries.MENU_TYPES, OTEMod.MOD_ID);
|
|
||||||
|
|
||||||
public static final RegistryObject <MenuType <VaultMenu>> VAULT = CONTAINERS.register("vault", ()-> new MenuType<>(VaultMenu::new));
|
|
||||||
|
|
||||||
|
|
||||||
private MenuInitializer(){}
|
|
||||||
}
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
package dev.zontreck.otemod.implementation.inits;
|
||||||
|
|
||||||
|
import dev.zontreck.otemod.OTEMod;
|
||||||
|
import dev.zontreck.otemod.implementation.scrubber.ScrubberMenu;
|
||||||
|
import dev.zontreck.otemod.implementation.vault.VaultMenu;
|
||||||
|
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||||
|
import net.minecraft.world.inventory.MenuType;
|
||||||
|
import net.minecraftforge.common.extensions.IForgeMenuType;
|
||||||
|
import net.minecraftforge.eventbus.api.IEventBus;
|
||||||
|
import net.minecraftforge.network.IContainerFactory;
|
||||||
|
import net.minecraftforge.registries.DeferredRegister;
|
||||||
|
import net.minecraftforge.registries.ForgeRegistries;
|
||||||
|
import net.minecraftforge.registries.RegistryObject;
|
||||||
|
|
||||||
|
public final class ModMenuTypes
|
||||||
|
{
|
||||||
|
public static final DeferredRegister<MenuType<?>> CONTAINERS = DeferredRegister.create(ForgeRegistries.MENU_TYPES, OTEMod.MOD_ID);
|
||||||
|
|
||||||
|
public static final RegistryObject <MenuType <VaultMenu>> VAULT = CONTAINERS.register("vault", ()-> new MenuType<>(VaultMenu::new));
|
||||||
|
|
||||||
|
public static final RegistryObject<MenuType<ScrubberMenu>> SCRUBBER = registerMenuType(ScrubberMenu::new, "item_scrubber_menu");
|
||||||
|
|
||||||
|
|
||||||
|
private static <T extends AbstractContainerMenu> RegistryObject<MenuType<T>> registerMenuType(IContainerFactory<T> factory, String name)
|
||||||
|
{
|
||||||
|
return CONTAINERS.register(name, ()->IForgeMenuType.create(factory));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void register(IEventBus bus)
|
||||||
|
{
|
||||||
|
CONTAINERS.register(bus);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,154 @@
|
||||||
|
package dev.zontreck.otemod.implementation.scrubber;
|
||||||
|
|
||||||
|
import dev.zontreck.otemod.blocks.ModBlocks;
|
||||||
|
import dev.zontreck.otemod.blocks.entity.ItemScrubberBlockEntity;
|
||||||
|
import dev.zontreck.otemod.implementation.inits.ModMenuTypes;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.network.FriendlyByteBuf;
|
||||||
|
import net.minecraft.world.entity.player.Inventory;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||||
|
import net.minecraft.world.inventory.ContainerData;
|
||||||
|
import net.minecraft.world.inventory.ContainerLevelAccess;
|
||||||
|
import net.minecraft.world.inventory.SimpleContainerData;
|
||||||
|
import net.minecraft.world.inventory.Slot;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
|
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||||
|
import net.minecraftforge.items.SlotItemHandler;
|
||||||
|
|
||||||
|
public class ScrubberMenu extends AbstractContainerMenu
|
||||||
|
{
|
||||||
|
public final ItemScrubberBlockEntity entity;
|
||||||
|
private final Level level;
|
||||||
|
private final ContainerData data;
|
||||||
|
|
||||||
|
public ScrubberMenu(int id, Inventory inv, FriendlyByteBuf buf)
|
||||||
|
{
|
||||||
|
this(id, inv, inv.player.level.getBlockEntity(buf.readBlockPos()), new SimpleContainerData(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScrubberMenu(int id, Inventory inv, BlockEntity entity, ContainerData data){
|
||||||
|
super(ModMenuTypes.SCRUBBER.get(), id);
|
||||||
|
|
||||||
|
checkContainerSize(inv, 1);
|
||||||
|
this.entity = (ItemScrubberBlockEntity)entity;
|
||||||
|
this.data=data;
|
||||||
|
this.level = inv.player.level;
|
||||||
|
|
||||||
|
addPlayerInventory(inv);
|
||||||
|
addPlayerHotbar(inv);
|
||||||
|
|
||||||
|
this.entity.getCapability(ForgeCapabilities.ITEM_HANDLER, Direction.UP).ifPresent(handler->{
|
||||||
|
addSlot(new SlotItemHandler(handler, 0, 16, 41));
|
||||||
|
});
|
||||||
|
this.entity.getCapability(ForgeCapabilities.ITEM_HANDLER, Direction.DOWN).ifPresent(handler->{
|
||||||
|
addSlot(new SlotItemHandler(handler, 0, 177, 41));
|
||||||
|
});
|
||||||
|
|
||||||
|
addDataSlots(data);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isCrafting()
|
||||||
|
{
|
||||||
|
return data.get(0) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getScaledProgress()
|
||||||
|
{
|
||||||
|
if(!isCrafting())return 0;
|
||||||
|
int progress = this.data.get(0);
|
||||||
|
int max = ItemScrubberBlockEntity.MAXIMUM_PROCESSING_TICKS;
|
||||||
|
|
||||||
|
int progressArrow = 125;
|
||||||
|
|
||||||
|
|
||||||
|
if(progress != 0 && max != 0)
|
||||||
|
{
|
||||||
|
int percent = progress * progressArrow / max;
|
||||||
|
return percent;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// CREDIT GOES TO: diesieben07 | https://github.com/diesieben07/SevenCommons
|
||||||
|
// must assign a slot number to each of the slots used by the GUI.
|
||||||
|
// For this container, we can see both the tile inventory's slots as well as the player inventory slots and the hotbar.
|
||||||
|
// Each time we add a Slot to the container, it automatically increases the slotIndex, which means
|
||||||
|
// 0 - 8 = hotbar slots (which will map to the InventoryPlayer slot numbers 0 - 8)
|
||||||
|
// 9 - 35 = player inventory slots (which map to the InventoryPlayer slot numbers 9 - 35)
|
||||||
|
// 36 - 44 = TileInventory slots, which map to our TileEntity slot numbers 0 - 8)
|
||||||
|
private static final int HOTBAR_SLOT_COUNT = 9;
|
||||||
|
private static final int PLAYER_INVENTORY_ROW_COUNT = 3;
|
||||||
|
private static final int PLAYER_INVENTORY_COLUMN_COUNT = 9;
|
||||||
|
private static final int PLAYER_INVENTORY_SLOT_COUNT = PLAYER_INVENTORY_COLUMN_COUNT * PLAYER_INVENTORY_ROW_COUNT;
|
||||||
|
private static final int VANILLA_SLOT_COUNT = HOTBAR_SLOT_COUNT + PLAYER_INVENTORY_SLOT_COUNT;
|
||||||
|
private static final int VANILLA_FIRST_SLOT_INDEX = 0;
|
||||||
|
private static final int TE_INVENTORY_FIRST_SLOT_INDEX = VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT;
|
||||||
|
|
||||||
|
// THIS YOU HAVE TO DEFINE!
|
||||||
|
private static final int TE_INVENTORY_SLOT_COUNT = 2; // must be the number of slots you have!
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack quickMoveStack(Player playerIn, int index) {
|
||||||
|
Slot sourceSlot = slots.get(index);
|
||||||
|
if (sourceSlot == null || !sourceSlot.hasItem()) return ItemStack.EMPTY; //EMPTY_ITEM
|
||||||
|
ItemStack sourceStack = sourceSlot.getItem();
|
||||||
|
ItemStack copyOfSourceStack = sourceStack.copy();
|
||||||
|
|
||||||
|
// Check if the slot clicked is one of the vanilla container slots
|
||||||
|
if (index < VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT) {
|
||||||
|
// This is a vanilla container slot so merge the stack into the tile inventory
|
||||||
|
if (!moveItemStackTo(sourceStack, TE_INVENTORY_FIRST_SLOT_INDEX, TE_INVENTORY_FIRST_SLOT_INDEX
|
||||||
|
+ TE_INVENTORY_SLOT_COUNT, false)) {
|
||||||
|
return ItemStack.EMPTY; // EMPTY_ITEM
|
||||||
|
}
|
||||||
|
} else if (index < TE_INVENTORY_FIRST_SLOT_INDEX + TE_INVENTORY_SLOT_COUNT) {
|
||||||
|
// This is a TE slot so merge the stack into the players inventory
|
||||||
|
if (!moveItemStackTo(sourceStack, VANILLA_FIRST_SLOT_INDEX, VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT, false)) {
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
System.out.println("Invalid slotIndex:" + index);
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
// If stack size == 0 (the entire stack was moved) set slot contents to null
|
||||||
|
if (sourceStack.getCount() == 0) {
|
||||||
|
sourceSlot.set(ItemStack.EMPTY);
|
||||||
|
} else {
|
||||||
|
sourceSlot.setChanged();
|
||||||
|
}
|
||||||
|
sourceSlot.onTake(playerIn, sourceStack);
|
||||||
|
return copyOfSourceStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean stillValid(Player player) {
|
||||||
|
return stillValid(ContainerLevelAccess.create(level, entity.getBlockPos()), player, ModBlocks.ITEM_SCRUBBER.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final int PLAYER_INVENTORY_FIRST_SLOT_HEIGHT = 69;
|
||||||
|
private static final int PLAYER_INVENTORY_FIRST_SLOT_LEFT = 24;
|
||||||
|
private static final int PLAYER_HOTBAR_FIRST_SLOT = 125;
|
||||||
|
|
||||||
|
private void addPlayerInventory(Inventory inv)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
for (int j = 0; j < 9; j++) {
|
||||||
|
this.addSlot(new Slot(inv, j+i*9+9, PLAYER_INVENTORY_FIRST_SLOT_LEFT+j*18, PLAYER_INVENTORY_FIRST_SLOT_HEIGHT+i*18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addPlayerHotbar(Inventory inv)
|
||||||
|
{
|
||||||
|
for (int index = 0; index < 9; index++) {
|
||||||
|
this.addSlot(new Slot(inv, index, PLAYER_INVENTORY_FIRST_SLOT_LEFT+index*18, PLAYER_HOTBAR_FIRST_SLOT));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,70 @@
|
||||||
|
package dev.zontreck.otemod.implementation.scrubber;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
|
|
||||||
|
import dev.zontreck.otemod.OTEMod;
|
||||||
|
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
|
||||||
|
import net.minecraft.client.renderer.GameRenderer;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.entity.player.Inventory;
|
||||||
|
|
||||||
|
public class ScrubberScreen extends AbstractContainerScreen<ScrubberMenu>
|
||||||
|
{
|
||||||
|
private static final ResourceLocation TEXTURE = new ResourceLocation(OTEMod.MOD_ID, "textures/gui/item_scrubber_gui.png");
|
||||||
|
|
||||||
|
public ScrubberScreen(ScrubberMenu p_97741_, Inventory p_97742_, Component p_97743_) {
|
||||||
|
super(p_97741_, p_97742_, p_97743_);
|
||||||
|
|
||||||
|
|
||||||
|
this.topPos=0;
|
||||||
|
this.leftPos=0;
|
||||||
|
|
||||||
|
this.imageWidth = 207;
|
||||||
|
this.imageHeight = 164;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void init()
|
||||||
|
{
|
||||||
|
super.init();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void renderBg(PoseStack poseStack, float partialTick, int mouseX, int mouseY) {
|
||||||
|
RenderSystem.setShader(GameRenderer::getPositionTexShader);
|
||||||
|
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
RenderSystem.setShaderTexture(0, TEXTURE);
|
||||||
|
|
||||||
|
|
||||||
|
blit(poseStack, this.leftPos, this.topPos, 0,0, imageWidth, imageHeight);
|
||||||
|
renderUncraftingProgress(poseStack);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void renderLabels(PoseStack stack, int mouseX, int mouseY)
|
||||||
|
{
|
||||||
|
this.font.draw(stack, this.title.getString(), 63, 12, 0xFFFFFF);
|
||||||
|
|
||||||
|
//this.font.draw(stack, this.playerInventoryTitle.getString(), this.leftPos + 17, this.topPos + 123, 0xFFFFFF);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void renderUncraftingProgress(PoseStack stack)
|
||||||
|
{
|
||||||
|
if(menu.isCrafting())
|
||||||
|
{
|
||||||
|
blit(stack, leftPos+42, topPos+45, 1, 168, menu.getScaledProgress(),6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void render(PoseStack stack, int mouseX, int mouseY, float delta)
|
||||||
|
{
|
||||||
|
renderBackground(stack);
|
||||||
|
super.render(stack, mouseX, mouseY, delta);
|
||||||
|
renderTooltip(stack, mouseX, mouseY);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.zontreck.otemod.implementation;
|
package dev.zontreck.otemod.implementation.vault;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
|
@ -0,0 +1,147 @@
|
||||||
|
package dev.zontreck.otemod.implementation.vault;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import dev.zontreck.otemod.implementation.inits.ModMenuTypes;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.world.entity.player.Inventory;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||||
|
import net.minecraft.world.inventory.MenuConstructor;
|
||||||
|
import net.minecraft.world.inventory.Slot;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraftforge.items.IItemHandler;
|
||||||
|
import net.minecraftforge.items.ItemStackHandler;
|
||||||
|
import net.minecraftforge.items.SlotItemHandler;
|
||||||
|
|
||||||
|
public class VaultMenu extends AbstractContainerMenu
|
||||||
|
{
|
||||||
|
//private final ContainerLevelAccess containerAccess;
|
||||||
|
public final UUID VaultMenuID;
|
||||||
|
|
||||||
|
public VaultMenu (int id, Inventory player)
|
||||||
|
{
|
||||||
|
this(id, player, new ItemStackHandler(54), BlockPos.ZERO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public VaultMenu (int id, Inventory player, IItemHandler slots, BlockPos pos)
|
||||||
|
{
|
||||||
|
super(ModMenuTypes.VAULT.get(), id);
|
||||||
|
VaultMenuID=UUID.randomUUID();
|
||||||
|
//this.containerAccess = ContainerLevelAccess.create(player.player.level, pos);
|
||||||
|
|
||||||
|
final int slotSize = 18;
|
||||||
|
final int startX = 24;
|
||||||
|
final int inventoryY = 38;
|
||||||
|
|
||||||
|
addPlayerInventory(player);
|
||||||
|
addPlayerHotbar(player);
|
||||||
|
|
||||||
|
|
||||||
|
for (int row = 0; row < 6; row++)
|
||||||
|
{
|
||||||
|
for (int column = 0; column < 9; column++)
|
||||||
|
{
|
||||||
|
addSlot(new SlotItemHandler(slots, row*9 + column, startX+column * slotSize , inventoryY + row * slotSize));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// CREDIT GOES TO: diesieben07 | https://github.com/diesieben07/SevenCommons
|
||||||
|
// must assign a slot number to each of the slots used by the GUI.
|
||||||
|
// For this container, we can see both the tile inventory's slots as well as the player inventory slots and the hotbar.
|
||||||
|
// Each time we add a Slot to the container, it automatically increases the slotIndex, which means
|
||||||
|
// 0 - 8 = hotbar slots (which will map to the InventoryPlayer slot numbers 0 - 8)
|
||||||
|
// 9 - 35 = player inventory slots (which map to the InventoryPlayer slot numbers 9 - 35)
|
||||||
|
// 36 - 44 = TileInventory slots, which map to our TileEntity slot numbers 0 - 8)
|
||||||
|
private static final int HOTBAR_SLOT_COUNT = 9;
|
||||||
|
private static final int PLAYER_INVENTORY_ROW_COUNT = 3;
|
||||||
|
private static final int PLAYER_INVENTORY_COLUMN_COUNT = 9;
|
||||||
|
private static final int PLAYER_INVENTORY_SLOT_COUNT = PLAYER_INVENTORY_COLUMN_COUNT * PLAYER_INVENTORY_ROW_COUNT;
|
||||||
|
private static final int VANILLA_SLOT_COUNT = HOTBAR_SLOT_COUNT + PLAYER_INVENTORY_SLOT_COUNT;
|
||||||
|
private static final int VANILLA_FIRST_SLOT_INDEX = 0;
|
||||||
|
private static final int TE_INVENTORY_FIRST_SLOT_INDEX = VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT;
|
||||||
|
|
||||||
|
// THIS YOU HAVE TO DEFINE!
|
||||||
|
private static final int TE_INVENTORY_SLOT_COUNT = 54; // must be the number of slots you have!
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack quickMoveStack(Player playerIn, int index) {
|
||||||
|
Slot sourceSlot = slots.get(index);
|
||||||
|
if (sourceSlot == null || !sourceSlot.hasItem()) return ItemStack.EMPTY; //EMPTY_ITEM
|
||||||
|
ItemStack sourceStack = sourceSlot.getItem();
|
||||||
|
ItemStack copyOfSourceStack = sourceStack.copy();
|
||||||
|
|
||||||
|
// Check if the slot clicked is one of the vanilla container slots
|
||||||
|
if (index < VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT) {
|
||||||
|
// This is a vanilla container slot so merge the stack into the tile inventory
|
||||||
|
if (!moveItemStackTo(sourceStack, TE_INVENTORY_FIRST_SLOT_INDEX, TE_INVENTORY_FIRST_SLOT_INDEX
|
||||||
|
+ TE_INVENTORY_SLOT_COUNT, false)) {
|
||||||
|
return ItemStack.EMPTY; // EMPTY_ITEM
|
||||||
|
}
|
||||||
|
} else if (index < TE_INVENTORY_FIRST_SLOT_INDEX + TE_INVENTORY_SLOT_COUNT) {
|
||||||
|
// This is a TE slot so merge the stack into the players inventory
|
||||||
|
if (!moveItemStackTo(sourceStack, VANILLA_FIRST_SLOT_INDEX, VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT, false)) {
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
System.out.println("Invalid slotIndex:" + index);
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
// If stack size == 0 (the entire stack was moved) set slot contents to null
|
||||||
|
if (sourceStack.getCount() == 0) {
|
||||||
|
sourceSlot.set(ItemStack.EMPTY);
|
||||||
|
} else {
|
||||||
|
sourceSlot.setChanged();
|
||||||
|
}
|
||||||
|
sourceSlot.onTake(playerIn, sourceStack);
|
||||||
|
return copyOfSourceStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean stillValid(Player p_38874_) {
|
||||||
|
return true; // We have no block
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MenuConstructor getServerMenu (ItemStackHandler inventory){
|
||||||
|
return (id, player, play) -> new VaultMenu(id, player, inventory, BlockPos.ZERO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void doCommitAction()
|
||||||
|
{
|
||||||
|
|
||||||
|
// Locate the Vault in the Vault Registry and commit changes.
|
||||||
|
// Search for myself!
|
||||||
|
for(Map.Entry<UUID,VaultContainer> e : VaultContainer.VAULT_REGISTRY.entrySet())
|
||||||
|
{
|
||||||
|
if(e.getValue().VaultID.equals(VaultMenuID))
|
||||||
|
{
|
||||||
|
e.getValue().commit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static final int PLAYER_INVENTORY_FIRST_SLOT_HEIGHT = 156;
|
||||||
|
private static final int PLAYER_INVENTORY_FIRST_SLOT_LEFT = 24;
|
||||||
|
private static final int PLAYER_HOTBAR_FIRST_SLOT = 212;
|
||||||
|
|
||||||
|
private void addPlayerInventory(Inventory inv)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
for (int j = 0; j < 9; j++) {
|
||||||
|
this.addSlot(new Slot(inv, j+i*9+9, PLAYER_INVENTORY_FIRST_SLOT_LEFT+j*18, PLAYER_INVENTORY_FIRST_SLOT_HEIGHT+i*18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addPlayerHotbar(Inventory inv)
|
||||||
|
{
|
||||||
|
for (int index = 0; index < 9; index++) {
|
||||||
|
this.addSlot(new Slot(inv, index, PLAYER_INVENTORY_FIRST_SLOT_LEFT+index*18, PLAYER_HOTBAR_FIRST_SLOT));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.zontreck.otemod.implementation;
|
package dev.zontreck.otemod.implementation.vault;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -26,8 +26,8 @@ public class VaultScreen extends AbstractContainerScreen <VaultMenu>
|
||||||
this.leftPos = 0;
|
this.leftPos = 0;
|
||||||
this.topPos = 0;
|
this.topPos = 0;
|
||||||
|
|
||||||
this.imageWidth = 176;
|
this.imageWidth = 207;
|
||||||
this.imageHeight = 224;
|
this.imageHeight = 238;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -37,13 +37,13 @@ public class VaultScreen extends AbstractContainerScreen <VaultMenu>
|
||||||
super.render(stack, mouseX, mouseY, partialTicks);
|
super.render(stack, mouseX, mouseY, partialTicks);
|
||||||
this.renderTooltip(stack, mouseX, mouseY);
|
this.renderTooltip(stack, mouseX, mouseY);
|
||||||
|
|
||||||
this.font.draw(stack, this.title, this.leftPos + 17, this.topPos + 15, 0xFFFFFF);
|
|
||||||
this.font.draw(stack, this.playerInventoryTitle, this.leftPos + 17, this.topPos + 123, 0xFFFFFF);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderLabels(PoseStack stack, int mouseX, int mouseY)
|
protected void renderLabels(PoseStack stack, int mouseX, int mouseY)
|
||||||
{
|
{
|
||||||
|
this.font.draw(stack, this.title, 63, 12, 0xFFFFFF);
|
||||||
|
this.font.draw(stack, this.playerInventoryTitle, 63, 146, 0xFFFFFF);
|
||||||
//this.font.draw(stack, this.title.getString(), this.leftPos + 17, this.topPos + 15, 0xFFFFFF);
|
//this.font.draw(stack, this.title.getString(), this.leftPos + 17, this.topPos + 15, 0xFFFFFF);
|
||||||
|
|
||||||
//this.font.draw(stack, this.playerInventoryTitle.getString(), this.leftPos + 17, this.topPos + 123, 0xFFFFFF);
|
//this.font.draw(stack, this.playerInventoryTitle.getString(), this.leftPos + 17, this.topPos + 123, 0xFFFFFF);
|
|
@ -1,11 +1,9 @@
|
||||||
package dev.zontreck.otemod.implementation;
|
package dev.zontreck.otemod.implementation.vault;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import dev.zontreck.otemod.OTEMod;
|
import dev.zontreck.otemod.OTEMod;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
||||||
import net.minecraftforge.event.entity.player.PlayerContainerEvent;
|
import net.minecraftforge.event.entity.player.PlayerContainerEvent;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
@ -14,11 +12,10 @@ import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
@EventBusSubscriber(modid=OTEMod.MOD_ID,bus=Mod.EventBusSubscriber.Bus.FORGE)
|
@EventBusSubscriber(modid=OTEMod.MOD_ID,bus=Mod.EventBusSubscriber.Bus.FORGE)
|
||||||
public class VaultWatcher {
|
public class VaultWatcher {
|
||||||
|
|
||||||
|
|
||||||
@OnlyIn(Dist.DEDICATED_SERVER)
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onClosedContainer(PlayerContainerEvent.Close ev)
|
public void onClosedContainer(PlayerContainerEvent.Close ev)
|
||||||
{
|
{
|
||||||
|
if(ev.getEntity().level.isClientSide)return;
|
||||||
//OTEMod.LOGGER.info("Player closed a container");
|
//OTEMod.LOGGER.info("Player closed a container");
|
||||||
// Player closed the container
|
// Player closed the container
|
||||||
// Check if it is a vault Container
|
// Check if it is a vault Container
|
|
@ -22,6 +22,13 @@ public class ModItems {
|
||||||
|
|
||||||
public static final RegistryObject<Item> ETERNIUM_RAW_ORE = ITEMS.register("eternium_ore", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
|
public static final RegistryObject<Item> ETERNIUM_RAW_ORE = ITEMS.register("eternium_ore", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
|
||||||
|
|
||||||
|
public static final RegistryObject<Item> RAW_COBALT = ITEMS.register("raw_cobalt", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
|
||||||
|
public static final RegistryObject<Item> COBALT_NUGGET = ITEMS.register("cobalt_nugget", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
|
||||||
|
public static final RegistryObject<Item> COBALT_INGOT = ITEMS.register("cobalt_ingot", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
|
||||||
|
public static final RegistryObject<Item> PATTERN = ITEMS.register("pattern", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
|
||||||
|
public static final RegistryObject<Item> SCORCHED_BRICK = ITEMS.register("scorched_brick", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
|
||||||
|
public static final RegistryObject<Item> COPPER_CAN = ITEMS.register("copper_can", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC).stacksTo(16)));
|
||||||
|
|
||||||
|
|
||||||
public static void register(IEventBus bus){
|
public static void register(IEventBus bus){
|
||||||
ITEMS.register(bus);
|
ITEMS.register(bus);
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
package dev.zontreck.otemod.recipes;
|
||||||
|
|
||||||
|
public class ModRecipes {
|
||||||
|
|
||||||
|
}
|
|
@ -19,9 +19,9 @@ modId="otemod" #mandatory
|
||||||
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
|
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
|
||||||
# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata
|
# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata
|
||||||
# see the associated build.gradle script for how to populate this completely automatically during a build
|
# see the associated build.gradle script for how to populate this completely automatically during a build
|
||||||
version="1.3.5.6" #mandatory
|
version="1.3.6.1" #mandatory
|
||||||
# A display name for the mod
|
# A display name for the mod
|
||||||
displayName="OTEMod Resources" #mandatory
|
displayName="OTEMod" #mandatory
|
||||||
# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/
|
# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/
|
||||||
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional
|
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional
|
||||||
# A URL for the "homepage" for this mod, displayed in the mod UI
|
# A URL for the "homepage" for this mod, displayed in the mod UI
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "otemod:block/cobalt_block"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "otemod:block/cobalt_ore"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
43
src/main/resources/assets/otemod/blockstates/gold_bars.json
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{
|
||||||
|
"multipart": [
|
||||||
|
{
|
||||||
|
"apply": { "model": "otemod:block/gold_bars/post_ends" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"when": { "north": "false", "west": "false", "south": "false", "east": "false" },
|
||||||
|
"apply": { "model": "otemod:block/gold_bars/post" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"when": { "north": "true", "west": "false", "south": "false", "east": "false" },
|
||||||
|
"apply": { "model": "otemod:block/gold_bars/cap" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"when": { "north": "false", "west": "false", "south": "false", "east": "true" },
|
||||||
|
"apply": { "model": "otemod:block/gold_bars/cap", "y": 90 }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"when": { "north": "false", "west": "false", "south": "true", "east": "false" },
|
||||||
|
"apply": { "model": "otemod:block/gold_bars/cap_alt" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"when": { "north": "false", "west": "true", "south": "false", "east": "false" },
|
||||||
|
"apply": { "model": "otemod:block/gold_bars/cap_alt", "y": 90 }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"when": { "north": "true" },
|
||||||
|
"apply": { "model": "otemod:block/gold_bars/side" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"when": { "east": "true" },
|
||||||
|
"apply": { "model": "otemod:block/gold_bars/side", "y": 90 }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"when": { "south": "true" },
|
||||||
|
"apply": { "model": "otemod:block/gold_bars/side_alt" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"when": { "west": "true" },
|
||||||
|
"apply": { "model": "otemod:block/gold_bars/side_alt", "y": 90 }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "otemod:block/item_scrubber"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "otemod:block/nether_grout"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "otemod:block/raw_cobalt_ore"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"facing=north": { "model": "otemod:block/scorched_table" },
|
||||||
|
"facing=south": { "model": "otemod:block/scorched_table", "y": 180 },
|
||||||
|
"facing=west": { "model": "otemod:block/scorched_table", "y": 270 },
|
||||||
|
"facing=east": { "model": "otemod:block/scorched_table", "y": 90 }
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 173 KiB |
|
@ -12,12 +12,25 @@
|
||||||
"item.otemod.eternium_fragment": "Fragmented Eternium",
|
"item.otemod.eternium_fragment": "Fragmented Eternium",
|
||||||
"item.otemod.eternium_dust": "Eternium Dust",
|
"item.otemod.eternium_dust": "Eternium Dust",
|
||||||
"item.otemod.aurora_compound": "Aurora Compound",
|
"item.otemod.aurora_compound": "Aurora Compound",
|
||||||
|
"item.otemod.raw_cobalt": "Raw Cobalt",
|
||||||
|
"item.otemod.cobalt_nugget": "Cobalt Nugget",
|
||||||
|
"item.otemod.cobalt_ingot": "Cobalt Ingot",
|
||||||
|
"item.otemod.pattern": "Pattern",
|
||||||
|
"item.otemod.scorched_brick": "Scorched Brick",
|
||||||
|
"item.otemod.copper_can": "Copper Can",
|
||||||
|
|
||||||
"block.otemod.eternium_ore_block": "Eternium Ore",
|
"block.otemod.eternium_ore_block": "Eternium Ore",
|
||||||
"block.otemod.deepslate_eternium_ore_block": "Deepslate Eternium Ore",
|
"block.otemod.deepslate_eternium_ore_block": "Deepslate Eternium Ore",
|
||||||
"block.otemod.aurora_block": "Aurora Block",
|
"block.otemod.aurora_block": "Aurora Block",
|
||||||
"block.otemod.aurora_door": "Aurora Door",
|
"block.otemod.aurora_door": "Aurora Door",
|
||||||
"block.otemod.clear_glass_block": "Clear Glass Block",
|
"block.otemod.clear_glass_block": "Clear Glass Block",
|
||||||
|
"block.otemod.cobalt_ore": "Cobalt Ore",
|
||||||
|
"block.otemod.raw_cobalt_ore": "Raw Cobalt Ore",
|
||||||
|
"block.otemod.gold_bars": "Gold Bars",
|
||||||
|
"block.otemod.cobalt_block": "Cobalt",
|
||||||
|
"block.otemod.nether_grout": "Nether Grout",
|
||||||
|
"block.otemod.scorched_table": "Scorched Table",
|
||||||
|
"block.otemod.item_scrubber": "Item Scrubber",
|
||||||
|
|
||||||
"dev.zontreck.otemod.msgs.only_player": "§cOnly players are allowed to execute this command",
|
"dev.zontreck.otemod.msgs.only_player": "§cOnly players are allowed to execute this command",
|
||||||
|
|
||||||
|
@ -27,9 +40,5 @@
|
||||||
"dev.zontreck.otemod.msgs.warps.set.success": "Warp successfully created",
|
"dev.zontreck.otemod.msgs.warps.set.success": "Warp successfully created",
|
||||||
"dev.zontreck.otemod.msgs.warps.del.success": "Warp successfully deleted",
|
"dev.zontreck.otemod.msgs.warps.del.success": "Warp successfully deleted",
|
||||||
"dev.zontreck.otemod.msgs.warps.set.fail": "Failed to create warp",
|
"dev.zontreck.otemod.msgs.warps.set.fail": "Failed to create warp",
|
||||||
"dev.zontreck.otemod.msgs.warps.del.fail": "Failed to delete warp",
|
"dev.zontreck.otemod.msgs.warps.del.fail": "Failed to delete warp"
|
||||||
|
|
||||||
"minecraft.player.joined": "",
|
|
||||||
"minecraft.player.joined.renamed": "",
|
|
||||||
"minecraft.player.quit": ""
|
|
||||||
}
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "otemod:block/cobalt_block"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "otemod:block/cobalt_ore"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"parent": "block/iron_bars_cap",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"particle": "otemod:block/gold_bars",
|
||||||
|
"bars": "otemod:block/gold_bars",
|
||||||
|
"edge": "otemod:block/gold_bars"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"parent": "block/iron_bars_cap_alt",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"particle": "otemod:block/gold_bars",
|
||||||
|
"bars": "otemod:block/gold_bars",
|
||||||
|
"edge": "otemod:block/gold_bars"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"parent": "block/iron_bars_post",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"particle": "otemod:block/gold_bars",
|
||||||
|
"bars": "otemod:block/gold_bars"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"parent": "block/iron_bars_post_ends",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"particle": "otemod:block/gold_bars",
|
||||||
|
"edge": "otemod:block/gold_bars"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"parent": "block/iron_bars_side",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"particle": "otemod:block/gold_bars",
|
||||||
|
"bars": "otemod:block/gold_bars",
|
||||||
|
"edge": "otemod:block/gold_bars"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"parent": "block/iron_bars_side_alt",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"particle": "otemod:block/gold_bars",
|
||||||
|
"bars": "otemod:block/gold_bars",
|
||||||
|
"edge": "otemod:block/gold_bars"
|
||||||
|
}
|
||||||
|
}
|
269
src/main/resources/assets/otemod/models/block/item_scrubber.json
Normal file
|
@ -0,0 +1,269 @@
|
||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"0": "otemod:block/scrubber/scrubber_top"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [0, 0, 0],
|
||||||
|
"to": [2, 2, 2],
|
||||||
|
"color": 2,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 2, 2], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 0, 14],
|
||||||
|
"to": [2, 2, 16],
|
||||||
|
"color": 2,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 2, 2], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 10, 0],
|
||||||
|
"to": [2, 12, 2],
|
||||||
|
"color": 2,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 2, 2], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 10, 14],
|
||||||
|
"to": [2, 12, 16],
|
||||||
|
"color": 2,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 2, 2], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 2, 0],
|
||||||
|
"to": [1, 10, 1],
|
||||||
|
"color": 7,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 2, 15],
|
||||||
|
"to": [1, 10, 16],
|
||||||
|
"color": 7,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 0, 2],
|
||||||
|
"to": [1, 1, 14],
|
||||||
|
"color": 7,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 12], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 12], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 11, 2],
|
||||||
|
"to": [1, 12, 14],
|
||||||
|
"color": 7,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 12], "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 12], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [14, 0, 14],
|
||||||
|
"to": [16, 2, 16],
|
||||||
|
"color": 2,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [14, 0, 0],
|
||||||
|
"to": [16, 2, 2],
|
||||||
|
"color": 2,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [14, 10, 14],
|
||||||
|
"to": [16, 12, 16],
|
||||||
|
"color": 2,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [14, 10, 0],
|
||||||
|
"to": [16, 12, 2],
|
||||||
|
"color": 2,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 2, 2], "rotation": 180, "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [15, 2, 15],
|
||||||
|
"to": [16, 10, 16],
|
||||||
|
"color": 7,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 0, 15],
|
||||||
|
"to": [14, 1, 16],
|
||||||
|
"color": 7,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 12, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 12, 1], "rotation": 180, "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 11, 15],
|
||||||
|
"to": [14, 12, 16],
|
||||||
|
"color": 7,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 12, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 12, 1], "rotation": 180, "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 11, 0],
|
||||||
|
"to": [14, 12, 1],
|
||||||
|
"color": 7,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 12, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 12, 1], "rotation": 180, "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 0, 0],
|
||||||
|
"to": [14, 1, 1],
|
||||||
|
"color": 7,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 12, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 12, 1], "rotation": 180, "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [15, 2, 0],
|
||||||
|
"to": [16, 10, 1],
|
||||||
|
"color": 7,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [15, 0, 2],
|
||||||
|
"to": [16, 1, 14],
|
||||||
|
"color": 7,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 12], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 12], "rotation": 180, "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [15, 11, 2],
|
||||||
|
"to": [16, 12, 14],
|
||||||
|
"color": 7,
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
"up": {"uv": [0, 0, 1, 12], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [0, 0, 1, 12], "rotation": 180, "texture": "#0"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube",
|
||||||
|
"textures": {
|
||||||
|
"down": "otemod:block/scrubber/scrubber_bottom",
|
||||||
|
"up": "otemod:block/scrubber/scrubber_top",
|
||||||
|
"south": "otemod:block/scrubber/scrubber_front",
|
||||||
|
"west": "otemod:block/scrubber/scrubber_left",
|
||||||
|
"north": "otemod:block/scrubber/scrubber_back",
|
||||||
|
"east": "otemod:block/scrubber/scrubber_right"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "otemod:block/nether_grout"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "otemod:block/raw_cobalt_ore"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"parent": "otemod:block/template/table",
|
||||||
|
"textures": {
|
||||||
|
"side": "otemod:block/scorched_table/table_side",
|
||||||
|
"top": "otemod:block/scorched_table/table_top",
|
||||||
|
"bottom": "otemod:block/scorched_table/table_bottom"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,114 @@
|
||||||
|
{
|
||||||
|
"loader": "otemod:casting",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"particle": "#side"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"name": "Table outer",
|
||||||
|
"from": [ 0, 10, 0 ],
|
||||||
|
"to": [ 16, 16, 16 ],
|
||||||
|
"faces": {
|
||||||
|
"north": { "texture": "#side", "cullface": "north" },
|
||||||
|
"east": { "texture": "#side", "cullface": "east" },
|
||||||
|
"south": { "texture": "#side", "cullface": "south" },
|
||||||
|
"west": { "texture": "#side", "cullface": "west" },
|
||||||
|
"down": { "texture": "#bottom" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Table inner",
|
||||||
|
"from": [ 15, 16, 15 ],
|
||||||
|
"to": [ 1, 15, 1 ],
|
||||||
|
"faces": {
|
||||||
|
"north": { "texture": "#side", "cullface": "up" },
|
||||||
|
"east": { "texture": "#side", "cullface": "up" },
|
||||||
|
"south": { "texture": "#side", "cullface": "up" },
|
||||||
|
"west": { "texture": "#side", "cullface": "up" },
|
||||||
|
"up": { "texture": "#top", "cullface": "up" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Northwest leg",
|
||||||
|
"from": [ 0, 0, 0] ,
|
||||||
|
"to": [ 4, 10, 4 ],
|
||||||
|
"faces": {
|
||||||
|
"north": { "texture": "#side", "cullface": "north" },
|
||||||
|
"east": { "texture": "#side" },
|
||||||
|
"south": { "texture": "#side" },
|
||||||
|
"west": { "texture": "#side", "cullface": "west" },
|
||||||
|
"down": { "texture": "#bottom", "cullface": "down" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Northeast leg",
|
||||||
|
"from": [ 12, 0, 0 ],
|
||||||
|
"to": [ 16, 10, 4 ],
|
||||||
|
"faces": {
|
||||||
|
"north": { "texture": "#side", "cullface": "north" },
|
||||||
|
"east": { "texture": "#side", "cullface": "east" },
|
||||||
|
"south": { "texture": "#side"},
|
||||||
|
"west": { "texture": "#side"},
|
||||||
|
"down": { "texture": "#bottom", "cullface": "down" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Southeast leg",
|
||||||
|
"from": [ 12, 0, 12 ],
|
||||||
|
"to": [ 16, 10, 16 ],
|
||||||
|
"faces": {
|
||||||
|
"north": { "texture": "#side" },
|
||||||
|
"east": { "texture": "#side", "cullface": "east" },
|
||||||
|
"south": { "texture": "#side", "cullface": "south" },
|
||||||
|
"west": { "texture": "#side" },
|
||||||
|
"down": { "texture": "#bottom", "cullface": "down" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Southwest leg",
|
||||||
|
"from": [ 0, 0, 12 ],
|
||||||
|
"to": [ 4, 10, 16 ],
|
||||||
|
"faces": {
|
||||||
|
"north": { "texture": "#side" },
|
||||||
|
"east": { "texture": "#side" },
|
||||||
|
"south": { "texture": "#side", "cullface": "south" },
|
||||||
|
"west": { "texture": "#side", "cullface": "west" },
|
||||||
|
"down": { "texture": "#bottom", "cullface": "down" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "West top edge",
|
||||||
|
"from": [ 0, 16, 0 ],
|
||||||
|
"to": [ 1, 16, 16 ],
|
||||||
|
"faces": { "up": { "texture": "#top", "cullface": "up" }}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "East top edge",
|
||||||
|
"from": [ 15, 16, 0 ],
|
||||||
|
"to": [ 16, 16, 16 ],
|
||||||
|
"faces": { "up": { "texture": "#top", "cullface": "up" }}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "North top edge",
|
||||||
|
"from": [ 1, 16, 0 ],
|
||||||
|
"to": [ 15, 16, 1 ],
|
||||||
|
"faces": { "up": { "texture": "#top", "cullface": "up" }}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "South top edge",
|
||||||
|
"from": [ 1, 16, 15 ],
|
||||||
|
"to": [ 15, 16, 16 ],
|
||||||
|
"faces": { "up": { "texture": "#top", "cullface": "up" }}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fluid": {
|
||||||
|
"from": [ 1, 15, 1 ],
|
||||||
|
"to": [ 15, 15.9, 15 ],
|
||||||
|
"faces": { "up": {} }
|
||||||
|
},
|
||||||
|
"items": [
|
||||||
|
{ "center": [ 8, 15.5, 8 ], "size": 14, "x": 270, "y": 180, "transform": "fixed" },
|
||||||
|
{ "center": [ 8, 15.5, 8 ], "size": 14.1, "x": 270, "y": 180, "transform": "fixed" }
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "otemod:block/cobalt_block"
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "otemod:item/cobalt_ingot"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "otemod:item/cobalt_nugget"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "otemod:block/cobalt_ore"
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "otemod:block/gold_bars"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "otemod:block/item_scrubber"
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "otemod:block/nether_grout"
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "otemod:item/pattern"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "otemod:item/raw_cobalt"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "otemod:block/raw_cobalt_ore"
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "otemod:item/scorched_brick"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "otemod:block/scorched_table"
|
||||||
|
}
|
BIN
src/main/resources/assets/otemod/textures/block/cobalt_block.png
Normal file
After Width: | Height: | Size: 146 B |
BIN
src/main/resources/assets/otemod/textures/block/cobalt_ore.png
Normal file
After Width: | Height: | Size: 263 B |
BIN
src/main/resources/assets/otemod/textures/block/gold_bars.png
Normal file
After Width: | Height: | Size: 251 B |
BIN
src/main/resources/assets/otemod/textures/block/nether_grout.png
Normal file
After Width: | Height: | Size: 430 B |
After Width: | Height: | Size: 254 B |
After Width: | Height: | Size: 268 B |
After Width: | Height: | Size: 304 B |
After Width: | Height: | Size: 226 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 62 KiB |
BIN
src/main/resources/assets/otemod/textures/item/cobalt_ingot.png
Normal file
After Width: | Height: | Size: 200 B |
BIN
src/main/resources/assets/otemod/textures/item/cobalt_nugget.png
Normal file
After Width: | Height: | Size: 151 B |
BIN
src/main/resources/assets/otemod/textures/item/copper_can.png
Normal file
After Width: | Height: | Size: 261 B |
After Width: | Height: | Size: 86 B |
BIN
src/main/resources/assets/otemod/textures/item/pattern.png
Normal file
After Width: | Height: | Size: 216 B |
BIN
src/main/resources/assets/otemod/textures/item/raw_cobalt.png
Normal file
After Width: | Height: | Size: 275 B |
After Width: | Height: | Size: 203 B |
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"otemod:cobalt_ore"
|
||||||
|
]
|
||||||
|
}
|
5
src/main/resources/data/forge/tags/blocks/ores.json
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"#forge:ores/cobalt"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"otemod:cobalt_ore"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"otemod:cobalt_ore"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"#forge:storage_blocks/raw_cobalt"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"otemod:raw_cobalt_ore"
|
||||||
|
]
|
||||||
|
}
|
5
src/main/resources/data/forge/tags/items/ingots.json
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"#forge:ingots/cobalt"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"otemod:cobalt_ingot"
|
||||||
|
]
|
||||||
|
}
|
5
src/main/resources/data/forge/tags/items/nuggets.json
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"#forge:nuggets/cobalt"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"otemod:cobalt_nugget"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"otemod:cobalt_ore"
|
||||||
|
]
|
||||||
|
}
|
6
src/main/resources/data/forge/tags/items/ores.json
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"#forge:ores/cobalt",
|
||||||
|
"#forge:ores/eternium"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"otemod:cobalt_ore"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"otemod:eternium_ore"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"otemod:cobalt_ore"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"#forge:raw_materials/cobalt"
|
||||||
|
]
|
||||||
|
}
|