Revert "Refactor and rename to Thresholds"

This reverts commit cd9d548806.
This commit is contained in:
zontreck 2024-01-15 22:34:05 -07:00
parent cd9d548806
commit 858f359d4b
578 changed files with 215113 additions and 214942 deletions

View file

@ -5,7 +5,7 @@ First of all, thank you for considering, or for contributing to any of the follo
```
LibZontreck
Arias-Essentials
Thresholds
OTEMod
ClaimsMod
WatchMyDurability
```
@ -20,7 +20,7 @@ Code Contributions
Asset contribution
----
2) Contributions are also accepted in the form of artwork or music, or sound, or block models from blockbench. Just simply follow the above steps to create your working base. Then send it to us in a pull request. No coding knowledge is necessary for adding these resources. Someone else can tackle that if you do not know how to code. An example of this is the Possum animal model in Thresholds. This was contributed by PossumTheWarrior via discord.
2) Contributions are also accepted in the form of artwork or music, or sound, or block models from blockbench. Just simply follow the above steps to create your working base. Then send it to us in a pull request. No coding knowledge is necessary for adding these resources. Someone else can tackle that if you do not know how to code. An example of this is the Possum animal model in OTEMod. This was contributed by PossumTheWarrior via discord.
Bug reporting or feature requests
----

View file

@ -4,4 +4,4 @@ Liquids
Super Furnace
* Melts materials into liquids. This is how to obtain the Thresholds liquids.
* Melts materials into liquids. This is how to obtain the OTEMod liquids.

View file

@ -49,7 +49,7 @@ mod_name=Thresholds
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=GPLv3
# The mod version. See https://semver.org/
mod_version=1.4.011524.2217
mod_version=1.4.011524.2056
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
@ -57,4 +57,4 @@ mod_group_id=dev.zontreck
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
mod_authors=zontreck
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
mod_description=Thresholds Mod
mod_description=Only The Essentials

View file

@ -1,7 +1,7 @@
{
"pack": {
"description": {
"text": "Thresholds Server Resource Pack"
"text": "OTEMod Server Resource Pack"
},
"pack_format": 15
}

View file

@ -1,4 +1,14 @@
package dev.zontreck.thresholds;
package dev.zontreck.otemod;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.mojang.logging.LogUtils;
import dev.zontreck.libzontreck.chat.ChatColor;
@ -6,20 +16,24 @@ import dev.zontreck.libzontreck.profiles.Profile;
import dev.zontreck.libzontreck.profiles.UserProfileNotYetExistsException;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.libzontreck.vectors.Vector3;
import dev.zontreck.thresholds.effects.ModEffects;
import dev.zontreck.thresholds.implementation.CreativeModeTabs;
import dev.zontreck.thresholds.implementation.InventoryBackup;
import dev.zontreck.thresholds.implementation.Messages;
import dev.zontreck.thresholds.implementation.PlayerFirstJoinTag;
import dev.zontreck.thresholds.implementation.compressor.CompressionChamberScreen;
import dev.zontreck.thresholds.implementation.vault.*;
import dev.zontreck.thresholds.integrations.KeyBindings;
import dev.zontreck.thresholds.recipe.ModRecipes;
import dev.zontreck.otemod.effects.ModEffects;
import dev.zontreck.otemod.implementation.CreativeModeTabs;
import dev.zontreck.otemod.implementation.InventoryBackup;
import dev.zontreck.otemod.implementation.Messages;
import dev.zontreck.otemod.implementation.PlayerFirstJoinTag;
import dev.zontreck.otemod.implementation.compressor.CompressionChamberScreen;
import dev.zontreck.otemod.implementation.vault.*;
import dev.zontreck.otemod.integrations.KeyBindings;
import dev.zontreck.otemod.recipe.ModRecipes;
import net.minecraft.client.gui.screens.MenuScreens;
import net.minecraft.client.renderer.entity.EntityRenderers;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.commands.GiveCommand;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.GameType;
@ -43,31 +57,32 @@ import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraftforge.items.ItemStackHandler;
import org.slf4j.Logger;
import dev.zontreck.thresholds.blocks.ModBlocks;
import dev.zontreck.thresholds.blocks.entity.ModEntities;
import dev.zontreck.thresholds.chat.ChatServerOverride;
import dev.zontreck.thresholds.commands.CommandRegistry;
import dev.zontreck.thresholds.configs.ThresholdsServerConfig;
import dev.zontreck.thresholds.enchantments.ModEnchantments;
import dev.zontreck.thresholds.entities.ModEntityTypes;
import dev.zontreck.thresholds.events.LoreHandlers;
import dev.zontreck.thresholds.implementation.inits.ModMenuTypes;
import dev.zontreck.thresholds.implementation.scrubber.ItemScrubberScreen;
import dev.zontreck.thresholds.implementation.scrubber.MagicalScrubberScreen;
import dev.zontreck.thresholds.items.ModItems;
import dev.zontreck.otemod.blocks.ModBlocks;
import dev.zontreck.otemod.blocks.entity.ModEntities;
import dev.zontreck.otemod.chat.ChatServerOverride;
import dev.zontreck.otemod.commands.CommandRegistry;
import dev.zontreck.otemod.configs.OTEServerConfig;
import dev.zontreck.otemod.enchantments.ModEnchantments;
import dev.zontreck.otemod.entities.ModEntityTypes;
import dev.zontreck.otemod.entities.monsters.client.PossumRenderer;
import dev.zontreck.otemod.events.LoreHandlers;
import dev.zontreck.otemod.implementation.inits.ModMenuTypes;
import dev.zontreck.otemod.implementation.scrubber.ItemScrubberScreen;
import dev.zontreck.otemod.implementation.scrubber.MagicalScrubberScreen;
import dev.zontreck.otemod.items.ModItems;
//import dev.zontreck.otemod.ore.Modifier.ModifierOfBiomes;
import dev.zontreck.thresholds.networking.ModMessages;
import dev.zontreck.otemod.networking.ModMessages;
// The value here should match an entry in the META-INF/mods.toml file
@Mod(ThresholdsMod.MOD_ID)
public class ThresholdsMod
@Mod(OTEMod.MOD_ID)
public class OTEMod
{
public static final Vector3 ZERO_VECTOR = new Vector3(0,0,0);
// Directly reference a slf4j logger
public static final Logger LOGGER = LogUtils.getLogger();
public static final String MOD_ID = "thresholds";
public static final String MOD_ID = "otemod";
public static final String MODIFY_BIOMES = "modify_biomes";
public static final ResourceLocation MODIFY_BIOMES_RL = new ResourceLocation(ThresholdsMod.MOD_ID, MODIFY_BIOMES);
public static final ResourceLocation MODIFY_BIOMES_RL = new ResourceLocation(OTEMod.MOD_ID, MODIFY_BIOMES);
//public static List<TeleportContainer> TeleportRegistry = new ArrayList<>();
public static MinecraftServer THE_SERVER;
@ -78,23 +93,23 @@ public class ThresholdsMod
public static boolean DEVELOPER=false;
private static Thread MasterThread;
public static String ThresholdsPrefix = "";
public static String OTEPrefix = "";
public static String ONLY_PLAYER = "";
public static IEventBus bus;
public ThresholdsMod()
public OTEMod()
{
ThresholdsMod.ThresholdsPrefix = ChatColor.doColors("!dark_gray![!dark_green!!bold!Thresholds!reset!!dark_gray!]!reset!");
ThresholdsMod.ONLY_PLAYER = ChatColor.doColors("!dark_red!Only a player can execute this command");
OTEMod.OTEPrefix = ChatColor.doColors("!dark_gray![!dark_green!!bold!OTEMod!reset!!dark_gray!]!reset!");
OTEMod.ONLY_PLAYER = ChatColor.doColors("!dark_red!Only a player can execute this command");
bus = FMLJavaModLoadingContext.get().getModEventBus();
// Register the setup method for modloading
bus.addListener(this::setup);
ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, ThresholdsServerConfig.SPEC, "thresholds-server.toml");
ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, OTEServerConfig.SPEC, "otemod-rss-server.toml");
@ -109,7 +124,7 @@ public class ThresholdsMod
MinecraftForge.EVENT_BUS.register(new ChatServerOverride());
MinecraftForge.EVENT_BUS.register(new CommandRegistry());
MinecraftForge.EVENT_BUS.register(new VaultWatcher());
MinecraftForge.EVENT_BUS.register(new dev.zontreck.thresholds.zschem.EventHandler());
MinecraftForge.EVENT_BUS.register(new dev.zontreck.otemod.zschem.EventHandler());
ModMenuTypes.CONTAINERS.register(bus);
ModBlocks.register(bus);
@ -173,7 +188,7 @@ public class ThresholdsMod
}else {
Starter data = StarterProvider.getStarter();
if(data.getLastChanged() > tag.LastGiven && ThresholdsServerConfig.GIVE_KIT_EVERY_CHANGE.get())
if(data.getLastChanged() > tag.LastGiven && OTEServerConfig.GIVE_KIT_EVERY_CHANGE.get())
{
tag = PlayerFirstJoinTag.now();
tag.save(prof.NBT);
@ -208,24 +223,24 @@ public class ThresholdsMod
public void onServerStarting(ServerStartedEvent event)
{
// Changed away from Starting event due to multiple calls
if(ThresholdsMod.ALIVE){
if(OTEMod.ALIVE){
// We were called again?
// Wtf... return
ThresholdsMod.LOGGER.info("/!\\ ALERT /!\\ ServerStartedEvent was called multiple times. This is a bug in MinecraftForge");
OTEMod.LOGGER.info("/!\\ ALERT /!\\ ServerStartedEvent was called multiple times. This is a bug in MinecraftForge");
return;
}
// Do something when the server starts
//LOGGER.info("HELLO from server starting");
ThresholdsMod.ALIVE=true;
OTEMod.ALIVE=true;
//HealerQueue.Initialize(); // Set up the queue
// Set up the repeating task to expire a TeleportContainer
ThresholdsMod.THE_SERVER = event.getServer();
ThresholdsMod.MasterThread = new Thread(new Runnable(){
OTEMod.THE_SERVER = event.getServer();
OTEMod.MasterThread = new Thread(new Runnable(){
public void run()
{
while(ThresholdsMod.ALIVE){
while(OTEMod.ALIVE){
// Check if the teleports have expired
try {
Thread.sleep(5000);
@ -245,10 +260,10 @@ public class ThresholdsMod
}*/
}
ThresholdsMod.LOGGER.info("Tearing down Thresholds teleport queue - The server is going down");
OTEMod.LOGGER.info("Tearing down OTEMod teleport queue - The server is going down");
}
});
ThresholdsMod.MasterThread.start();
OTEMod.MasterThread.start();
}
@ -258,7 +273,7 @@ public class ThresholdsMod
{
if(ev.getEntity().level().isClientSide)return;
if(ThresholdsServerConfig.ITEM_DESPAWN_TIMER.get()<=0)return;
if(OTEServerConfig.ITEM_DESPAWN_TIMER.get()<=0)return;
ItemEntity ite = (ItemEntity)ev.getEntity();
if(ite.getAge() != (1200 * 5)) {
@ -270,7 +285,7 @@ public class ThresholdsMod
//OTEMod.LOGGER.info("Giving extra life to item : "+ev.getEntity().getName().getString() + "; item age [ "+ev.getEntity().getAge()+ " ]");
// 1200 ticks per minute
// OTEMod item despawn amplifier is set in 5 minute intervals
ev.setExtraLife((1200 * 5)+ ((1200 * 5) * ThresholdsServerConfig.ITEM_DESPAWN_TIMER.get())); // reset the life count
ev.setExtraLife((1200 * 5)+ ((1200 * 5) * OTEServerConfig.ITEM_DESPAWN_TIMER.get())); // reset the life count
//OTEMod.LOGGER.info("Item ["+ev.getEntity().getItem().getDisplayName().getString()+"] was given extra life");
// Hopefully this works?
ev.setCanceled(true);
@ -281,14 +296,14 @@ public class ThresholdsMod
@SubscribeEvent
public void onStop(final ServerStoppingEvent ev)
{
ThresholdsMod.ALIVE=false; // Tear down all looping threads that will watch this
ThresholdsMod.MasterThread.interrupt();
OTEMod.ALIVE=false; // Tear down all looping threads that will watch this
OTEMod.MasterThread.interrupt();
}
// You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent
@Mod.EventBusSubscriber(modid = ThresholdsMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
@Mod.EventBusSubscriber(modid = OTEMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
public static class ClientModEvents
{
@SubscribeEvent

View file

@ -1,5 +1,6 @@
package dev.zontreck.thresholds.blocks;
package dev.zontreck.otemod.blocks;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.DoorBlock;
import net.minecraft.world.level.block.SoundType;

View file

@ -1,9 +1,9 @@
package dev.zontreck.thresholds.blocks;
package dev.zontreck.otemod.blocks;
import dev.zontreck.thresholds.blocks.entity.CompressionChamberBlockEntity;
import dev.zontreck.thresholds.blocks.entity.ModEntities;
import dev.zontreck.thresholds.networking.ModMessages;
import dev.zontreck.thresholds.networking.packets.EnergySyncS2CPacket;
import dev.zontreck.otemod.blocks.entity.CompressionChamberBlockEntity;
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;

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.blocks;
package dev.zontreck.otemod.blocks;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.ItemStack;

View file

@ -1,10 +1,11 @@
package dev.zontreck.thresholds.blocks;
package dev.zontreck.otemod.blocks;
import dev.zontreck.thresholds.blocks.entity.ItemScrubberBlockEntity;
import dev.zontreck.thresholds.blocks.entity.ModEntities;
import dev.zontreck.thresholds.networking.ModMessages;
import dev.zontreck.thresholds.networking.packets.EnergySyncS2CPacket;
import dev.zontreck.otemod.blocks.entity.ItemScrubberBlockEntity;
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.Direction;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;

View file

@ -1,9 +1,9 @@
package dev.zontreck.thresholds.blocks;
package dev.zontreck.otemod.blocks;
import dev.zontreck.thresholds.blocks.entity.MagicalScrubberBlockEntity;
import dev.zontreck.thresholds.blocks.entity.ModEntities;
import dev.zontreck.thresholds.networking.ModMessages;
import dev.zontreck.thresholds.networking.packets.EnergySyncS2CPacket;
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;

View file

@ -1,9 +1,10 @@
package dev.zontreck.thresholds.blocks;
package dev.zontreck.otemod.blocks;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.implementation.CreativeModeTabs;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.implementation.CreativeModeTabs;
import net.minecraft.core.BlockPos;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.FlintAndSteelItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.*;
@ -15,13 +16,13 @@ import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
public class ModBlocks {
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ThresholdsMod.MOD_ID);
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, ThresholdsMod.MOD_ID);
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, OTEMod.MOD_ID);
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, OTEMod.MOD_ID);
public static void register(IEventBus bus){
BLOCKS.register(bus);
ITEMS.register(bus);
ThresholdsMod.LOGGER.info("Registering all blocks...");
OTEMod.LOGGER.info("Registering all blocks...");
}
public static final RegistryObject<Block> ETERNIUM_ORE_BLOCK = BLOCKS.register("eternium_ore_block", () -> new Block(BlockBehaviour.Properties.of().requiresCorrectToolForDrops().strength(7F).explosionResistance(1200).destroyTime(6)));

View file

@ -1,10 +1,12 @@
package dev.zontreck.thresholds.blocks;
package dev.zontreck.otemod.blocks;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.*;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.DirectionProperty;
import net.minecraft.world.phys.shapes.VoxelShape;
import org.jetbrains.annotations.Nullable;
public class ParallaxWindow extends BaseEntityBlock

View file

@ -1,11 +1,11 @@
package dev.zontreck.thresholds.blocks.entity;
package dev.zontreck.otemod.blocks.entity;
import dev.zontreck.thresholds.implementation.OutputItemStackHandler;
import dev.zontreck.thresholds.implementation.compressor.CompressionChamberMenu;
import dev.zontreck.thresholds.implementation.energy.OTEEnergy;
import dev.zontreck.thresholds.networking.ModMessages;
import dev.zontreck.thresholds.networking.packets.EnergySyncS2CPacket;
import dev.zontreck.thresholds.recipe.CompressionChamberRecipe;
import dev.zontreck.otemod.implementation.OutputItemStackHandler;
import dev.zontreck.otemod.implementation.compressor.CompressionChamberMenu;
import dev.zontreck.otemod.implementation.energy.OTEEnergy;
import dev.zontreck.otemod.networking.ModMessages;
import dev.zontreck.otemod.networking.packets.EnergySyncS2CPacket;
import dev.zontreck.otemod.recipe.CompressionChamberRecipe;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag;
@ -17,14 +17,17 @@ 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.SimpleContainerData;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
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.EnergyStorage;
import net.minecraftforge.energy.IEnergyStorage;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.ItemStackHandler;

View file

@ -1,10 +1,10 @@
package dev.zontreck.thresholds.blocks.entity;
package dev.zontreck.otemod.blocks.entity;
import dev.zontreck.thresholds.implementation.OutputItemStackHandler;
import dev.zontreck.thresholds.implementation.energy.OTEEnergy;
import dev.zontreck.thresholds.implementation.scrubber.ItemScrubberMenu;
import dev.zontreck.thresholds.networking.ModMessages;
import dev.zontreck.thresholds.networking.packets.EnergySyncS2CPacket;
import dev.zontreck.otemod.implementation.OutputItemStackHandler;
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.Direction;
import net.minecraft.nbt.CompoundTag;

View file

@ -1,11 +1,11 @@
package dev.zontreck.thresholds.blocks.entity;
package dev.zontreck.otemod.blocks.entity;
import dev.zontreck.libzontreck.util.ItemUtils;
import dev.zontreck.thresholds.implementation.OutputItemStackHandler;
import dev.zontreck.thresholds.implementation.energy.OTEEnergy;
import dev.zontreck.thresholds.implementation.scrubber.MagicalScrubberMenu;
import dev.zontreck.thresholds.networking.ModMessages;
import dev.zontreck.thresholds.networking.packets.EnergySyncS2CPacket;
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;

View file

@ -1,7 +1,8 @@
package dev.zontreck.thresholds.blocks.entity;
package dev.zontreck.otemod.blocks.entity;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.blocks.ModBlocks;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.blocks.CompressionChamberBlock;
import dev.zontreck.otemod.blocks.ModBlocks;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraftforge.eventbus.api.IEventBus;
@ -11,13 +12,13 @@ import net.minecraftforge.registries.RegistryObject;
public class ModEntities {
public static final DeferredRegister<BlockEntityType<?>> ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, ThresholdsMod.MOD_ID);
public static final DeferredRegister<BlockEntityType<?>> ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, OTEMod.MOD_ID);
public static final RegistryObject <BlockEntityType <ItemScrubberBlockEntity>> ITEM_SCRUBBER = ENTITIES.register("item_scrubber", ()-> BlockEntityType.Builder.of(ItemScrubberBlockEntity::new, ModBlocks.ITEM_SCRUBBER.get()).build(null));
public static final RegistryObject <BlockEntityType <MagicalScrubberBlockEntity>> MAGICAL_SCRUBBER = ENTITIES.register("magical_scrubber", ()-> BlockEntityType.Builder.of(MagicalScrubberBlockEntity::new, ModBlocks.MAGICAL_SCRUBBER.get()).build(null));
public static final ResourceLocation PARALLAX_BLOCK = new ResourceLocation(ThresholdsMod.MOD_ID, "parallax_block");
public static final ResourceLocation PARALLAX_BLOCK = new ResourceLocation(OTEMod.MOD_ID, "parallax_block");
public static final RegistryObject<BlockEntityType<CompressionChamberBlockEntity>> COMPRESSION_CHAMBER = ENTITIES.register("compression_chamber", ()->BlockEntityType.Builder.of(CompressionChamberBlockEntity::new, ModBlocks.COMPRESSION_CHAMBER_BLOCK.get()).build(null));

View file

@ -1,11 +1,14 @@
package dev.zontreck.thresholds.blocks.entity;
package dev.zontreck.otemod.blocks.entity;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import org.joml.Matrix4f;
import java.util.Arrays;

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.blocks.types;
package dev.zontreck.otemod.blocks.types;
import net.minecraft.core.Direction;
import net.minecraft.core.Direction.Plane;

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.chat;
package dev.zontreck.otemod.chat;
import dev.zontreck.libzontreck.chat.ChatColor;
import dev.zontreck.libzontreck.chat.HoverTip;
@ -8,11 +8,11 @@ import dev.zontreck.libzontreck.profiles.Profile;
import dev.zontreck.libzontreck.profiles.UserProfileNotYetExistsException;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.libzontreck.util.ItemUtils;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.configs.ThresholdsServerConfig;
import dev.zontreck.thresholds.configs.PlayerFlyCache;
import dev.zontreck.thresholds.enchantments.ModEnchantments;
import dev.zontreck.thresholds.implementation.vault.StarterProvider;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.configs.OTEServerConfig;
import dev.zontreck.otemod.configs.PlayerFlyCache;
import dev.zontreck.otemod.enchantments.ModEnchantments;
import dev.zontreck.otemod.implementation.vault.StarterProvider;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.Style;
import net.minecraft.server.level.ServerPlayer;
@ -26,7 +26,7 @@ import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
@EventBusSubscriber(modid= ThresholdsMod.MOD_ID, bus=Mod.EventBusSubscriber.Bus.FORGE)
@EventBusSubscriber(modid=OTEMod.MOD_ID, bus=Mod.EventBusSubscriber.Bus.FORGE)
public class ChatServerOverride {
@SubscribeEvent
@ -55,9 +55,9 @@ public class ChatServerOverride {
c.Assert(play);
if(StarterProvider.exists())
ThresholdsMod.checkFirstJoin(ev.player);
OTEMod.checkFirstJoin(ev.player);
if(!ThresholdsServerConfig.USE_CUSTOM_JOINLEAVE.get()) return;
if(!OTEServerConfig.USE_CUSTOM_JOINLEAVE.get()) return;
ChatHelpers.broadcast(ChatHelpers.macro("!Dark_Gray![!Dark_Green!+!Dark_Gray!] !Bold!!Dark_Aqua![0]",prof.nickname), ev.level.getServer());
@ -72,7 +72,7 @@ public class ChatServerOverride {
if(px==null)return;
if(!ThresholdsServerConfig.USE_CUSTOM_JOINLEAVE.get()) return;
if(!OTEServerConfig.USE_CUSTOM_JOINLEAVE.get()) return;
// Send the alert
ChatHelpers.broadcast(ChatHelpers.macro("!Dark_Gray![!Dark_Red!-!Dark_Gray!] !Bold!!Dark_Aqua![0]", px.nickname), px.player.server);
@ -98,7 +98,7 @@ public class ChatServerOverride {
public void onChat(final ServerChatEvent ev){
if(ev.getPlayer().level().isClientSide)return;
// Player has chatted, apply override
if(!ThresholdsServerConfig.USE_CUSTOM_CHATREPLACER.get()) return;
if(!OTEServerConfig.USE_CUSTOM_CHATREPLACER.get()) return;
ServerPlayer sp = ev.getPlayer();

View file

@ -1,8 +1,9 @@
package dev.zontreck.thresholds.client.renderer;
package dev.zontreck.otemod.client.renderer;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import dev.zontreck.thresholds.blocks.entity.ParallaxWindowEntity;
import dev.zontreck.otemod.blocks.ParallaxWindow;
import dev.zontreck.otemod.blocks.entity.ParallaxWindowEntity;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;

View file

@ -1,32 +1,32 @@
package dev.zontreck.thresholds.commands;
package dev.zontreck.otemod.commands;
import java.time.Instant;
import java.util.HashMap;
import java.util.Map;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.commands.items.ShareItemInChatCommand;
import dev.zontreck.thresholds.commands.profilecmds.ChatColorCommand;
import dev.zontreck.thresholds.commands.profilecmds.NameColorCommand;
import dev.zontreck.thresholds.commands.profilecmds.NickCommand;
import dev.zontreck.thresholds.commands.profilecmds.PrefixColorCommand;
import dev.zontreck.thresholds.commands.profilecmds.PrefixCommand;
import dev.zontreck.thresholds.commands.vaults.StarterCommand;
import dev.zontreck.thresholds.commands.vaults.TrashCommand;
import dev.zontreck.thresholds.commands.vaults.VaultCommand;
import dev.zontreck.thresholds.commands.zschem.LoadSchem;
import dev.zontreck.thresholds.commands.zschem.Place;
import dev.zontreck.thresholds.commands.zschem.PlaceAsAir;
import dev.zontreck.thresholds.commands.zschem.SaveSchem;
import dev.zontreck.thresholds.commands.zschem.SetPos1;
import dev.zontreck.thresholds.commands.zschem.SetPos2;
import dev.zontreck.thresholds.configs.ThresholdsServerConfig;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.commands.items.ShareItemInChatCommand;
import dev.zontreck.otemod.commands.profilecmds.ChatColorCommand;
import dev.zontreck.otemod.commands.profilecmds.NameColorCommand;
import dev.zontreck.otemod.commands.profilecmds.NickCommand;
import dev.zontreck.otemod.commands.profilecmds.PrefixColorCommand;
import dev.zontreck.otemod.commands.profilecmds.PrefixCommand;
import dev.zontreck.otemod.commands.vaults.StarterCommand;
import dev.zontreck.otemod.commands.vaults.TrashCommand;
import dev.zontreck.otemod.commands.vaults.VaultCommand;
import dev.zontreck.otemod.commands.zschem.LoadSchem;
import dev.zontreck.otemod.commands.zschem.Place;
import dev.zontreck.otemod.commands.zschem.PlaceAsAir;
import dev.zontreck.otemod.commands.zschem.SaveSchem;
import dev.zontreck.otemod.commands.zschem.SetPos1;
import dev.zontreck.otemod.commands.zschem.SetPos2;
import dev.zontreck.otemod.configs.OTEServerConfig;
import net.minecraftforge.event.RegisterCommandsEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
@EventBusSubscriber(modid= ThresholdsMod.MOD_ID,bus=Mod.EventBusSubscriber.Bus.FORGE)
@EventBusSubscriber(modid=OTEMod.MOD_ID,bus=Mod.EventBusSubscriber.Bus.FORGE)
public class CommandRegistry {
public static Map<String,Long> CommandCooldownRegistry = new HashMap<>();
@ -44,7 +44,7 @@ public class CommandRegistry {
{
case "rtp":
{
if(Instant.now().getEpochSecond() > lastUse+Long.parseLong(String.valueOf(ThresholdsServerConfig.RTP_COOLDOWN))){
if(Instant.now().getEpochSecond() > lastUse+Long.parseLong(String.valueOf(OTEServerConfig.RTP_COOLDOWN))){
CommandCooldownRegistry.remove(cmd);
return true;
}else return false;
@ -66,7 +66,7 @@ public class CommandRegistry {
{
case "rtp":
{
cmd_time = Long.parseLong(String.valueOf(ThresholdsServerConfig.RTP_COOLDOWN));
cmd_time = Long.parseLong(String.valueOf(OTEServerConfig.RTP_COOLDOWN));
break;
}
default:

View file

@ -1,9 +1,9 @@
package dev.zontreck.thresholds.commands;
package dev.zontreck.otemod.commands;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.context.CommandContext;
import dev.zontreck.libzontreck.chat.ChatColor;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.otemod.OTEMod;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.network.chat.Component;
@ -38,12 +38,12 @@ public class FlyCommand {
p.onUpdateAbilities();
ctx.sendSystemMessage(Component.literal(ThresholdsMod.ThresholdsPrefix + ChatColor.DARK_PURPLE + " Your ability to fly has been disabled"));
ctx.sendSystemMessage(Component.literal(OTEMod.OTEPrefix + ChatColor.DARK_PURPLE + " Your ability to fly has been disabled"));
}else {
p.getAbilities().mayfly=true;
p.onUpdateAbilities();
ctx.sendSystemMessage(Component.literal(ThresholdsMod.ThresholdsPrefix + ChatColor.DARK_PURPLE + " You can now fly"));
ctx.sendSystemMessage(Component.literal(OTEMod.OTEPrefix + ChatColor.DARK_PURPLE + " You can now fly"));
}
return 0;

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.commands.antigrief;
package dev.zontreck.otemod.commands.antigrief;
// This will accelerate the healing queue, not do it instantly!
// The queue will get processed at a rate of 10* the configured rate.

View file

@ -1,11 +1,11 @@
package dev.zontreck.thresholds.commands.items;
package dev.zontreck.otemod.commands.items;
import com.mojang.brigadier.CommandDispatcher;
import dev.zontreck.libzontreck.chat.HoverTip;
import dev.zontreck.libzontreck.profiles.Profile;
import dev.zontreck.libzontreck.profiles.UserProfileNotYetExistsException;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.otemod.OTEMod;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.network.chat.MutableComponent;
@ -36,7 +36,7 @@ public class ShareItemInChatCommand {
ItemStack is = play.getItemInHand(InteractionHand.MAIN_HAND);
if(is.getItem() instanceof AirItem)
{
play.displayClientMessage(ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix +" !Dark_Red!You cannot share air in the chat."), false);
play.displayClientMessage(ChatHelpers.macro(OTEMod.OTEPrefix+" !Dark_Red!You cannot share air in the chat."), false);
return 0;
}
@ -47,11 +47,11 @@ public class ShareItemInChatCommand {
return 1;
}
MutableComponent component = ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix).append(is.getDisplayName()).append(ChatHelpers.macro(" !White!-!Dark_Purple! Hover here to see the item that "+prof.name_color+prof.nickname+"!Dark_Purple! shared"));
MutableComponent component = ChatHelpers.macro(OTEMod.OTEPrefix).append(is.getDisplayName()).append(ChatHelpers.macro(" !White!-!Dark_Purple! Hover here to see the item that "+prof.name_color+prof.nickname+"!Dark_Purple! shared"));
Style style = Style.EMPTY.withFont(Style.DEFAULT_FONT);
component = component.withStyle(style.withHoverEvent(HoverTip.getItem(is)));
ChatHelpers.broadcast(component, ThresholdsMod.THE_SERVER);
ChatHelpers.broadcast(component, OTEMod.THE_SERVER);
}else {
return 1;

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.commands.profilecmds;
package dev.zontreck.otemod.commands.profilecmds;
import com.mojang.brigadier.CommandDispatcher;
import dev.zontreck.libzontreck.LibZontreck;
@ -7,7 +7,8 @@ import dev.zontreck.libzontreck.chat.ChatColor.ColorOptions;
import dev.zontreck.libzontreck.profiles.Profile;
import dev.zontreck.libzontreck.profiles.UserProfileNotYetExistsException;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.thresholds.implementation.Messages;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.implementation.Messages;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.server.level.ServerPlayer;

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.commands.profilecmds;
package dev.zontreck.otemod.commands.profilecmds;
import com.mojang.brigadier.CommandDispatcher;
import dev.zontreck.libzontreck.LibZontreck;
@ -7,7 +7,8 @@ import dev.zontreck.libzontreck.chat.ChatColor.ColorOptions;
import dev.zontreck.libzontreck.profiles.Profile;
import dev.zontreck.libzontreck.profiles.UserProfileNotYetExistsException;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.thresholds.implementation.Messages;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.implementation.Messages;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.server.level.ServerPlayer;

View file

@ -1,12 +1,14 @@
package dev.zontreck.thresholds.commands.profilecmds;
package dev.zontreck.otemod.commands.profilecmds;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.arguments.StringArgumentType;
import dev.zontreck.libzontreck.LibZontreck;
import dev.zontreck.libzontreck.chat.ChatColor;
import dev.zontreck.libzontreck.profiles.Profile;
import dev.zontreck.libzontreck.profiles.UserProfileNotYetExistsException;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.thresholds.implementation.Messages;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.implementation.Messages;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.server.level.ServerPlayer;

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.commands.profilecmds;
package dev.zontreck.otemod.commands.profilecmds;
import com.mojang.brigadier.CommandDispatcher;
import dev.zontreck.libzontreck.LibZontreck;
@ -7,7 +7,8 @@ import dev.zontreck.libzontreck.chat.ChatColor.ColorOptions;
import dev.zontreck.libzontreck.profiles.Profile;
import dev.zontreck.libzontreck.profiles.UserProfileNotYetExistsException;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.thresholds.implementation.Messages;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.implementation.Messages;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.server.level.ServerPlayer;

View file

@ -1,12 +1,14 @@
package dev.zontreck.thresholds.commands.profilecmds;
package dev.zontreck.otemod.commands.profilecmds;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.arguments.StringArgumentType;
import dev.zontreck.libzontreck.LibZontreck;
import dev.zontreck.libzontreck.chat.ChatColor;
import dev.zontreck.libzontreck.profiles.Profile;
import dev.zontreck.libzontreck.profiles.UserProfileNotYetExistsException;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.thresholds.implementation.Messages;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.implementation.Messages;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.server.level.ServerPlayer;

View file

@ -1,15 +1,17 @@
package dev.zontreck.thresholds.commands.vaults;
package dev.zontreck.otemod.commands.vaults;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.arguments.StringArgumentType;
import dev.zontreck.libzontreck.profiles.Profile;
import dev.zontreck.libzontreck.profiles.UserProfileNotYetExistsException;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.implementation.Messages;
import dev.zontreck.thresholds.implementation.PlayerFirstJoinTag;
import dev.zontreck.thresholds.implementation.vault.NoMoreVaultException;
import dev.zontreck.thresholds.implementation.vault.StarterContainer;
import dev.zontreck.thresholds.implementation.vault.VaultContainer;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.configs.OTEServerConfig;
import dev.zontreck.otemod.implementation.Messages;
import dev.zontreck.otemod.implementation.PlayerFirstJoinTag;
import dev.zontreck.otemod.implementation.vault.NoMoreVaultException;
import dev.zontreck.otemod.implementation.vault.StarterContainer;
import dev.zontreck.otemod.implementation.vault.VaultContainer;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.commands.arguments.EntityArgument;
@ -18,6 +20,8 @@ import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.SimpleMenuProvider;
import net.minecraftforge.network.NetworkHooks;
import java.time.Instant;
public class StarterCommand
{
public static void register(CommandDispatcher<CommandSourceStack> dispatcher)
@ -46,7 +50,7 @@ public class StarterCommand
PFJT.save(prof.NBT);
ThresholdsMod.checkFirstJoin(player);
OTEMod.checkFirstJoin(player);
}
public static int openStarterMenu(CommandSourceStack ctx)
@ -85,7 +89,7 @@ public class StarterCommand
try {
container = new StarterContainer(p);
} catch (NoMoreVaultException e) {
ChatHelpers.broadcastTo(p.getUUID(), ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix +"!Dark_Red!You cannot open anymore vaults. Craft a new vault!"), p.server);
ChatHelpers.broadcastTo(p.getUUID(), ChatHelpers.macro(OTEMod.OTEPrefix+"!Dark_Red!You cannot open anymore vaults. Craft a new vault!"), p.server);
return;
}

View file

@ -1,10 +1,10 @@
package dev.zontreck.thresholds.commands.vaults;
package dev.zontreck.otemod.commands.vaults;
import com.mojang.brigadier.CommandDispatcher;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.implementation.vault.NoMoreVaultException;
import dev.zontreck.thresholds.implementation.vault.VaultContainer;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.implementation.vault.NoMoreVaultException;
import dev.zontreck.otemod.implementation.vault.VaultContainer;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.network.chat.Component;
@ -33,7 +33,7 @@ public class TrashCommand {
try {
container = new VaultContainer(play, -1);
} catch (NoMoreVaultException e) {
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix +" !Dark_Red!You cannot open anymore vaults. Craft a new vault!"), play.server);
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(OTEMod.OTEPrefix+" !Dark_Red!You cannot open anymore vaults. Craft a new vault!"), play.server);
return 0;
}

View file

@ -1,11 +1,11 @@
package dev.zontreck.thresholds.commands.vaults;
package dev.zontreck.otemod.commands.vaults;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.arguments.IntegerArgumentType;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.implementation.vault.NoMoreVaultException;
import dev.zontreck.thresholds.implementation.vault.VaultContainer;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.implementation.vault.NoMoreVaultException;
import dev.zontreck.otemod.implementation.vault.VaultContainer;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.network.chat.Component;
@ -32,7 +32,7 @@ public class VaultCommand {
ServerPlayer play = (ServerPlayer)source.getEntity();
if(i <0)
{
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix +" !Dark_Red!You can only specify a vault number in the positive range"), source.getServer());
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(OTEMod.OTEPrefix+" !Dark_Red!You can only specify a vault number in the positive range"), source.getServer());
return 0;
}
doOpen(play, i);
@ -47,7 +47,7 @@ public class VaultCommand {
try {
container = new VaultContainer(p, i);
} catch (NoMoreVaultException e) {
ChatHelpers.broadcastTo(p.getUUID(), ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix +" !Dark_Red!You cannot open anymore vaults. Craft a new vault!"), p.server);
ChatHelpers.broadcastTo(p.getUUID(), ChatHelpers.macro(OTEMod.OTEPrefix+" !Dark_Red!You cannot open anymore vaults. Craft a new vault!"), p.server);
return;
}

View file

@ -1,16 +1,16 @@
package dev.zontreck.thresholds.commands.zschem;
package dev.zontreck.otemod.commands.zschem;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.arguments.StringArgumentType;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.libzontreck.vectors.Vector3;
import dev.zontreck.libzontreck.vectors.WorldPosition;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.integrations.LuckPermsHelper;
import dev.zontreck.thresholds.permissions.Permissions;
import dev.zontreck.thresholds.zschem.MemoryHolder;
import dev.zontreck.thresholds.zschem.MemoryHolder.Container;
import dev.zontreck.thresholds.zschem.StoredBlock;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.integrations.LuckPermsHelper;
import dev.zontreck.otemod.permissions.Permissions;
import dev.zontreck.otemod.zschem.MemoryHolder;
import dev.zontreck.otemod.zschem.MemoryHolder.Container;
import dev.zontreck.otemod.zschem.StoredBlock;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.nbt.CompoundTag;
@ -61,7 +61,7 @@ public class LoadSchem {
loadSchematicUsage(source);
}else {
if(cont.Pos1 != ThresholdsMod.ZERO_VECTOR)
if(cont.Pos1 != OTEMod.ZERO_VECTOR)
{
// Lets go!
List<StoredBlock> blocks = new ArrayList<StoredBlock>();
@ -112,28 +112,28 @@ public class LoadSchem {
MemoryHolder.setBlocks(play, blocks);
}else {
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix + " !Dark_Red!No such ZSchem exists!"), source.getServer());
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(OTEMod.OTEPrefix + " !Dark_Red!No such ZSchem exists!"), source.getServer());
return 0;
}
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix +" !Dark_Green!ZSchem loaded from disk!"), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(OTEMod.OTEPrefix+" !Dark_Green!ZSchem loaded from disk!"), OTEMod.THE_SERVER);
return 0;
}
}
}
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro("!Dark_Red! You must set the first position"), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro("!Dark_Red! You must set the first position"), OTEMod.THE_SERVER);
return 0;
}
private static int loadSchematicUsage(CommandSourceStack source)
{
String usage = ThresholdsMod.ThresholdsPrefix;
String usage = OTEMod.OTEPrefix;
usage += "!gold! /loadzschem [string:name]";
ServerPlayer play=(ServerPlayer)source.getEntity();
if(play==null)return 1;
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(usage), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(usage), OTEMod.THE_SERVER);
return 0;
}
}

View file

@ -1,14 +1,14 @@
package dev.zontreck.thresholds.commands.zschem;
package dev.zontreck.otemod.commands.zschem;
import com.mojang.brigadier.CommandDispatcher;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.integrations.LuckPermsHelper;
import dev.zontreck.thresholds.permissions.Permissions;
import dev.zontreck.thresholds.zschem.MemoryHolder;
import dev.zontreck.thresholds.zschem.MemoryHolder.Container;
import dev.zontreck.thresholds.zschem.StoredBlock;
import dev.zontreck.thresholds.zschem.WorldProp;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.integrations.LuckPermsHelper;
import dev.zontreck.otemod.permissions.Permissions;
import dev.zontreck.otemod.zschem.MemoryHolder;
import dev.zontreck.otemod.zschem.MemoryHolder.Container;
import dev.zontreck.otemod.zschem.StoredBlock;
import dev.zontreck.otemod.zschem.WorldProp;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.server.level.ServerPlayer;
@ -41,7 +41,7 @@ public class Place {
if(!MemoryHolder.hasPlayerCached(play)){
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix +" !Dark_Red!You must first load the zschem!"), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(OTEMod.OTEPrefix+" !Dark_Red!You must first load the zschem!"), OTEMod.THE_SERVER);
return 1;
}
@ -50,7 +50,7 @@ public class Place {
List<StoredBlock> blocks = cont.blocks;
Collections.shuffle(blocks);
if(cont.Pos1 != ThresholdsMod.ZERO_VECTOR)
if(cont.Pos1 != OTEMod.ZERO_VECTOR)
{
WorldProp system = WorldProp.acquire(cont.lvl);
// Begin the process
@ -62,13 +62,13 @@ public class Place {
}else {
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix +" !Dark_Red!You must first load the zschem!"), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(OTEMod.OTEPrefix+" !Dark_Red!You must first load the zschem!"), OTEMod.THE_SERVER);
return 1;
}
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix +" !Dark_Green!Enqueued!"), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(OTEMod.OTEPrefix+" !Dark_Green!Enqueued!"), OTEMod.THE_SERVER);
return 0;
}

View file

@ -1,15 +1,15 @@
package dev.zontreck.thresholds.commands.zschem;
package dev.zontreck.otemod.commands.zschem;
import com.mojang.brigadier.CommandDispatcher;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.libzontreck.vectors.Vector3;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.integrations.LuckPermsHelper;
import dev.zontreck.thresholds.permissions.Permissions;
import dev.zontreck.thresholds.zschem.MemoryHolder;
import dev.zontreck.thresholds.zschem.MemoryHolder.Container;
import dev.zontreck.thresholds.zschem.StoredBlock;
import dev.zontreck.thresholds.zschem.WorldProp;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.integrations.LuckPermsHelper;
import dev.zontreck.otemod.permissions.Permissions;
import dev.zontreck.otemod.zschem.MemoryHolder;
import dev.zontreck.otemod.zschem.MemoryHolder.Container;
import dev.zontreck.otemod.zschem.StoredBlock;
import dev.zontreck.otemod.zschem.WorldProp;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.server.level.ServerPlayer;
@ -44,14 +44,14 @@ public class PlaceAsAir {
if(!MemoryHolder.hasPlayerCached(play)){
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix +" !Dark_Red!You must first set the positions!"), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(OTEMod.OTEPrefix+" !Dark_Red!You must first set the positions!"), OTEMod.THE_SERVER);
return 1;
}
Container cont = MemoryHolder.getContainer(play);
if(cont.Pos1 != ThresholdsMod.ZERO_VECTOR && cont.Pos2 != ThresholdsMod.ZERO_VECTOR)
if(cont.Pos1 != OTEMod.ZERO_VECTOR && cont.Pos2 != OTEMod.ZERO_VECTOR)
{
WorldProp system = WorldProp.acquire(cont.lvl);
// Begin the process
@ -69,13 +69,13 @@ public class PlaceAsAir {
}else {
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix +" !Dark_Red!You must first set the positions!"), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(OTEMod.OTEPrefix+" !Dark_Red!You must first set the positions!"), OTEMod.THE_SERVER);
return 1;
}
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix +" !Dark_Green!Enqueued!"), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(OTEMod.OTEPrefix+" !Dark_Green!Enqueued!"), OTEMod.THE_SERVER);
return 0;
}

View file

@ -1,15 +1,15 @@
package dev.zontreck.thresholds.commands.zschem;
package dev.zontreck.otemod.commands.zschem;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.arguments.StringArgumentType;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.libzontreck.vectors.Vector3;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.integrations.LuckPermsHelper;
import dev.zontreck.thresholds.permissions.Permissions;
import dev.zontreck.thresholds.zschem.MemoryHolder;
import dev.zontreck.thresholds.zschem.MemoryHolder.Container;
import dev.zontreck.thresholds.zschem.StoredBlock;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.integrations.LuckPermsHelper;
import dev.zontreck.otemod.permissions.Permissions;
import dev.zontreck.otemod.zschem.MemoryHolder;
import dev.zontreck.otemod.zschem.MemoryHolder.Container;
import dev.zontreck.otemod.zschem.StoredBlock;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.core.BlockPos;
@ -57,7 +57,7 @@ public class SaveSchem {
saveSchematicUsage(source);
}else {
if(cont.Pos1 != ThresholdsMod.ZERO_VECTOR && cont.Pos2 != ThresholdsMod.ZERO_VECTOR)
if(cont.Pos1 != OTEMod.ZERO_VECTOR && cont.Pos2 != OTEMod.ZERO_VECTOR)
{
// Lets go!
List<StoredBlock> blocks = new ArrayList<StoredBlock>();
@ -103,23 +103,23 @@ public class SaveSchem {
} catch (IOException e) {
e.printStackTrace();
}
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix +" !Dark_Green!ZSchem saved to disk!"), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(OTEMod.OTEPrefix+" !Dark_Green!ZSchem saved to disk!"), OTEMod.THE_SERVER);
return 0;
}
}
}
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro("!Dark_Red! You must first set the positions"), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro("!Dark_Red! You must first set the positions"), OTEMod.THE_SERVER);
return 0;
}
private static int saveSchematicUsage(CommandSourceStack source)
{
String usage = ThresholdsMod.ThresholdsPrefix;
String usage = OTEMod.OTEPrefix;
usage += "!gold! /savezschem [string:name]";
ServerPlayer play=(ServerPlayer)source.getEntity();
if(play==null)return 1;
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(usage), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(usage), OTEMod.THE_SERVER);
return 0;
}
}

View file

@ -1,13 +1,13 @@
package dev.zontreck.thresholds.commands.zschem;
package dev.zontreck.otemod.commands.zschem;
import com.mojang.brigadier.CommandDispatcher;
import dev.zontreck.libzontreck.chat.ChatColor;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.libzontreck.vectors.Vector3;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.integrations.LuckPermsHelper;
import dev.zontreck.thresholds.permissions.Permissions;
import dev.zontreck.thresholds.zschem.MemoryHolder;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.integrations.LuckPermsHelper;
import dev.zontreck.otemod.permissions.Permissions;
import dev.zontreck.otemod.zschem.MemoryHolder;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.network.chat.Component;
@ -37,7 +37,7 @@ public class SetPos1 {
MemoryHolder.setPos1(play, new Vector3(source.getPosition()));
MemoryHolder.setLevel(play, source.getLevel());
ChatHelpers.broadcastTo(play.getUUID(), Component.literal(ThresholdsMod.ThresholdsPrefix +ChatColor.doColors(" !Dark_Green!Position 1 set!")), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(play.getUUID(), Component.literal(OTEMod.OTEPrefix+ChatColor.doColors(" !Dark_Green!Position 1 set!")), OTEMod.THE_SERVER);
return 0;
}

View file

@ -1,13 +1,13 @@
package dev.zontreck.thresholds.commands.zschem;
package dev.zontreck.otemod.commands.zschem;
import com.mojang.brigadier.CommandDispatcher;
import dev.zontreck.libzontreck.chat.ChatColor;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.libzontreck.vectors.Vector3;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.integrations.LuckPermsHelper;
import dev.zontreck.thresholds.permissions.Permissions;
import dev.zontreck.thresholds.zschem.MemoryHolder;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.integrations.LuckPermsHelper;
import dev.zontreck.otemod.permissions.Permissions;
import dev.zontreck.otemod.zschem.MemoryHolder;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.network.chat.Component;
@ -37,7 +37,7 @@ public class SetPos2 {
MemoryHolder.setPos2(play, new Vector3(source.getPosition()));
MemoryHolder.setLevel(play, source.getLevel());
ChatHelpers.broadcastTo(play.getUUID(), Component.literal(ThresholdsMod.ThresholdsPrefix +ChatColor.doColors(" !Dark_Green!Position 2 set!")), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(play.getUUID(), Component.literal(OTEMod.OTEPrefix+ChatColor.doColors(" !Dark_Green!Position 2 set!")), OTEMod.THE_SERVER);
return 0;
}

View file

@ -1,12 +1,13 @@
package dev.zontreck.thresholds.configs;
package dev.zontreck.otemod.configs;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.common.ForgeConfigSpec;
public class ThresholdsServerConfig {
public class OTEServerConfig {
public static final ForgeConfigSpec.Builder BUILDER = new ForgeConfigSpec.Builder();
public static final ForgeConfigSpec SPEC;
@ -79,7 +80,7 @@ public class ThresholdsServerConfig {
List<String> defDims = new ArrayList<String>();
defDims.add("minecraft:the_end");
defDims.add("minecraft:the_nether");
defDims.add("thresholds:resource");
defDims.add("otemod:resource");
EXCLUDE_DIMS = BUILDER.comment("Dimension names (ex. minecraft:overworld) to exclude from the explosion healing events").define("exclude_dimensions", defDims);
BUILDER.pop();

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.configs;
package dev.zontreck.otemod.configs;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.player.Abilities;

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.database;
package dev.zontreck.otemod.database;
import java.io.IOException;
import java.nio.file.Files;

View file

@ -1,17 +1,19 @@
package dev.zontreck.thresholds.effects;
package dev.zontreck.otemod.effects;
import dev.zontreck.libzontreck.LibZontreck;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.libzontreck.util.ItemUtils;
import dev.zontreck.libzontreck.util.ServerUtilities;
import dev.zontreck.thresholds.enchantments.ModEnchantments;
import dev.zontreck.thresholds.implementation.Messages;
import dev.zontreck.otemod.enchantments.ModEnchantments;
import dev.zontreck.otemod.implementation.Messages;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectCategory;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.ai.attributes.AttributeMap;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.player.Abilities;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;

View file

@ -1,6 +1,6 @@
package dev.zontreck.thresholds.effects;
package dev.zontreck.otemod.effects;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.otemod.OTEMod;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectCategory;
import net.minecraftforge.eventbus.api.IEventBus;
@ -10,7 +10,7 @@ import net.minecraftforge.registries.RegistryObject;
public class ModEffects
{
public static final DeferredRegister<MobEffect> REGISTRY = DeferredRegister.create(ForgeRegistries.MOB_EFFECTS, ThresholdsMod.MOD_ID);
public static final DeferredRegister<MobEffect> REGISTRY = DeferredRegister.create(ForgeRegistries.MOB_EFFECTS, OTEMod.MOD_ID);
public static final RegistryObject<MobEffect> FLIGHT = REGISTRY.register("flight", ()->new FlightEffect(MobEffectCategory.BENEFICIAL, 0xFF0000FF));

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.enchantments;
package dev.zontreck.otemod.enchantments;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.enchantment.Enchantment;

View file

@ -1,23 +1,34 @@
package dev.zontreck.thresholds.enchantments;
package dev.zontreck.otemod.enchantments;
import dev.zontreck.libzontreck.util.ItemUtils;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.configs.ThresholdsServerConfig;
import dev.zontreck.thresholds.effects.ModEffects;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.configs.OTEServerConfig;
import dev.zontreck.otemod.effects.ModEffects;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.server.level.ServerPlayerGameMode;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.player.Abilities;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ArmorItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.enchantment.EnchantmentCategory;
import net.minecraft.world.item.enchantment.Enchantments;
import net.minecraft.world.item.enchantment.SoulSpeedEnchantment;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.event.entity.living.LivingEquipmentChangeEvent;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.LogicalSide;
import net.minecraftforge.fml.common.Mod;
import java.util.concurrent.atomic.AtomicInteger;
@Mod.EventBusSubscriber(modid = ThresholdsMod.MOD_ID)
@Mod.EventBusSubscriber(modid = OTEMod.MOD_ID)
public class FlightEnchantment extends Enchantment
{
@ -75,9 +86,9 @@ public class FlightEnchantment extends Enchantment
if(ThresholdsServerConfig.DEBUG.get())
if(OTEServerConfig.DEBUG.get())
{
ThresholdsMod.LOGGER.info("> Flight Enchantment Tick <");
OTEMod.LOGGER.info("> Flight Enchantment Tick <");
}
if(event.phase == TickEvent.Phase.END)

View file

@ -1,9 +1,12 @@
package dev.zontreck.thresholds.enchantments;
package dev.zontreck.otemod.enchantments;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.configs.ThresholdsServerConfig;
import java.util.Random;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.configs.OTEServerConfig;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.SwordItem;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.enchantment.EnchantmentCategory;
@ -59,16 +62,16 @@ public class MobEggEnchantment extends Enchantment
public static boolean givesEgg(int level, int bias)
{
double CHANCE = ThresholdsServerConfig.SPAWN_EGG_CHANCE.get() * 100;
double CHANCE = OTEServerConfig.SPAWN_EGG_CHANCE.get() * 100;
CHANCE *= (level / 0.5);
CHANCE += bias;
double rng = Math.random()*100000;
if(ThresholdsServerConfig.DEBUG.get())
if(OTEServerConfig.DEBUG.get())
{
ThresholdsMod.LOGGER.info("Spawn Egg Chance (" + CHANCE + ") [" + rng + "]");
OTEMod.LOGGER.info("Spawn Egg Chance (" + CHANCE + ") [" + rng + "]");
}
return (rng <= CHANCE);
}

View file

@ -1,6 +1,6 @@
package dev.zontreck.thresholds.enchantments;
package dev.zontreck.otemod.enchantments;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.otemod.OTEMod;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.enchantment.EnchantmentCategory;
@ -12,7 +12,7 @@ import net.minecraftforge.registries.RegistryObject;
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, ThresholdsMod.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());

View file

@ -1,8 +1,9 @@
package dev.zontreck.thresholds.enchantments;
package dev.zontreck.otemod.enchantments;
import dev.zontreck.libzontreck.util.ItemUtils;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.configs.ThresholdsServerConfig;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.configs.OTEServerConfig;
import dev.zontreck.otemod.effects.ModEffects;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
@ -10,6 +11,7 @@ import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.enchantment.EnchantmentCategory;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.LogicalSide;
@ -17,7 +19,7 @@ import net.minecraftforge.fml.common.Mod;
import java.util.concurrent.atomic.AtomicInteger;
@Mod.EventBusSubscriber(modid = ThresholdsMod.MOD_ID)
@Mod.EventBusSubscriber(modid = OTEMod.MOD_ID)
public class NightVisionEnchantment extends Enchantment
{
@ -62,9 +64,9 @@ public class NightVisionEnchantment extends Enchantment
if(ThresholdsServerConfig.DEBUG.get())
if(OTEServerConfig.DEBUG.get())
{
ThresholdsMod.LOGGER.info("> NVision Enchantment Tick <");
OTEMod.LOGGER.info("> NVision Enchantment Tick <");
}
if(event.phase == TickEvent.Phase.END)

View file

@ -1,6 +1,14 @@
package dev.zontreck.thresholds.entities;
package dev.zontreck.otemod.entities;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.entities.monsters.PossumEntity;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.MobCategory;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
public class ModEntityTypes {
//public static final DeferredRegister<EntityType<?>> ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITY_TYPES, OTEMod.MOD_ID);

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.entities.monsters;
package dev.zontreck.otemod.entities.monsters;
public class PossumEntity

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.entities.monsters.client;
package dev.zontreck.otemod.entities.monsters.client;
public class PossumModel

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.entities.monsters.client;
package dev.zontreck.otemod.entities.monsters.client;
public class PossumRenderer

View file

@ -1,9 +1,9 @@
package dev.zontreck.thresholds.events;
package dev.zontreck.otemod.events;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.integrations.KeyBindings;
import dev.zontreck.thresholds.networking.ModMessages;
import dev.zontreck.thresholds.networking.packets.OpenVaultC2SPacket;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.integrations.KeyBindings;
import dev.zontreck.otemod.networking.ModMessages;
import dev.zontreck.otemod.networking.packets.OpenVaultC2SPacket;
import net.minecraft.client.Minecraft;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.event.InputEvent;
@ -13,7 +13,7 @@ import net.minecraftforge.fml.common.Mod;
import java.time.Instant;
public class ClientEvents {
@Mod.EventBusSubscriber(modid = ThresholdsMod.MOD_ID, value = Dist.CLIENT)
@Mod.EventBusSubscriber(modid = OTEMod.MOD_ID, value = Dist.CLIENT)
public static class ForgeEvents
{
// Timeout!
@ -31,7 +31,7 @@ public class ClientEvents {
}
}
@Mod.EventBusSubscriber(modid = ThresholdsMod.MOD_ID, value=Dist.CLIENT, bus=Mod.EventBusSubscriber.Bus.MOD)
@Mod.EventBusSubscriber(modid = OTEMod.MOD_ID, value=Dist.CLIENT, bus=Mod.EventBusSubscriber.Bus.MOD)
public static class ClientModBus
{

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.events;
package dev.zontreck.otemod.events;
import dev.zontreck.libzontreck.lore.LoreContainer;
import dev.zontreck.libzontreck.lore.LoreEntry;
@ -7,11 +7,13 @@ import dev.zontreck.libzontreck.profiles.UserProfileNotYetExistsException;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.libzontreck.util.ItemUtils;
import dev.zontreck.libzontreck.util.heads.HeadUtilities;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.configs.ThresholdsServerConfig;
import dev.zontreck.thresholds.enchantments.MobEggEnchantment;
import dev.zontreck.thresholds.enchantments.ModEnchantments;
import dev.zontreck.thresholds.implementation.DeathMessages;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.configs.OTEServerConfig;
import dev.zontreck.otemod.enchantments.MobEggEnchantment;
import dev.zontreck.otemod.enchantments.ModEnchantments;
import dev.zontreck.otemod.implementation.DeathMessages;
import dev.zontreck.otemod.implementation.InventoryBackup;
import dev.zontreck.otemod.items.tags.ItemStatType;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerPlayer;
@ -21,18 +23,21 @@ import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.enchantment.Enchantments;
import net.minecraft.world.level.GameType;
import net.minecraftforge.common.ForgeSpawnEggItem;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.eventbus.api.EventPriority;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.items.ItemStackHandler;
import java.time.Instant;
import java.util.Date;
import java.util.Random;
@Mod.EventBusSubscriber(modid= ThresholdsMod.MOD_ID)
@Mod.EventBusSubscriber(modid=OTEMod.MOD_ID)
public class EventHandler {
@ -50,7 +55,7 @@ public class EventHandler {
}
profile.deaths++;
profile.commit();
if(!ThresholdsServerConfig.ENABLE_PLAYER_HEAD_DROPS.get())
if(!OTEServerConfig.ENABLE_PLAYER_HEAD_DROPS.get())
{
return;
}
@ -63,7 +68,7 @@ public class EventHandler {
}
// Calculate chance
double base_chance = ThresholdsServerConfig.CHANCE_OF_PLAYER_HEAD.get();
double base_chance = OTEServerConfig.CHANCE_OF_PLAYER_HEAD.get();
base_chance += looting;
base_chance *= 100;

View file

@ -1,10 +1,31 @@
package dev.zontreck.thresholds.events;
package dev.zontreck.otemod.events;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.libzontreck.lore.LoreContainer;
import dev.zontreck.libzontreck.lore.LoreEntry;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.items.tags.ItemStatTag;
import dev.zontreck.otemod.items.tags.ItemStatType;
import dev.zontreck.otemod.items.tags.ItemStatistics;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.level.BlockEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.registries.ForgeRegistries;
@EventBusSubscriber(modid= ThresholdsMod.MOD_ID, bus=Mod.EventBusSubscriber.Bus.FORGE)
@EventBusSubscriber(modid=OTEMod.MOD_ID, bus=Mod.EventBusSubscriber.Bus.FORGE)
public class LoreHandlers {
/*
@SubscribeEvent

View file

@ -1,17 +1,21 @@
package dev.zontreck.thresholds.events;
package dev.zontreck.otemod.events;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.entities.ModEntityTypes;
import dev.zontreck.otemod.entities.monsters.PossumEntity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraftforge.event.entity.EntityAttributeCreationEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
@Mod.EventBusSubscriber(modid = ThresholdsMod.MOD_ID, bus = Bus.MOD)
@Mod.EventBusSubscriber(modid = OTEMod.MOD_ID, bus = Bus.MOD)
public class ModEventBusEvents {
@SubscribeEvent
public static void onMobAttributeCreation(EntityAttributeCreationEvent ev)
{
//ev.put((EntityType<? extends LivingEntity>) ModEntityTypes.POSSUM.get(), PossumEntity.createAttributes());
ThresholdsMod.LOGGER.info("/!\\ REGISTERING ATTRIBUTES /!\\");
OTEMod.LOGGER.info("/!\\ REGISTERING ATTRIBUTES /!\\");
}
}

View file

@ -1,7 +1,7 @@
package dev.zontreck.thresholds.implementation;
package dev.zontreck.otemod.implementation;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.items.ModItems;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.items.ModItems;
import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.CreativeModeTab;
@ -9,16 +9,17 @@ import net.minecraft.world.item.Item;
import net.minecraft.world.level.ItemLike;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Supplier;
@Mod.EventBusSubscriber(modid = ThresholdsMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
@Mod.EventBusSubscriber(modid = OTEMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
public class CreativeModeTabs
{
public static final DeferredRegister<CreativeModeTab> REGISTER = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, ThresholdsMod.MOD_ID);
public static final DeferredRegister<CreativeModeTab> REGISTER = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, OTEMod.MOD_ID);
public static final List<Supplier<? extends ItemLike>> OTEMOD_TAB_ITEMS = new ArrayList<>();

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.implementation;
package dev.zontreck.otemod.implementation;
import java.util.ArrayList;
import java.util.List;
@ -8,6 +8,7 @@ import dev.zontreck.libzontreck.profiles.Profile;
import dev.zontreck.libzontreck.util.ChatHelpers;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.damagesource.DamageTypes;
import net.minecraft.world.entity.Entity;
public class DeathMessages {
private static final List<String> messages;

View file

@ -1,13 +1,18 @@
package dev.zontreck.thresholds.implementation;
package dev.zontreck.otemod.implementation;
import dev.zontreck.thresholds.database.OTEDatastore;
import dev.zontreck.otemod.database.OTEDatastore;
import net.minecraft.nbt.*;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.GameType;
import net.minecraftforge.items.ItemStackHandler;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
public class InventoryBackup extends OTEDatastore
{

View file

@ -0,0 +1,32 @@
package dev.zontreck.otemod.implementation;
public class Messages {
public static final String OTE_PREFIX;
public static final String PREFIX_UPDATED;
public static final String PREFIX_COLOR_UPDATED;
public static final String NICK_UPDATED;
public static final String NAME_COLOR_UPDATED;
public static final String CHAT_COLOR_UPDATED;
public static final String STARTER_FAILURE_CONSOLE;
public static final String STARTER_FAILURE_PERMISSIONS;
public static final String STARTER_KIT_GIVEN;
public static final String FLIGHT_GIVEN;
public static final String FLIGHT_REMOVED;
static{
OTE_PREFIX = "!Dark_Gray![!Dark_Purple!OTE!Dark_Gray!] ";
PREFIX_UPDATED = OTE_PREFIX + " !Dark_Purple!Your prefix has been updated";
PREFIX_COLOR_UPDATED = OTE_PREFIX + "!Dark_Purple!Your prefix color has been updated";
NICK_UPDATED = OTE_PREFIX + "!Dark_Purple! Your nickname has been updated";
NAME_COLOR_UPDATED = OTE_PREFIX + "!Dark_Purple!Your name color has been updated";
CHAT_COLOR_UPDATED = OTE_PREFIX + "!Dark_Purple!Your chat color has been updated";
STARTER_FAILURE_CONSOLE = OTE_PREFIX + "!Dark_Red!This command can only be executed from within the game";
STARTER_FAILURE_PERMISSIONS = OTE_PREFIX + "!Dark_Red!This command can only be executed by server operators";
STARTER_KIT_GIVEN = OTE_PREFIX + "!Dark_Purple!You have been given a starter kit. Welcome to the server.";
FLIGHT_GIVEN = OTE_PREFIX + "!Dark_Green!You start to feel lighter than a feather";
FLIGHT_REMOVED = OTE_PREFIX + "!Dark_Red!You have a sinking feeling you are no longer lighter than a feather.";
}
}

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.implementation;
package dev.zontreck.otemod.implementation;
public class MouseHelpers {
public static boolean isMouseOver(double mouseX, double mouseY, int x, int y, int sizeX, int sizeY)

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.implementation;
package dev.zontreck.otemod.implementation;
import net.minecraft.core.NonNullList;
import net.minecraft.world.item.ItemStack;

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.implementation;
package dev.zontreck.otemod.implementation;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.LongTag;

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.implementation;
package dev.zontreck.otemod.implementation;
public class StarterKitDoesNotExistException extends Exception
{

View file

@ -1,8 +1,11 @@
package dev.zontreck.thresholds.implementation.compressor;
package dev.zontreck.otemod.implementation.compressor;
import dev.zontreck.thresholds.blocks.ModBlocks;
import dev.zontreck.thresholds.blocks.entity.CompressionChamberBlockEntity;
import dev.zontreck.thresholds.implementation.inits.ModMenuTypes;
import dev.zontreck.otemod.blocks.ModBlocks;
import dev.zontreck.otemod.blocks.entity.CompressionChamberBlockEntity;
import dev.zontreck.otemod.blocks.entity.ItemScrubberBlockEntity;
import dev.zontreck.otemod.blocks.entity.ModEntities;
import dev.zontreck.otemod.implementation.inits.ModMenuTypes;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.world.entity.player.Inventory;

View file

@ -1,9 +1,9 @@
package dev.zontreck.thresholds.implementation.compressor;
package dev.zontreck.otemod.implementation.compressor;
import com.mojang.blaze3d.systems.RenderSystem;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.implementation.MouseHelpers;
import dev.zontreck.thresholds.implementation.energy.screenrenderer.EnergyInfoArea;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.implementation.MouseHelpers;
import dev.zontreck.otemod.implementation.energy.screenrenderer.EnergyInfoArea;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
import net.minecraft.client.renderer.GameRenderer;
@ -16,7 +16,7 @@ import java.util.Optional;
public class CompressionChamberScreen extends AbstractContainerScreen<CompressionChamberMenu> {
private static final ResourceLocation TEXTURE = new ResourceLocation(ThresholdsMod.MOD_ID, "textures/gui/energized_compression_chamber.png");
private static final ResourceLocation TEXTURE = new ResourceLocation(OTEMod.MOD_ID, "textures/gui/energized_compression_chamber.png");
private EnergyInfoArea EIA;

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.implementation.energy;
package dev.zontreck.otemod.implementation.energy;
import net.minecraftforge.energy.EnergyStorage;

View file

@ -1,5 +1,7 @@
package dev.zontreck.thresholds.implementation.energy.screenrenderer;
package dev.zontreck.otemod.implementation.energy.screenrenderer;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.renderer.Rect2i;
import net.minecraft.network.chat.Component;

View file

@ -1,5 +1,8 @@
package dev.zontreck.thresholds.implementation.energy.screenrenderer;
package dev.zontreck.otemod.implementation.energy.screenrenderer;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.renderer.Rect2i;

View file

@ -1,7 +1,7 @@
package dev.zontreck.thresholds.implementation.events;
package dev.zontreck.otemod.implementation.events;
import dev.zontreck.libzontreck.profiles.Profile;
import dev.zontreck.thresholds.configs.ThresholdsServerConfig;
import dev.zontreck.otemod.configs.OTEServerConfig;
import net.minecraftforge.eventbus.api.Event;
public class VaultCreatedEvent extends Event
@ -16,7 +16,7 @@ public class VaultCreatedEvent extends Event
public VaultCreatedEvent(int num, Profile user, int vaultsInUse)
{
max= ThresholdsServerConfig.MAX_VAULTS.get();
max=OTEServerConfig.MAX_VAULTS.get();
vault_num = num;
in_use = vaultsInUse;
playerMax=user.available_vaults;

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.implementation.events;
package dev.zontreck.otemod.implementation.events;
import dev.zontreck.libzontreck.profiles.Profile;

View file

@ -1,6 +1,7 @@
package dev.zontreck.thresholds.implementation.events;
package dev.zontreck.otemod.implementation.events;
import dev.zontreck.libzontreck.profiles.Profile;
import net.minecraft.world.entity.player.Inventory;
import net.minecraftforge.items.ItemStackHandler;
public class VaultModifiedEvent extends VaultCreatedEvent

View file

@ -1,11 +1,11 @@
package dev.zontreck.thresholds.implementation.inits;
package dev.zontreck.otemod.implementation.inits;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.implementation.compressor.CompressionChamberMenu;
import dev.zontreck.thresholds.implementation.scrubber.ItemScrubberMenu;
import dev.zontreck.thresholds.implementation.scrubber.MagicalScrubberMenu;
import dev.zontreck.thresholds.implementation.vault.StarterMenu;
import dev.zontreck.thresholds.implementation.vault.VaultMenu;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.implementation.compressor.CompressionChamberMenu;
import dev.zontreck.otemod.implementation.scrubber.ItemScrubberMenu;
import dev.zontreck.otemod.implementation.scrubber.MagicalScrubberMenu;
import dev.zontreck.otemod.implementation.vault.StarterMenu;
import dev.zontreck.otemod.implementation.vault.VaultMenu;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.inventory.MenuType;
import net.minecraftforge.common.extensions.IForgeMenuType;
@ -17,7 +17,7 @@ import net.minecraftforge.registries.RegistryObject;
public final class ModMenuTypes
{
public static final DeferredRegister<MenuType<?>> CONTAINERS = DeferredRegister.create(ForgeRegistries.MENU_TYPES, ThresholdsMod.MOD_ID);
public static final DeferredRegister<MenuType<?>> CONTAINERS = DeferredRegister.create(ForgeRegistries.MENU_TYPES, OTEMod.MOD_ID);
public static final RegistryObject<MenuType<VaultMenu>> VAULT = registerMenuType(VaultMenu::new, "vault");

View file

@ -1,8 +1,8 @@
package dev.zontreck.thresholds.implementation.scrubber;
package dev.zontreck.otemod.implementation.scrubber;
import dev.zontreck.thresholds.blocks.ModBlocks;
import dev.zontreck.thresholds.blocks.entity.ItemScrubberBlockEntity;
import dev.zontreck.thresholds.implementation.inits.ModMenuTypes;
import dev.zontreck.otemod.blocks.ModBlocks;
import dev.zontreck.otemod.blocks.entity.ItemScrubberBlockEntity;
import dev.zontreck.otemod.implementation.inits.ModMenuTypes;
import net.minecraft.core.Direction;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.world.entity.player.Inventory;

View file

@ -1,12 +1,13 @@
package dev.zontreck.thresholds.implementation.scrubber;
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.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.implementation.MouseHelpers;
import dev.zontreck.thresholds.implementation.energy.screenrenderer.EnergyInfoArea;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.implementation.MouseHelpers;
import dev.zontreck.otemod.implementation.energy.screenrenderer.EnergyInfoArea;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
import net.minecraft.client.renderer.GameRenderer;
@ -16,7 +17,7 @@ import net.minecraft.world.entity.player.Inventory;
public class ItemScrubberScreen extends AbstractContainerScreen<ItemScrubberMenu>
{
private static final ResourceLocation TEXTURE = new ResourceLocation(ThresholdsMod.MOD_ID, "textures/gui/item_scrubber_gui.png");
private static final ResourceLocation TEXTURE = new ResourceLocation(OTEMod.MOD_ID, "textures/gui/item_scrubber_gui.png");
private EnergyInfoArea EIA;

View file

@ -1,8 +1,8 @@
package dev.zontreck.thresholds.implementation.scrubber;
package dev.zontreck.otemod.implementation.scrubber;
import dev.zontreck.thresholds.blocks.ModBlocks;
import dev.zontreck.thresholds.blocks.entity.MagicalScrubberBlockEntity;
import dev.zontreck.thresholds.implementation.inits.ModMenuTypes;
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;

View file

@ -1,12 +1,13 @@
package dev.zontreck.thresholds.implementation.scrubber;
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.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.implementation.MouseHelpers;
import dev.zontreck.thresholds.implementation.energy.screenrenderer.EnergyInfoArea;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.implementation.MouseHelpers;
import dev.zontreck.otemod.implementation.energy.screenrenderer.EnergyInfoArea;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
import net.minecraft.client.renderer.GameRenderer;
@ -17,7 +18,7 @@ import net.minecraft.world.entity.player.Inventory;
public class MagicalScrubberScreen extends AbstractContainerScreen<MagicalScrubberMenu>
{
private static final ResourceLocation TEXTURE = new ResourceLocation(ThresholdsMod.MOD_ID, "textures/gui/item_scrubber_gui.png");
private static final ResourceLocation TEXTURE = new ResourceLocation(OTEMod.MOD_ID, "textures/gui/item_scrubber_gui.png");
private EnergyInfoArea EIA;

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.implementation.vault;
package dev.zontreck.otemod.implementation.vault;
/**
* You cannot create or open the vault due to server settings

View file

@ -1,5 +1,6 @@
package dev.zontreck.thresholds.implementation.vault;
package dev.zontreck.otemod.implementation.vault;
import dev.zontreck.libzontreck.profiles.Profile;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.LongTag;
import net.minecraft.nbt.NbtIo;

View file

@ -1,9 +1,13 @@
package dev.zontreck.thresholds.implementation.vault;
package dev.zontreck.otemod.implementation.vault;
import dev.zontreck.libzontreck.chat.ChatColor;
import dev.zontreck.libzontreck.profiles.Profile;
import dev.zontreck.libzontreck.profiles.UserProfileNotYetExistsException;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.configs.OTEServerConfig;
import dev.zontreck.otemod.implementation.StarterKitDoesNotExistException;
import dev.zontreck.otemod.implementation.events.VaultModifiedEvent;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;

View file

@ -1,6 +1,6 @@
package dev.zontreck.thresholds.implementation.vault;
package dev.zontreck.otemod.implementation.vault;
import dev.zontreck.thresholds.implementation.inits.ModMenuTypes;
import dev.zontreck.otemod.implementation.inits.ModMenuTypes;
import net.minecraft.core.BlockPos;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.world.entity.player.Inventory;

View file

@ -1,11 +1,14 @@
package dev.zontreck.thresholds.implementation.vault;
package dev.zontreck.otemod.implementation.vault;
import dev.zontreck.thresholds.database.OTEDatastore;
import dev.zontreck.libzontreck.profiles.Profile;
import dev.zontreck.otemod.configs.OTEServerConfig;
import dev.zontreck.otemod.database.OTEDatastore;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
public class StarterProvider extends OTEDatastore
{

View file

@ -1,8 +1,12 @@
package dev.zontreck.thresholds.implementation.vault;
package dev.zontreck.otemod.implementation.vault;
import com.mojang.blaze3d.systems.RenderSystem;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.networking.ModMessages;
import dev.zontreck.otemod.networking.packets.OpenStarterVaultC2SPacket;
import dev.zontreck.otemod.networking.packets.OpenVaultC2SPacket;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.network.chat.Component;
@ -19,7 +23,7 @@ public class StarterScreen extends AbstractContainerScreen <StarterMenu>
public final Player thePlayer;
public final StarterMenu THE_CONTAINER;
private static final ResourceLocation TEXTURE = new ResourceLocation(ThresholdsMod.MOD_ID, "textures/gui/vault.png");
private static final ResourceLocation TEXTURE = new ResourceLocation(OTEMod.MOD_ID, "textures/gui/vault.png");
public StarterScreen(StarterMenu container, Inventory playerInv, Component comp){
super(container, playerInv, comp);

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.implementation.vault;
package dev.zontreck.otemod.implementation.vault;
import dev.zontreck.libzontreck.profiles.Profile;
import net.minecraft.nbt.CompoundTag;

View file

@ -1,12 +1,12 @@
package dev.zontreck.thresholds.implementation.vault;
package dev.zontreck.otemod.implementation.vault;
import dev.zontreck.libzontreck.chat.ChatColor;
import dev.zontreck.libzontreck.profiles.Profile;
import dev.zontreck.libzontreck.profiles.UserProfileNotYetExistsException;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.implementation.events.VaultModifiedEvent;
import dev.zontreck.thresholds.implementation.vault.VaultProvider.VaultAccessStrategy;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.implementation.events.VaultModifiedEvent;
import dev.zontreck.otemod.implementation.vault.VaultProvider.VaultAccessStrategy;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
@ -105,7 +105,7 @@ public class VaultContainer
VaultModifiedEvent vme = new VaultModifiedEvent(VAULT_NUMBER, profile, VaultProvider.getInUse(profile), myInventory, startingInventory);
ThresholdsMod.bus.post(vme);
OTEMod.bus.post(vme);
}
public void invalidate()

View file

@ -1,14 +1,15 @@
package dev.zontreck.thresholds.implementation.vault;
package dev.zontreck.otemod.implementation.vault;
import java.util.Map;
import java.util.UUID;
import dev.zontreck.thresholds.implementation.inits.ModMenuTypes;
import dev.zontreck.otemod.implementation.inits.ModMenuTypes;
import net.minecraft.core.BlockPos;
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.ClickType;
import net.minecraft.world.inventory.MenuConstructor;
import net.minecraft.world.inventory.Slot;
import net.minecraft.world.item.ItemStack;

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.implementation.vault;
package dev.zontreck.otemod.implementation.vault;
import java.io.File;
import java.io.IOException;
@ -7,8 +7,8 @@ import java.nio.file.Path;
import java.util.List;
import dev.zontreck.libzontreck.profiles.Profile;
import dev.zontreck.thresholds.configs.ThresholdsServerConfig;
import dev.zontreck.thresholds.database.OTEDatastore;
import dev.zontreck.otemod.configs.OTEServerConfig;
import dev.zontreck.otemod.database.OTEDatastore;
public class VaultProvider extends OTEDatastore
{
@ -67,12 +67,12 @@ public class VaultProvider extends OTEDatastore
public static boolean isAtMaxVaults(Profile prof, int consumed)
{
if(ThresholdsServerConfig.MAX_VAULTS.get()==0){
if(OTEServerConfig.MAX_VAULTS.get()==0){
if(consumed < prof.available_vaults){
return false;
}else return true;
}
if(prof.available_vaults >= ThresholdsServerConfig.MAX_VAULTS.get())
if(prof.available_vaults >= OTEServerConfig.MAX_VAULTS.get())
{
if(consumed<prof.available_vaults)
{

View file

@ -1,20 +1,27 @@
package dev.zontreck.thresholds.implementation.vault;
package dev.zontreck.otemod.implementation.vault;
import java.util.UUID;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.PoseStack;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.networking.ModMessages;
import dev.zontreck.thresholds.networking.packets.OpenVaultC2SPacket;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.commands.vaults.VaultCommand;
import dev.zontreck.otemod.networking.ModMessages;
import dev.zontreck.otemod.networking.packets.OpenVaultC2SPacket;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.components.Button.OnPress;
import net.minecraft.client.gui.font.TextFieldHelper;
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.server.level.ServerPlayer;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.entity.player.Player;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.network.NetworkHooks;
public class VaultScreen extends AbstractContainerScreen <VaultMenu>
{
@ -23,7 +30,7 @@ public class VaultScreen extends AbstractContainerScreen <VaultMenu>
public final Player thePlayer;
public final VaultMenu THE_CONTAINER;
private static final ResourceLocation TEXTURE = new ResourceLocation(ThresholdsMod.MOD_ID, "textures/gui/vault.png");
private static final ResourceLocation TEXTURE = new ResourceLocation(OTEMod.MOD_ID, "textures/gui/vault.png");
public VaultScreen(VaultMenu container, Inventory playerInv, Component comp){
super(container, playerInv, comp);

View file

@ -1,15 +1,16 @@
package dev.zontreck.thresholds.implementation.vault;
package dev.zontreck.otemod.implementation.vault;
import java.util.Map;
import java.util.UUID;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.otemod.OTEMod;
import net.minecraftforge.client.event.ContainerScreenEvent;
import net.minecraftforge.event.entity.player.PlayerContainerEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
@EventBusSubscriber(modid= ThresholdsMod.MOD_ID,bus=Mod.EventBusSubscriber.Bus.FORGE)
@EventBusSubscriber(modid=OTEMod.MOD_ID,bus=Mod.EventBusSubscriber.Bus.FORGE)
public class VaultWatcher {
@SubscribeEvent

View file

@ -1,8 +1,10 @@
package dev.zontreck.thresholds.integrations;
package dev.zontreck.otemod.integrations;
import com.mojang.blaze3d.platform.InputConstants;
import net.minecraft.client.KeyMapping;
import net.minecraft.client.multiplayer.ClientRegistryLayer;
import net.minecraft.core.registries.Registries;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.event.RegisterKeyMappingsEvent;

View file

@ -1,7 +1,10 @@
package dev.zontreck.thresholds.integrations;
package dev.zontreck.otemod.integrations;
import dev.zontreck.libzontreck.chat.ChatColor;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.thresholds.implementation.Messages;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.chat.ChatServerOverride;
import dev.zontreck.otemod.implementation.Messages;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.player.Player;
@ -32,6 +35,6 @@ public class LuckPermsHelper {
}
public static void sendNoPermissionsMessage(ServerPlayer play, String perm, String group) {
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(Messages.THRESHOLDS_PREFIX +" !Dark_Red!You do not have permission to use that command. You need permission !Gold!"+perm+" !White! or !Gold!"+group), play.server);
ChatHelpers.broadcastTo(play.getUUID(), ChatHelpers.macro(Messages.OTE_PREFIX+" !Dark_Red!You do not have permission to use that command. You need permission !Gold!"+perm+" !White! or !Gold!"+group), play.server);
}
}

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.items;
package dev.zontreck.otemod.items;
import net.minecraft.world.item.Item;

View file

@ -1,15 +1,18 @@
package dev.zontreck.thresholds.items;
package dev.zontreck.otemod.items;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.implementation.CreativeModeTabs;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.blocks.FoiledBlockItem;
import dev.zontreck.otemod.entities.ModEntityTypes;
import dev.zontreck.otemod.implementation.CreativeModeTabs;
import net.minecraft.world.item.*;
import net.minecraftforge.common.ForgeSpawnEggItem;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
public class ModItems {
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, ThresholdsMod.MOD_ID);
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, OTEMod.MOD_ID);
public static final RegistryObject<Item> ETERNIUM_FRAGMENT = CreativeModeTabs.addToOTEModTab(ITEMS.register("eternium_fragment", () -> new Item(new Item.Properties())));

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.items;
package dev.zontreck.otemod.items;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.sounds.SoundEvents;
@ -6,7 +6,10 @@ import net.minecraft.sounds.SoundSource;
import net.minecraft.stats.Stats;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.monster.Guardian;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.entity.projectile.Arrow;
import net.minecraft.world.item.EggItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;

View file

@ -1,11 +1,16 @@
package dev.zontreck.thresholds.items;
package dev.zontreck.otemod.items;
import dev.zontreck.libzontreck.chat.ChatColor;
import dev.zontreck.libzontreck.lore.ExtraLore;
import dev.zontreck.libzontreck.lore.LoreContainer;
import dev.zontreck.libzontreck.lore.LoreEntry;
import dev.zontreck.libzontreck.util.ChatHelpers;
import net.minecraft.core.particles.ItemParticleOption;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.NbtUtils;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
@ -15,6 +20,7 @@ import net.minecraft.world.entity.projectile.ThrowableItemProjectile;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.DropperBlock;
import net.minecraft.world.phys.EntityHitResult;
import net.minecraft.world.phys.HitResult;

View file

@ -1,11 +1,15 @@
package dev.zontreck.thresholds.items;
package dev.zontreck.otemod.items;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.item.SimpleFoiledItem;
import net.minecraft.world.item.context.UseOnContext;
import net.minecraft.world.level.Explosion;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
public class UnstableSingularity extends SimpleFoiledItem
{

View file

@ -1,17 +1,22 @@
package dev.zontreck.thresholds.items;
package dev.zontreck.otemod.items;
import dev.zontreck.libzontreck.chat.ChatColor;
import dev.zontreck.libzontreck.profiles.Profile;
import dev.zontreck.libzontreck.profiles.UserProfileNotYetExistsException;
import dev.zontreck.libzontreck.util.ChatHelpers;
import dev.zontreck.thresholds.ThresholdsMod;
import dev.zontreck.thresholds.configs.ThresholdsServerConfig;
import dev.zontreck.otemod.OTEMod;
import dev.zontreck.otemod.chat.ChatServerOverride;
import dev.zontreck.otemod.configs.OTEServerConfig;
import dev.zontreck.otemod.events.LoreHandlers;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.SimpleFoiledItem;
import net.minecraft.world.level.Level;
public class VaultItem extends Item
@ -37,7 +42,7 @@ public class VaultItem extends Item
@Override
public InteractionResultHolder<ItemStack> use(Level pLevel, Player pPlayer, InteractionHand pUsedHand)
{
ThresholdsMod.LOGGER.info("Vault item is being used");
OTEMod.LOGGER.info("Vault item is being used");
if(!pLevel.isClientSide && pUsedHand == InteractionHand.MAIN_HAND)
{
ItemStack is = pPlayer.getItemInHand(pUsedHand);
@ -45,16 +50,16 @@ public class VaultItem extends Item
Profile p;
try {
p = Profile.get_profile_of(pPlayer.getStringUUID());
if(ThresholdsServerConfig.MAX_VAULTS.get()>0)
if(OTEServerConfig.MAX_VAULTS.get()>0)
{
if(p.available_vaults >= ThresholdsServerConfig.MAX_VAULTS.get())
if(p.available_vaults >= OTEServerConfig.MAX_VAULTS.get())
{
ChatHelpers.broadcastTo(pPlayer.getUUID(), ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix +" !Dark_Red!You cannot activate anymore vaults due to the maximum set by the server admin"), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(pPlayer.getUUID(), ChatHelpers.macro(OTEMod.OTEPrefix+" !Dark_Red!You cannot activate anymore vaults due to the maximum set by the server admin"), OTEMod.THE_SERVER);
return InteractionResultHolder.pass(is);
} else {
p.available_vaults++;
p.commit();
ChatHelpers.broadcastTo(pPlayer.getUUID(), ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix +" !Dark_Green!You now have "+String.valueOf(p.available_vaults)+" available vaults"), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(pPlayer.getUUID(), ChatHelpers.macro(OTEMod.OTEPrefix+" !Dark_Green!You now have "+String.valueOf(p.available_vaults)+" available vaults"), OTEMod.THE_SERVER);
pPlayer.setItemInHand(pUsedHand, new ItemStack(Items.AIR));
return InteractionResultHolder.consume(is);
@ -62,7 +67,7 @@ public class VaultItem extends Item
}else {
p.available_vaults++;
p.commit();
ChatHelpers.broadcastTo(pPlayer.getUUID(), ChatHelpers.macro(ThresholdsMod.ThresholdsPrefix +" !Dark_Green!You now have "+String.valueOf(p.available_vaults)+" available vaults"), ThresholdsMod.THE_SERVER);
ChatHelpers.broadcastTo(pPlayer.getUUID(), ChatHelpers.macro(OTEMod.OTEPrefix+" !Dark_Green!You now have "+String.valueOf(p.available_vaults)+" available vaults"), OTEMod.THE_SERVER);
pPlayer.setItemInHand(pUsedHand, new ItemStack(Items.AIR));
return InteractionResultHolder.consume(is);

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.items.tags;
package dev.zontreck.otemod.items.tags;
import net.minecraft.nbt.CompoundTag;

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.items.tags;
package dev.zontreck.otemod.items.tags;
public enum ItemStatType {
SWORD,

View file

@ -1,4 +1,4 @@
package dev.zontreck.thresholds.items.tags;
package dev.zontreck.otemod.items.tags;
import dev.zontreck.libzontreck.chat.ChatColor;

Some files were not shown because too many files have changed in this diff Show more