Split client and server.
This commit is contained in:
parent
3cb62b0291
commit
c3622cb263
208 changed files with 194 additions and 219 deletions
|
@ -34,6 +34,7 @@ import net.fabricmc.fabric.api.event.client.ClientSpriteRegistryCallback;
|
|||
import net.minecraft.client.texture.SpriteAtlasTexture;
|
||||
import reborncore.api.blockentity.UnloadHandler;
|
||||
import reborncore.client.*;
|
||||
import reborncore.common.screen.ScreenIcons;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -43,7 +44,12 @@ public class RebornCoreClient implements ClientModInitializer {
|
|||
public void onInitializeClient() {
|
||||
RebornFluidRenderManager.setupClient();
|
||||
HolidayRenderManager.setupClient();
|
||||
ClientSpriteRegistryCallback.event(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE).register(IconSupplier::registerSprites);
|
||||
ClientSpriteRegistryCallback.event(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE).register((atlasTexture, registry) -> {
|
||||
registry.register(ScreenIcons.HEAD);
|
||||
registry.register(ScreenIcons.CHEST);
|
||||
registry.register(ScreenIcons.LEGS);
|
||||
registry.register(ScreenIcons.FEET);
|
||||
});
|
||||
ClientBoundPacketHandlers.init();
|
||||
HudRenderCallback.EVENT.register(new ItemStackRenderer());
|
||||
ItemTooltipCallback.EVENT.register(new StackToolTipHandler());
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.common.util;
|
||||
package reborncore.client;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.network.MessageSender;
|
|
@ -53,7 +53,7 @@ import reborncore.client.gui.builder.slot.SlotConfigGui;
|
|||
import reborncore.client.gui.builder.widget.GuiButtonHologram;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.common.screen.BuiltScreenHandler;
|
||||
import reborncore.client.screen.builder.slot.PlayerInventorySlot;
|
||||
import reborncore.common.screen.slot.PlayerInventorySlot;
|
||||
import reborncore.common.blockentity.MachineBaseBlockEntity;
|
||||
|
||||
import java.util.ArrayList;
|
|
@ -27,7 +27,6 @@ package reborncore.client.gui.builder;
|
|||
import net.minecraft.client.render.item.ItemRenderer;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.Text;
|
||||
import reborncore.client.RenderUtil;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.common.blockentity.RedstoneConfiguration;
|
|
@ -28,13 +28,9 @@ import com.google.common.collect.Lists;
|
|||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.network.MessageType;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
import reborncore.client.gui.GuiUtil;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.builder.slot.elements.ConfigSlotElement;
|
||||
|
@ -44,7 +40,7 @@ import reborncore.common.screen.BuiltScreenHandler;
|
|||
import reborncore.common.blockentity.MachineBaseBlockEntity;
|
||||
import reborncore.common.network.NetworkManager;
|
||||
import reborncore.common.network.ServerBoundPackets;
|
||||
import reborncore.common.util.ClientChatUtils;
|
||||
import reborncore.client.ClientChatUtils;
|
||||
import reborncore.common.util.Color;
|
||||
|
||||
import java.util.Collections;
|
|
@ -34,7 +34,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.text.Text;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.builder.slot.SlotConfigGui;
|
||||
import reborncore.client.gui.slots.BaseSlot;
|
||||
import reborncore.common.screen.slot.BaseSlot;
|
||||
import reborncore.common.blockentity.SlotConfiguration;
|
||||
|
||||
import java.util.ArrayList;
|
|
@ -43,7 +43,6 @@ import net.minecraft.client.util.math.MatrixStack;
|
|||
import net.minecraft.fluid.Fluids;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.Identifier;
|
||||
import reborncore.api.IListInfoProvider;
|
||||
|
@ -436,7 +435,7 @@ public class GuiBuilder {
|
|||
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
BufferBuilder bufferBuilder = tessellator.getBuffer();
|
||||
RenderSystem.setShaderTexture(0, DrawableHelper.OPTIONS_BACKGROUND_TEXTURE);
|
||||
RenderSystem.setShaderTexture(0, OPTIONS_BACKGROUND_TEXTURE);
|
||||
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
bufferBuilder.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE_COLOR);
|
||||
bufferBuilder.vertex(this.left, this.bottom, 0.0D).texture((float) this.left / 32.0F, (float) (this.bottom + (int) this.getScrollAmount()) / 32.0F).color(32, 32, 32, 255).next();
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.mixin.client;
|
||||
package reborncore.client.mixin;
|
||||
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.debug.DebugRenderer;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.mixin.client;
|
||||
package reborncore.client.mixin;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.network.AbstractClientPlayerEntity;
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"required": true,
|
||||
"package": "reborncore.mixin.client",
|
||||
"package": "reborncore.client.mixin",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"client": [
|
||||
"MixinGameRenderer",
|
|
@ -29,7 +29,6 @@ import net.minecraft.block.Blocks;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.BlockView;
|
||||
import reborncore.client.multiblock.HologramRenderer;
|
||||
|
||||
import java.util.function.BiPredicate;
|
||||
|
||||
|
@ -38,7 +37,6 @@ import java.util.function.BiPredicate;
|
|||
*
|
||||
* @author ramidzkh
|
||||
* @see MultiblockVerifier
|
||||
* @see HologramRenderer
|
||||
*/
|
||||
public interface MultiblockWriter {
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.apache.commons.lang3.Validate;
|
|||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import reborncore.api.recipe.IRecipeCrafterProvider;
|
||||
import reborncore.client.screen.builder.Syncable;
|
||||
import reborncore.common.screen.Syncable;
|
||||
import reborncore.common.util.BooleanFunction;
|
||||
import reborncore.common.util.NBTSerializable;
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ import net.minecraft.util.math.MathHelper;
|
|||
import net.minecraft.world.World;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import reborncore.api.IListInfoProvider;
|
||||
import reborncore.client.screen.builder.BlockEntityScreenHandlerBuilder;
|
||||
import reborncore.common.blockentity.MachineBaseBlockEntity;
|
||||
import reborncore.common.blockentity.RedstoneConfiguration;
|
||||
import reborncore.common.util.StringUtils;
|
||||
|
|
|
@ -22,27 +22,13 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.event.client.ClientSpriteRegistryCallback;
|
||||
import net.minecraft.client.texture.SpriteAtlasTexture;
|
||||
package reborncore.common.screen;
|
||||
import net.minecraft.util.Identifier;
|
||||
import reborncore.RebornCore;
|
||||
|
||||
public class IconSupplier {
|
||||
|
||||
public static Identifier armour_head_id = new Identifier(RebornCore.MOD_ID, "gui/slot_sprites/armour_head");
|
||||
public static Identifier armour_chest_id = new Identifier(RebornCore.MOD_ID, "gui/slot_sprites/armour_chest");
|
||||
public static Identifier armour_legs_id = new Identifier(RebornCore.MOD_ID, "gui/slot_sprites/armour_legs");
|
||||
public static Identifier armour_feet_id = new Identifier(RebornCore.MOD_ID, "gui/slot_sprites/armour_feet");
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public static void registerSprites(SpriteAtlasTexture atlasTexture, ClientSpriteRegistryCallback.Registry registry) {
|
||||
registry.register(IconSupplier.armour_head_id);
|
||||
registry.register(IconSupplier.armour_chest_id);
|
||||
registry.register(IconSupplier.armour_legs_id);
|
||||
registry.register(IconSupplier.armour_feet_id);
|
||||
}
|
||||
public class ScreenIcons {
|
||||
public static Identifier HEAD = new Identifier(RebornCore.MOD_ID, "gui/slot_sprites/armour_head");
|
||||
public static Identifier CHEST = new Identifier(RebornCore.MOD_ID, "gui/slot_sprites/armour_chest");
|
||||
public static Identifier LEGS = new Identifier(RebornCore.MOD_ID, "gui/slot_sprites/armour_legs");
|
||||
public static Identifier FEET = new Identifier(RebornCore.MOD_ID, "gui/slot_sprites/armour_feet");
|
||||
}
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.screen.builder;
|
||||
package reborncore.common.screen;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.screen.builder;
|
||||
package reborncore.common.screen.builder;
|
||||
|
||||
import com.mojang.serialization.Codec;
|
||||
import com.mojang.serialization.DataResult;
|
||||
|
@ -40,14 +40,11 @@ import reborncore.RebornCore;
|
|||
import reborncore.api.blockentity.IUpgrade;
|
||||
import reborncore.api.blockentity.IUpgradeable;
|
||||
import reborncore.api.recipe.IRecipeCrafterProvider;
|
||||
import reborncore.client.gui.slots.BaseSlot;
|
||||
import reborncore.client.gui.slots.SlotFake;
|
||||
import reborncore.client.gui.slots.SlotOutput;
|
||||
import reborncore.client.screen.builder.slot.FilteredSlot;
|
||||
import reborncore.client.screen.builder.slot.UpgradeSlot;
|
||||
import reborncore.common.blockentity.MachineBaseBlockEntity;
|
||||
import reborncore.common.fluid.FluidUtils;
|
||||
import reborncore.common.powerSystem.PowerAcceptorBlockEntity;
|
||||
import reborncore.common.screen.Syncable;
|
||||
import reborncore.common.screen.slot.*;
|
||||
import team.reborn.energy.api.EnergyStorageUtil;
|
||||
|
||||
import java.util.function.Consumer;
|
|
@ -22,16 +22,16 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.screen.builder;
|
||||
package reborncore.common.screen.builder;
|
||||
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ArmorItem;
|
||||
import net.minecraft.util.Identifier;
|
||||
import org.apache.commons.lang3.Range;
|
||||
import reborncore.client.IconSupplier;
|
||||
import reborncore.client.screen.builder.slot.PlayerInventorySlot;
|
||||
import reborncore.client.screen.builder.slot.SpriteSlot;
|
||||
import reborncore.common.screen.ScreenIcons;
|
||||
import reborncore.common.screen.slot.PlayerInventorySlot;
|
||||
import reborncore.common.screen.slot.SpriteSlot;
|
||||
|
||||
public final class PlayerScreenHandlerBuilder {
|
||||
|
||||
|
@ -114,19 +114,19 @@ public final class PlayerScreenHandlerBuilder {
|
|||
}
|
||||
|
||||
public PlayerArmorScreenHandlerBuilder helmet(final int xStart, final int yStart) {
|
||||
return this.armor(this.parent.player.size() - 2, xStart, yStart, EquipmentSlot.HEAD, IconSupplier.armour_head_id);
|
||||
return this.armor(this.parent.player.size() - 2, xStart, yStart, EquipmentSlot.HEAD, ScreenIcons.HEAD);
|
||||
}
|
||||
|
||||
public PlayerArmorScreenHandlerBuilder chestplate(final int xStart, final int yStart) {
|
||||
return this.armor(this.parent.player.size() - 3, xStart, yStart, EquipmentSlot.CHEST, IconSupplier.armour_chest_id);
|
||||
return this.armor(this.parent.player.size() - 3, xStart, yStart, EquipmentSlot.CHEST, ScreenIcons.CHEST);
|
||||
}
|
||||
|
||||
public PlayerArmorScreenHandlerBuilder leggings(final int xStart, final int yStart) {
|
||||
return this.armor(this.parent.player.size() - 4, xStart, yStart, EquipmentSlot.LEGS, IconSupplier.armour_legs_id);
|
||||
return this.armor(this.parent.player.size() - 4, xStart, yStart, EquipmentSlot.LEGS, ScreenIcons.LEGS);
|
||||
}
|
||||
|
||||
public PlayerArmorScreenHandlerBuilder boots(final int xStart, final int yStart) {
|
||||
return this.armor(this.parent.player.size() - 5, xStart, yStart, EquipmentSlot.FEET, IconSupplier.armour_feet_id);
|
||||
return this.armor(this.parent.player.size() - 5, xStart, yStart, EquipmentSlot.FEET, ScreenIcons.FEET);
|
||||
}
|
||||
|
||||
public PlayerArmorScreenHandlerBuilder complete(final int xStart, final int yStart) {
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.screen.builder;
|
||||
package reborncore.common.screen.builder;
|
||||
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.slots;
|
||||
package reborncore.common.screen.slot;
|
||||
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.item.ItemStack;
|
|
@ -22,11 +22,10 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.screen.builder.slot;
|
||||
package reborncore.common.screen.slot;
|
||||
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import reborncore.client.gui.slots.BaseSlot;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.screen.builder.slot;
|
||||
package reborncore.common.screen.slot;
|
||||
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.screen.slot.Slot;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.slots;
|
||||
package reborncore.common.screen.slot;
|
||||
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.item.ItemStack;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.slots;
|
||||
package reborncore.common.screen.slot;
|
||||
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.item.ItemStack;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.slots;
|
||||
package reborncore.common.screen.slot;
|
||||
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.item.ItemStack;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.gui.slots;
|
||||
package reborncore.common.screen.slot;
|
||||
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.item.ItemStack;
|
|
@ -22,13 +22,13 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.screen.builder.slot;
|
||||
package reborncore.common.screen.slot;
|
||||
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.texture.SpriteAtlasTexture;
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.screen.PlayerScreenHandler;
|
||||
import net.minecraft.util.Identifier;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
@ -56,6 +56,6 @@ public class SpriteSlot extends FilteredSlot {
|
|||
@Nullable
|
||||
@Environment(EnvType.CLIENT)
|
||||
public Pair<Identifier, Identifier> getBackgroundSprite() {
|
||||
return Pair.of(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, spriteName);
|
||||
return Pair.of(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE, spriteName);
|
||||
}
|
||||
}
|
|
@ -22,13 +22,12 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package reborncore.client.screen.builder.slot;
|
||||
package reborncore.common.screen.slot;
|
||||
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import reborncore.api.blockentity.IUpgrade;
|
||||
import reborncore.api.blockentity.IUpgradeable;
|
||||
import reborncore.client.gui.slots.BaseSlot;
|
||||
import reborncore.common.util.RebornInventory;
|
||||
|
||||
public class UpgradeSlot extends BaseSlot {
|
|
@ -37,10 +37,10 @@ import net.minecraft.util.registry.Registry;
|
|||
import org.apache.commons.lang3.Validate;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import reborncore.client.screen.builder.Syncable;
|
||||
import reborncore.common.blockentity.MachineBaseBlockEntity;
|
||||
import reborncore.common.fluid.FluidValue;
|
||||
import reborncore.common.fluid.container.FluidInstance;
|
||||
import reborncore.common.screen.Syncable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
]
|
||||
},
|
||||
"mixins": [
|
||||
"reborncore.client.mixins.json",
|
||||
"reborncore.client.mixins.json",
|
||||
"reborncore.common.mixins.json"
|
||||
],
|
||||
"depends": {
|
||||
|
|
25
build.gradle
25
build.gradle
|
@ -78,6 +78,7 @@ allprojects {
|
|||
|
||||
loom {
|
||||
runtimeOnlyLog4j = true
|
||||
splitEnvironmentSourceSets()
|
||||
}
|
||||
|
||||
// Shared deps between TR and RC
|
||||
|
@ -178,9 +179,33 @@ sourceSets {
|
|||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
loom {
|
||||
mods {
|
||||
reborncore {
|
||||
sourceSet project(":RebornCore").sourceSets.main
|
||||
sourceSet project(":RebornCore").sourceSets.client
|
||||
}
|
||||
techreborn {
|
||||
sourceSet project(":").sourceSets.main
|
||||
sourceSet project(":").sourceSets.client
|
||||
}
|
||||
"techreborn-datagen" {
|
||||
sourceSet project(":").sourceSets.datagen
|
||||
}
|
||||
"techreborn-gametest" {
|
||||
sourceSet project(":").sourceSets.gametest
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TechReborn specific dependencies
|
||||
dependencies {
|
||||
api project(path: ":RebornCore", configuration: "namedElements")
|
||||
clientCompileClasspath project(":RebornCore").sourceSets.client.output
|
||||
clientRuntimeClasspath project(":RebornCore").sourceSets.client.output
|
||||
|
||||
include project(":RebornCore")
|
||||
|
||||
disabledOptionalDependency "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.dashloader;
|
||||
package techreborn.client.compat.dashloader;
|
||||
|
||||
import net.oskarstrom.dashloader.DashRegistry;
|
||||
import net.oskarstrom.dashloader.api.annotation.DashConstructor;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.dashloader;
|
||||
package techreborn.client.compat.dashloader;
|
||||
|
||||
import net.oskarstrom.dashloader.DashRegistry;
|
||||
import net.oskarstrom.dashloader.api.annotation.DashConstructor;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei;
|
||||
package techreborn.client.compat.rei;
|
||||
|
||||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
||||
import me.shedaniel.rei.api.common.display.Display;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei;
|
||||
package techreborn.client.compat.rei;
|
||||
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import dev.architectury.event.CompoundEventResult;
|
||||
|
@ -51,7 +51,6 @@ import me.shedaniel.rei.impl.client.gui.widget.EntryWidget;
|
|||
import net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandler;
|
||||
import net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandlerRegistry;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.DrawableHelper;
|
||||
import net.minecraft.client.texture.Sprite;
|
||||
import net.minecraft.client.texture.SpriteAtlasTexture;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
|
@ -76,13 +75,13 @@ import techreborn.api.generator.EFluidGenerator;
|
|||
import techreborn.api.generator.GeneratorRecipeHelper;
|
||||
import techreborn.api.recipe.recipes.FluidReplicatorRecipe;
|
||||
import techreborn.api.recipe.recipes.RollingMachineRecipe;
|
||||
import techreborn.compat.rei.fluidgenerator.FluidGeneratorRecipeCategory;
|
||||
import techreborn.compat.rei.fluidgenerator.FluidGeneratorRecipeDisplay;
|
||||
import techreborn.compat.rei.fluidreplicator.FluidReplicatorRecipeCategory;
|
||||
import techreborn.compat.rei.fluidreplicator.FluidReplicatorRecipeDisplay;
|
||||
import techreborn.compat.rei.machine.*;
|
||||
import techreborn.compat.rei.rollingmachine.RollingMachineCategory;
|
||||
import techreborn.compat.rei.rollingmachine.RollingMachineDisplay;
|
||||
import techreborn.client.compat.rei.fluidgenerator.FluidGeneratorRecipeCategory;
|
||||
import techreborn.client.compat.rei.machine.*;
|
||||
import techreborn.client.compat.rei.fluidgenerator.FluidGeneratorRecipeDisplay;
|
||||
import techreborn.client.compat.rei.fluidreplicator.FluidReplicatorRecipeCategory;
|
||||
import techreborn.client.compat.rei.fluidreplicator.FluidReplicatorRecipeDisplay;
|
||||
import techreborn.client.compat.rei.rollingmachine.RollingMachineCategory;
|
||||
import techreborn.client.compat.rei.rollingmachine.RollingMachineDisplay;
|
||||
import techreborn.init.ModRecipes;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.init.TRContent.Machine;
|
||||
|
@ -389,7 +388,7 @@ public class ReiPlugin implements REIClientPlugin {
|
|||
while (offsetHeight != 0) {
|
||||
final int curHeight = Math.min(offsetHeight, iconHeight);
|
||||
|
||||
DrawableHelper.drawSprite(matrixStack, x, y - offsetHeight, 0, width, curHeight, sprite);
|
||||
drawSprite(matrixStack, x, y - offsetHeight, 0, width, curHeight, sprite);
|
||||
offsetHeight -= curHeight;
|
||||
iteration++;
|
||||
if (iteration > 50) {
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.fluidgenerator;
|
||||
package techreborn.client.compat.rei.fluidgenerator;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
|
@ -35,12 +35,11 @@ import me.shedaniel.rei.api.client.registry.display.DisplayCategory;
|
|||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
||||
import me.shedaniel.rei.api.common.util.EntryStacks;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.Identifier;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import techreborn.TechReborn;
|
||||
import techreborn.compat.rei.ReiPlugin;
|
||||
import techreborn.client.compat.rei.ReiPlugin;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
import java.util.List;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.fluidgenerator;
|
||||
package techreborn.client.compat.rei.fluidgenerator;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.fluidreplicator;
|
||||
package techreborn.client.compat.rei.fluidreplicator;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import me.shedaniel.math.Point;
|
||||
|
@ -37,13 +37,12 @@ import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
|||
import me.shedaniel.rei.api.common.util.EntryStacks;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.Identifier;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import techreborn.api.recipe.recipes.FluidReplicatorRecipe;
|
||||
import techreborn.compat.rei.ReiPlugin;
|
||||
import techreborn.client.compat.rei.ReiPlugin;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.List;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.fluidreplicator;
|
||||
package techreborn.client.compat.rei.fluidreplicator;
|
||||
|
||||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
||||
import me.shedaniel.rei.api.common.display.Display;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.machine;
|
||||
package techreborn.client.compat.rei.machine;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
|
@ -31,13 +31,12 @@ import me.shedaniel.rei.api.client.gui.widgets.Tooltip;
|
|||
import me.shedaniel.rei.api.client.gui.widgets.Widget;
|
||||
import me.shedaniel.rei.api.client.gui.widgets.Widgets;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.Identifier;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import techreborn.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.compat.rei.ReiPlugin;
|
||||
import techreborn.client.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.client.compat.rei.ReiPlugin;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.machine;
|
||||
package techreborn.client.compat.rei.machine;
|
||||
|
||||
import me.shedaniel.rei.api.client.gui.DisplayRenderer;
|
||||
import me.shedaniel.rei.api.client.gui.Renderer;
|
||||
|
@ -33,11 +33,10 @@ import me.shedaniel.rei.api.common.entry.EntryIngredient;
|
|||
import me.shedaniel.rei.api.common.util.EntryStacks;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.Text;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import techreborn.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.compat.rei.ReiPlugin;
|
||||
import techreborn.client.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.client.compat.rei.ReiPlugin;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.machine;
|
||||
package techreborn.client.compat.rei.machine;
|
||||
|
||||
import me.shedaniel.math.Point;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
|
@ -32,8 +32,8 @@ import net.minecraft.text.Text;
|
|||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import techreborn.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.compat.rei.ReiPlugin;
|
||||
import techreborn.client.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.client.compat.rei.ReiPlugin;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.List;
|
|
@ -22,20 +22,18 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.machine;
|
||||
package techreborn.client.compat.rei.machine;
|
||||
|
||||
import me.shedaniel.math.Point;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
import me.shedaniel.rei.api.client.gui.widgets.Widget;
|
||||
import me.shedaniel.rei.api.client.gui.widgets.Widgets;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.Text;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import techreborn.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.compat.rei.ReiPlugin;
|
||||
import techreborn.client.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.client.compat.rei.ReiPlugin;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.List;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.machine;
|
||||
package techreborn.client.compat.rei.machine;
|
||||
|
||||
import me.shedaniel.math.Point;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
|
@ -32,8 +32,8 @@ import net.minecraft.text.Text;
|
|||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import techreborn.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.compat.rei.ReiPlugin;
|
||||
import techreborn.client.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.client.compat.rei.ReiPlugin;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.List;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.machine;
|
||||
package techreborn.client.compat.rei.machine;
|
||||
|
||||
import me.shedaniel.math.Point;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
|
@ -32,8 +32,8 @@ import net.minecraft.text.Text;
|
|||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import techreborn.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.compat.rei.ReiPlugin;
|
||||
import techreborn.client.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.client.compat.rei.ReiPlugin;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.List;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.machine;
|
||||
package techreborn.client.compat.rei.machine;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import me.shedaniel.math.Point;
|
||||
|
@ -32,14 +32,13 @@ import me.shedaniel.rei.api.client.gui.widgets.Tooltip;
|
|||
import me.shedaniel.rei.api.client.gui.widgets.Widget;
|
||||
import me.shedaniel.rei.api.client.gui.widgets.Widgets;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.Identifier;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import techreborn.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.compat.rei.ReiPlugin;
|
||||
import techreborn.client.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.client.compat.rei.ReiPlugin;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.List;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.machine;
|
||||
package techreborn.client.compat.rei.machine;
|
||||
|
||||
import me.shedaniel.math.Point;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
|
@ -32,8 +32,8 @@ import net.minecraft.text.Text;
|
|||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import techreborn.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.compat.rei.ReiPlugin;
|
||||
import techreborn.client.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.client.compat.rei.ReiPlugin;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.List;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.machine;
|
||||
package techreborn.client.compat.rei.machine;
|
||||
|
||||
import me.shedaniel.math.Point;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
|
@ -32,8 +32,8 @@ import net.minecraft.text.Text;
|
|||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import techreborn.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.compat.rei.ReiPlugin;
|
||||
import techreborn.client.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.client.compat.rei.ReiPlugin;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.List;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.machine;
|
||||
package techreborn.client.compat.rei.machine;
|
||||
|
||||
import me.shedaniel.math.Point;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
|
@ -32,8 +32,8 @@ import net.minecraft.text.Text;
|
|||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import techreborn.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.compat.rei.ReiPlugin;
|
||||
import techreborn.client.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.client.compat.rei.ReiPlugin;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.List;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.machine;
|
||||
package techreborn.client.compat.rei.machine;
|
||||
|
||||
import me.shedaniel.math.Point;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
|
@ -32,8 +32,8 @@ import net.minecraft.text.Text;
|
|||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import techreborn.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.compat.rei.ReiPlugin;
|
||||
import techreborn.client.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.client.compat.rei.ReiPlugin;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.List;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.machine;
|
||||
package techreborn.client.compat.rei.machine;
|
||||
|
||||
import me.shedaniel.math.Point;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
|
@ -32,8 +32,8 @@ import net.minecraft.text.Text;
|
|||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import techreborn.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.compat.rei.ReiPlugin;
|
||||
import techreborn.client.compat.rei.MachineRecipeDisplay;
|
||||
import techreborn.client.compat.rei.ReiPlugin;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.List;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.rollingmachine;
|
||||
package techreborn.client.compat.rei.rollingmachine;
|
||||
|
||||
import me.shedaniel.rei.api.client.gui.Renderer;
|
||||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
||||
|
@ -31,10 +31,9 @@ import me.shedaniel.rei.plugin.client.categories.crafting.DefaultCraftingCategor
|
|||
import me.shedaniel.rei.plugin.common.displays.crafting.DefaultCraftingDisplay;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.Text;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import techreborn.api.recipe.recipes.RollingMachineRecipe;
|
||||
import techreborn.compat.rei.ReiPlugin;
|
||||
import techreborn.client.compat.rei.ReiPlugin;
|
||||
|
||||
public class RollingMachineCategory extends DefaultCraftingCategory {
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.compat.rei.rollingmachine;
|
||||
package techreborn.client.compat.rei.rollingmachine;
|
||||
|
||||
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
|
||||
import me.shedaniel.rei.plugin.common.displays.crafting.DefaultShapedDisplay;
|
|
@ -41,8 +41,6 @@ import net.minecraft.fluid.Fluids;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.registry.Registry;
|
|
@ -28,7 +28,6 @@ import net.minecraft.client.gui.screen.Screen;
|
|||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.Text;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.builder.widget.GuiButtonUpDown;
|
||||
import reborncore.client.gui.builder.widget.GuiButtonUpDown.UpDownButtonType;
|
||||
|
@ -89,6 +88,6 @@ public class GuiAESU extends GuiBase<BuiltScreenHandler> {
|
|||
}
|
||||
|
||||
public void onClick(int amount) {
|
||||
NetworkManager.sendToServer(ServerboundPackets.createPacketAesu(amount, Screen.hasShiftDown(), Screen.hasControlDown(), blockEntity));
|
||||
NetworkManager.sendToServer(ServerboundPackets.createPacketAesu(amount, hasShiftDown(), hasControlDown(), blockEntity));
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue