Update to latest yarn
This commit is contained in:
parent
147eec26f6
commit
6725fd30a1
2 changed files with 8 additions and 9 deletions
|
@ -66,7 +66,7 @@ group = 'TechReborn'
|
|||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:1.15.2"
|
||||
mappings "net.fabricmc:yarn:1.15.2+build.1:v2"
|
||||
mappings "net.fabricmc:yarn:1.15.2+build.2:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:0.7.5+build.178"
|
||||
|
||||
//Fabric api
|
||||
|
|
|
@ -29,17 +29,13 @@ import net.fabricmc.api.Environment;
|
|||
import net.fabricmc.fabric.api.client.screen.ScreenProviderRegistry;
|
||||
import net.fabricmc.fabric.api.container.ContainerProviderRegistry;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.client.gui.screen.ingame.AbstractContainerScreen;
|
||||
import net.minecraft.client.gui.screen.ingame.ContainerScreen;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import reborncore.RebornCore;
|
||||
import reborncore.client.containerBuilder.IContainerProvider;
|
||||
import techreborn.blockentity.machine.misc.ChargeOMatBlockEntity;
|
||||
import techreborn.blockentity.machine.tier3.IndustrialCentrifugeBlockEntity;
|
||||
import techreborn.blockentity.storage.fluid.TankUnitBaseBlockEntity;
|
||||
import techreborn.blockentity.data.DataDrivenBEProvider;
|
||||
import techreborn.blockentity.data.DataDrivenGui;
|
||||
import techreborn.blockentity.machine.multiblock.FusionControlComputerBlockEntity;
|
||||
import techreborn.blockentity.generator.PlasmaGeneratorBlockEntity;
|
||||
import techreborn.blockentity.generator.SolarPanelBlockEntity;
|
||||
import techreborn.blockentity.generator.advanced.DieselGeneratorBlockEntity;
|
||||
|
@ -49,9 +45,11 @@ import techreborn.blockentity.generator.advanced.ThermalGeneratorBlockEntity;
|
|||
import techreborn.blockentity.generator.basic.SolidFuelGeneratorBlockEntity;
|
||||
import techreborn.blockentity.machine.iron.IronAlloyFurnaceBlockEntity;
|
||||
import techreborn.blockentity.machine.iron.IronFurnaceBlockEntity;
|
||||
import techreborn.blockentity.machine.misc.ChargeOMatBlockEntity;
|
||||
import techreborn.blockentity.machine.multiblock.*;
|
||||
import techreborn.blockentity.machine.tier1.*;
|
||||
import techreborn.blockentity.machine.tier3.ChunkLoaderBlockEntity;
|
||||
import techreborn.blockentity.machine.tier3.IndustrialCentrifugeBlockEntity;
|
||||
import techreborn.blockentity.machine.tier3.MatterFabricatorBlockEntity;
|
||||
import techreborn.blockentity.storage.energy.AdjustableSUBlockEntity;
|
||||
import techreborn.blockentity.storage.energy.HighVoltageSUBlockEntity;
|
||||
|
@ -59,12 +57,13 @@ import techreborn.blockentity.storage.energy.LowVoltageSUBlockEntity;
|
|||
import techreborn.blockentity.storage.energy.MediumVoltageSUBlockEntity;
|
||||
import techreborn.blockentity.storage.energy.idsu.InterdimensionalSUBlockEntity;
|
||||
import techreborn.blockentity.storage.energy.lesu.LapotronicSUBlockEntity;
|
||||
import techreborn.blockentity.storage.fluid.TankUnitBaseBlockEntity;
|
||||
import techreborn.blockentity.storage.item.StorageUnitBaseBlockEntity;
|
||||
import techreborn.client.gui.*;
|
||||
|
||||
public class GuiHandler {
|
||||
|
||||
public static void register(){
|
||||
public static void register() {
|
||||
|
||||
EGui.stream().forEach(gui -> ContainerProviderRegistry.INSTANCE.registerFactory(gui.getID(), (syncID, identifier, playerEntity, packetByteBuf) -> {
|
||||
final BlockEntity blockEntity = playerEntity.world.getBlockEntity(packetByteBuf.readBlockPos());
|
||||
|
@ -75,10 +74,10 @@ public class GuiHandler {
|
|||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
private static AbstractContainerScreen<?> getClientGuiElement(final EGui gui, final PlayerEntity player, BlockPos pos, int syncID) {
|
||||
private static ContainerScreen<?> getClientGuiElement(final EGui gui, final PlayerEntity player, BlockPos pos, int syncID) {
|
||||
final BlockEntity blockEntity = player.world.getBlockEntity(pos);
|
||||
|
||||
if(blockEntity instanceof DataDrivenBEProvider.DataDrivenBlockEntity){
|
||||
if (blockEntity instanceof DataDrivenBEProvider.DataDrivenBlockEntity) {
|
||||
return new DataDrivenGui(syncID, player, (DataDrivenBEProvider.DataDrivenBlockEntity) blockEntity);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue