mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-24 14:06:42 +01:00
Fix server launch
This commit is contained in:
parent
c3cdf346f7
commit
702a79684b
1 changed files with 7 additions and 3 deletions
|
@ -24,6 +24,7 @@ import net.minecraft.block.Blocks;
|
|||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
|
||||
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(
|
||||
ConnectedTextureBehaviour behavior) {
|
||||
return b -> b.onRegister(entry -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () ->
|
||||
CreateClient.getCustomBlockModels()
|
||||
.register(entry.delegate, model -> new CTModel(model, behavior))));
|
||||
return b -> b.onRegister(entry -> DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> registerModel(entry, behavior)));
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
private void registerModel(Block entry, ConnectedTextureBehaviour behavior) {
|
||||
CreateClient.getCustomBlockModels().register(entry.delegate, model -> new CTModel(model, behavior));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue