Port forge and finally fix build scripts
This commit is contained in:
@@ -19,9 +19,9 @@ import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.Mth;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.joml.Matrix4f;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.math.BigDecimal;
|
||||
|
@@ -6,8 +6,8 @@ import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.gui.components.events.AbstractContainerEventHandler;
|
||||
import net.minecraft.client.gui.components.events.GuiEventListener;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
@@ -1,15 +1,7 @@
|
||||
package com.hypherionmc.craterlib.client.registry;
|
||||
|
||||
import com.hypherionmc.craterlib.api.rendering.DyableBlock;
|
||||
import com.hypherionmc.craterlib.api.rendering.ItemDyable;
|
||||
import com.hypherionmc.craterlib.client.rendering.ItemColorHandler;
|
||||
import com.hypherionmc.craterlib.core.platform.ClientPlatform;
|
||||
import com.hypherionmc.craterlib.core.systems.reg.RegistrationProvider;
|
||||
import net.minecraft.client.color.block.BlockColors;
|
||||
import net.minecraft.client.color.item.ItemColors;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -26,13 +18,13 @@ public class ClientRegistry {
|
||||
* @param colors Existing block colors obtained from {@link com.hypherionmc.craterlib.api.event.client.ColorRegistrationEvent}
|
||||
* @param blocks The blocks registered for the module
|
||||
*/
|
||||
public static void registerBlockColors(@NotNull BlockColors colors, @NotNull RegistrationProvider<Block> blocks) {
|
||||
/*public static void registerBlockColors(@NotNull BlockColors colors, @NotNull RegistrationProvider<Block> blocks) {
|
||||
blocks.getEntries().forEach(blockRegistryObject -> {
|
||||
if (blockRegistryObject.get() instanceof DyableBlock dyableBlock) {
|
||||
colors.register(dyableBlock.dyeHandler(), (Block) dyableBlock);
|
||||
}
|
||||
});
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* Register Item Color Handlers
|
||||
@@ -40,13 +32,13 @@ public class ClientRegistry {
|
||||
* @param colors Existing item colors obtained from {@link com.hypherionmc.craterlib.api.event.client.ColorRegistrationEvent}
|
||||
* @param items The items registered for the module
|
||||
*/
|
||||
public static void registerItemColors(@NotNull ItemColors colors, @NotNull RegistrationProvider<Item> items) {
|
||||
/*public static void registerItemColors(@NotNull ItemColors colors, @NotNull RegistrationProvider<Item> items) {
|
||||
items.getEntries().forEach(itemRegistryObject -> {
|
||||
if (itemRegistryObject.get() instanceof ItemDyable itemDyable) {
|
||||
colors.register(new ItemColorHandler(), (Item) itemDyable);
|
||||
}
|
||||
});
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* Register a {@link net.minecraft.client.renderer.blockentity.BlockEntityRenderer} for a BlockEntity
|
||||
|
@@ -1,20 +1,16 @@
|
||||
package com.hypherionmc.craterlib.core.platform;
|
||||
|
||||
import com.hypherionmc.craterlib.common.item.BlockItemDyable;
|
||||
import com.hypherionmc.craterlib.core.systems.reg.RegistryObject;
|
||||
import com.hypherionmc.craterlib.util.ServiceUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
import net.minecraft.network.Connection;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* @author HypherionSA
|
||||
*/
|
||||
@@ -24,7 +20,7 @@ public interface ClientPlatform {
|
||||
|
||||
void registerItemProperty(@NotNull BlockItemDyable item, @NotNull String property);
|
||||
|
||||
void registerCustomRenderTypes(@NotNull Collection<RegistryObject<Block>> blocks);
|
||||
//void registerCustomRenderTypes(@NotNull Collection<RegistryObject<Block>> blocks);
|
||||
|
||||
Minecraft getClientInstance();
|
||||
|
||||
|
@@ -13,8 +13,8 @@ import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.inventory.MenuType;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import org.apache.commons.lang3.function.TriFunction;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
|
@@ -3,7 +3,6 @@ package com.hypherionmc.craterlib.mixin.events.client;
|
||||
import com.hypherionmc.craterlib.api.event.client.CraterSinglePlayerEvent;
|
||||
import com.hypherionmc.craterlib.core.event.CraterEventBus;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.client.player.AbstractClientPlayer;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
@@ -4,18 +4,18 @@ import com.hypherionmc.craterlib.api.event.client.ScreenEvent;
|
||||
import com.hypherionmc.craterlib.core.event.CraterEventBus;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.screens.Screen;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@Mixin(Minecraft.class)
|
||||
public class MinecraftMixin {
|
||||
|
||||
@Shadow @Nullable public Screen screen;
|
||||
@Shadow @Nullable
|
||||
public Screen screen;
|
||||
|
||||
@Inject(method = "setScreen", at = @At(value = "TAIL"))
|
||||
private void injectScreenOpeningEvent(Screen screen, CallbackInfo ci) {
|
||||
|
Reference in New Issue
Block a user