finished relicense of master branch

This commit is contained in:
Robin Bärtschi 2024-06-28 08:24:19 +02:00
parent f78e208a95
commit 7cf4f606a5
41 changed files with 530 additions and 235 deletions

View File

@ -1,3 +1,9 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.unittest; package robaertschi.environmenttech.unittest;

View File

@ -1,6 +1,13 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.unittest; package robaertschi.environmenttech.unittest;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import robaertschi.environmenttech.client.screen.ProgressArrowUtils; import robaertschi.environmenttech.client.screen.ProgressArrowUtils;
import static org.assertj.core.api.Assertions.*; import static org.assertj.core.api.Assertions.*;

View File

@ -1,3 +1,9 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech; package robaertschi.environmenttech;
import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.bus.api.SubscribeEvent;

View File

@ -1,7 +1,11 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech; package robaertschi.environmenttech;
import com.mojang.logging.LogUtils;
import net.minecraft.resources.ResourceLocation;
import net.neoforged.bus.api.IEventBus; import net.neoforged.bus.api.IEventBus;
import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.ModContainer; import net.neoforged.fml.ModContainer;
@ -11,6 +15,11 @@ import net.neoforged.neoforge.common.NeoForge;
import net.neoforged.neoforge.event.RegisterCommandsEvent; import net.neoforged.neoforge.event.RegisterCommandsEvent;
import net.neoforged.neoforge.event.tick.PlayerTickEvent; import net.neoforged.neoforge.event.tick.PlayerTickEvent;
import org.slf4j.Logger; import org.slf4j.Logger;
import net.minecraft.resources.ResourceLocation;
import com.mojang.logging.LogUtils;
import robaertschi.environmenttech.command.EnvironmenttechCommand; import robaertschi.environmenttech.command.EnvironmenttechCommand;
import robaertschi.environmenttech.data.attachments.ETAttachments; import robaertschi.environmenttech.data.attachments.ETAttachments;
import robaertschi.environmenttech.data.capabilities.ETCapabilities; import robaertschi.environmenttech.data.capabilities.ETCapabilities;

View File

@ -1,14 +1,18 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.client; package robaertschi.environmenttech.client;
import com.mojang.blaze3d.platform.InputConstants;
import net.minecraft.client.KeyMapping;
import net.minecraft.client.renderer.item.ItemProperties;
import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber; import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent; import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent;
import net.neoforged.jarjar.nio.util.Lazy;
import net.neoforged.neoforge.client.event.*; import net.neoforged.neoforge.client.event.*;
import org.lwjgl.glfw.GLFW;
import net.minecraft.client.renderer.item.ItemProperties;
import robaertschi.environmenttech.EnvironmentTech; import robaertschi.environmenttech.EnvironmentTech;
import robaertschi.environmenttech.client.particle.EnvParticleProvider; import robaertschi.environmenttech.client.particle.EnvParticleProvider;
import robaertschi.environmenttech.client.screen.EnvCollectorScreen; import robaertschi.environmenttech.client.screen.EnvCollectorScreen;

View File

@ -1,13 +1,22 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.client.particle; package robaertschi.environmenttech.client.particle;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.particle.Particle; import net.minecraft.client.particle.Particle;
import net.minecraft.client.particle.ParticleProvider; import net.minecraft.client.particle.ParticleProvider;
import net.minecraft.client.particle.SpriteSet; import net.minecraft.client.particle.SpriteSet;
import net.minecraft.core.particles.SimpleParticleType; import net.minecraft.core.particles.SimpleParticleType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import robaertschi.environmenttech.level.particle.EnvParticle; import robaertschi.environmenttech.level.particle.EnvParticle;
@AllArgsConstructor() @AllArgsConstructor()

View File

@ -1,6 +1,13 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.client.renderer; package robaertschi.environmenttech.client.renderer;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.util.FastColor; import net.minecraft.util.FastColor;

View File

@ -1,11 +1,19 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.client.screen; package robaertschi.environmenttech.client.screen;
import org.jetbrains.annotations.NotNull;
import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Inventory;
import org.jetbrains.annotations.NotNull;
import robaertschi.environmenttech.EnvironmentTech; import robaertschi.environmenttech.EnvironmentTech;
import robaertschi.environmenttech.client.renderer.EnvStorageRenderer; import robaertschi.environmenttech.client.renderer.EnvStorageRenderer;
import robaertschi.environmenttech.menu.EnvCollectorMenu; import robaertschi.environmenttech.menu.EnvCollectorMenu;

View File

@ -1,6 +1,13 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.client.screen; package robaertschi.environmenttech.client.screen;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import robaertschi.environmenttech.EnvironmentTech; import robaertschi.environmenttech.EnvironmentTech;
public class ProgressArrowUtils { public class ProgressArrowUtils {

View File

@ -1,12 +1,20 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.command; package robaertschi.environmenttech.command;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.arguments.LongArgumentType;
import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.CommandSourceStack;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkAccess;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.arguments.LongArgumentType;
import robaertschi.environmenttech.data.attachments.ETAttachments; import robaertschi.environmenttech.data.attachments.ETAttachments;
import static net.minecraft.commands.Commands.*; import static net.minecraft.commands.Commands.*;

View File

@ -1,13 +1,21 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.data.attachments; package robaertschi.environmenttech.data.attachments;
import com.mojang.serialization.Codec; import java.util.function.Supplier;
import net.neoforged.bus.api.IEventBus; import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.attachment.AttachmentType; import net.neoforged.neoforge.attachment.AttachmentType;
import net.neoforged.neoforge.registries.DeferredRegister; import net.neoforged.neoforge.registries.DeferredRegister;
import net.neoforged.neoforge.registries.NeoForgeRegistries; import net.neoforged.neoforge.registries.NeoForgeRegistries;
import robaertschi.environmenttech.EnvironmentTech;
import java.util.function.Supplier; import com.mojang.serialization.Codec;
import robaertschi.environmenttech.EnvironmentTech;
public class ETAttachments { public class ETAttachments {
private static final DeferredRegister<AttachmentType<?>> ATTACHMENT_TYPES = DeferredRegister.create(NeoForgeRegistries.ATTACHMENT_TYPES, EnvironmentTech.MODID); private static final DeferredRegister<AttachmentType<?>> ATTACHMENT_TYPES = DeferredRegister.create(NeoForgeRegistries.ATTACHMENT_TYPES, EnvironmentTech.MODID);

View File

@ -1,10 +1,18 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.data.capabilities; package robaertschi.environmenttech.data.capabilities;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import net.minecraft.world.item.ItemStack;
import net.neoforged.neoforge.items.IItemHandlerModifiable; import net.neoforged.neoforge.items.IItemHandlerModifiable;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import net.minecraft.world.item.ItemStack;
@AllArgsConstructor @AllArgsConstructor
public class AdaptedItemHandler implements IItemHandlerModifiable { public class AdaptedItemHandler implements IItemHandlerModifiable {
private final IItemHandlerModifiable handler; private final IItemHandlerModifiable handler;

View File

@ -1,10 +1,18 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.data.capabilities; package robaertschi.environmenttech.data.capabilities;
import net.minecraft.core.Direction;
import net.neoforged.bus.api.IEventBus; import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.capabilities.BlockCapability; import net.neoforged.neoforge.capabilities.BlockCapability;
import net.neoforged.neoforge.capabilities.Capabilities; import net.neoforged.neoforge.capabilities.Capabilities;
import net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent; import net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent;
import net.minecraft.core.Direction;
import robaertschi.environmenttech.EnvironmentTech; import robaertschi.environmenttech.EnvironmentTech;
import robaertschi.environmenttech.level.block.entity.ETBlockEntities; import robaertschi.environmenttech.level.block.entity.ETBlockEntities;

View File

@ -1,3 +1,9 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.data.capabilities; package robaertschi.environmenttech.data.capabilities;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;

View File

@ -1,3 +1,9 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.data.capabilities; package robaertschi.environmenttech.data.capabilities;
public enum EnvType { public enum EnvType {

View File

@ -1,3 +1,9 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.data.capabilities; package robaertschi.environmenttech.data.capabilities;
/** /**

View File

@ -1,9 +1,17 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.data.components; package robaertschi.environmenttech.data.components;
import net.minecraft.core.component.DataComponentType;
import net.neoforged.bus.api.IEventBus; import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredHolder; import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister; import net.neoforged.neoforge.registries.DeferredRegister;
import net.minecraft.core.component.DataComponentType;
import robaertschi.environmenttech.EnvironmentTech; import robaertschi.environmenttech.EnvironmentTech;
public class ETComponents { public class ETComponents {

View File

@ -1,10 +1,18 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.data.components; package robaertschi.environmenttech.data.components;
import io.netty.buffer.ByteBuf;
import net.minecraft.network.codec.ByteBufCodecs;
import net.minecraft.network.codec.StreamCodec;
import com.mojang.serialization.Codec; import com.mojang.serialization.Codec;
import com.mojang.serialization.codecs.RecordCodecBuilder; import com.mojang.serialization.codecs.RecordCodecBuilder;
import io.netty.buffer.ByteBuf;
import net.minecraft.network.codec.ByteBufCodecs;
import net.minecraft.network.codec.StreamCodec;
public record FilledComponent(int filled) { public record FilledComponent(int filled) {
public static final Codec<FilledComponent> CODEC = RecordCodecBuilder.create(filledComponentInstance -> public static final Codec<FilledComponent> CODEC = RecordCodecBuilder.create(filledComponentInstance ->

View File

@ -1,11 +1,18 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.data.recipes; package robaertschi.environmenttech.data.recipes;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister;
import net.minecraft.core.registries.Registries; import net.minecraft.core.registries.Registries;
import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.RecipeSerializer;
import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.item.crafting.RecipeType;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister;
import static robaertschi.environmenttech.EnvironmentTech.MODID; import static robaertschi.environmenttech.EnvironmentTech.MODID;

View File

@ -1,6 +1,19 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.data.recipes; package robaertschi.environmenttech.data.recipes;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import java.util.LinkedHashMap;
import java.util.Map;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import net.minecraft.advancements.Advancement; import net.minecraft.advancements.Advancement;
import net.minecraft.advancements.AdvancementRequirements; import net.minecraft.advancements.AdvancementRequirements;
import net.minecraft.advancements.AdvancementRewards; import net.minecraft.advancements.AdvancementRewards;
@ -18,11 +31,6 @@ import net.minecraft.world.item.crafting.Recipe;
import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.RecipeSerializer;
import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.item.crafting.RecipeType;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.LinkedHashMap;
import java.util.Map;
public record EnvCollectorRecipe(Ingredient input, ItemStack output, int envUsed) implements Recipe<Container> { public record EnvCollectorRecipe(Ingredient input, ItemStack output, int envUsed) implements Recipe<Container> {
@Override @Override

View File

@ -1,14 +1,22 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.data.recipes; package robaertschi.environmenttech.data.recipes;
import com.mojang.serialization.Codec; import org.jetbrains.annotations.NotNull;
import com.mojang.serialization.MapCodec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.RegistryFriendlyByteBuf;
import net.minecraft.network.codec.StreamCodec; import net.minecraft.network.codec.StreamCodec;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.RecipeSerializer;
import org.jetbrains.annotations.NotNull;
import com.mojang.serialization.Codec;
import com.mojang.serialization.MapCodec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
public class EnvCollectorRecipeSerializer implements RecipeSerializer<EnvCollectorRecipe> { public class EnvCollectorRecipeSerializer implements RecipeSerializer<EnvCollectorRecipe> {
public static final MapCodec<EnvCollectorRecipe> CODEC = RecordCodecBuilder.mapCodec( public static final MapCodec<EnvCollectorRecipe> CODEC = RecordCodecBuilder.mapCodec(

View File

@ -1,9 +1,17 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.datagen; package robaertschi.environmenttech.datagen;
import net.minecraft.data.PackOutput;
import net.neoforged.neoforge.client.model.generators.BlockStateProvider; import net.neoforged.neoforge.client.model.generators.BlockStateProvider;
import net.neoforged.neoforge.client.model.generators.ModelFile; import net.neoforged.neoforge.client.model.generators.ModelFile;
import net.neoforged.neoforge.common.data.ExistingFileHelper; import net.neoforged.neoforge.common.data.ExistingFileHelper;
import net.minecraft.data.PackOutput;
import robaertschi.environmenttech.level.block.ETBlocks; import robaertschi.environmenttech.level.block.ETBlocks;
import static robaertschi.environmenttech.EnvironmentTech.MODID; import static robaertschi.environmenttech.EnvironmentTech.MODID;

View File

@ -1,14 +1,21 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.datagen; package robaertschi.environmenttech.datagen;
import net.minecraft.core.HolderLookup; import java.util.concurrent.CompletableFuture;
import net.minecraft.data.DataGenerator;
import net.minecraft.data.PackOutput;
import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber; import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.common.data.ExistingFileHelper; import net.neoforged.neoforge.common.data.ExistingFileHelper;
import net.neoforged.neoforge.data.event.GatherDataEvent; import net.neoforged.neoforge.data.event.GatherDataEvent;
import java.util.concurrent.CompletableFuture; import net.minecraft.core.HolderLookup;
import net.minecraft.data.DataGenerator;
import net.minecraft.data.PackOutput;
import static robaertschi.environmenttech.EnvironmentTech.MODID; import static robaertschi.environmenttech.EnvironmentTech.MODID;

View File

@ -1,11 +1,19 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.datagen; package robaertschi.environmenttech.datagen;
import net.minecraft.data.PackOutput;
import net.minecraft.resources.ResourceLocation;
import net.neoforged.neoforge.client.model.generators.ItemModelBuilder; import net.neoforged.neoforge.client.model.generators.ItemModelBuilder;
import net.neoforged.neoforge.client.model.generators.ItemModelProvider; import net.neoforged.neoforge.client.model.generators.ItemModelProvider;
import net.neoforged.neoforge.client.model.generators.ModelFile; import net.neoforged.neoforge.client.model.generators.ModelFile;
import net.neoforged.neoforge.common.data.ExistingFileHelper; import net.neoforged.neoforge.common.data.ExistingFileHelper;
import net.minecraft.data.PackOutput;
import net.minecraft.resources.ResourceLocation;
import robaertschi.environmenttech.EnvironmentTech; import robaertschi.environmenttech.EnvironmentTech;
import robaertschi.environmenttech.level.block.ETBlocks; import robaertschi.environmenttech.level.block.ETBlocks;
import robaertschi.environmenttech.level.item.ETItems; import robaertschi.environmenttech.level.item.ETItems;

View File

@ -1,5 +1,16 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.datagen; package robaertschi.environmenttech.datagen;
import java.util.concurrent.CompletableFuture;
import net.neoforged.neoforge.common.Tags;
import org.jetbrains.annotations.NotNull;
import net.minecraft.advancements.critereon.InventoryChangeTrigger; import net.minecraft.advancements.critereon.InventoryChangeTrigger;
import net.minecraft.advancements.critereon.ItemPredicate; import net.minecraft.advancements.critereon.ItemPredicate;
import net.minecraft.core.HolderLookup; import net.minecraft.core.HolderLookup;
@ -11,14 +22,11 @@ import net.minecraft.data.recipes.ShapedRecipeBuilder;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items; import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.Ingredient;
import net.neoforged.neoforge.common.Tags;
import org.jetbrains.annotations.NotNull;
import robaertschi.environmenttech.EnvironmentTech; import robaertschi.environmenttech.EnvironmentTech;
import robaertschi.environmenttech.data.recipes.EnvCollectorRecipe; import robaertschi.environmenttech.data.recipes.EnvCollectorRecipe;
import robaertschi.environmenttech.level.item.ETItems; import robaertschi.environmenttech.level.item.ETItems;
import java.util.concurrent.CompletableFuture;
public class ETRecipeProvider extends RecipeProvider { public class ETRecipeProvider extends RecipeProvider {
public ETRecipeProvider(PackOutput pOutput, CompletableFuture<HolderLookup.Provider> pRegistries) { public ETRecipeProvider(PackOutput pOutput, CompletableFuture<HolderLookup.Provider> pRegistries) {
super(pOutput, pRegistries); super(pOutput, pRegistries);

View File

@ -1,11 +1,20 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.level; package robaertschi.environmenttech.level;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.minecraft.world.level.chunk.LevelChunk;
import net.minecraft.world.level.chunk.status.ChunkStatus;
import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber; import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.event.level.ChunkEvent; import net.neoforged.neoforge.event.level.ChunkEvent;
import net.minecraft.world.level.chunk.LevelChunk;
import net.minecraft.world.level.chunk.status.ChunkStatus;
import robaertschi.environmenttech.Config; import robaertschi.environmenttech.Config;
import robaertschi.environmenttech.EnvironmentTech; import robaertschi.environmenttech.EnvironmentTech;
import robaertschi.environmenttech.data.attachments.ETAttachments; import robaertschi.environmenttech.data.attachments.ETAttachments;

View File

@ -1,10 +1,17 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.level.block; package robaertschi.environmenttech.level.block;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.neoforged.bus.api.IEventBus; import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredBlock; import net.neoforged.neoforge.registries.DeferredBlock;
import net.neoforged.neoforge.registries.DeferredRegister; import net.neoforged.neoforge.registries.DeferredRegister;
import net.minecraft.world.level.block.state.BlockBehaviour;
import static robaertschi.environmenttech.EnvironmentTech.MODID; import static robaertschi.environmenttech.EnvironmentTech.MODID;
public class ETBlocks { public class ETBlocks {

View File

@ -1,7 +1,18 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.level.block; package robaertschi.environmenttech.level.block;
import com.mojang.serialization.MapCodec;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import javax.annotation.ParametersAreNonnullByDefault;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionHand;
@ -27,13 +38,12 @@ import net.minecraft.world.phys.shapes.BooleanOp;
import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import com.mojang.serialization.MapCodec;
import robaertschi.environmenttech.level.block.entity.ETBlockEntities; import robaertschi.environmenttech.level.block.entity.ETBlockEntities;
import robaertschi.environmenttech.level.block.entity.EnvCollectorBlockEntity; import robaertschi.environmenttech.level.block.entity.EnvCollectorBlockEntity;
import javax.annotation.ParametersAreNonnullByDefault;
@ParametersAreNonnullByDefault() @ParametersAreNonnullByDefault()
@Slf4j @Slf4j
public class EnvCollectorBlock extends BaseEntityBlock { public class EnvCollectorBlock extends BaseEntityBlock {

View File

@ -1,7 +1,18 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.level.block; package robaertschi.environmenttech.level.block;
import com.mojang.serialization.MapCodec;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import javax.annotation.ParametersAreNonnullByDefault;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.MethodsReturnNonnullByDefault;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
@ -16,13 +27,12 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.state.properties.DirectionProperty; import net.minecraft.world.level.block.state.properties.DirectionProperty;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import com.mojang.serialization.MapCodec;
import robaertschi.environmenttech.level.block.entity.ETBlockEntities; import robaertschi.environmenttech.level.block.entity.ETBlockEntities;
import robaertschi.environmenttech.level.block.entity.EnvDistributorBlockEntity; import robaertschi.environmenttech.level.block.entity.EnvDistributorBlockEntity;
import javax.annotation.ParametersAreNonnullByDefault;
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
@Slf4j @Slf4j
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault

View File

@ -1,12 +1,19 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.level.block.entity; package robaertschi.environmenttech.level.block.entity;
import net.minecraft.core.registries.Registries;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.neoforged.bus.api.IEventBus; import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredHolder; import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister; import net.neoforged.neoforge.registries.DeferredRegister;
import net.minecraft.core.registries.Registries;
import net.minecraft.world.level.block.entity.BlockEntityType;
import robaertschi.environmenttech.level.block.ETBlocks; import robaertschi.environmenttech.level.block.ETBlocks;
import robaertschi.environmenttech.level.block.EnvDistributorBlock;
import static robaertschi.environmenttech.EnvironmentTech.MODID; import static robaertschi.environmenttech.EnvironmentTech.MODID;

View File

@ -1,6 +1,22 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.level.block.entity; package robaertschi.environmenttech.level.block.entity;
import lombok.Getter; import lombok.Getter;
import net.neoforged.jarjar.nio.util.Lazy;
import net.neoforged.neoforge.items.IItemHandler;
import net.neoforged.neoforge.items.IItemHandlerModifiable;
import net.neoforged.neoforge.items.ItemStackHandler;
import net.neoforged.neoforge.items.wrapper.CombinedInvWrapper;
import net.neoforged.neoforge.items.wrapper.RecipeWrapper;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.HolderLookup; import net.minecraft.core.HolderLookup;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
@ -20,14 +36,7 @@ import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkAccess;
import net.neoforged.jarjar.nio.util.Lazy;
import net.neoforged.neoforge.items.IItemHandler;
import net.neoforged.neoforge.items.IItemHandlerModifiable;
import net.neoforged.neoforge.items.ItemStackHandler;
import net.neoforged.neoforge.items.wrapper.CombinedInvWrapper;
import net.neoforged.neoforge.items.wrapper.RecipeWrapper;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import robaertschi.environmenttech.data.attachments.ETAttachments; import robaertschi.environmenttech.data.attachments.ETAttachments;
import robaertschi.environmenttech.data.capabilities.AdaptedItemHandler; import robaertschi.environmenttech.data.capabilities.AdaptedItemHandler;
import robaertschi.environmenttech.data.capabilities.EnvStorage; import robaertschi.environmenttech.data.capabilities.EnvStorage;

View File

@ -1,22 +1,28 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.level.block.entity; package robaertschi.environmenttech.level.block.entity;
import lombok.Getter; import lombok.Getter;
import javax.annotation.ParametersAreNonnullByDefault;
import org.jetbrains.annotations.NotNull;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.HolderLookup; import net.minecraft.core.HolderLookup;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
import net.minecraft.util.Mth;
import net.minecraft.world.level.block.entity.BlockEntity; 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.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkAccess;
import org.jetbrains.annotations.NotNull;
import robaertschi.environmenttech.data.attachments.ETAttachments; import robaertschi.environmenttech.data.attachments.ETAttachments;
import robaertschi.environmenttech.data.capabilities.EnvStorage; import robaertschi.environmenttech.data.capabilities.EnvStorage;
import robaertschi.environmenttech.data.capabilities.EnvType; import robaertschi.environmenttech.data.capabilities.EnvType;
import robaertschi.environmenttech.data.components.ETComponents;
import javax.annotation.ParametersAreNonnullByDefault;
import static robaertschi.environmenttech.EnvironmentTech.MODID; import static robaertschi.environmenttech.EnvironmentTech.MODID;

View File

@ -1,7 +1,14 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.level.block.entity.renderer; package robaertschi.environmenttech.level.block.entity.renderer;
import com.mojang.blaze3d.vertex.PoseStack; import java.util.Objects;
import com.mojang.math.Axis; import javax.annotation.ParametersAreNonnullByDefault;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.LightTexture; import net.minecraft.client.renderer.LightTexture;
import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.MultiBufferSource;
@ -16,13 +23,14 @@ import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
import net.minecraft.world.level.LightLayer; import net.minecraft.world.level.LightLayer;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import robaertschi.environmenttech.level.block.EnvCollectorBlock; import robaertschi.environmenttech.level.block.EnvCollectorBlock;
import robaertschi.environmenttech.level.block.entity.EnvCollectorBlockEntity; import robaertschi.environmenttech.level.block.entity.EnvCollectorBlockEntity;
import robaertschi.environmenttech.level.particle.ETParticles; import robaertschi.environmenttech.level.particle.ETParticles;
import javax.annotation.ParametersAreNonnullByDefault;
import java.util.Objects;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public class EnvCollectorRenderer implements BlockEntityRenderer<EnvCollectorBlockEntity> { public class EnvCollectorRenderer implements BlockEntityRenderer<EnvCollectorBlockEntity> {
@SuppressWarnings("unused") @SuppressWarnings("unused")

View File

@ -1,5 +1,16 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.level.item; package robaertschi.environmenttech.level.item;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredItem;
import net.neoforged.neoforge.registries.DeferredRegister;
import net.minecraft.core.component.DataComponents; import net.minecraft.core.component.DataComponents;
import net.minecraft.core.registries.Registries; import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
@ -8,10 +19,7 @@ import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.CreativeModeTabs; import net.minecraft.world.item.CreativeModeTabs;
import net.minecraft.world.item.Item; import net.minecraft.world.item.Item;
import net.minecraft.world.item.component.CustomModelData; import net.minecraft.world.item.component.CustomModelData;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredItem;
import net.neoforged.neoforge.registries.DeferredRegister;
import robaertschi.environmenttech.level.block.ETBlocks; import robaertschi.environmenttech.level.block.ETBlocks;
import static robaertschi.environmenttech.EnvironmentTech.MODID; import static robaertschi.environmenttech.EnvironmentTech.MODID;

View File

@ -1,5 +1,16 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.level.item; package robaertschi.environmenttech.level.item;
import java.util.List;
import javax.annotation.ParametersAreNonnullByDefault;
import org.jetbrains.annotations.NotNull;
import net.minecraft.ChatFormatting; import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionHand;
@ -9,14 +20,11 @@ import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
import org.jetbrains.annotations.NotNull;
import robaertschi.environmenttech.data.attachments.ETAttachments; import robaertschi.environmenttech.data.attachments.ETAttachments;
import robaertschi.environmenttech.data.components.ETComponents; import robaertschi.environmenttech.data.components.ETComponents;
import robaertschi.environmenttech.data.components.FilledComponent; import robaertschi.environmenttech.data.components.FilledComponent;
import javax.annotation.ParametersAreNonnullByDefault;
import java.util.List;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public class EnvDetectorItem extends Item { public class EnvDetectorItem extends Item {
public static final int STEPS = 9; public static final int STEPS = 9;

View File

@ -1,11 +1,18 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.level.particle; package robaertschi.environmenttech.level.particle;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister;
import net.minecraft.core.particles.ParticleType; import net.minecraft.core.particles.ParticleType;
import net.minecraft.core.particles.SimpleParticleType; import net.minecraft.core.particles.SimpleParticleType;
import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.BuiltInRegistries;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister;
import static robaertschi.environmenttech.EnvironmentTech.MODID; import static robaertschi.environmenttech.EnvironmentTech.MODID;

View File

@ -1,12 +1,19 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.level.particle; package robaertschi.environmenttech.level.particle;
import org.jetbrains.annotations.NotNull;
import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.particle.ParticleRenderType; import net.minecraft.client.particle.ParticleRenderType;
import net.minecraft.client.particle.SpriteSet; import net.minecraft.client.particle.SpriteSet;
import net.minecraft.client.particle.TextureSheetParticle; import net.minecraft.client.particle.TextureSheetParticle;
import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.particles.ParticleOptions;
import net.minecraft.core.particles.ParticleType; import net.minecraft.core.particles.ParticleType;
import org.jetbrains.annotations.NotNull;
public class EnvParticle extends TextureSheetParticle implements ParticleOptions { public class EnvParticle extends TextureSheetParticle implements ParticleOptions {
private final SpriteSet spriteSet; private final SpriteSet spriteSet;

View File

@ -1,12 +1,19 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.menu; package robaertschi.environmenttech.menu;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.world.inventory.MenuType;
import net.neoforged.bus.api.IEventBus; import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.common.extensions.IMenuTypeExtension; import net.neoforged.neoforge.common.extensions.IMenuTypeExtension;
import net.neoforged.neoforge.registries.DeferredHolder; import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister; import net.neoforged.neoforge.registries.DeferredRegister;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.world.inventory.MenuType;
import static robaertschi.environmenttech.EnvironmentTech.MODID; import static robaertschi.environmenttech.EnvironmentTech.MODID;
public class ETMenus { public class ETMenus {

View File

@ -1,14 +1,23 @@
/*
* EnvironmentTech Copyright (C) 2024 Robin B??rtschi
* This program comes with ABSOLUTELY NO WARRANTY; for details open the file LICENSE at the root of the source code.
* This is free software, and you are welcome to redistribute it
* under certain conditions; read the LICENSE file at the root of the source code for details.
*/
package robaertschi.environmenttech.menu; package robaertschi.environmenttech.menu;
import lombok.Getter; import lombok.Getter;
import net.neoforged.neoforge.items.SlotItemHandler;
import org.jetbrains.annotations.NotNull;
import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.world.Container; import net.minecraft.world.Container;
import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.*; import net.minecraft.world.inventory.*;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.neoforged.neoforge.items.SlotItemHandler;
import org.jetbrains.annotations.NotNull;
import robaertschi.environmenttech.level.block.ETBlocks; import robaertschi.environmenttech.level.block.ETBlocks;
import robaertschi.environmenttech.level.block.entity.EnvCollectorBlockEntity; import robaertschi.environmenttech.level.block.entity.EnvCollectorBlockEntity;