mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-13 14:04:05 +01:00
Fix server launch
This commit is contained in:
parent
c3cdf346f7
commit
702a79684b
@ -24,6 +24,7 @@ import net.minecraft.block.Blocks;
|
|||||||
import net.minecraft.client.renderer.RenderType;
|
import net.minecraft.client.renderer.RenderType;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
import net.minecraftforge.fml.DistExecutor;
|
import net.minecraftforge.fml.DistExecutor;
|
||||||
|
|
||||||
public class PalettesRegistrate extends CreateRegistrateBase<PalettesRegistrate> {
|
public class PalettesRegistrate extends CreateRegistrateBase<PalettesRegistrate> {
|
||||||
@ -102,8 +103,11 @@ public class PalettesRegistrate extends CreateRegistrateBase<PalettesRegistrate>
|
|||||||
|
|
||||||
private <T extends Block> NonNullUnaryOperator<BlockBuilder<T, PalettesRegistrate>> connectedTextures(
|
private <T extends Block> NonNullUnaryOperator<BlockBuilder<T, PalettesRegistrate>> connectedTextures(
|
||||||
ConnectedTextureBehaviour behavior) {
|
ConnectedTextureBehaviour behavior) {
|
||||||
return b -> b.onRegister(entry -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () ->
|
return b -> b.onRegister(entry -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> registerModel(entry, behavior)));
|
||||||
CreateClient.getCustomBlockModels()
|
}
|
||||||
.register(entry.delegate, model -> new CTModel(model, behavior))));
|
|
||||||
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
private void registerModel(Block entry, ConnectedTextureBehaviour behavior) {
|
||||||
|
CreateClient.getCustomBlockModels().register(entry.delegate, model -> new CTModel(model, behavior));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user