Rework the item scrubber
Add magical scrubber Fix flight enchantment Fix mob egging Add mob egging stat to sword
|
@ -145,6 +145,8 @@ dependencies {
|
||||||
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
||||||
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
||||||
api 'curse.maven:mariadb-jdbc-561883:3586357'
|
api 'curse.maven:mariadb-jdbc-561883:3586357'
|
||||||
|
|
||||||
|
runtimeOnly fg.deobf("curse.maven:mekanism-268560:4385637")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Example for how to get properties into the manifest for reading at runtime.
|
// Example for how to get properties into the manifest for reading at runtime.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
org.gradle.jvmargs=-Xmx8G
|
org.gradle.jvmargs=-Xmx8G
|
||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
|
|
||||||
my_version=1.3.6.7
|
my_version=1.3.7.2
|
||||||
|
|
||||||
mc_version=1.19.2
|
mc_version=1.19.2
|
||||||
forge_version=43.2.3
|
forge_version=43.2.3
|
||||||
|
|
|
@ -29,7 +29,7 @@ gamma:1.0
|
||||||
renderDistance:12
|
renderDistance:12
|
||||||
simulationDistance:12
|
simulationDistance:12
|
||||||
entityDistanceScaling:1.0
|
entityDistanceScaling:1.0
|
||||||
guiScale:3
|
guiScale:4
|
||||||
particles:0
|
particles:0
|
||||||
maxFps:120
|
maxFps:120
|
||||||
graphicsMode:1
|
graphicsMode:1
|
||||||
|
@ -39,7 +39,7 @@ biomeBlendRadius:2
|
||||||
renderClouds:"true"
|
renderClouds:"true"
|
||||||
resourcePacks:[]
|
resourcePacks:[]
|
||||||
incompatibleResourcePacks:[]
|
incompatibleResourcePacks:[]
|
||||||
lastServer:
|
lastServer:127.0.0.1
|
||||||
lang:en_us
|
lang:en_us
|
||||||
soundDevice:""
|
soundDevice:""
|
||||||
chatVisibility:0
|
chatVisibility:0
|
||||||
|
@ -111,6 +111,16 @@ key_key.hotbar.6:key.keyboard.6
|
||||||
key_key.hotbar.7:key.keyboard.7
|
key_key.hotbar.7:key.keyboard.7
|
||||||
key_key.hotbar.8:key.keyboard.8
|
key_key.hotbar.8:key.keyboard.8
|
||||||
key_key.hotbar.9:key.keyboard.9
|
key_key.hotbar.9:key.keyboard.9
|
||||||
|
key_key.mekanism.mode:key.keyboard.n
|
||||||
|
key_key.mekanism.head_mode:key.keyboard.v
|
||||||
|
key_key.mekanism.chest_mode:key.keyboard.g
|
||||||
|
key_key.mekanism.legs_mode:key.keyboard.j
|
||||||
|
key_key.mekanism.feet_mode:key.keyboard.b
|
||||||
|
key_key.mekanism.details:key.keyboard.left.shift
|
||||||
|
key_key.mekanism.description:key.keyboard.n:SHIFT
|
||||||
|
key_key.mekanism.module_tweaker:key.keyboard.backslash
|
||||||
|
key_key.mekanism.key_boost:key.keyboard.left.control
|
||||||
|
key_key.mekanism.key_hud:key.keyboard.h
|
||||||
key_key.otemod.open_vault:key.keyboard.v:ALT
|
key_key.otemod.open_vault:key.keyboard.v:ALT
|
||||||
soundCategory_master:1.0
|
soundCategory_master:1.0
|
||||||
soundCategory_music:0.08862526
|
soundCategory_music:0.08862526
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#Minecraft server properties
|
#Minecraft server properties
|
||||||
#Mon Jan 16 18:19:06 MST 2023
|
#Sun Feb 12 22:34:47 MST 2023
|
||||||
allow-flight=false
|
allow-flight=false
|
||||||
allow-nether=true
|
allow-nether=true
|
||||||
broadcast-console-to-ops=true
|
broadcast-console-to-ops=true
|
||||||
|
|
|
@ -54,7 +54,8 @@ import dev.zontreck.otemod.enchantments.ModEnchantments;
|
||||||
import dev.zontreck.otemod.events.EventHandler;
|
import dev.zontreck.otemod.events.EventHandler;
|
||||||
import dev.zontreck.otemod.events.LoreHandlers;
|
import dev.zontreck.otemod.events.LoreHandlers;
|
||||||
import dev.zontreck.otemod.implementation.inits.ModMenuTypes;
|
import dev.zontreck.otemod.implementation.inits.ModMenuTypes;
|
||||||
import dev.zontreck.otemod.implementation.scrubber.ScrubberScreen;
|
import dev.zontreck.otemod.implementation.scrubber.ItemScrubberScreen;
|
||||||
|
import dev.zontreck.otemod.implementation.scrubber.MagicalScrubberScreen;
|
||||||
import dev.zontreck.otemod.implementation.vault.VaultScreen;
|
import dev.zontreck.otemod.implementation.vault.VaultScreen;
|
||||||
import dev.zontreck.otemod.implementation.vault.VaultWatcher;
|
import dev.zontreck.otemod.implementation.vault.VaultWatcher;
|
||||||
import dev.zontreck.otemod.items.ModItems;
|
import dev.zontreck.otemod.items.ModItems;
|
||||||
|
@ -286,7 +287,8 @@ public class OTEMod
|
||||||
//LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName());
|
//LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName());
|
||||||
|
|
||||||
MenuScreens.register(ModMenuTypes.VAULT.get(), VaultScreen::new);
|
MenuScreens.register(ModMenuTypes.VAULT.get(), VaultScreen::new);
|
||||||
MenuScreens.register(ModMenuTypes.SCRUBBER.get(), ScrubberScreen::new);
|
MenuScreens.register(ModMenuTypes.SCRUBBER.get(), ItemScrubberScreen::new);
|
||||||
|
MenuScreens.register(ModMenuTypes.MAGIC_SCRUBBER.get(), MagicalScrubberScreen::new);
|
||||||
|
|
||||||
//ItemBlockRenderTypes.setRenderLayer(ModBlocks.AURORA_DOOR.get(), RenderType.translucent());
|
//ItemBlockRenderTypes.setRenderLayer(ModBlocks.AURORA_DOOR.get(), RenderType.translucent());
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@ import javax.annotation.Nullable;
|
||||||
|
|
||||||
import dev.zontreck.otemod.blocks.entity.ItemScrubberBlockEntity;
|
import dev.zontreck.otemod.blocks.entity.ItemScrubberBlockEntity;
|
||||||
import dev.zontreck.otemod.blocks.entity.ModEntities;
|
import dev.zontreck.otemod.blocks.entity.ModEntities;
|
||||||
|
import dev.zontreck.otemod.networking.ModMessages;
|
||||||
|
import dev.zontreck.otemod.networking.packets.EnergySyncS2CPacket;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
|
@ -62,7 +64,11 @@ public class ItemScrubberBlock extends BaseEntityBlock
|
||||||
BlockEntity be = lvl.getBlockEntity(pos);
|
BlockEntity be = lvl.getBlockEntity(pos);
|
||||||
if(be instanceof ItemScrubberBlockEntity)
|
if(be instanceof ItemScrubberBlockEntity)
|
||||||
{
|
{
|
||||||
NetworkHooks.openScreen(((ServerPlayer)player), (ItemScrubberBlockEntity)be, pos);
|
ItemScrubberBlockEntity entity = (ItemScrubberBlockEntity)be;
|
||||||
|
NetworkHooks.openScreen(((ServerPlayer)player), entity, pos);
|
||||||
|
|
||||||
|
ModMessages.sendToPlayer(new EnergySyncS2CPacket(entity.getEnergyStorage().getEnergyStored(), entity.getBlockPos()), (ServerPlayer)player);
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
throw new IllegalStateException("Our container is missing!");
|
throw new IllegalStateException("Our container is missing!");
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,92 @@
|
||||||
|
package dev.zontreck.otemod.blocks;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import dev.zontreck.otemod.blocks.entity.ItemScrubberBlockEntity;
|
||||||
|
import dev.zontreck.otemod.blocks.entity.MagicalScrubberBlockEntity;
|
||||||
|
import dev.zontreck.otemod.blocks.entity.ModEntities;
|
||||||
|
import dev.zontreck.otemod.networking.ModMessages;
|
||||||
|
import dev.zontreck.otemod.networking.packets.EnergySyncS2CPacket;
|
||||||
|
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 MagicalScrubberBlock extends BaseEntityBlock
|
||||||
|
{
|
||||||
|
|
||||||
|
public MagicalScrubberBlock(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 MagicalScrubberBlockEntity)
|
||||||
|
{
|
||||||
|
((MagicalScrubberBlockEntity)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 MagicalScrubberBlockEntity)
|
||||||
|
{
|
||||||
|
MagicalScrubberBlockEntity entity = (MagicalScrubberBlockEntity)be;
|
||||||
|
NetworkHooks.openScreen(((ServerPlayer)player), entity, pos);
|
||||||
|
|
||||||
|
ModMessages.sendToPlayer(new EnergySyncS2CPacket(entity.getEnergyStorage().getEnergyStored(), entity.getBlockPos()), (ServerPlayer)player);
|
||||||
|
}else{
|
||||||
|
throw new IllegalStateException("Our container is missing!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return InteractionResult.sidedSuccess(lvl.isClientSide);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Nullable
|
||||||
|
public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
|
||||||
|
return new MagicalScrubberBlockEntity(pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level lvl, BlockState state, BlockEntityType<T> type)
|
||||||
|
{
|
||||||
|
return createTickerHelper(type, ModEntities.MAGICAL_SCRUBBER.get(), MagicalScrubberBlockEntity::tick);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -91,9 +91,18 @@ public class ModBlocks {
|
||||||
|
|
||||||
public static final RegistryObject<Item> ITEM_SCRUBBER_I = ITEMS.register("item_scrubber", ()->new BlockItem(ITEM_SCRUBBER.get(), new Item.Properties().tab(CreativeModeTab.TAB_REDSTONE)));
|
public static final RegistryObject<Item> ITEM_SCRUBBER_I = ITEMS.register("item_scrubber", ()->new BlockItem(ITEM_SCRUBBER.get(), new Item.Properties().tab(CreativeModeTab.TAB_REDSTONE)));
|
||||||
|
|
||||||
|
public static final RegistryObject<Block> MAGICAL_SCRUBBER = BLOCKS.register("magical_scrubber", ()->new MagicalScrubberBlock(BlockBehaviour.Properties.copy(ModBlocks.AURORA_BLOCK.get()).noOcclusion().isViewBlocking(ModBlocks::never)));
|
||||||
|
|
||||||
|
public static final RegistryObject<Item> MAGICAL_SCRUBBER_I = ITEMS.register("magical_scrubber", ()->new BlockItem(MAGICAL_SCRUBBER.get(), new Item.Properties().tab(CreativeModeTab.TAB_REDSTONE)));
|
||||||
|
|
||||||
|
|
||||||
private static boolean never(BlockState p_50806_, BlockGetter p_50807_, BlockPos p_50808_) {
|
public static final RegistryObject<Block> STABLE_SINGULARITY = BLOCKS.register("stable_singularity", ()->new Block(BlockBehaviour.Properties.copy(ModBlocks.AURORA_BLOCK.get()).noOcclusion().isViewBlocking(ModBlocks::never)));
|
||||||
return false;
|
|
||||||
}
|
public static final RegistryObject<Item> STABLE_SINGULARITY_I = ITEMS.register("stable_singularity", ()->new BlockItem(STABLE_SINGULARITY.get(), new Item.Properties().tab(CreativeModeTab.TAB_REDSTONE)));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private static boolean never(BlockState p_50806_, BlockGetter p_50807_, BlockPos p_50808_) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,10 @@ package dev.zontreck.otemod.blocks.entity;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import dev.zontreck.otemod.implementation.OutputItemStackHandler;
|
import dev.zontreck.otemod.implementation.OutputItemStackHandler;
|
||||||
import dev.zontreck.otemod.implementation.scrubber.ScrubberMenu;
|
import dev.zontreck.otemod.implementation.energy.OTEEnergy;
|
||||||
|
import dev.zontreck.otemod.implementation.scrubber.ItemScrubberMenu;
|
||||||
|
import dev.zontreck.otemod.networking.ModMessages;
|
||||||
|
import dev.zontreck.otemod.networking.packets.EnergySyncS2CPacket;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
@ -23,6 +26,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraftforge.common.capabilities.Capability;
|
import net.minecraftforge.common.capabilities.Capability;
|
||||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||||
import net.minecraftforge.common.util.LazyOptional;
|
import net.minecraftforge.common.util.LazyOptional;
|
||||||
|
import net.minecraftforge.energy.IEnergyStorage;
|
||||||
import net.minecraftforge.items.IItemHandler;
|
import net.minecraftforge.items.IItemHandler;
|
||||||
import net.minecraftforge.items.ItemStackHandler;
|
import net.minecraftforge.items.ItemStackHandler;
|
||||||
|
|
||||||
|
@ -45,6 +49,20 @@ public class ItemScrubberBlockEntity extends BlockEntity implements MenuProvider
|
||||||
};
|
};
|
||||||
private ItemStackHandler outputSlot;
|
private ItemStackHandler outputSlot;
|
||||||
|
|
||||||
|
private final OTEEnergy ENERGY_STORAGE = new OTEEnergy(ENERGY_REQ*3, ENERGY_REQ+512) {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onChanged() {
|
||||||
|
setChanged();
|
||||||
|
|
||||||
|
ModMessages.sendToAll(new EnergySyncS2CPacket(energy, getBlockPos()));
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
private static final int ENERGY_REQ = 15000;
|
||||||
|
private LazyOptional<IEnergyStorage> lazyEnergyHandler = LazyOptional.empty();
|
||||||
|
|
||||||
private LazyOptional<IItemHandler> lazyItemHandler = LazyOptional.empty();
|
private LazyOptional<IItemHandler> lazyItemHandler = LazyOptional.empty();
|
||||||
private LazyOptional<IItemHandler> lazyOutputItems = LazyOptional.empty();
|
private LazyOptional<IItemHandler> lazyOutputItems = LazyOptional.empty();
|
||||||
|
|
||||||
|
@ -88,7 +106,7 @@ public class ItemScrubberBlockEntity extends BlockEntity implements MenuProvider
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public AbstractContainerMenu createMenu(int id, Inventory inv, Player player) {
|
public AbstractContainerMenu createMenu(int id, Inventory inv, Player player) {
|
||||||
return new ScrubberMenu(id, inv, this, this.data);
|
return new ItemScrubberMenu(id, inv, this, this.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -99,6 +117,10 @@ public class ItemScrubberBlockEntity extends BlockEntity implements MenuProvider
|
||||||
@Override
|
@Override
|
||||||
public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side)
|
public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side)
|
||||||
{
|
{
|
||||||
|
if(cap == ForgeCapabilities.ENERGY)
|
||||||
|
{
|
||||||
|
return lazyEnergyHandler.cast();
|
||||||
|
}
|
||||||
if(side == Direction.DOWN && cap == ForgeCapabilities.ITEM_HANDLER)
|
if(side == Direction.DOWN && cap == ForgeCapabilities.ITEM_HANDLER)
|
||||||
{
|
{
|
||||||
// Return the output slot only
|
// Return the output slot only
|
||||||
|
@ -119,6 +141,7 @@ public class ItemScrubberBlockEntity extends BlockEntity implements MenuProvider
|
||||||
super.onLoad();
|
super.onLoad();
|
||||||
lazyItemHandler = LazyOptional.of(()->itemsHandler);
|
lazyItemHandler = LazyOptional.of(()->itemsHandler);
|
||||||
lazyOutputItems = LazyOptional.of(()->outputSlot);
|
lazyOutputItems = LazyOptional.of(()->outputSlot);
|
||||||
|
lazyEnergyHandler = LazyOptional.of(()->ENERGY_STORAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,6 +151,7 @@ public class ItemScrubberBlockEntity extends BlockEntity implements MenuProvider
|
||||||
super.invalidateCaps();
|
super.invalidateCaps();
|
||||||
lazyItemHandler.invalidate();
|
lazyItemHandler.invalidate();
|
||||||
lazyOutputItems.invalidate();
|
lazyOutputItems.invalidate();
|
||||||
|
lazyEnergyHandler.invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -136,6 +160,7 @@ public class ItemScrubberBlockEntity extends BlockEntity implements MenuProvider
|
||||||
nbt.put("inventory", itemsHandler.serializeNBT());
|
nbt.put("inventory", itemsHandler.serializeNBT());
|
||||||
nbt.put("output", outputItems.serializeNBT());
|
nbt.put("output", outputItems.serializeNBT());
|
||||||
nbt.putInt("prog", progress);
|
nbt.putInt("prog", progress);
|
||||||
|
nbt.putInt("energy", ENERGY_STORAGE.getEnergyStored());
|
||||||
|
|
||||||
super.saveAdditional(nbt);
|
super.saveAdditional(nbt);
|
||||||
}
|
}
|
||||||
|
@ -147,6 +172,7 @@ public class ItemScrubberBlockEntity extends BlockEntity implements MenuProvider
|
||||||
itemsHandler.deserializeNBT(nbt.getCompound("inventory"));
|
itemsHandler.deserializeNBT(nbt.getCompound("inventory"));
|
||||||
outputItems.deserializeNBT(nbt.getCompound("output"));
|
outputItems.deserializeNBT(nbt.getCompound("output"));
|
||||||
progress = nbt.getInt("prog");
|
progress = nbt.getInt("prog");
|
||||||
|
ENERGY_STORAGE.setEnergy(nbt.getInt("energy"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doDrop()
|
public void doDrop()
|
||||||
|
@ -167,10 +193,13 @@ public class ItemScrubberBlockEntity extends BlockEntity implements MenuProvider
|
||||||
{
|
{
|
||||||
if(lvl.isClientSide())return;
|
if(lvl.isClientSide())return;
|
||||||
|
|
||||||
|
|
||||||
if(hasRecipe(entity))
|
if(hasRecipe(entity))
|
||||||
{
|
{
|
||||||
|
if(!hasEnergy(entity))return; // Halt until sufficient energy has been received
|
||||||
entity.progress++;
|
entity.progress++;
|
||||||
setChanged(lvl, pos, state);
|
setChanged(lvl, pos, state);
|
||||||
|
drain(entity);
|
||||||
|
|
||||||
if(entity.progress >= ItemScrubberBlockEntity.MAXIMUM_PROCESSING_TICKS)
|
if(entity.progress >= ItemScrubberBlockEntity.MAXIMUM_PROCESSING_TICKS)
|
||||||
{
|
{
|
||||||
|
@ -184,6 +213,14 @@ public class ItemScrubberBlockEntity extends BlockEntity implements MenuProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void drain(ItemScrubberBlockEntity entity) {
|
||||||
|
entity.ENERGY_STORAGE.extractEnergy(ENERGY_REQ, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean hasEnergy(ItemScrubberBlockEntity entity) {
|
||||||
|
return (entity.ENERGY_STORAGE.getEnergyStored() >= ENERGY_REQ);
|
||||||
|
}
|
||||||
|
|
||||||
private static void craftItem(ItemScrubberBlockEntity entity) {
|
private static void craftItem(ItemScrubberBlockEntity entity) {
|
||||||
if(hasRecipe(entity))
|
if(hasRecipe(entity))
|
||||||
{
|
{
|
||||||
|
@ -244,4 +281,12 @@ public class ItemScrubberBlockEntity extends BlockEntity implements MenuProvider
|
||||||
ItemStack newItem = new ItemStack(original.getItem(),1);
|
ItemStack newItem = new ItemStack(original.getItem(),1);
|
||||||
return newItem;
|
return newItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IEnergyStorage getEnergyStorage() {
|
||||||
|
return ENERGY_STORAGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnergy(int energy) {
|
||||||
|
ENERGY_STORAGE.setEnergy(energy);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,331 @@
|
||||||
|
package dev.zontreck.otemod.blocks.entity;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import dev.zontreck.otemod.implementation.OutputItemStackHandler;
|
||||||
|
import dev.zontreck.otemod.implementation.energy.OTEEnergy;
|
||||||
|
import dev.zontreck.otemod.implementation.scrubber.MagicalScrubberMenu;
|
||||||
|
import dev.zontreck.otemod.networking.ModMessages;
|
||||||
|
import dev.zontreck.otemod.networking.packets.EnergySyncS2CPacket;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
import net.minecraft.nbt.NbtUtils;
|
||||||
|
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.EnchantedBookItem;
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.Items;
|
||||||
|
import net.minecraft.world.item.Item.Properties;
|
||||||
|
import net.minecraft.world.item.enchantment.Enchantment;
|
||||||
|
import net.minecraft.world.item.enchantment.EnchantmentInstance;
|
||||||
|
import net.minecraft.world.item.enchantment.Enchantments;
|
||||||
|
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.energy.IEnergyStorage;
|
||||||
|
import net.minecraftforge.items.IItemHandler;
|
||||||
|
import net.minecraftforge.items.ItemStackHandler;
|
||||||
|
|
||||||
|
public class MagicalScrubberBlockEntity 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 final OTEEnergy ENERGY_STORAGE = new OTEEnergy(ENERGY_REQ*3, ENERGY_REQ+512) {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onChanged() {
|
||||||
|
setChanged();
|
||||||
|
|
||||||
|
ModMessages.sendToAll(new EnergySyncS2CPacket(energy, getBlockPos()));
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
private static final int ENERGY_REQ = 10000;
|
||||||
|
private LazyOptional<IEnergyStorage> lazyEnergyHandler = LazyOptional.empty();
|
||||||
|
|
||||||
|
private LazyOptional<IItemHandler> lazyItemHandler = LazyOptional.empty();
|
||||||
|
private LazyOptional<IItemHandler> lazyOutputItems = LazyOptional.empty();
|
||||||
|
|
||||||
|
public MagicalScrubberBlockEntity(BlockPos pos, BlockState state) {
|
||||||
|
super(ModEntities.MAGICAL_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 -> MagicalScrubberBlockEntity.this.progress;
|
||||||
|
default -> 0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void set(int p_39285_, int p_39286_) {
|
||||||
|
switch(p_39285_)
|
||||||
|
{
|
||||||
|
case 0 -> MagicalScrubberBlockEntity.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 = 1750;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Nullable
|
||||||
|
public AbstractContainerMenu createMenu(int id, Inventory inv, Player player) {
|
||||||
|
return new MagicalScrubberMenu(id, inv, this, this.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Component getDisplayName() {
|
||||||
|
return Component.translatable("block.otemod.magical_scrubber");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side)
|
||||||
|
{
|
||||||
|
if(cap == ForgeCapabilities.ENERGY)
|
||||||
|
{
|
||||||
|
return lazyEnergyHandler.cast();
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
lazyEnergyHandler = LazyOptional.of(()->ENERGY_STORAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void invalidateCaps()
|
||||||
|
{
|
||||||
|
super.invalidateCaps();
|
||||||
|
lazyItemHandler.invalidate();
|
||||||
|
lazyOutputItems.invalidate();
|
||||||
|
lazyEnergyHandler.invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void saveAdditional(CompoundTag nbt)
|
||||||
|
{
|
||||||
|
nbt.put("inventory", itemsHandler.serializeNBT());
|
||||||
|
nbt.put("output", outputItems.serializeNBT());
|
||||||
|
nbt.putInt("prog", progress);
|
||||||
|
nbt.putInt("energy", ENERGY_STORAGE.getEnergyStored());
|
||||||
|
|
||||||
|
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");
|
||||||
|
ENERGY_STORAGE.setEnergy(nbt.getInt("energy"));
|
||||||
|
}
|
||||||
|
|
||||||
|
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, MagicalScrubberBlockEntity entity)
|
||||||
|
{
|
||||||
|
if(lvl.isClientSide())return;
|
||||||
|
|
||||||
|
if(hasRecipe(entity))
|
||||||
|
{
|
||||||
|
if(!hasEnergy(entity))return; // Halt until sufficient energy has been received
|
||||||
|
entity.progress++;
|
||||||
|
setChanged(lvl, pos, state);
|
||||||
|
drain(entity);
|
||||||
|
|
||||||
|
if(entity.progress >= MagicalScrubberBlockEntity.MAXIMUM_PROCESSING_TICKS)
|
||||||
|
{
|
||||||
|
craftItem(entity);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if(entity.progress>0){
|
||||||
|
entity.resetProgress();
|
||||||
|
setChanged(lvl, pos, state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void drain(MagicalScrubberBlockEntity entity) {
|
||||||
|
entity.ENERGY_STORAGE.extractEnergy(ENERGY_REQ, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean hasEnergy(MagicalScrubberBlockEntity entity) {
|
||||||
|
return (entity.ENERGY_STORAGE.getEnergyStored() >= ENERGY_REQ);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void craftItem(MagicalScrubberBlockEntity entity) {
|
||||||
|
if(hasRecipe(entity))
|
||||||
|
{
|
||||||
|
ItemStack existing = entity.outputItems.getStackInSlot(0);
|
||||||
|
ItemStack main = entity.itemsHandler.getStackInSlot(0);
|
||||||
|
|
||||||
|
Map<Enchantment, Integer> enchants = main.getAllEnchantments();
|
||||||
|
if(enchants.size()>0)
|
||||||
|
{
|
||||||
|
Iterator<Map.Entry<Enchantment,Integer>> iEntries = enchants.entrySet().iterator();
|
||||||
|
Map.Entry<Enchantment,Integer> entry = iEntries.next();
|
||||||
|
|
||||||
|
EnchantmentInstance eInst = new EnchantmentInstance(entry.getKey(), entry.getValue());
|
||||||
|
existing = EnchantedBookItem.createForEnchantment(eInst);
|
||||||
|
|
||||||
|
main.getAllEnchantments().remove(entry.getKey());
|
||||||
|
//iEntries.remove();
|
||||||
|
main = makeOutputItem(main);
|
||||||
|
while(iEntries.hasNext())
|
||||||
|
{
|
||||||
|
entry = iEntries.next();
|
||||||
|
main.enchant(entry.getKey(), entry.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
if(main.getAllEnchantments().size()==0){
|
||||||
|
entity.itemsHandler.extractItem(0, 1, false);
|
||||||
|
}else entity.itemsHandler.setStackInSlot(0, main);
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
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(MagicalScrubberBlockEntity 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnergyStorage getEnergyStorage() {
|
||||||
|
return ENERGY_STORAGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnergy(int energy) {
|
||||||
|
ENERGY_STORAGE.setEnergy(energy);
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,8 +2,6 @@ package dev.zontreck.otemod.blocks.entity;
|
||||||
|
|
||||||
import dev.zontreck.otemod.OTEMod;
|
import dev.zontreck.otemod.OTEMod;
|
||||||
import dev.zontreck.otemod.blocks.ModBlocks;
|
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.minecraft.world.level.block.entity.BlockEntityType;
|
||||||
import net.minecraftforge.eventbus.api.IEventBus;
|
import net.minecraftforge.eventbus.api.IEventBus;
|
||||||
import net.minecraftforge.registries.DeferredRegister;
|
import net.minecraftforge.registries.DeferredRegister;
|
||||||
|
@ -16,6 +14,8 @@ public class ModEntities {
|
||||||
|
|
||||||
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 final RegistryObject <BlockEntityType <ItemScrubberBlockEntity>> ITEM_SCRUBBER = ENTITIES.register("item_scrubber", ()-> BlockEntityType.Builder.of(ItemScrubberBlockEntity::new, ModBlocks.ITEM_SCRUBBER.get()).build(null));
|
||||||
|
|
||||||
|
public static final RegistryObject <BlockEntityType <MagicalScrubberBlockEntity>> MAGICAL_SCRUBBER = ENTITIES.register("magical_scrubber", ()-> BlockEntityType.Builder.of(MagicalScrubberBlockEntity::new, ModBlocks.MAGICAL_SCRUBBER.get()).build(null));
|
||||||
|
|
||||||
|
|
||||||
public static void register(IEventBus eventBus)
|
public static void register(IEventBus eventBus)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@ public class OTEServerConfig {
|
||||||
public static final ForgeConfigSpec SPEC;
|
public static final ForgeConfigSpec SPEC;
|
||||||
|
|
||||||
public static final ForgeConfigSpec.ConfigValue<List<ItemStack>> INITIAL_ITEMS_TO_GIVE_ON_FIRST_JOIN;
|
public static final ForgeConfigSpec.ConfigValue<List<ItemStack>> INITIAL_ITEMS_TO_GIVE_ON_FIRST_JOIN;
|
||||||
public static final ForgeConfigSpec.ConfigValue<Float> SPAWN_EGG_CHANCE;
|
public static final ForgeConfigSpec.ConfigValue<Double> SPAWN_EGG_CHANCE;
|
||||||
|
|
||||||
public static final ForgeConfigSpec.ConfigValue<String> HOST_ADDR;
|
public static final ForgeConfigSpec.ConfigValue<String> HOST_ADDR;
|
||||||
public static final ForgeConfigSpec.ConfigValue<Integer> PORT;
|
public static final ForgeConfigSpec.ConfigValue<Integer> PORT;
|
||||||
|
@ -46,7 +46,7 @@ public class OTEServerConfig {
|
||||||
|
|
||||||
BUILDER.push("OTE");
|
BUILDER.push("OTE");
|
||||||
INITIAL_ITEMS_TO_GIVE_ON_FIRST_JOIN = BUILDER.comment("What items, identified by modid:item, to give to a brand new user on the server").define("New Player Gear", defaults);
|
INITIAL_ITEMS_TO_GIVE_ON_FIRST_JOIN = BUILDER.comment("What items, identified by modid:item, to give to a brand new user on the server").define("New Player Gear", defaults);
|
||||||
SPAWN_EGG_CHANCE = BUILDER.comment("What is the chance for a spawn egg to drop from a mob when looting 3 is used? Default: 0.25").define("spawn_egg_chance", 0.25F);
|
SPAWN_EGG_CHANCE = BUILDER.comment("What is the chance for a spawn egg to drop from a mob when looting 3 is used? Default: 0.25").define("spawn_egg_chance", 0.25);
|
||||||
BUILDER.pop();
|
BUILDER.pop();
|
||||||
|
|
||||||
BUILDER.push("DATABASE");
|
BUILDER.push("DATABASE");
|
||||||
|
|
|
@ -1,15 +1,22 @@
|
||||||
package dev.zontreck.otemod.enchantments;
|
package dev.zontreck.otemod.enchantments;
|
||||||
|
|
||||||
import dev.zontreck.otemod.OTEMod;
|
import dev.zontreck.otemod.OTEMod;
|
||||||
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
|
import net.minecraft.server.level.ServerPlayerGameMode;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
import net.minecraft.world.entity.EquipmentSlot;
|
||||||
import net.minecraft.world.entity.player.Abilities;
|
import net.minecraft.world.entity.player.Abilities;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.item.ArmorItem;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.item.enchantment.Enchantment;
|
import net.minecraft.world.item.enchantment.Enchantment;
|
||||||
import net.minecraft.world.item.enchantment.EnchantmentCategory;
|
import net.minecraft.world.item.enchantment.EnchantmentCategory;
|
||||||
|
import net.minecraft.world.item.enchantment.Enchantments;
|
||||||
|
import net.minecraft.world.item.enchantment.SoulSpeedEnchantment;
|
||||||
import net.minecraftforge.event.entity.living.LivingEquipmentChangeEvent;
|
import net.minecraftforge.event.entity.living.LivingEquipmentChangeEvent;
|
||||||
|
import net.minecraftforge.event.entity.player.PlayerEvent;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
|
import net.minecraftforge.fml.LogicalSide;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
|
||||||
public class FlightEnchantment extends Enchantment
|
public class FlightEnchantment extends Enchantment
|
||||||
|
@ -23,39 +30,52 @@ public class FlightEnchantment extends Enchantment
|
||||||
{
|
{
|
||||||
if(ev.getEntity().level.isClientSide)return;
|
if(ev.getEntity().level.isClientSide)return;
|
||||||
|
|
||||||
|
|
||||||
ServerPlayer sp = (ServerPlayer)ev.getEntity();
|
ServerPlayer sp = (ServerPlayer)ev.getEntity();
|
||||||
ItemStack feet = sp.getItemBySlot(EquipmentSlot.FEET);
|
recheck(sp);
|
||||||
ItemStack legs = sp.getItemBySlot(EquipmentSlot.LEGS);
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean hasFlight = false;
|
private static void recheck(ServerPlayer sp)
|
||||||
|
{
|
||||||
|
if(sp.gameMode.isCreative())return; // Don't mess with the creative mode attributes
|
||||||
|
|
||||||
if(feet.getEnchantmentLevel(ModEnchantments.FLIGHT_ENCHANTMENT.get())>0)hasFlight=true;
|
ItemStack feet = sp.getItemBySlot(EquipmentSlot.FEET);
|
||||||
if(legs.getEnchantmentLevel(ModEnchantments.FLIGHT_ENCHANTMENT.get())>0)hasFlight=true;
|
|
||||||
|
|
||||||
Abilities playerAbilities = sp.getAbilities();
|
boolean hasFlight = false;
|
||||||
if(playerAbilities.mayfly == false)
|
|
||||||
{
|
|
||||||
if(hasFlight){
|
|
||||||
playerAbilities.mayfly=true;
|
|
||||||
sp.onUpdateAbilities();
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
if(!hasFlight){
|
|
||||||
|
|
||||||
playerAbilities.mayfly=false;
|
if(feet.getEnchantmentLevel(ModEnchantments.FLIGHT_ENCHANTMENT.get())>0)hasFlight=true;
|
||||||
playerAbilities.flying=false;
|
|
||||||
|
|
||||||
sp.onUpdateAbilities();
|
Abilities playerAbilities = sp.getAbilities();
|
||||||
}
|
if(playerAbilities.mayfly == false)
|
||||||
|
{
|
||||||
|
if(hasFlight){
|
||||||
|
playerAbilities.mayfly=true;
|
||||||
|
sp.onUpdateAbilities();
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if(!hasFlight){
|
||||||
|
|
||||||
|
playerAbilities.mayfly=false;
|
||||||
|
playerAbilities.flying=false;
|
||||||
|
|
||||||
|
sp.onUpdateAbilities();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public static void onGameModeChange(PlayerEvent.PlayerChangeGameModeEvent ev)
|
||||||
|
{
|
||||||
|
if(ev.getEntity().level.isClientSide)return;
|
||||||
|
|
||||||
|
recheck((ServerPlayer)ev.getEntity());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public FlightEnchantment()
|
public FlightEnchantment(EquipmentSlot... slots)
|
||||||
{
|
{
|
||||||
super(Rarity.RARE, EnchantmentCategory.ARMOR, new EquipmentSlot[] {EquipmentSlot.FEET, EquipmentSlot.LEGS});
|
super(Rarity.VERY_RARE, EnchantmentCategory.ARMOR_FEET, slots);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -75,11 +95,7 @@ public class FlightEnchantment extends Enchantment
|
||||||
{
|
{
|
||||||
return this.getMinCost(level) + 15;
|
return this.getMinCost(level) + 15;
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
public boolean canApplyAtEnchantingTable(ItemStack stack)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isTreasureOnly(){
|
public boolean isTreasureOnly(){
|
||||||
return true;
|
return true;
|
||||||
|
@ -90,7 +106,8 @@ public class FlightEnchantment extends Enchantment
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not a bug. Flight is meant to be a permanent upgrade to a item. It is considered a curse due to unstable behavior that can randomly happen if the enchantment level is now maxxed out.
|
// Not a bug. Flight is meant to be a permanent upgrade to a item. It is considered a curse due to unstable behavior. Flight will eat up durability and forge energy
|
||||||
|
// Flight should NOT be able to be removed via the grindstone
|
||||||
@Override
|
@Override
|
||||||
public boolean isCurse()
|
public boolean isCurse()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
package dev.zontreck.otemod.enchantments;
|
package dev.zontreck.otemod.enchantments;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import dev.zontreck.otemod.configs.OTEServerConfig;
|
||||||
|
import net.minecraft.util.RandomSource;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
import net.minecraft.world.entity.EquipmentSlot;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.item.SwordItem;
|
import net.minecraft.world.item.SwordItem;
|
||||||
|
@ -8,6 +12,7 @@ import net.minecraft.world.item.enchantment.EnchantmentCategory;
|
||||||
|
|
||||||
public class MobEggEnchantment extends Enchantment
|
public class MobEggEnchantment extends Enchantment
|
||||||
{
|
{
|
||||||
|
public static final String TAG_BIAS = "mob_egging_bias";
|
||||||
|
|
||||||
public MobEggEnchantment()
|
public MobEggEnchantment()
|
||||||
{
|
{
|
||||||
|
@ -55,4 +60,14 @@ public class MobEggEnchantment extends Enchantment
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean givesEgg(int level, int bias)
|
||||||
|
{
|
||||||
|
double CHANCE = OTEServerConfig.SPAWN_EGG_CHANCE.get() * 100;
|
||||||
|
|
||||||
|
CHANCE *= (level / 0.5);
|
||||||
|
CHANCE += bias;
|
||||||
|
|
||||||
|
double rng = Math.random()*100000;
|
||||||
|
return (rng <= CHANCE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package dev.zontreck.otemod.enchantments;
|
package dev.zontreck.otemod.enchantments;
|
||||||
|
|
||||||
import dev.zontreck.otemod.OTEMod;
|
import dev.zontreck.otemod.OTEMod;
|
||||||
|
import net.minecraft.world.entity.EquipmentSlot;
|
||||||
import net.minecraft.world.item.enchantment.Enchantment;
|
import net.minecraft.world.item.enchantment.Enchantment;
|
||||||
import net.minecraftforge.eventbus.api.IEventBus;
|
import net.minecraftforge.eventbus.api.IEventBus;
|
||||||
import net.minecraftforge.registries.DeferredRegister;
|
import net.minecraftforge.registries.DeferredRegister;
|
||||||
|
@ -8,11 +9,13 @@ import net.minecraftforge.registries.ForgeRegistries;
|
||||||
import net.minecraftforge.registries.RegistryObject;
|
import net.minecraftforge.registries.RegistryObject;
|
||||||
|
|
||||||
public class ModEnchantments {
|
public class ModEnchantments {
|
||||||
|
|
||||||
|
protected static final EquipmentSlot[] ARMOR_SLOTS = new EquipmentSlot[]{EquipmentSlot.HEAD, EquipmentSlot.CHEST, EquipmentSlot.LEGS, EquipmentSlot.FEET};
|
||||||
public static final DeferredRegister<Enchantment> REGISTERS = DeferredRegister.create(ForgeRegistries.ENCHANTMENTS, OTEMod.MOD_ID);
|
public static final DeferredRegister<Enchantment> REGISTERS = DeferredRegister.create(ForgeRegistries.ENCHANTMENTS, OTEMod.MOD_ID);
|
||||||
|
|
||||||
public static final RegistryObject<Enchantment> MOB_EGGING_ENCHANTMENT = REGISTERS.register("mob_egging", ()->new MobEggEnchantment());
|
public static final RegistryObject<Enchantment> MOB_EGGING_ENCHANTMENT = REGISTERS.register("mob_egging", ()->new MobEggEnchantment());
|
||||||
|
|
||||||
public static final RegistryObject<Enchantment> FLIGHT_ENCHANTMENT = REGISTERS.register("player_flight", ()->new FlightEnchantment());
|
public static final RegistryObject<Enchantment> FLIGHT_ENCHANTMENT = REGISTERS.register("player_flight", ()->new FlightEnchantment(EquipmentSlot.FEET));
|
||||||
|
|
||||||
public static void register(IEventBus bus){
|
public static void register(IEventBus bus){
|
||||||
REGISTERS.register(bus);
|
REGISTERS.register(bus);
|
||||||
|
|
13
src/main/java/dev/zontreck/otemod/entities/ModEntities.java
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
package dev.zontreck.otemod.entities;
|
||||||
|
|
||||||
|
import dev.zontreck.otemod.OTEMod;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.entity.EntityType;
|
||||||
|
import net.minecraftforge.registries.DeferredRegister;
|
||||||
|
import net.minecraftforge.registries.ForgeRegistries;
|
||||||
|
|
||||||
|
public class ModEntities {
|
||||||
|
public static final DeferredRegister<EntityType<?>> ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITY_TYPES, OTEMod.MOD_ID);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
95
src/main/java/dev/zontreck/otemod/entities/PossumEntity.java
Normal file
|
@ -0,0 +1,95 @@
|
||||||
|
// Made with Blockbench 4.6.4
|
||||||
|
// Exported for Minecraft version 1.17 or later with Mojang mappings
|
||||||
|
// Paste this class into your mod and generate all required imports
|
||||||
|
package dev.zontreck.otemod.entities;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
|
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.EntityModel;
|
||||||
|
import net.minecraft.client.model.geom.ModelLayerLocation;
|
||||||
|
import net.minecraft.client.model.geom.ModelPart;
|
||||||
|
import net.minecraft.client.model.geom.PartPose;
|
||||||
|
import net.minecraft.client.model.geom.builders.CubeDeformation;
|
||||||
|
import net.minecraft.client.model.geom.builders.CubeListBuilder;
|
||||||
|
import net.minecraft.client.model.geom.builders.LayerDefinition;
|
||||||
|
import net.minecraft.client.model.geom.builders.MeshDefinition;
|
||||||
|
import net.minecraft.client.model.geom.builders.PartDefinition;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
|
||||||
|
public class PossumEntity<T extends Entity> extends EntityModel<T> {
|
||||||
|
// This layer location should be baked with EntityRendererProvider.Context in the entity renderer and passed into this model's constructor
|
||||||
|
public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation(new ResourceLocation("modid", "possum"), "main");
|
||||||
|
private final ModelPart tail;
|
||||||
|
private final ModelPart body;
|
||||||
|
private final ModelPart feet;
|
||||||
|
private final ModelPart head;
|
||||||
|
private final ModelPart ears;
|
||||||
|
|
||||||
|
public PossumEntity(ModelPart root) {
|
||||||
|
this.tail = root.getChild("tail");
|
||||||
|
this.body = root.getChild("body");
|
||||||
|
this.feet = root.getChild("feet");
|
||||||
|
this.head = root.getChild("head");
|
||||||
|
this.ears = root.getChild("ears");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static LayerDefinition createBodyLayer() {
|
||||||
|
MeshDefinition meshdefinition = new MeshDefinition();
|
||||||
|
PartDefinition partdefinition = meshdefinition.getRoot();
|
||||||
|
|
||||||
|
PartDefinition tail = partdefinition.addOrReplaceChild("tail", CubeListBuilder.create().texOffs(10, 29).addBox(-12.0F, -5.0F, -9.0F, 2.0F, 1.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(10, 29).addBox(-12.0F, -4.0F, -8.0F, 2.0F, 1.0F, 1.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(14, 25).addBox(-12.0F, -2.0F, -11.0F, 1.0F, 1.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(14, 25).addBox(-12.0F, -1.0F, -12.0F, 2.0F, 1.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(14, 25).addBox(-11.0F, -2.0F, -12.0F, 1.0F, 1.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(14, 25).addBox(-12.0F, -1.0F, -13.0F, 2.0F, 1.0F, 1.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(0, 0).addBox(-13.0F, -4.0F, -10.0F, 1.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(0, 0).addBox(-12.0F, -4.0F, -9.0F, 1.0F, 2.0F, 1.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(6, 25).addBox(-12.0F, -4.0F, -11.0F, 2.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(0, 4).addBox(-14.0F, -3.0F, -12.0F, 2.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(0, 32).addBox(-12.0F, -2.0F, -13.0F, 1.0F, 1.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(16, 31).addBox(-13.0F, -1.0F, -16.0F, 1.0F, 1.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(10, 29).addBox(-13.0F, -2.0F, -14.0F, 1.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(14, 25).addBox(-13.0F, 2.0F, -18.0F, 1.0F, 1.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(6, 25).addBox(-12.0F, -1.0F, -15.0F, 2.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(0, 4).addBox(-13.0F, 0.0F, -17.0F, 2.0F, 1.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(0, 4).addBox(-12.0F, 1.0F, -17.0F, 1.0F, 1.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(0, 32).addBox(-13.0F, 1.0F, -18.0F, 1.0F, 1.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(16, 31).addBox(-14.0F, 1.0F, -18.0F, 1.0F, 2.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offset(5.0F, 23.0F, 10.0F));
|
||||||
|
|
||||||
|
PartDefinition body = partdefinition.addOrReplaceChild("body", CubeListBuilder.create().texOffs(14, 14).addBox(-4.0F, -7.0F, 6.0F, 7.0F, 4.0F, 1.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(0, 0).addBox(-5.0F, -7.75F, -2.0F, 9.0F, 6.0F, 8.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(20, 19).addBox(-4.0F, -7.0F, -3.0F, 7.0F, 4.0F, 1.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 24.0F, 0.0F));
|
||||||
|
|
||||||
|
PartDefinition feet = partdefinition.addOrReplaceChild("feet", CubeListBuilder.create().texOffs(26, 0).addBox(-5.0F, -2.0F, -1.9F, 3.0F, 1.0F, 3.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(22, 24).addBox(-5.0F, -2.0F, 3.0F, 3.0F, 1.0F, 3.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(26, 4).addBox(1.0F, -2.0F, -1.9F, 3.0F, 1.0F, 3.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(23, 28).addBox(1.0F, -2.0F, 3.1F, 3.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 24.0F, 0.0F));
|
||||||
|
|
||||||
|
PartDefinition head = partdefinition.addOrReplaceChild("head", CubeListBuilder.create().texOffs(0, 14).addBox(2.0F, -12.0F, -1.0F, 4.0F, 5.0F, 6.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(0, 25).addBox(6.0F, -10.0F, 0.0F, 1.0F, 3.0F, 4.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(31, 24).addBox(7.0F, -9.0F, 1.0F, 1.0F, 1.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(16, 24).addBox(1.0F, -11.0F, 0.0F, 1.0F, 3.0F, 4.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 24.0F, 0.0F));
|
||||||
|
|
||||||
|
PartDefinition ears = partdefinition.addOrReplaceChild("ears", CubeListBuilder.create().texOffs(30, 14).addBox(3.0F, -13.0F, -2.0F, 1.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
|
||||||
|
.texOffs(0, 14).addBox(3.0F, -13.0F, 4.0F, 1.0F, 2.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 24.0F, 0.0F));
|
||||||
|
|
||||||
|
return LayerDefinition.create(meshdefinition, 64, 64);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setupAnim(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) {
|
||||||
|
tail.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
|
||||||
|
body.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
|
||||||
|
feet.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
|
||||||
|
head.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
|
||||||
|
ears.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,7 +3,7 @@ package dev.zontreck.otemod.events;
|
||||||
import dev.zontreck.otemod.OTEMod;
|
import dev.zontreck.otemod.OTEMod;
|
||||||
import dev.zontreck.otemod.integrations.KeyBindings;
|
import dev.zontreck.otemod.integrations.KeyBindings;
|
||||||
import dev.zontreck.otemod.networking.ModMessages;
|
import dev.zontreck.otemod.networking.ModMessages;
|
||||||
import dev.zontreck.otemod.networking.packets.OpenVaultPacket;
|
import dev.zontreck.otemod.networking.packets.OpenVaultC2SPacket;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.client.event.InputEvent;
|
import net.minecraftforge.client.event.InputEvent;
|
||||||
import net.minecraftforge.client.event.RegisterKeyMappingsEvent;
|
import net.minecraftforge.client.event.RegisterKeyMappingsEvent;
|
||||||
|
@ -21,7 +21,7 @@ public class ClientEvents {
|
||||||
//OTEMod.LOGGER.info("KEY PRESS: "+event.getKey());
|
//OTEMod.LOGGER.info("KEY PRESS: "+event.getKey());
|
||||||
if(KeyBindings.OPEN_VAULT.consumeClick())
|
if(KeyBindings.OPEN_VAULT.consumeClick())
|
||||||
{
|
{
|
||||||
ModMessages.sendToServer(new OpenVaultPacket(0, false, 0));
|
ModMessages.sendToServer(new OpenVaultC2SPacket(0, false, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,14 @@ package dev.zontreck.otemod.events;
|
||||||
|
|
||||||
import dev.zontreck.otemod.OTEMod;
|
import dev.zontreck.otemod.OTEMod;
|
||||||
import dev.zontreck.otemod.configs.OTEServerConfig;
|
import dev.zontreck.otemod.configs.OTEServerConfig;
|
||||||
|
import dev.zontreck.otemod.enchantments.MobEggEnchantment;
|
||||||
import dev.zontreck.otemod.enchantments.ModEnchantments;
|
import dev.zontreck.otemod.enchantments.ModEnchantments;
|
||||||
|
import dev.zontreck.otemod.items.tags.ItemStatType;
|
||||||
|
import dev.zontreck.otemod.items.tags.ItemStatistics;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
@ -35,19 +39,29 @@ public class EventHandler {
|
||||||
ServerPlayer play = (ServerPlayer)ent;
|
ServerPlayer play = (ServerPlayer)ent;
|
||||||
LivingEntity killed = ev.getEntity();
|
LivingEntity killed = ev.getEntity();
|
||||||
|
|
||||||
int levelOfEgging = play.getMainHandItem().getEnchantmentLevel(ModEnchantments.MOB_EGGING_ENCHANTMENT.get());
|
ItemStack stack = play.getMainHandItem();
|
||||||
float CHANCE = (OTEServerConfig.SPAWN_EGG_CHANCE.get()*1000);
|
int levelOfEgging = stack.getEnchantmentLevel(ModEnchantments.MOB_EGGING_ENCHANTMENT.get());
|
||||||
|
|
||||||
CHANCE += (levelOfEgging * 0.5f);
|
if(levelOfEgging==0)return;
|
||||||
if(killed.level.random.nextInt(0,100000) <= CHANCE)
|
CompoundTag tag = stack.getTag();
|
||||||
|
int bias = tag.getInt(MobEggEnchantment.TAG_BIAS);
|
||||||
|
|
||||||
|
|
||||||
|
if(MobEggEnchantment.givesEgg(levelOfEgging, bias))
|
||||||
{
|
{
|
||||||
|
bias=0;
|
||||||
|
tag.putInt(MobEggEnchantment.TAG_BIAS, bias);
|
||||||
// .25% chance
|
// .25% chance
|
||||||
// Check enchantment level for looting
|
// Check enchantment level for looting
|
||||||
int level = play.getMainHandItem().getEnchantmentLevel(Enchantments.MOB_LOOTING);
|
int level = stack.getEnchantmentLevel(Enchantments.MOB_LOOTING);
|
||||||
if(level==3){
|
if(level==3){
|
||||||
ItemStack egg = new ItemStack(ForgeSpawnEggItem.fromEntityType(killed.getType()));
|
ItemStack egg = new ItemStack(ForgeSpawnEggItem.fromEntityType(killed.getType()));
|
||||||
ev.getDrops().add(new ItemEntity(killed.level, killed.getX(), killed.getY(), killed.getZ(), egg));
|
ev.getDrops().add(new ItemEntity(killed.level, killed.getX(), killed.getY(), killed.getZ(), egg));
|
||||||
|
LoreHandlers.updateItem(stack, ItemStatType.EGGING);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
bias += 1;
|
||||||
|
tag.putInt(MobEggEnchantment.TAG_BIAS, bias);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,7 +134,8 @@ public class LoreHandlers {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateItem(ItemStack weaponUsed, ItemStatType type)
|
// Only valid to be used by OTEMod
|
||||||
|
protected static void updateItem(ItemStack weaponUsed, ItemStatType type)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Update the mob kill count
|
// Update the mob kill count
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
package dev.zontreck.otemod.implementation;
|
||||||
|
|
||||||
|
public class MouseHelpers {
|
||||||
|
public static boolean isMouseOver(double mouseX, double mouseY, int x, int y, int sizeX, int sizeY)
|
||||||
|
{
|
||||||
|
return (mouseX>=x && mouseX <= x+sizeX) && (mouseY >= y && mouseY <= y+sizeY);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isMouseOver(double mouseX, double mouseY, int x, int y, int size)
|
||||||
|
{
|
||||||
|
return isMouseOver(mouseX, mouseY, x, y, size,size);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static boolean isMouseOver(double mouseX, double mouseY, int x, int y)
|
||||||
|
{
|
||||||
|
return isMouseOver(mouseX, mouseY, x, y, 16);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package dev.zontreck.otemod.implementation;
|
package dev.zontreck.otemod.implementation.energy;
|
||||||
|
|
||||||
import net.minecraftforge.energy.EnergyStorage;
|
import net.minecraftforge.energy.EnergyStorage;
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
package dev.zontreck.otemod.implementation.energy.screenrenderer;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.Rect2i;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
|
import net.minecraftforge.energy.IEnergyStorage;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* BluSunrize
|
||||||
|
* Copyright (c) 2021
|
||||||
|
*
|
||||||
|
* This code is licensed under "Blu's License of Common Sense"
|
||||||
|
* Details can be found in the license file in the root folder of this project
|
||||||
|
*/
|
||||||
|
public class EnergyInfoArea extends InfoArea {
|
||||||
|
private final IEnergyStorage energy;
|
||||||
|
|
||||||
|
public EnergyInfoArea(int xMin, int yMin) {
|
||||||
|
this(xMin, yMin, null,8,64);
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnergyInfoArea(int xMin, int yMin, IEnergyStorage energy) {
|
||||||
|
this(xMin, yMin, energy,8,64);
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnergyInfoArea(int xMin, int yMin, IEnergyStorage energy, int width, int height) {
|
||||||
|
super(new Rect2i(xMin, yMin, width, height));
|
||||||
|
this.energy = energy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Component> getTooltips() {
|
||||||
|
return List.of(Component.literal(energy.getEnergyStored()+"/"+energy.getMaxEnergyStored()+" FE"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void draw(PoseStack transform) {
|
||||||
|
final int height = area.getHeight();
|
||||||
|
int stored = (int)(height*(energy.getEnergyStored()/(float)energy.getMaxEnergyStored()));
|
||||||
|
fillGradient(
|
||||||
|
transform,
|
||||||
|
area.getX(), area.getY()+(height-stored),
|
||||||
|
area.getX() + area.getWidth(), area.getY() +area.getHeight(),
|
||||||
|
0xffb51500, 0xff600b00
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package dev.zontreck.otemod.implementation.energy.screenrenderer;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
|
|
||||||
|
import net.minecraft.client.gui.GuiComponent;
|
||||||
|
import net.minecraft.client.renderer.Rect2i;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* BluSunrize
|
||||||
|
* Copyright (c) 2021
|
||||||
|
*
|
||||||
|
* This code is licensed under "Blu's License of Common Sense"
|
||||||
|
* Details can be found in the license file in the root folder of this project
|
||||||
|
*/
|
||||||
|
public abstract class InfoArea extends GuiComponent {
|
||||||
|
protected final Rect2i area;
|
||||||
|
|
||||||
|
protected InfoArea(Rect2i area) {
|
||||||
|
this.area = area;
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract void draw(PoseStack transform);
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
package dev.zontreck.otemod.implementation.inits;
|
package dev.zontreck.otemod.implementation.inits;
|
||||||
|
|
||||||
import dev.zontreck.otemod.OTEMod;
|
import dev.zontreck.otemod.OTEMod;
|
||||||
import dev.zontreck.otemod.implementation.scrubber.ScrubberMenu;
|
import dev.zontreck.otemod.implementation.scrubber.ItemScrubberMenu;
|
||||||
|
import dev.zontreck.otemod.implementation.scrubber.MagicalScrubberMenu;
|
||||||
import dev.zontreck.otemod.implementation.vault.VaultMenu;
|
import dev.zontreck.otemod.implementation.vault.VaultMenu;
|
||||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||||
import net.minecraft.world.inventory.MenuType;
|
import net.minecraft.world.inventory.MenuType;
|
||||||
|
@ -18,7 +19,8 @@ public final class ModMenuTypes
|
||||||
|
|
||||||
public static final RegistryObject <MenuType <VaultMenu>> VAULT = CONTAINERS.register("vault", ()-> new MenuType<>(VaultMenu::new));
|
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");
|
public static final RegistryObject<MenuType<ItemScrubberMenu>> SCRUBBER = registerMenuType(ItemScrubberMenu::new, "item_scrubber_menu");
|
||||||
|
public static final RegistryObject<MenuType<MagicalScrubberMenu>> MAGIC_SCRUBBER = registerMenuType(MagicalScrubberMenu::new, "magical_scrubber_menu");
|
||||||
|
|
||||||
|
|
||||||
private static <T extends AbstractContainerMenu> RegistryObject<MenuType<T>> registerMenuType(IContainerFactory<T> factory, String name)
|
private static <T extends AbstractContainerMenu> RegistryObject<MenuType<T>> registerMenuType(IContainerFactory<T> factory, String name)
|
||||||
|
|
|
@ -18,18 +18,18 @@ import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||||
import net.minecraftforge.items.SlotItemHandler;
|
import net.minecraftforge.items.SlotItemHandler;
|
||||||
|
|
||||||
public class ScrubberMenu extends AbstractContainerMenu
|
public class ItemScrubberMenu extends AbstractContainerMenu
|
||||||
{
|
{
|
||||||
public final ItemScrubberBlockEntity entity;
|
public final ItemScrubberBlockEntity entity;
|
||||||
private final Level level;
|
private final Level level;
|
||||||
private final ContainerData data;
|
private final ContainerData data;
|
||||||
|
|
||||||
public ScrubberMenu(int id, Inventory inv, FriendlyByteBuf buf)
|
public ItemScrubberMenu(int id, Inventory inv, FriendlyByteBuf buf)
|
||||||
{
|
{
|
||||||
this(id, inv, inv.player.level.getBlockEntity(buf.readBlockPos()), new SimpleContainerData(1));
|
this(id, inv, inv.player.level.getBlockEntity(buf.readBlockPos()), new SimpleContainerData(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ScrubberMenu(int id, Inventory inv, BlockEntity entity, ContainerData data){
|
public ItemScrubberMenu(int id, Inventory inv, BlockEntity entity, ContainerData data){
|
||||||
super(ModMenuTypes.SCRUBBER.get(), id);
|
super(ModMenuTypes.SCRUBBER.get(), id);
|
||||||
|
|
||||||
checkContainerSize(inv, 1);
|
checkContainerSize(inv, 1);
|
|
@ -1,34 +1,48 @@
|
||||||
package dev.zontreck.otemod.implementation.scrubber;
|
package dev.zontreck.otemod.implementation.scrubber;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
|
|
||||||
import dev.zontreck.otemod.OTEMod;
|
import dev.zontreck.otemod.OTEMod;
|
||||||
|
import dev.zontreck.otemod.implementation.MouseHelpers;
|
||||||
|
import dev.zontreck.otemod.implementation.energy.screenrenderer.EnergyInfoArea;
|
||||||
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
|
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
|
||||||
import net.minecraft.client.renderer.GameRenderer;
|
import net.minecraft.client.renderer.GameRenderer;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.entity.player.Inventory;
|
import net.minecraft.world.entity.player.Inventory;
|
||||||
|
|
||||||
public class ScrubberScreen extends AbstractContainerScreen<ScrubberMenu>
|
public class ItemScrubberScreen extends AbstractContainerScreen<ItemScrubberMenu>
|
||||||
{
|
{
|
||||||
private static final ResourceLocation TEXTURE = new ResourceLocation(OTEMod.MOD_ID, "textures/gui/item_scrubber_gui.png");
|
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_) {
|
private EnergyInfoArea EIA;
|
||||||
|
|
||||||
|
public ItemScrubberScreen(ItemScrubberMenu p_97741_, Inventory p_97742_, Component p_97743_) {
|
||||||
super(p_97741_, p_97742_, p_97743_);
|
super(p_97741_, p_97742_, p_97743_);
|
||||||
|
|
||||||
|
|
||||||
this.topPos=0;
|
this.topPos=0;
|
||||||
this.leftPos=0;
|
this.leftPos=0;
|
||||||
|
|
||||||
this.imageWidth = 207;
|
this.imageWidth = 208;
|
||||||
this.imageHeight = 164;
|
this.imageHeight = 165;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void init()
|
protected void init()
|
||||||
{
|
{
|
||||||
super.init();
|
super.init();
|
||||||
|
assignEnergyArea();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void assignEnergyArea() {
|
||||||
|
int x = (width - imageWidth )/2;
|
||||||
|
int y = (height - imageHeight)/2;
|
||||||
|
|
||||||
|
EIA = new EnergyInfoArea(x+188, y+69, menu.entity.getEnergyStorage(), 7, 72);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,6 +54,7 @@ public class ScrubberScreen extends AbstractContainerScreen<ScrubberMenu>
|
||||||
|
|
||||||
blit(poseStack, this.leftPos, this.topPos, 0,0, imageWidth, imageHeight);
|
blit(poseStack, this.leftPos, this.topPos, 0,0, imageWidth, imageHeight);
|
||||||
renderUncraftingProgress(poseStack);
|
renderUncraftingProgress(poseStack);
|
||||||
|
EIA.draw(poseStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,9 +63,18 @@ public class ScrubberScreen extends AbstractContainerScreen<ScrubberMenu>
|
||||||
{
|
{
|
||||||
this.font.draw(stack, this.title.getString(), 63, 12, 0xFFFFFF);
|
this.font.draw(stack, this.title.getString(), 63, 12, 0xFFFFFF);
|
||||||
|
|
||||||
|
int x = (width - imageWidth )/2;
|
||||||
|
int y = (height - imageHeight)/2;
|
||||||
|
renderEnergy(stack, mouseX, mouseY, x, y);
|
||||||
//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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void renderEnergy(PoseStack stack, int mouseX, int mouseY, int x, int y) {
|
||||||
|
if(isMouseAbove(mouseX, mouseY, x, y, 188, 69, 7, 72)){
|
||||||
|
renderTooltip(stack, EIA.getTooltips(), Optional.empty(), mouseX-x, mouseY-y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void renderUncraftingProgress(PoseStack stack)
|
private void renderUncraftingProgress(PoseStack stack)
|
||||||
{
|
{
|
||||||
if(menu.isCrafting())
|
if(menu.isCrafting())
|
||||||
|
@ -67,4 +91,9 @@ public class ScrubberScreen extends AbstractContainerScreen<ScrubberMenu>
|
||||||
renderTooltip(stack, mouseX, mouseY);
|
renderTooltip(stack, mouseX, mouseY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isMouseAbove(int mouseX, int mouseY, int x, int y, int offsetX, int offsetY, int width, int height)
|
||||||
|
{
|
||||||
|
return MouseHelpers.isMouseOver(mouseX, mouseY, x+offsetX, y+offsetY, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -0,0 +1,154 @@
|
||||||
|
package dev.zontreck.otemod.implementation.scrubber;
|
||||||
|
|
||||||
|
import dev.zontreck.otemod.blocks.ModBlocks;
|
||||||
|
import dev.zontreck.otemod.blocks.entity.MagicalScrubberBlockEntity;
|
||||||
|
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 MagicalScrubberMenu extends AbstractContainerMenu
|
||||||
|
{
|
||||||
|
public final MagicalScrubberBlockEntity entity;
|
||||||
|
private final Level level;
|
||||||
|
private final ContainerData data;
|
||||||
|
|
||||||
|
public MagicalScrubberMenu(int id, Inventory inv, FriendlyByteBuf buf)
|
||||||
|
{
|
||||||
|
this(id, inv, inv.player.level.getBlockEntity(buf.readBlockPos()), new SimpleContainerData(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
public MagicalScrubberMenu(int id, Inventory inv, BlockEntity entity, ContainerData data){
|
||||||
|
super(ModMenuTypes.MAGIC_SCRUBBER.get(), id);
|
||||||
|
|
||||||
|
checkContainerSize(inv, 1);
|
||||||
|
this.entity = (MagicalScrubberBlockEntity)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 = MagicalScrubberBlockEntity.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.MAGICAL_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,99 @@
|
||||||
|
package dev.zontreck.otemod.implementation.scrubber;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
|
|
||||||
|
import dev.zontreck.otemod.OTEMod;
|
||||||
|
import dev.zontreck.otemod.implementation.MouseHelpers;
|
||||||
|
import dev.zontreck.otemod.implementation.energy.screenrenderer.EnergyInfoArea;
|
||||||
|
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 MagicalScrubberScreen extends AbstractContainerScreen<MagicalScrubberMenu>
|
||||||
|
{
|
||||||
|
private static final ResourceLocation TEXTURE = new ResourceLocation(OTEMod.MOD_ID, "textures/gui/item_scrubber_gui.png");
|
||||||
|
|
||||||
|
private EnergyInfoArea EIA;
|
||||||
|
|
||||||
|
public MagicalScrubberScreen(MagicalScrubberMenu p_97741_, Inventory p_97742_, Component p_97743_) {
|
||||||
|
super(p_97741_, p_97742_, p_97743_);
|
||||||
|
|
||||||
|
|
||||||
|
this.topPos=0;
|
||||||
|
this.leftPos=0;
|
||||||
|
|
||||||
|
this.imageWidth = 208;
|
||||||
|
this.imageHeight = 165;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void init()
|
||||||
|
{
|
||||||
|
super.init();
|
||||||
|
assignEnergyArea();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void assignEnergyArea() {
|
||||||
|
int x = (width - imageWidth )/2;
|
||||||
|
int y = (height - imageHeight)/2;
|
||||||
|
|
||||||
|
EIA = new EnergyInfoArea(x+188, y+69, menu.entity.getEnergyStorage(), 7, 72);
|
||||||
|
}
|
||||||
|
|
||||||
|
@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);
|
||||||
|
EIA.draw(poseStack);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void renderLabels(PoseStack stack, int mouseX, int mouseY)
|
||||||
|
{
|
||||||
|
this.font.draw(stack, this.title.getString(), 63, 12, 0xFFFFFF);
|
||||||
|
|
||||||
|
int x = (width - imageWidth )/2;
|
||||||
|
int y = (height - imageHeight)/2;
|
||||||
|
renderEnergy(stack, mouseX, mouseY, x, y);
|
||||||
|
//this.font.draw(stack, this.playerInventoryTitle.getString(), this.leftPos + 17, this.topPos + 123, 0xFFFFFF);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void renderEnergy(PoseStack stack, int mouseX, int mouseY, int x, int y) {
|
||||||
|
if(isMouseAbove(mouseX, mouseY, x, y, 188, 69, 7, 72)){
|
||||||
|
renderTooltip(stack, EIA.getTooltips(), Optional.empty(), mouseX-x, mouseY-y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isMouseAbove(int mouseX, int mouseY, int x, int y, int offsetX, int offsetY, int width, int height)
|
||||||
|
{
|
||||||
|
return MouseHelpers.isMouseOver(mouseX, mouseY, x+offsetX, y+offsetY, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -8,7 +8,7 @@ import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import dev.zontreck.otemod.OTEMod;
|
import dev.zontreck.otemod.OTEMod;
|
||||||
import dev.zontreck.otemod.commands.vaults.VaultCommand;
|
import dev.zontreck.otemod.commands.vaults.VaultCommand;
|
||||||
import dev.zontreck.otemod.networking.ModMessages;
|
import dev.zontreck.otemod.networking.ModMessages;
|
||||||
import dev.zontreck.otemod.networking.packets.OpenVaultPacket;
|
import dev.zontreck.otemod.networking.packets.OpenVaultC2SPacket;
|
||||||
import net.minecraft.client.gui.components.Button;
|
import net.minecraft.client.gui.components.Button;
|
||||||
import net.minecraft.client.gui.components.Button.OnPress;
|
import net.minecraft.client.gui.components.Button.OnPress;
|
||||||
import net.minecraft.client.gui.font.TextFieldHelper;
|
import net.minecraft.client.gui.font.TextFieldHelper;
|
||||||
|
@ -72,12 +72,12 @@ public class VaultScreen extends AbstractContainerScreen <VaultMenu>
|
||||||
this.addWidget(new Button(this.leftPos+7,this.topPos+84,16,16,Component.literal(""), (button)->{
|
this.addWidget(new Button(this.leftPos+7,this.topPos+84,16,16,Component.literal(""), (button)->{
|
||||||
thePlayer.closeContainer();
|
thePlayer.closeContainer();
|
||||||
|
|
||||||
ModMessages.sendToServer(new OpenVaultPacket(0,true,-1));
|
ModMessages.sendToServer(new OpenVaultC2SPacket(0,true,-1));
|
||||||
} ));
|
} ));
|
||||||
|
|
||||||
this.addWidget(new Button(this.leftPos+187,this.topPos+84,16,16,Component.literal(""), (button)->{
|
this.addWidget(new Button(this.leftPos+187,this.topPos+84,16,16,Component.literal(""), (button)->{
|
||||||
thePlayer.closeContainer();
|
thePlayer.closeContainer();
|
||||||
ModMessages.sendToServer(new OpenVaultPacket(0, true, 1));
|
ModMessages.sendToServer(new OpenVaultC2SPacket(0, true, 1));
|
||||||
} ));
|
} ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@ package dev.zontreck.otemod.items;
|
||||||
import dev.zontreck.otemod.OTEMod;
|
import dev.zontreck.otemod.OTEMod;
|
||||||
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.item.Items;
|
||||||
|
import net.minecraft.world.item.SimpleFoiledItem;
|
||||||
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;
|
||||||
|
@ -28,6 +30,16 @@ public class ModItems {
|
||||||
public static final RegistryObject<Item> PATTERN = ITEMS.register("pattern", () -> 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> 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 final RegistryObject<Item> COPPER_CAN = ITEMS.register("copper_can", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC).stacksTo(16)));
|
||||||
|
public static final RegistryObject<Item> ETERNIUM_INGOT = ITEMS.register("eternium_ingot", ()-> new SimpleFoiledItem(new Item.Properties().tab(CreativeModeTab.TAB_MATERIALS)));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static final RegistryObject<Item> MELTED_NETHER_STAR = ITEMS.register("melted_nether_star", () -> new SimpleFoiledItem(new Item.Properties().tab(CreativeModeTab.TAB_MISC).stacksTo(64)));
|
||||||
|
public static final RegistryObject<Item> SINGULARITY = ITEMS.register("singularity", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC).stacksTo(1)));
|
||||||
|
public static final RegistryObject<Item> ETERNIUM_ROD = ITEMS.register("eternium_rod", () -> new SimpleFoiledItem(new Item.Properties().tab(CreativeModeTab.TAB_MISC).stacksTo(64)));
|
||||||
|
public static final RegistryObject<Item> SCRUBBER_FRAME_PIECE = ITEMS.register("scrubber_frame_piece", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC).stacksTo(64)));
|
||||||
|
public static final RegistryObject<Item> SCRUBBER_FRAME = ITEMS.register("scrubber_frame", () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC).stacksTo(64)));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void register(IEventBus bus){
|
public static void register(IEventBus bus){
|
||||||
|
|
|
@ -8,5 +8,6 @@ public enum ItemStatType {
|
||||||
SHOVEL,
|
SHOVEL,
|
||||||
SHOVELPATH,
|
SHOVELPATH,
|
||||||
HOE,
|
HOE,
|
||||||
SHEARS
|
SHEARS,
|
||||||
|
EGGING
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,9 @@ public class ItemStatistics {
|
||||||
case SHEARS -> {
|
case SHEARS -> {
|
||||||
lore += "Sheep Shaved: ";
|
lore += "Sheep Shaved: ";
|
||||||
}
|
}
|
||||||
|
case EGGING -> {
|
||||||
|
lore += "Mobs Egged: ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
lore += ChatColor.doColors("!Green!"+val);
|
lore += ChatColor.doColors("!Green!"+val);
|
||||||
return lore;
|
return lore;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
package dev.zontreck.otemod.networking;
|
package dev.zontreck.otemod.networking;
|
||||||
|
|
||||||
import dev.zontreck.otemod.OTEMod;
|
import dev.zontreck.otemod.OTEMod;
|
||||||
import dev.zontreck.otemod.networking.packets.OpenVaultPacket;
|
import dev.zontreck.otemod.networking.packets.EnergySyncS2CPacket;
|
||||||
|
import dev.zontreck.otemod.networking.packets.OpenVaultC2SPacket;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
import net.minecraftforge.network.NetworkDirection;
|
import net.minecraftforge.network.NetworkDirection;
|
||||||
|
@ -28,10 +29,16 @@ public class ModMessages {
|
||||||
|
|
||||||
INSTANCE=net;
|
INSTANCE=net;
|
||||||
|
|
||||||
net.messageBuilder(OpenVaultPacket.class, id(), NetworkDirection.PLAY_TO_SERVER)
|
net.messageBuilder(OpenVaultC2SPacket.class, id(), NetworkDirection.PLAY_TO_SERVER)
|
||||||
.decoder(OpenVaultPacket::new)
|
.decoder(OpenVaultC2SPacket::new)
|
||||||
.encoder(OpenVaultPacket::toBytes)
|
.encoder(OpenVaultC2SPacket::toBytes)
|
||||||
.consumerMainThread(OpenVaultPacket::handle)
|
.consumerMainThread(OpenVaultC2SPacket::handle)
|
||||||
|
.add();
|
||||||
|
|
||||||
|
net.messageBuilder(EnergySyncS2CPacket.class, id(), NetworkDirection.PLAY_TO_CLIENT)
|
||||||
|
.decoder(EnergySyncS2CPacket::new)
|
||||||
|
.encoder(EnergySyncS2CPacket::toBytes)
|
||||||
|
.consumerMainThread(EnergySyncS2CPacket::handle)
|
||||||
.add();
|
.add();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,4 +50,9 @@ public class ModMessages {
|
||||||
{
|
{
|
||||||
INSTANCE.send(PacketDistributor.PLAYER.with(()->player), message);
|
INSTANCE.send(PacketDistributor.PLAYER.with(()->player), message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static <MSG> void sendToAll(MSG message)
|
||||||
|
{
|
||||||
|
INSTANCE.send(PacketDistributor.ALL.noArg(), message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
package dev.zontreck.otemod.networking.packets;
|
||||||
|
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
import dev.zontreck.otemod.blocks.entity.ItemScrubberBlockEntity;
|
||||||
|
import dev.zontreck.otemod.blocks.entity.MagicalScrubberBlockEntity;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.network.FriendlyByteBuf;
|
||||||
|
import net.minecraftforge.network.NetworkEvent;
|
||||||
|
|
||||||
|
public class EnergySyncS2CPacket {
|
||||||
|
private int energy;
|
||||||
|
private BlockPos pos;
|
||||||
|
|
||||||
|
public EnergySyncS2CPacket(int amount, BlockPos pos)
|
||||||
|
{
|
||||||
|
this.energy=amount;
|
||||||
|
this.pos=pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnergySyncS2CPacket(FriendlyByteBuf buf)
|
||||||
|
{
|
||||||
|
energy = buf.readInt();
|
||||||
|
pos = buf.readBlockPos();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void toBytes(FriendlyByteBuf buf)
|
||||||
|
{
|
||||||
|
buf.writeInt(energy);
|
||||||
|
buf.writeBlockPos(pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void handle(Supplier<NetworkEvent.Context> ctx)
|
||||||
|
{
|
||||||
|
NetworkEvent.Context context = ctx.get();
|
||||||
|
|
||||||
|
context.enqueueWork(()->
|
||||||
|
{
|
||||||
|
// WE ARE NOW ON THE CLIENT
|
||||||
|
if(Minecraft.getInstance().level.getBlockEntity(pos) instanceof ItemScrubberBlockEntity entity)
|
||||||
|
{
|
||||||
|
entity.setEnergy(energy);
|
||||||
|
} else if(Minecraft.getInstance().level.getBlockEntity(pos) instanceof MagicalScrubberBlockEntity entity)
|
||||||
|
{
|
||||||
|
entity.setEnergy(energy);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -6,22 +6,21 @@ import dev.zontreck.otemod.commands.vaults.VaultCommand;
|
||||||
import dev.zontreck.otemod.implementation.vault.VaultContainer;
|
import dev.zontreck.otemod.implementation.vault.VaultContainer;
|
||||||
import net.minecraft.network.FriendlyByteBuf;
|
import net.minecraft.network.FriendlyByteBuf;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
import net.minecraftforge.event.level.NoteBlockEvent.Change;
|
|
||||||
import net.minecraftforge.network.NetworkEvent;
|
import net.minecraftforge.network.NetworkEvent;
|
||||||
|
|
||||||
// This packet is only ever sent from the client to the server when requesting to open vaults using the EaseOfUse Buttons
|
// This packet is only ever sent from the client to the server when requesting to open vaults using the EaseOfUse Buttons
|
||||||
public class OpenVaultPacket {
|
public class OpenVaultC2SPacket {
|
||||||
private int vault=0;
|
private int vault=0;
|
||||||
private boolean change = false; // This is set to true when going previous or next.
|
private boolean change = false; // This is set to true when going previous or next.
|
||||||
private int changeDir = 0; // This is only in the packet when change is true. This is either a 1 or a -1.
|
private int changeDir = 0; // This is only in the packet when change is true. This is either a 1 or a -1.
|
||||||
public OpenVaultPacket(int vaultNum, boolean change, int changeDir)
|
public OpenVaultC2SPacket(int vaultNum, boolean change, int changeDir)
|
||||||
{
|
{
|
||||||
this.vault = vaultNum;
|
this.vault = vaultNum;
|
||||||
this.change = change;
|
this.change = change;
|
||||||
this.changeDir=changeDir;
|
this.changeDir=changeDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OpenVaultPacket(FriendlyByteBuf buf)
|
public OpenVaultC2SPacket(FriendlyByteBuf buf)
|
||||||
{
|
{
|
||||||
this.change = buf.readBoolean();
|
this.change = buf.readBoolean();
|
||||||
if(this.change)
|
if(this.change)
|
|
@ -19,7 +19,7 @@ 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.6.7" #mandatory
|
version="1.3.7.2" #mandatory
|
||||||
# A display name for the mod
|
# A display name for the mod
|
||||||
displayName="OTEMod" #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/
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "otemod:block/magical_scrubber"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "otemod:block/stable_singularity"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -22,6 +22,13 @@
|
||||||
"item.otemod.pattern": "Pattern",
|
"item.otemod.pattern": "Pattern",
|
||||||
"item.otemod.scorched_brick": "Scorched Brick",
|
"item.otemod.scorched_brick": "Scorched Brick",
|
||||||
"item.otemod.copper_can": "Copper Can",
|
"item.otemod.copper_can": "Copper Can",
|
||||||
|
"item.otemod.melted_nether_star": "Melted Nether Star",
|
||||||
|
"item.otemod.eternium_ingot": "Eternium Ingot",
|
||||||
|
"item.otemod.eternium_rod": "Eternium Rod",
|
||||||
|
"item.otemod.singularity": "Singularity",
|
||||||
|
"item.otemod.scrubber_frame_piece": "Scrubber Frame Component",
|
||||||
|
"item.otemod.scrubber_frame": "Scrubber Frame",
|
||||||
|
|
||||||
|
|
||||||
"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",
|
||||||
|
@ -35,6 +42,9 @@
|
||||||
"block.otemod.nether_grout": "Nether Grout",
|
"block.otemod.nether_grout": "Nether Grout",
|
||||||
"block.otemod.scorched_table": "Scorched Table",
|
"block.otemod.scorched_table": "Scorched Table",
|
||||||
"block.otemod.item_scrubber": "Item Scrubber",
|
"block.otemod.item_scrubber": "Item Scrubber",
|
||||||
|
"block.otemod.magical_scrubber": "Magical Scrubber",
|
||||||
|
"block.otemod.stable_singularity": "Stable Singularity",
|
||||||
|
|
||||||
|
|
||||||
"enchantment.otemod.mob_egging": "Mob Egging",
|
"enchantment.otemod.mob_egging": "Mob Egging",
|
||||||
"enchantment.otemod.player_flight": "Flight",
|
"enchantment.otemod.player_flight": "Flight",
|
||||||
|
|
|
@ -1,6 +1,322 @@
|
||||||
{
|
{
|
||||||
"parent": "block/cube_all",
|
"credit": "Made with Blockbench",
|
||||||
"textures": {
|
"render_type": "minecraft:translucent",
|
||||||
"all": "otemod:block/aurora_block"
|
"texture_size": [64, 64],
|
||||||
}
|
"textures": {
|
||||||
|
"0": "otemod:block/aurora/body",
|
||||||
|
"1": "otemod:block/aurora/inside",
|
||||||
|
"particle": "otemod:block/aurora/body"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [9, 15, 0],
|
||||||
|
"to": [16, 16, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [12.5, 6, 14.25, 6.25], "texture": "#0"},
|
||||||
|
"east": {"uv": [11, 3, 15, 3.25], "texture": "#0"},
|
||||||
|
"south": {"uv": [12.75, 12.25, 14.5, 12.5], "texture": "#0"},
|
||||||
|
"west": {"uv": [11, 3.25, 15, 3.5], "texture": "#0"},
|
||||||
|
"up": {"uv": [1.75, 4, 0, 0], "texture": "#0"},
|
||||||
|
"down": {"uv": [3.5, 0, 1.75, 4], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 0, 0],
|
||||||
|
"to": [7, 1, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [12.75, 12.5, 14.5, 12.75], "texture": "#0"},
|
||||||
|
"east": {"uv": [11, 3.5, 15, 3.75], "texture": "#0"},
|
||||||
|
"south": {"uv": [12.75, 12.75, 14.5, 13], "texture": "#0"},
|
||||||
|
"west": {"uv": [11, 3.75, 15, 4], "texture": "#0"},
|
||||||
|
"up": {"uv": [5.25, 4, 3.5, 0], "texture": "#0"},
|
||||||
|
"down": {"uv": [1.75, 4, 0, 8], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7, 0, 0],
|
||||||
|
"to": [9, 1, 7],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5.75, 8, 6.25, 8.25], "texture": "#0"},
|
||||||
|
"east": {"uv": [0.5, 13, 2.25, 13.25], "texture": "#0"},
|
||||||
|
"south": {"uv": [6.25, 8, 6.75, 8.25], "texture": "#0"},
|
||||||
|
"west": {"uv": [6, 13, 7.75, 13.25], "texture": "#0"},
|
||||||
|
"up": {"uv": [5, 13.75, 4.5, 12], "texture": "#0"},
|
||||||
|
"down": {"uv": [12.5, 4.5, 12, 6.25], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7, 0, 9],
|
||||||
|
"to": [9, 1, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5.75, 8.25, 6.25, 8.5], "texture": "#0"},
|
||||||
|
"east": {"uv": [7.75, 13, 9.5, 13.25], "texture": "#0"},
|
||||||
|
"south": {"uv": [6.25, 8.25, 6.75, 8.5], "texture": "#0"},
|
||||||
|
"west": {"uv": [9.5, 13, 11.25, 13.25], "texture": "#0"},
|
||||||
|
"up": {"uv": [5.5, 13.75, 5, 12], "texture": "#0"},
|
||||||
|
"down": {"uv": [6, 12, 5.5, 13.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [9, 0, 0],
|
||||||
|
"to": [16, 1, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [12.75, 13, 14.5, 13.25], "texture": "#0"},
|
||||||
|
"east": {"uv": [11, 4, 15, 4.25], "texture": "#0"},
|
||||||
|
"south": {"uv": [0.5, 13.25, 2.25, 13.5], "texture": "#0"},
|
||||||
|
"west": {"uv": [11, 4.25, 15, 4.5], "texture": "#0"},
|
||||||
|
"up": {"uv": [3.5, 8, 1.75, 4], "texture": "#0"},
|
||||||
|
"down": {"uv": [5.25, 4, 3.5, 8], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 1, 0],
|
||||||
|
"to": [1, 7, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10.25, 13.25, 10.5, 14.75], "texture": "#0"},
|
||||||
|
"east": {"uv": [7, 0, 11, 1.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [10.5, 13.25, 10.75, 14.75], "texture": "#0"},
|
||||||
|
"west": {"uv": [7, 1.5, 11, 3], "texture": "#0"},
|
||||||
|
"up": {"uv": [11.25, 8.5, 11, 4.5], "texture": "#0"},
|
||||||
|
"down": {"uv": [11.5, 4.5, 11.25, 8.5], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 7, 13],
|
||||||
|
"to": [1, 9, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6.75, 8, 7, 8.5], "texture": "#0"},
|
||||||
|
"east": {"uv": [4, 8, 5.75, 8.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [5.75, 8.5, 6, 9], "texture": "#0"},
|
||||||
|
"west": {"uv": [4, 8.5, 5.75, 9], "texture": "#0"},
|
||||||
|
"up": {"uv": [2.5, 14.75, 2.25, 13], "texture": "#0"},
|
||||||
|
"down": {"uv": [2.75, 13, 2.5, 14.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 9, 0],
|
||||||
|
"to": [1, 15, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10.75, 13.25, 11, 14.75], "texture": "#0"},
|
||||||
|
"east": {"uv": [7, 3, 11, 4.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [11, 13.25, 11.25, 14.75], "texture": "#0"},
|
||||||
|
"west": {"uv": [7, 4.5, 11, 6], "texture": "#0"},
|
||||||
|
"up": {"uv": [11.75, 8.5, 11.5, 4.5], "texture": "#0"},
|
||||||
|
"down": {"uv": [12, 4.5, 11.75, 8.5], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 7, 0],
|
||||||
|
"to": [1, 9, 7],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6, 8.5, 6.25, 9], "texture": "#0"},
|
||||||
|
"east": {"uv": [11.5, 9, 13.25, 9.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [6.25, 8.5, 6.5, 9], "texture": "#0"},
|
||||||
|
"west": {"uv": [11.5, 9.5, 13.25, 10], "texture": "#0"},
|
||||||
|
"up": {"uv": [3, 14.75, 2.75, 13], "texture": "#0"},
|
||||||
|
"down": {"uv": [3.25, 13, 3, 14.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [15, 12, 0],
|
||||||
|
"to": [16, 15, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [12.75, 13.25, 13, 14.75], "texture": "#0"},
|
||||||
|
"east": {"uv": [7, 6, 11, 7.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [13, 13.25, 13.25, 14.75], "texture": "#0"},
|
||||||
|
"west": {"uv": [7, 7.5, 11, 9], "texture": "#0"},
|
||||||
|
"up": {"uv": [3.75, 16, 3.5, 12], "texture": "#0"},
|
||||||
|
"down": {"uv": [4, 12, 3.75, 16], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [15, 7, 12],
|
||||||
|
"to": [16, 12, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6.5, 8.5, 6.75, 9], "texture": "#0"},
|
||||||
|
"east": {"uv": [11.5, 10, 13.25, 10.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [6.75, 8.5, 7, 9], "texture": "#0"},
|
||||||
|
"west": {"uv": [6, 12, 7.75, 12.5], "texture": "#0"},
|
||||||
|
"up": {"uv": [3.5, 14.75, 3.25, 13], "texture": "#0"},
|
||||||
|
"down": {"uv": [6.25, 13.25, 6, 15], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [15, 7, 0],
|
||||||
|
"to": [16, 12, 7],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [3.5, 9.5, 3.75, 10], "texture": "#0"},
|
||||||
|
"east": {"uv": [12, 6.25, 13.75, 6.75], "texture": "#0"},
|
||||||
|
"south": {"uv": [3.75, 9.5, 4, 10], "texture": "#0"},
|
||||||
|
"west": {"uv": [12, 6.75, 13.75, 7.25], "texture": "#0"},
|
||||||
|
"up": {"uv": [6.5, 15, 6.25, 13.25], "texture": "#0"},
|
||||||
|
"down": {"uv": [6.75, 13.25, 6.5, 15], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [15, 1, 0],
|
||||||
|
"to": [16, 7, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [13.25, 13.25, 13.5, 14.75], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 8, 4, 9.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [0.5, 13.5, 0.75, 15], "texture": "#0"},
|
||||||
|
"west": {"uv": [4, 9, 8, 10.5], "texture": "#0"},
|
||||||
|
"up": {"uv": [4.25, 16, 4, 12], "texture": "#0"},
|
||||||
|
"down": {"uv": [4.5, 12, 4.25, 16], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 9, 0],
|
||||||
|
"to": [15, 15, 1],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 9, 11.5, 10.5], "texture": "#0"},
|
||||||
|
"east": {"uv": [0.75, 13.5, 1, 15], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 9.5, 3.5, 11], "texture": "#0"},
|
||||||
|
"west": {"uv": [1, 13.5, 1.25, 15], "texture": "#0"},
|
||||||
|
"up": {"uv": [15.5, 7.5, 12, 7.25], "texture": "#0"},
|
||||||
|
"down": {"uv": [15.5, 7.5, 12, 7.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [9, 7, 0],
|
||||||
|
"to": [15, 9, 1],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0.5, 12.5, 2, 13], "texture": "#0"},
|
||||||
|
"east": {"uv": [3.5, 10, 3.75, 10.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [2, 12.5, 3.5, 13], "texture": "#0"},
|
||||||
|
"west": {"uv": [3.75, 10, 4, 10.5], "texture": "#0"},
|
||||||
|
"up": {"uv": [14.75, 10.25, 13.25, 10], "texture": "#0"},
|
||||||
|
"down": {"uv": [14.75, 10.25, 13.25, 10.5], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 3, 0],
|
||||||
|
"to": [7, 9, 1],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [12.5, 4.5, 14, 5], "texture": "#0"},
|
||||||
|
"east": {"uv": [10.5, 12.5, 10.75, 13], "texture": "#0"},
|
||||||
|
"south": {"uv": [12.5, 5, 14, 5.5], "texture": "#0"},
|
||||||
|
"west": {"uv": [10.75, 12.5, 11, 13], "texture": "#0"},
|
||||||
|
"up": {"uv": [8.25, 13.75, 6.75, 13.5], "texture": "#0"},
|
||||||
|
"down": {"uv": [9.75, 13.5, 8.25, 13.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 1, 0],
|
||||||
|
"to": [15, 3, 1],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [3.5, 10.5, 7, 12], "texture": "#0"},
|
||||||
|
"east": {"uv": [1.25, 13.5, 1.5, 15], "texture": "#0"},
|
||||||
|
"south": {"uv": [7, 10.5, 10.5, 12], "texture": "#0"},
|
||||||
|
"west": {"uv": [1.5, 13.5, 1.75, 15], "texture": "#0"},
|
||||||
|
"up": {"uv": [11.25, 12.25, 7.75, 12], "texture": "#0"},
|
||||||
|
"down": {"uv": [15.5, 7.75, 12, 8], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 1, 15],
|
||||||
|
"to": [15, 5, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10.5, 10.5, 14, 12], "texture": "#0"},
|
||||||
|
"east": {"uv": [1.75, 13.5, 2, 15], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 11, 3.5, 12.5], "texture": "#0"},
|
||||||
|
"west": {"uv": [2, 13.5, 2.25, 15], "texture": "#0"},
|
||||||
|
"up": {"uv": [15.5, 8.25, 12, 8], "texture": "#0"},
|
||||||
|
"down": {"uv": [15.5, 8.25, 12, 8.5], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 5, 15],
|
||||||
|
"to": [5, 11, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [12.5, 5.5, 14, 6], "texture": "#0"},
|
||||||
|
"east": {"uv": [11, 12.5, 11.25, 13], "texture": "#0"},
|
||||||
|
"south": {"uv": [6, 12.5, 7.5, 13], "texture": "#0"},
|
||||||
|
"west": {"uv": [13.75, 6.5, 14, 7], "texture": "#0"},
|
||||||
|
"up": {"uv": [15, 13.5, 13.5, 13.25], "texture": "#0"},
|
||||||
|
"down": {"uv": [15, 13.5, 13.5, 13.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [11, 5, 15],
|
||||||
|
"to": [15, 11, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [7.5, 12.5, 9, 13], "texture": "#0"},
|
||||||
|
"east": {"uv": [6.75, 13.75, 7, 14.25], "texture": "#0"},
|
||||||
|
"south": {"uv": [9, 12.5, 10.5, 13], "texture": "#0"},
|
||||||
|
"west": {"uv": [7, 13.75, 7.25, 14.25], "texture": "#0"},
|
||||||
|
"up": {"uv": [6, 14, 4.5, 13.75], "texture": "#0"},
|
||||||
|
"down": {"uv": [15.25, 6.25, 13.75, 6.5], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 11, 15],
|
||||||
|
"to": [15, 15, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [11, 0, 14.5, 1.5], "texture": "#0"},
|
||||||
|
"east": {"uv": [9.75, 13.5, 10, 15], "texture": "#0"},
|
||||||
|
"south": {"uv": [11, 1.5, 14.5, 3], "texture": "#0"},
|
||||||
|
"west": {"uv": [10, 13.5, 10.25, 15], "texture": "#0"},
|
||||||
|
"up": {"uv": [14.75, 12.25, 11.25, 12], "texture": "#0"},
|
||||||
|
"down": {"uv": [11.25, 12.25, 7.75, 12.5], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7, 15, 9],
|
||||||
|
"to": [9, 16, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [13.75, 7, 14.25, 7.25], "texture": "#0"},
|
||||||
|
"east": {"uv": [6.75, 13.25, 8.5, 13.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [7.25, 13.75, 7.75, 14], "texture": "#0"},
|
||||||
|
"west": {"uv": [8.5, 13.25, 10.25, 13.5], "texture": "#0"},
|
||||||
|
"up": {"uv": [11.75, 14, 11.25, 12.25], "texture": "#0"},
|
||||||
|
"down": {"uv": [12.25, 12.25, 11.75, 14], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [7, 15, 0],
|
||||||
|
"to": [9, 16, 7],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [7.75, 13.75, 8.25, 14], "texture": "#0"},
|
||||||
|
"east": {"uv": [13.25, 9, 15, 9.25], "texture": "#0"},
|
||||||
|
"south": {"uv": [8.25, 13.75, 8.75, 14], "texture": "#0"},
|
||||||
|
"west": {"uv": [13.25, 9.25, 15, 9.5], "texture": "#0"},
|
||||||
|
"up": {"uv": [12.75, 14, 12.25, 12.25], "texture": "#0"},
|
||||||
|
"down": {"uv": [0.5, 12.5, 0, 14.25], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [0, 15, 0],
|
||||||
|
"to": [7, 16, 16],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [13.25, 9.5, 15, 9.75], "texture": "#0"},
|
||||||
|
"east": {"uv": [11, 8.5, 15, 8.75], "texture": "#0"},
|
||||||
|
"south": {"uv": [13.25, 9.75, 15, 10], "texture": "#0"},
|
||||||
|
"west": {"uv": [11, 8.75, 15, 9], "texture": "#0"},
|
||||||
|
"up": {"uv": [7, 4, 5.25, 0], "texture": "#0"},
|
||||||
|
"down": {"uv": [7, 4, 5.25, 8], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "inner",
|
||||||
|
"from": [1, 1, 1],
|
||||||
|
"to": [15, 15, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 16, 16], "texture": "#1"},
|
||||||
|
"east": {"uv": [0, 0, 16, 16], "texture": "#1"},
|
||||||
|
"south": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "north"},
|
||||||
|
"west": {"uv": [0, 0, 16, 16], "texture": "#1"},
|
||||||
|
"up": {"uv": [16, 16, 0, 0], "texture": "#1"},
|
||||||
|
"down": {"uv": [16, 0, 0, 16], "texture": "#1"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "Outer Panels",
|
||||||
|
"origin": [0, 0, 0],
|
||||||
|
"color": 0,
|
||||||
|
"children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
|
||||||
|
},
|
||||||
|
24
|
||||||
|
]
|
||||||
}
|
}
|
|
@ -1,14 +1,16 @@
|
||||||
{
|
{
|
||||||
"credit": "Made with Blockbench",
|
"credit": "Made with Blockbench",
|
||||||
"render_type": "minecraft:translucent",
|
"render_type": "minecraft:translucent",
|
||||||
|
"texture_size": [64, 64],
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "otemod:block/scrubber/scrubber_top"
|
"0": "otemod:block/scrubber/scrubber_top",
|
||||||
|
"1": "otemod:block/scrubber/scrubber_old_internal_cube",
|
||||||
|
"particle": "otemod:block/scrubber/scrubber_old_internal_cube"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"from": [0, 0, 0],
|
"from": [0, 0, 0],
|
||||||
"to": [2, 2, 2],
|
"to": [2, 2, 2],
|
||||||
"color": 2,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
@ -21,7 +23,6 @@
|
||||||
{
|
{
|
||||||
"from": [0, 0, 14],
|
"from": [0, 0, 14],
|
||||||
"to": [2, 2, 16],
|
"to": [2, 2, 16],
|
||||||
"color": 2,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
@ -32,9 +33,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": [0, 10, 0],
|
"from": [0, 14, 0],
|
||||||
"to": [2, 12, 2],
|
"to": [2, 16, 2],
|
||||||
"color": 2,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
@ -45,9 +45,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": [0, 10, 14],
|
"from": [0, 14, 14],
|
||||||
"to": [2, 12, 16],
|
"to": [2, 16, 16],
|
||||||
"color": 2,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
@ -59,8 +58,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": [0, 2, 0],
|
"from": [0, 2, 0],
|
||||||
"to": [1, 10, 1],
|
"to": [1, 14, 1],
|
||||||
"color": 7,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
"north": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
"east": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
@ -72,8 +70,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": [0, 2, 15],
|
"from": [0, 2, 15],
|
||||||
"to": [1, 10, 16],
|
"to": [1, 14, 16],
|
||||||
"color": 7,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
"north": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
"east": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
@ -86,7 +83,6 @@
|
||||||
{
|
{
|
||||||
"from": [0, 0, 2],
|
"from": [0, 0, 2],
|
||||||
"to": [1, 1, 14],
|
"to": [1, 1, 14],
|
||||||
"color": 7,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
"east": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
@ -97,9 +93,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": [0, 11, 2],
|
"from": [0, 15, 2],
|
||||||
"to": [1, 12, 14],
|
"to": [1, 16, 14],
|
||||||
"color": 7,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
"east": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
@ -112,7 +107,6 @@
|
||||||
{
|
{
|
||||||
"from": [14, 0, 14],
|
"from": [14, 0, 14],
|
||||||
"to": [16, 2, 16],
|
"to": [16, 2, 16],
|
||||||
"color": 2,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
@ -125,7 +119,6 @@
|
||||||
{
|
{
|
||||||
"from": [14, 0, 0],
|
"from": [14, 0, 0],
|
||||||
"to": [16, 2, 2],
|
"to": [16, 2, 2],
|
||||||
"color": 2,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
@ -136,9 +129,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": [14, 10, 14],
|
"from": [14, 14, 14],
|
||||||
"to": [16, 12, 16],
|
"to": [16, 16, 16],
|
||||||
"color": 2,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
@ -149,9 +141,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": [14, 10, 0],
|
"from": [14, 14, 0],
|
||||||
"to": [16, 12, 2],
|
"to": [16, 16, 2],
|
||||||
"color": 2,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
|
||||||
|
@ -163,8 +154,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": [15, 2, 15],
|
"from": [15, 2, 15],
|
||||||
"to": [16, 10, 16],
|
"to": [16, 14, 16],
|
||||||
"color": 7,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
"north": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
"east": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
@ -177,7 +167,6 @@
|
||||||
{
|
{
|
||||||
"from": [2, 0, 15],
|
"from": [2, 0, 15],
|
||||||
"to": [14, 1, 16],
|
"to": [14, 1, 16],
|
||||||
"color": 7,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
"north": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
@ -188,9 +177,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": [2, 11, 15],
|
"from": [2, 15, 15],
|
||||||
"to": [14, 12, 16],
|
"to": [14, 16, 16],
|
||||||
"color": 7,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
"north": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
@ -201,9 +189,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": [2, 11, 0],
|
"from": [2, 15, 0],
|
||||||
"to": [14, 12, 1],
|
"to": [14, 16, 1],
|
||||||
"color": 7,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
"north": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
@ -216,7 +203,6 @@
|
||||||
{
|
{
|
||||||
"from": [2, 0, 0],
|
"from": [2, 0, 0],
|
||||||
"to": [14, 1, 1],
|
"to": [14, 1, 1],
|
||||||
"color": 7,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
"north": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
|
@ -228,8 +214,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": [15, 2, 0],
|
"from": [15, 2, 0],
|
||||||
"to": [16, 10, 1],
|
"to": [16, 14, 1],
|
||||||
"color": 7,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
"north": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
"east": {"uv": [0, 0, 1, 8], "texture": "#0"},
|
||||||
|
@ -242,7 +227,6 @@
|
||||||
{
|
{
|
||||||
"from": [15, 0, 2],
|
"from": [15, 0, 2],
|
||||||
"to": [16, 1, 14],
|
"to": [16, 1, 14],
|
||||||
"color": 7,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
"east": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
@ -253,9 +237,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": [15, 11, 2],
|
"from": [15, 15, 2],
|
||||||
"to": [16, 12, 14],
|
"to": [16, 16, 14],
|
||||||
"color": 7,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
"north": {"uv": [0, 0, 1, 1], "texture": "#0"},
|
||||||
"east": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
"east": {"uv": [0, 0, 12, 1], "texture": "#0"},
|
||||||
|
@ -264,6 +247,28 @@
|
||||||
"up": {"uv": [0, 0, 1, 12], "rotation": 180, "texture": "#0"},
|
"up": {"uv": [0, 0, 1, 12], "rotation": 180, "texture": "#0"},
|
||||||
"down": {"uv": [0, 0, 1, 12], "rotation": 180, "texture": "#0"}
|
"down": {"uv": [0, 0, 1, 12], "rotation": 180, "texture": "#0"}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "internal",
|
||||||
|
"from": [2, 2, 2],
|
||||||
|
"to": [14, 14, 14],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 3, 3], "texture": "#1"},
|
||||||
|
"east": {"uv": [0, 3, 3, 6], "texture": "#1"},
|
||||||
|
"south": {"uv": [3, 0, 6, 3], "texture": "#1"},
|
||||||
|
"west": {"uv": [3, 3, 6, 6], "texture": "#1"},
|
||||||
|
"up": {"uv": [3, 9, 0, 6], "texture": "#1"},
|
||||||
|
"down": {"uv": [9, 0, 6, 3], "texture": "#1"}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "scrubber",
|
||||||
|
"origin": [0, 0, 0],
|
||||||
|
"color": 0,
|
||||||
|
"children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
|
||||||
|
},
|
||||||
|
20
|
||||||
]
|
]
|
||||||
}
|
}
|
1489
src/main/resources/assets/otemod/models/block/magical_scrubber.json
Normal file
|
@ -0,0 +1,321 @@
|
||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"render_type": "minecraft:translucent",
|
||||||
|
"textures": {
|
||||||
|
"0": "otemod:block/scrubber/stable_singularity_body",
|
||||||
|
"1": "otemod:block/scrubber/stable_singularity_inner",
|
||||||
|
"particle": "otemod:block/scrubber/stable_singularity_body"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [10, 14, 2],
|
||||||
|
"to": [14, 15, 14],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [12.5, 6, 14.25, 6.25], "texture": "#0"},
|
||||||
|
"east": {"uv": [11, 3, 15, 3.25], "texture": "#0"},
|
||||||
|
"south": {"uv": [12.75, 12.25, 14.5, 12.5], "texture": "#0"},
|
||||||
|
"west": {"uv": [11, 3.25, 15, 3.5], "texture": "#0"},
|
||||||
|
"up": {"uv": [1.75, 4, 0, 0], "texture": "#0"},
|
||||||
|
"down": {"uv": [3.5, 0, 1.75, 4], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 0, 1],
|
||||||
|
"to": [6, 1, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [12.75, 12.5, 14.5, 12.75], "texture": "#0"},
|
||||||
|
"east": {"uv": [11, 3.5, 15, 3.75], "texture": "#0"},
|
||||||
|
"south": {"uv": [12.75, 12.75, 14.5, 13], "texture": "#0"},
|
||||||
|
"west": {"uv": [11, 3.75, 15, 4], "texture": "#0"},
|
||||||
|
"up": {"uv": [5.25, 4, 3.5, 0], "texture": "#0"},
|
||||||
|
"down": {"uv": [1.75, 4, 0, 8], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [6, 0, 1],
|
||||||
|
"to": [10, 1, 6],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5.75, 8, 6.25, 8.25], "texture": "#0"},
|
||||||
|
"east": {"uv": [0.5, 13, 2.25, 13.25], "texture": "#0"},
|
||||||
|
"south": {"uv": [6.25, 8, 6.75, 8.25], "texture": "#0"},
|
||||||
|
"west": {"uv": [6, 13, 7.75, 13.25], "texture": "#0"},
|
||||||
|
"up": {"uv": [5, 13.75, 4.5, 12], "texture": "#0"},
|
||||||
|
"down": {"uv": [12.5, 4.5, 12, 6.25], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [6, 0, 10],
|
||||||
|
"to": [10, 1, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [5.75, 8.25, 6.25, 8.5], "texture": "#0"},
|
||||||
|
"east": {"uv": [7.75, 13, 9.5, 13.25], "texture": "#0"},
|
||||||
|
"south": {"uv": [6.25, 8.25, 6.75, 8.5], "texture": "#0"},
|
||||||
|
"west": {"uv": [9.5, 13, 11.25, 13.25], "texture": "#0"},
|
||||||
|
"up": {"uv": [5.5, 13.75, 5, 12], "texture": "#0"},
|
||||||
|
"down": {"uv": [6, 12, 5.5, 13.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [10, 0, 1],
|
||||||
|
"to": [15, 1, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [12.75, 13, 14.5, 13.25], "texture": "#0"},
|
||||||
|
"east": {"uv": [11, 4, 15, 4.25], "texture": "#0"},
|
||||||
|
"south": {"uv": [0.5, 13.25, 2.25, 13.5], "texture": "#0"},
|
||||||
|
"west": {"uv": [11, 4.25, 15, 4.5], "texture": "#0"},
|
||||||
|
"up": {"uv": [3.5, 8, 1.75, 4], "texture": "#0"},
|
||||||
|
"down": {"uv": [5.25, 4, 3.5, 8], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 1, 2],
|
||||||
|
"to": [2, 6, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10.25, 13.25, 10.5, 14.75], "texture": "#0"},
|
||||||
|
"east": {"uv": [7, 0, 11, 1.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [10.5, 13.25, 10.75, 14.75], "texture": "#0"},
|
||||||
|
"west": {"uv": [7, 1.5, 11, 3], "texture": "#0"},
|
||||||
|
"up": {"uv": [11.25, 8.5, 11, 4.5], "texture": "#0"},
|
||||||
|
"down": {"uv": [11.5, 4.5, 11.25, 8.5], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 6, 11],
|
||||||
|
"to": [2, 10, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6.75, 8, 7, 8.5], "texture": "#0"},
|
||||||
|
"east": {"uv": [4, 8, 5.75, 8.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [5.75, 8.5, 6, 9], "texture": "#0"},
|
||||||
|
"west": {"uv": [4, 8.5, 5.75, 9], "texture": "#0"},
|
||||||
|
"up": {"uv": [2.5, 14.75, 2.25, 13], "texture": "#0"},
|
||||||
|
"down": {"uv": [2.75, 13, 2.5, 14.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 10, 2],
|
||||||
|
"to": [2, 15, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10.75, 13.25, 11, 14.75], "texture": "#0"},
|
||||||
|
"east": {"uv": [7, 3, 11, 4.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [11, 13.25, 11.25, 14.75], "texture": "#0"},
|
||||||
|
"west": {"uv": [7, 4.5, 11, 6], "texture": "#0"},
|
||||||
|
"up": {"uv": [11.75, 8.5, 11.5, 4.5], "texture": "#0"},
|
||||||
|
"down": {"uv": [12, 4.5, 11.75, 8.5], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 6, 2],
|
||||||
|
"to": [2, 10, 6],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6, 8.5, 6.25, 9], "texture": "#0"},
|
||||||
|
"east": {"uv": [11.5, 9, 13.25, 9.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [6.25, 8.5, 6.5, 9], "texture": "#0"},
|
||||||
|
"west": {"uv": [11.5, 9.5, 13.25, 10], "texture": "#0"},
|
||||||
|
"up": {"uv": [3, 14.75, 2.75, 13], "texture": "#0"},
|
||||||
|
"down": {"uv": [3.25, 13, 3, 14.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [14, 10, 1],
|
||||||
|
"to": [15, 15, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [12.75, 13.25, 13, 14.75], "texture": "#0"},
|
||||||
|
"east": {"uv": [7, 6, 11, 7.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [13, 13.25, 13.25, 14.75], "texture": "#0"},
|
||||||
|
"west": {"uv": [7, 7.5, 11, 9], "texture": "#0"},
|
||||||
|
"up": {"uv": [3.75, 16, 3.5, 12], "texture": "#0"},
|
||||||
|
"down": {"uv": [4, 12, 3.75, 16], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [14, 6, 10],
|
||||||
|
"to": [15, 10, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [6.5, 8.5, 6.75, 9], "texture": "#0"},
|
||||||
|
"east": {"uv": [11.5, 10, 13.25, 10.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [6.75, 8.5, 7, 9], "texture": "#0"},
|
||||||
|
"west": {"uv": [6, 12, 7.75, 12.5], "texture": "#0"},
|
||||||
|
"up": {"uv": [3.5, 14.75, 3.25, 13], "texture": "#0"},
|
||||||
|
"down": {"uv": [6.25, 13.25, 6, 15], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [14, 6, 1],
|
||||||
|
"to": [15, 10, 6],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [3.5, 9.5, 3.75, 10], "texture": "#0"},
|
||||||
|
"east": {"uv": [12, 6.25, 13.75, 6.75], "texture": "#0"},
|
||||||
|
"south": {"uv": [3.75, 9.5, 4, 10], "texture": "#0"},
|
||||||
|
"west": {"uv": [12, 6.75, 13.75, 7.25], "texture": "#0"},
|
||||||
|
"up": {"uv": [6.5, 15, 6.25, 13.25], "texture": "#0"},
|
||||||
|
"down": {"uv": [6.75, 13.25, 6.5, 15], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [14, 1, 1],
|
||||||
|
"to": [15, 6, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [13.25, 13.25, 13.5, 14.75], "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 8, 4, 9.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [0.5, 13.5, 0.75, 15], "texture": "#0"},
|
||||||
|
"west": {"uv": [4, 9, 8, 10.5], "texture": "#0"},
|
||||||
|
"up": {"uv": [4.25, 16, 4, 12], "texture": "#0"},
|
||||||
|
"down": {"uv": [4.5, 12, 4.25, 16], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 10, 1],
|
||||||
|
"to": [14, 15, 2],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [8, 9, 11.5, 10.5], "texture": "#0"},
|
||||||
|
"east": {"uv": [0.75, 13.5, 1, 15], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 9.5, 3.5, 11], "texture": "#0"},
|
||||||
|
"west": {"uv": [1, 13.5, 1.25, 15], "texture": "#0"},
|
||||||
|
"up": {"uv": [15.5, 7.5, 12, 7.25], "texture": "#0"},
|
||||||
|
"down": {"uv": [15.5, 7.5, 12, 7.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [9, 6, 1],
|
||||||
|
"to": [14, 10, 2],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0.5, 12.5, 2, 13], "texture": "#0"},
|
||||||
|
"east": {"uv": [3.5, 10, 3.75, 10.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [2, 12.5, 3.5, 13], "texture": "#0"},
|
||||||
|
"west": {"uv": [3.75, 10, 4, 10.5], "texture": "#0"},
|
||||||
|
"up": {"uv": [14.75, 10.25, 13.25, 10], "texture": "#0"},
|
||||||
|
"down": {"uv": [14.75, 10.25, 13.25, 10.5], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 6, 1],
|
||||||
|
"to": [5, 10, 2],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [12.5, 4.5, 14, 5], "texture": "#0"},
|
||||||
|
"east": {"uv": [10.5, 12.5, 10.75, 13], "texture": "#0"},
|
||||||
|
"south": {"uv": [12.5, 5, 14, 5.5], "texture": "#0"},
|
||||||
|
"west": {"uv": [10.75, 12.5, 11, 13], "texture": "#0"},
|
||||||
|
"up": {"uv": [8.25, 13.75, 6.75, 13.5], "texture": "#0"},
|
||||||
|
"down": {"uv": [9.75, 13.5, 8.25, 13.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [1, 1, 1],
|
||||||
|
"to": [14, 6, 2],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [3.5, 10.5, 7, 12], "texture": "#0"},
|
||||||
|
"east": {"uv": [1.25, 13.5, 1.5, 15], "texture": "#0"},
|
||||||
|
"south": {"uv": [7, 10.5, 10.5, 12], "texture": "#0"},
|
||||||
|
"west": {"uv": [1.5, 13.5, 1.75, 15], "texture": "#0"},
|
||||||
|
"up": {"uv": [11.25, 12.25, 7.75, 12], "texture": "#0"},
|
||||||
|
"down": {"uv": [15.5, 7.75, 12, 8], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 1, 15],
|
||||||
|
"to": [14, 6, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [10.5, 10.5, 14, 12], "texture": "#0"},
|
||||||
|
"east": {"uv": [1.75, 13.5, 2, 15], "texture": "#0"},
|
||||||
|
"south": {"uv": [0, 11, 3.5, 12.5], "texture": "#0"},
|
||||||
|
"west": {"uv": [2, 13.5, 2.25, 15], "texture": "#0"},
|
||||||
|
"up": {"uv": [15.5, 8.25, 12, 8], "texture": "#0"},
|
||||||
|
"down": {"uv": [15.5, 8.25, 12, 8.5], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 6, 14],
|
||||||
|
"to": [6, 10, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [12.5, 5.5, 14, 6], "texture": "#0"},
|
||||||
|
"east": {"uv": [11, 12.5, 11.25, 13], "texture": "#0"},
|
||||||
|
"south": {"uv": [6, 12.5, 7.5, 13], "texture": "#0"},
|
||||||
|
"west": {"uv": [13.75, 6.5, 14, 7], "texture": "#0"},
|
||||||
|
"up": {"uv": [15, 13.5, 13.5, 13.25], "texture": "#0"},
|
||||||
|
"down": {"uv": [15, 13.5, 13.5, 13.75], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [10, 6, 14],
|
||||||
|
"to": [14, 10, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [7.5, 12.5, 9, 13], "texture": "#0"},
|
||||||
|
"east": {"uv": [6.75, 13.75, 7, 14.25], "texture": "#0"},
|
||||||
|
"south": {"uv": [9, 12.5, 10.5, 13], "texture": "#0"},
|
||||||
|
"west": {"uv": [7, 13.75, 7.25, 14.25], "texture": "#0"},
|
||||||
|
"up": {"uv": [6, 14, 4.5, 13.75], "texture": "#0"},
|
||||||
|
"down": {"uv": [15.25, 6.25, 13.75, 6.5], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 10, 14],
|
||||||
|
"to": [14, 15, 15],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [11, 0, 14.5, 1.5], "texture": "#0"},
|
||||||
|
"east": {"uv": [9.75, 13.5, 10, 15], "texture": "#0"},
|
||||||
|
"south": {"uv": [11, 1.5, 14.5, 3], "texture": "#0"},
|
||||||
|
"west": {"uv": [10, 13.5, 10.25, 15], "texture": "#0"},
|
||||||
|
"up": {"uv": [14.75, 12.25, 11.25, 12], "texture": "#0"},
|
||||||
|
"down": {"uv": [11.25, 12.25, 7.75, 12.5], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [6, 14, 10],
|
||||||
|
"to": [10, 15, 14],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [13.75, 7, 14.25, 7.25], "texture": "#0"},
|
||||||
|
"east": {"uv": [6.75, 13.25, 8.5, 13.5], "texture": "#0"},
|
||||||
|
"south": {"uv": [7.25, 13.75, 7.75, 14], "texture": "#0"},
|
||||||
|
"west": {"uv": [8.5, 13.25, 10.25, 13.5], "texture": "#0"},
|
||||||
|
"up": {"uv": [11.75, 14, 11.25, 12.25], "texture": "#0"},
|
||||||
|
"down": {"uv": [12.25, 12.25, 11.75, 14], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [6, 14, 2],
|
||||||
|
"to": [10, 15, 6],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [7.75, 13.75, 8.25, 14], "texture": "#0"},
|
||||||
|
"east": {"uv": [13.25, 9, 15, 9.25], "texture": "#0"},
|
||||||
|
"south": {"uv": [8.25, 13.75, 8.75, 14], "texture": "#0"},
|
||||||
|
"west": {"uv": [13.25, 9.25, 15, 9.5], "texture": "#0"},
|
||||||
|
"up": {"uv": [12.75, 14, 12.25, 12.25], "texture": "#0"},
|
||||||
|
"down": {"uv": [0.5, 12.5, 0, 14.25], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [2, 14, 2],
|
||||||
|
"to": [6, 15, 14],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [13.25, 9.5, 15, 9.75], "texture": "#0"},
|
||||||
|
"east": {"uv": [11, 8.5, 15, 8.75], "texture": "#0"},
|
||||||
|
"south": {"uv": [13.25, 9.75, 15, 10], "texture": "#0"},
|
||||||
|
"west": {"uv": [11, 8.75, 15, 9], "texture": "#0"},
|
||||||
|
"up": {"uv": [7, 4, 5.25, 0], "texture": "#0"},
|
||||||
|
"down": {"uv": [7, 4, 5.25, 8], "texture": "#0"}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "inner",
|
||||||
|
"from": [2, 1, 2],
|
||||||
|
"to": [14, 13, 14],
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [0, 0, 16, 16], "texture": "#1"},
|
||||||
|
"east": {"uv": [0, 0, 16, 16], "texture": "#1"},
|
||||||
|
"south": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "north"},
|
||||||
|
"west": {"uv": [0, 0, 16, 16], "texture": "#1"},
|
||||||
|
"up": {"uv": [16, 16, 0, 0], "texture": "#1"},
|
||||||
|
"down": {"uv": [16, 0, 0, 16], "texture": "#1"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"groups": [
|
||||||
|
{
|
||||||
|
"name": "Outer Panels",
|
||||||
|
"origin": [0, 0, 0],
|
||||||
|
"color": 0,
|
||||||
|
"children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
|
||||||
|
},
|
||||||
|
24
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "otemod:item/eternium_ingot"
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "item/generated",
|
"parent": "item/generated",
|
||||||
"textures": {
|
"textures": {
|
||||||
"layer0": "otemod:item/eternium_dust"
|
"layer0": "otemod:item/eternium_rod"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "otemod:block/magical_scrubber"
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "otemod:item/melted_nether_star"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "otemod:item/scrubber_frame"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "otemod:item/scrubber_frame_piece"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "otemod:item/singularity"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "otemod:block/stable_singularity"
|
||||||
|
}
|
BIN
src/main/resources/assets/otemod/textures/block/aurora/body.png
Normal file
After Width: | Height: | Size: 222 B |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 123 B |
After Width: | Height: | Size: 120 B |
After Width: | Height: | Size: 181 B |
After Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 325 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 118 B |
After Width: | Height: | Size: 168 B |
After Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 214 B |
BIN
src/main/resources/assets/otemod/textures/item/eternium_rod.png
Normal file
After Width: | Height: | Size: 115 B |
After Width: | Height: | Size: 302 B |
After Width: | Height: | Size: 145 B |
After Width: | Height: | Size: 129 B |
BIN
src/main/resources/assets/otemod/textures/item/singularity.png
Normal file
After Width: | Height: | Size: 128 B |
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"values": [
|
"values": [
|
||||||
"#forge:ores/cobalt"
|
"#forge:ores/cobalt",
|
||||||
|
"#forge:ores/eternium"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"otemod:eternium_ore_block",
|
||||||
|
"otemod:deepslate_eternium_ore_block"
|
||||||
|
]
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"values": [
|
"values": [
|
||||||
"#forge:ingots/cobalt"
|
"#forge:ingots/cobalt",
|
||||||
|
"#forge:ingots/eternium"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"otemod:eternium_ingot"
|
||||||
|
]
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"values": [
|
"values": [
|
||||||
"#forge:raw_materials/cobalt"
|
"#forge:raw_materials/cobalt",
|
||||||
|
"#forge:raw_materials/eternium"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"otemod:eternium_ore"
|
||||||
|
]
|
||||||
|
}
|
5
src/main/resources/data/forge/tags/items/rods.json
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"#forge:rods/eternium"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"otemod:eternium_rod"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"rolls": 1,
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "otemod:magical_scrubber"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:survives_explosion"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"rolls": 1,
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "otemod:stable_singularity"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:survives_explosion"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"type": "minecraft:crafting_shaped",
|
"type": "minecraft:crafting_shaped",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
"CC ",
|
"CC",
|
||||||
"CC ",
|
"CC",
|
||||||
"CC "
|
"CC"
|
||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"C": {
|
"C": {
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
"type": "minecraft:blasting",
|
|
||||||
"ingredient": {
|
|
||||||
"item": "otemod:eternium_fragment"
|
|
||||||
},
|
|
||||||
"result": "otemod:eternium_dust",
|
|
||||||
"experience": 25,
|
|
||||||
"cookingtime": 60
|
|
||||||
}
|
|
||||||
|
|
|
@ -9,12 +9,9 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"item": "otemod:deepslate_eternium_ore_block"
|
"item": "otemod:deepslate_eternium_ore_block"
|
||||||
},
|
|
||||||
{
|
|
||||||
"item": "otemod:eternium_dust"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"result": "otemod:eternium_fragment",
|
"result": "otemod:eternium_ingot",
|
||||||
"experience": 0.5,
|
"experience": 0.5,
|
||||||
"cookingtime": 25
|
"cookingtime": 25
|
||||||
}
|
}
|
20
src/main/resources/data/otemod/recipes/eternium_rod.json
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern":
|
||||||
|
[
|
||||||
|
"ccc",
|
||||||
|
"ggg",
|
||||||
|
"ccc"],
|
||||||
|
"key": {
|
||||||
|
"c": {
|
||||||
|
"item": "minecraft:obsidian"
|
||||||
|
},
|
||||||
|
"g": {
|
||||||
|
"tag": "forge:ingots/eternium"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "otemod:eternium_rod",
|
||||||
|
"count": 2
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,16 +2,16 @@
|
||||||
"type": "minecraft:crafting_shaped",
|
"type": "minecraft:crafting_shaped",
|
||||||
"key": {
|
"key": {
|
||||||
"A": {
|
"A": {
|
||||||
"tag": "forge:unusual/experience_blocks"
|
"item": "otemod:scrubber_frame"
|
||||||
},
|
},
|
||||||
"B": {
|
"B": {
|
||||||
"tag": "forge:ingots/cobalt"
|
"item": "otemod:singularity"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pattern": [
|
"pattern": [
|
||||||
|
"AAA",
|
||||||
"ABA",
|
"ABA",
|
||||||
"B B",
|
"AAA"
|
||||||
"ABA"
|
|
||||||
],
|
],
|
||||||
"result":{
|
"result":{
|
||||||
"item": "otemod:item_scrubber"
|
"item": "otemod:item_scrubber"
|
||||||
|
|
19
src/main/resources/data/otemod/recipes/magical_scrubber.json
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"key": {
|
||||||
|
"A": {
|
||||||
|
"item": "otemod:scrubber_frame"
|
||||||
|
},
|
||||||
|
"B": {
|
||||||
|
"item": "otemod:item_scrubber"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"AAA",
|
||||||
|
"ABA",
|
||||||
|
"AAA"
|
||||||
|
],
|
||||||
|
"result":{
|
||||||
|
"item": "otemod:magical_scrubber"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:smelting",
|
||||||
|
"ingredient": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:nether_star"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"result": "otemod:melted_nether_star",
|
||||||
|
"experience": 3,
|
||||||
|
"cookingtime": 60
|
||||||
|
}
|
20
src/main/resources/data/otemod/recipes/scrubber_frame.json
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
" c ",
|
||||||
|
"r r",
|
||||||
|
" c "
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"c": {
|
||||||
|
"item": "otemod:scrubber_frame_piece"
|
||||||
|
},
|
||||||
|
"r": {
|
||||||
|
"tag": "forge:rods/eternium"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "otemod:scrubber_frame",
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": ["cgc"],
|
||||||
|
"key": {
|
||||||
|
"c": {
|
||||||
|
"item": "otemod:stable_singularity"
|
||||||
|
},
|
||||||
|
"g": {
|
||||||
|
"tag": "forge:rods/eternium"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "otemod:scrubber_frame_piece",
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
13
src/main/resources/data/otemod/recipes/singularity.json
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": ["ccc", "c c", "ccc"],
|
||||||
|
"key": {
|
||||||
|
"c": {
|
||||||
|
"item": "otemod:melted_nether_star"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "otemod:singularity",
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": ["ccc", "cbc", "ccc"],
|
||||||
|
"key": {
|
||||||
|
"c": {
|
||||||
|
"item": "minecraft:obsidian"
|
||||||
|
},
|
||||||
|
"b": {
|
||||||
|
"item": "otemod:singularity"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "otemod:stable_singularity",
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|