Added cloud bricks, carved cloud, and orange cloud bed

This commit is contained in:
Sollace 2023-10-31 16:45:41 +00:00
parent 61c8ae8927
commit ff6d24e25f
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
73 changed files with 1075 additions and 188 deletions

View file

@ -10,7 +10,7 @@ import net.minecraft.registry.Registries;
public interface UBlockEntities {
BlockEntityType<WeatherVaneBlock.WeatherVane> WEATHER_VANE = create("weather_vane", BlockEntityType.Builder.create(WeatherVaneBlock.WeatherVane::new, UBlocks.WEATHER_VANE));
BlockEntityType<CloudBedBlock.Tile> CLOUD_BED = create("cloud_bed", BlockEntityType.Builder.create(CloudBedBlock.Tile::new, UBlocks.CLOUD_BED));
BlockEntityType<CloudBedBlock.Tile> CLOUD_BED = create("cloud_bed", BlockEntityType.Builder.create(CloudBedBlock.Tile::new, UBlocks.WHITE_CLOUD_BED, UBlocks.ORANGE_CLOUD_BED));
static <T extends BlockEntity> BlockEntityType<T> create(String id, Builder<T> builder) {
return Registry.register(Registries.BLOCK_ENTITY_TYPE, id, builder.build(null));

View file

@ -10,6 +10,7 @@ import com.minelittlepony.unicopia.block.cloud.CloudSlabBlock;
import com.minelittlepony.unicopia.block.cloud.CloudStairsBlock;
import com.minelittlepony.unicopia.block.cloud.CompactedCloudBlock;
import com.minelittlepony.unicopia.block.cloud.NaturalCloudBlock;
import com.minelittlepony.unicopia.block.cloud.OrientedCloudBlock;
import com.minelittlepony.unicopia.block.cloud.CloudBedBlock;
import com.minelittlepony.unicopia.block.cloud.CloudBlock;
import com.minelittlepony.unicopia.block.cloud.SoggyCloudBlock;
@ -29,6 +30,7 @@ import net.minecraft.block.enums.Instrument;
import net.minecraft.block.piston.PistonBehavior;
import net.minecraft.item.*;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.DyeColor;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.Direction;
import net.minecraft.util.shape.VoxelShapes;
@ -144,24 +146,37 @@ public interface UBlocks {
Block CLOUD = register("cloud", new NaturalCloudBlock(Settings.create().mapColor(MapColor.OFF_WHITE).hardness(0.3F).resistance(0).sounds(BlockSoundGroup.WOOL), true,
() -> UBlocks.SOGGY_CLOUD,
() -> UBlocks.COMPACTED_CLOUD), ItemGroups.NATURAL);
Block COMPACTED_CLOUD = register("compacted_cloud", new CompactedCloudBlock(Settings.copy(CLOUD)));
Block CLOUD_SLAB = register("cloud_slab", new CloudSlabBlock(Settings.copy(CLOUD), true, () -> UBlocks.SOGGY_CLOUD_SLAB), ItemGroups.NATURAL);
Block CLOUD_STAIRS = register("cloud_stairs", new CloudStairsBlock(CLOUD.getDefaultState(), Settings.copy(CLOUD), () -> UBlocks.SOGGY_CLOUD_STAIRS), ItemGroups.NATURAL);
Block COMPACTED_CLOUD = register("compacted_cloud", new CompactedCloudBlock(Settings.copy(CLOUD)));
Block CLOUD_PLANKS = register("cloud_planks", new NaturalCloudBlock(Settings.copy(CLOUD).requiresTool(), false,
Block CLOUD_PLANKS = register("cloud_planks", new NaturalCloudBlock(Settings.copy(CLOUD).hardness(0.4F).requiresTool(), false,
null,
() -> UBlocks.COMPACTED_CLOUD_PLANKS), ItemGroups.BUILDING_BLOCKS);
Block CLOUD_PLANKS_SLAB = register("cloud_planks_slab", new CloudSlabBlock(Settings.copy(CLOUD_PLANKS), false, null), ItemGroups.BUILDING_BLOCKS);
Block CLOUD_PLANKS_STAIRS = register("cloud_planks_stairs", new CloudStairsBlock(CLOUD_PLANKS.getDefaultState(), Settings.copy(CLOUD_PLANKS), null), ItemGroups.BUILDING_BLOCKS);
Block COMPACTED_CLOUD_PLANKS = register("compacted_cloud_planks", new CompactedCloudBlock(Settings.copy(CLOUD_PLANKS)));
Block UNSTABLE_CLOUD = register("unstable_cloud", new UnstableCloudBlock(Settings.copy(CLOUD)), ItemGroups.NATURAL);
SoggyCloudBlock SOGGY_CLOUD = register("soggy_cloud", new SoggyCloudBlock(Settings.copy(CLOUD), () -> UBlocks.CLOUD));
SoggyCloudSlabBlock SOGGY_CLOUD_SLAB = register("soggy_cloud_slab", new SoggyCloudSlabBlock(Settings.copy(CLOUD), () -> UBlocks.CLOUD_SLAB));
Block CLOUD_PLANK_SLAB = register("cloud_plank_slab", new CloudSlabBlock(Settings.copy(CLOUD_PLANKS), false, null), ItemGroups.BUILDING_BLOCKS);
Block CLOUD_PLANK_STAIRS = register("cloud_plank_stairs", new CloudStairsBlock(CLOUD_PLANKS.getDefaultState(), Settings.copy(CLOUD_PLANKS), null), ItemGroups.BUILDING_BLOCKS);
Block CLOUD_BRICKS = register("cloud_bricks", new NaturalCloudBlock(Settings.copy(CLOUD).hardness(0.6F).requiresTool(), false,
null,
() -> UBlocks.COMPACTED_CLOUD_BRICKS), ItemGroups.BUILDING_BLOCKS);
Block COMPACTED_CLOUD_BRICKS = register("compacted_cloud_bricks", new CompactedCloudBlock(Settings.copy(CLOUD_BRICKS)));
Block CLOUD_BRICK_SLAB = register("cloud_brick_slab", new CloudSlabBlock(Settings.copy(CLOUD_BRICKS), false, null), ItemGroups.BUILDING_BLOCKS);
Block CLOUD_BRICK_STAIRS = register("cloud_brick_stairs", new CloudStairsBlock(CLOUD_BRICKS.getDefaultState(), Settings.copy(CLOUD_PLANKS), null), ItemGroups.BUILDING_BLOCKS);
SoggyCloudBlock SOGGY_CLOUD = register("soggy_cloud", new SoggyCloudBlock(Settings.copy(CLOUD).hardness(0.7F), () -> UBlocks.CLOUD));
SoggyCloudSlabBlock SOGGY_CLOUD_SLAB = register("soggy_cloud_slab", new SoggyCloudSlabBlock(Settings.copy(SOGGY_CLOUD), () -> UBlocks.CLOUD_SLAB));
CloudStairsBlock SOGGY_CLOUD_STAIRS = register("soggy_cloud_stairs", new CloudStairsBlock(SOGGY_CLOUD.getDefaultState(), Settings.copy(CLOUD), null));
Block DENSE_CLOUD = register("dense_cloud", new CloudBlock(Settings.create().mapColor(MapColor.GRAY).hardness(0.5F).resistance(0).sounds(BlockSoundGroup.WOOL), false), ItemGroups.NATURAL);
Block DENSE_CLOUD_SLAB = register("dense_cloud_slab", new CloudSlabBlock(Settings.copy(DENSE_CLOUD), false, null), ItemGroups.NATURAL);
Block DENSE_CLOUD_STAIRS = register("dense_cloud_stairs", new CloudStairsBlock(DENSE_CLOUD.getDefaultState(), Settings.copy(DENSE_CLOUD), null), ItemGroups.NATURAL);
Block CARVED_CLOUD = register("carved_cloud", new OrientedCloudBlock(Settings.copy(CLOUD).hardness(0.4F).requiresTool(), false), ItemGroups.BUILDING_BLOCKS);
Block UNSTABLE_CLOUD = register("unstable_cloud", new UnstableCloudBlock(Settings.copy(CLOUD)), ItemGroups.NATURAL);
Block CLOUD_PILLAR = register("cloud_pillar", new CloudPillarBlock(Settings.create().mapColor(MapColor.GRAY).hardness(0.5F).resistance(0).sounds(BlockSoundGroup.WOOL)), ItemGroups.NATURAL);
Block CLOUD_BED = register("cloud_bed", new CloudBedBlock(CLOUD.getDefaultState(), Settings.copy(Blocks.WHITE_BED).sounds(BlockSoundGroup.WOOL)));
Block WHITE_CLOUD_BED = register("white_cloud_bed", new CloudBedBlock(DyeColor.WHITE, CLOUD.getDefaultState(), Settings.copy(Blocks.WHITE_BED).sounds(BlockSoundGroup.WOOL)));
Block ORANGE_CLOUD_BED = register("orange_cloud_bed", new CloudBedBlock(DyeColor.ORANGE, CLOUD.getDefaultState(), Settings.copy(Blocks.ORANGE_BED).sounds(BlockSoundGroup.WOOL)));
private static <T extends Block> T register(String name, T item) {
return register(Unicopia.id(name), item);

View file

@ -29,8 +29,8 @@ public class CloudBedBlock extends BedBlock {
private final BlockState baseState;
private final CloudBlock baseBlock;
public CloudBedBlock(BlockState baseState, Settings settings) {
super(DyeColor.WHITE, settings);
public CloudBedBlock(DyeColor color, BlockState baseState, Settings settings) {
super(color, settings);
this.baseState = baseState;
this.baseBlock = (CloudBlock)baseState.getBlock();
}

View file

@ -0,0 +1,42 @@
package com.minelittlepony.unicopia.block.cloud;
import com.minelittlepony.unicopia.EquineContext;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.item.ItemPlacementContext;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.DirectionProperty;
import net.minecraft.state.property.Properties;
import net.minecraft.util.BlockMirror;
import net.minecraft.util.BlockRotation;
import net.minecraft.util.math.Direction;
public class OrientedCloudBlock extends CloudBlock {
public static final DirectionProperty FACING = Properties.FACING;
public OrientedCloudBlock(Settings settings, boolean meltable) {
super(settings, meltable);
this.setDefaultState(getDefaultState().with(FACING, Direction.UP));
}
@Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(FACING);
}
@Override
public BlockState rotate(BlockState state, BlockRotation rotation) {
return state.with(FACING, rotation.rotate(state.get(FACING)));
}
@Override
public BlockState mirror(BlockState state, BlockMirror mirror) {
return state.rotate(mirror.getRotation(state.get(FACING)));
}
@Override
public BlockState getPlacementState(ItemPlacementContext ctx, EquineContext equineContext) {
return getDefaultState().with(FACING, ctx.getSide().getOpposite());
}
}

View file

@ -1,5 +1,7 @@
package com.minelittlepony.unicopia.client;
import org.jetbrains.annotations.Nullable;
import com.minelittlepony.unicopia.Unicopia;
import com.minelittlepony.unicopia.block.*;
import com.minelittlepony.unicopia.client.particle.ChangelingMagicParticle;
@ -30,9 +32,10 @@ import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry;
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry.PendingParticleFactory;
import net.fabricmc.fabric.api.client.rendering.v1.*;
import net.fabricmc.fabric.api.client.rendering.v1.BuiltinItemRendererRegistry.DynamicItemRenderer;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.color.block.BlockColorProvider;
import net.minecraft.client.color.world.BiomeColors;
import net.minecraft.client.color.world.FoliageColors;
import net.minecraft.client.item.ModelPredicateProviderRegistry;
@ -43,11 +46,14 @@ import net.minecraft.client.render.block.entity.BlockEntityRendererFactories;
import net.minecraft.client.render.entity.FlyingItemEntityRenderer;
import net.minecraft.client.render.item.ItemRenderer;
import net.minecraft.client.render.model.json.ModelTransformationMode;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.fluid.Fluids;
import net.minecraft.item.*;
import net.minecraft.particle.ParticleEffect;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.BlockRenderView;
public interface URenderers {
static void bootstrap() {
@ -65,14 +71,11 @@ public interface URenderers {
ParticleFactoryRegistry.getInstance().register(UParticles.CLOUDS_ESCAPING, CloudsEscapingParticle::new);
ParticleFactoryRegistry.getInstance().register(UParticles.LIGHTNING_BOLT, LightningBoltParticle::new);
AccessoryFeatureRenderer.register(BraceletFeatureRenderer::new);
AccessoryFeatureRenderer.register(AmuletFeatureRenderer::new);
AccessoryFeatureRenderer.register(WingsFeatureRenderer::new);
AccessoryFeatureRenderer.register(HornFeatureRenderer::new);
AccessoryFeatureRenderer.register(IcarusWingsFeatureRenderer::new);
AccessoryFeatureRenderer.register(BatWingsFeatureRenderer::new);
AccessoryFeatureRenderer.register(GlassesFeatureRenderer::new);
AccessoryFeatureRenderer.register(HeldEntityFeatureRenderer::new);
AccessoryFeatureRenderer.register(
BraceletFeatureRenderer::new, AmuletFeatureRenderer::new, GlassesFeatureRenderer::new,
WingsFeatureRenderer::new, HornFeatureRenderer::new, IcarusWingsFeatureRenderer::new, BatWingsFeatureRenderer::new,
HeldEntityFeatureRenderer::new
);
EntityRendererRegistry.register(UEntities.THROWN_ITEM, FlyingItemEntityRenderer::new);
EntityRendererRegistry.register(UEntities.MUFFIN, FlyingItemEntityRenderer::new);
@ -91,94 +94,17 @@ public interface URenderers {
BlockEntityRendererFactories.register(UBlockEntities.WEATHER_VANE, WeatherVaneBlockEntityRenderer::new);
BlockEntityRendererFactories.register(UBlockEntities.CLOUD_BED, CloudBedBlockEntityRenderer::new);
register(URenderers::renderJarItem, UItems.FILLED_JAR);
register(URenderers::renderBedItem, UItems.WHITE_CLOUD_BED, UItems.ORANGE_CLOUD_BED);
PolearmRenderer.register(UItems.WOODEN_POLEARM, UItems.STONE_POLEARM, UItems.IRON_POLEARM, UItems.GOLDEN_POLEARM, UItems.DIAMOND_POLEARM, UItems.NETHERITE_POLEARM);
ModelPredicateProviderRegistry.register(UItems.GEMSTONE, new Identifier("affinity"), (stack, world, entity, seed) -> EnchantableItem.isEnchanted(stack) ? EnchantableItem.getSpellKey(stack).getAffinity().getAlignment() : 0);
ModelPredicateProviderRegistry.register(UItems.ROCK_CANDY, new Identifier("count"), (stack, world, entity, seed) -> stack.getCount() / (float)stack.getMaxCount());
ColorProviderRegistry.BLOCK.register(URenderers::getTintedBlockColor, TintedBlock.REGISTRY.stream().toArray(Block[]::new));
ColorProviderRegistry.ITEM.register((stack, i) -> getTintedBlockColor(Block.getBlockFromItem(stack.getItem()).getDefaultState(), null, null, i), TintedBlock.REGISTRY.stream().map(Block::asItem).filter(i -> i != Items.AIR).toArray(Item[]::new));
ColorProviderRegistry.ITEM.register((stack, i) -> i > 0 ? -1 : ((DyeableItem)stack.getItem()).getColor(stack), UItems.FRIENDSHIP_BRACELET);
BuiltinItemRendererRegistry.INSTANCE.register(UItems.FILLED_JAR, (stack, mode, matrices, vertices, light, overlay) -> {
ItemRenderer renderer = MinecraftClient.getInstance().getItemRenderer();
ChameleonItem item = (ChameleonItem)stack.getItem();
// Reset stuff done in the beforelands
matrices.pop();
if (mode == ModelTransformationMode.GUI) {
DiffuseLighting.disableGuiDepthLighting();
}
VertexConsumerProvider.Immediate immediate = MinecraftClient.getInstance().getBufferBuilders().getEntityVertexConsumers();
ClientWorld world = MinecraftClient.getInstance().world;
if (item.hasAppearance(stack)) {
matrices.push();
if (mode.isFirstPerson()) {
matrices.translate(0.05, 0.06, 0.06);
} else if (mode == ModelTransformationMode.HEAD) {
matrices.translate(0, 0.4, 0);
} else if (mode == ModelTransformationMode.GROUND
|| mode == ModelTransformationMode.THIRD_PERSON_LEFT_HAND || mode == ModelTransformationMode.THIRD_PERSON_RIGHT_HAND) {
matrices.translate(0, 0.06, 0);
}
// GUI, FIXED, NONE - translate(0, 0, 0)
//matrices.scale(0.5F, 0.5F, 0.5F);
float scale = 0.5F;
matrices.scale(scale, scale, scale);
ItemStack appearance = item.getAppearanceStack(stack);
renderer.renderItem(appearance, mode, light, overlay, matrices, immediate, world, 0);
matrices.pop();
}
renderer.renderItem(item.createAppearanceStack(stack, UItems.EMPTY_JAR), mode, light, OverlayTexture.DEFAULT_UV, matrices, vertices, world, 0);
if (mode == ModelTransformationMode.GUI) {
DiffuseLighting.enableGuiDepthLighting();
}
matrices.push();
});
BuiltinItemRendererRegistry.INSTANCE.register(UItems.CLOUD_BED, (stack, mode, matrices, vertices, light, overlay) -> {
MinecraftClient.getInstance().getBlockEntityRenderDispatcher().renderEntity(((CloudBedItem)stack.getItem()).getRenderEntity(), matrices, vertices, light, overlay);
});
PolearmRenderer.register(UItems.WOODEN_POLEARM);
PolearmRenderer.register(UItems.STONE_POLEARM);
PolearmRenderer.register(UItems.IRON_POLEARM);
PolearmRenderer.register(UItems.GOLDEN_POLEARM);
PolearmRenderer.register(UItems.DIAMOND_POLEARM);
PolearmRenderer.register(UItems.NETHERITE_POLEARM);
ModelPredicateProviderRegistry.register(UItems.GEMSTONE, new Identifier("affinity"), (stack, world, entity, seed) -> {
return EnchantableItem.isEnchanted(stack) ? EnchantableItem.getSpellKey(stack).getAffinity().getAlignment() : 0;
});
ModelPredicateProviderRegistry.register(UItems.ROCK_CANDY, new Identifier("count"), (stack, world, entity, seed) -> {
return stack.getCount() / (float)stack.getMaxCount();
});
ColorProviderRegistry.ITEM.register((stack, i) -> {
return i > 0 || !EnchantableItem.isEnchanted(stack) ? -1 : EnchantableItem.getSpellKey(stack).getColor();
}, UItems.GEMSTONE);
ColorProviderRegistry.ITEM.register((stack, i) -> {
if (i == 1 && EnchantableItem.isEnchanted(stack)) {
return EnchantableItem.getSpellKey(stack).getColor();
}
return -1;
}, UItems.MAGIC_STAFF);
BlockColorProvider tintedProvider = (state, view, pos, color) -> {
if (view == null || pos == null) {
color = FoliageColors.getDefaultColor();
} else {
color = BiomeColors.getFoliageColor(view, pos);
}
if (state.getBlock() instanceof TintedBlock block) {
return block.getTint(state, view, pos, color);
}
return color;
};
ColorProviderRegistry.BLOCK.register(tintedProvider, TintedBlock.REGISTRY.stream().toArray(Block[]::new));
ColorProviderRegistry.ITEM.register((stack, i) -> {
return tintedProvider.getColor(Block.getBlockFromItem(stack.getItem()).getDefaultState(), null, null, i);
}, TintedBlock.REGISTRY.stream().map(Block::asItem).filter(i -> i != Items.AIR).toArray(Item[]::new));
ColorProviderRegistry.ITEM.register((stack, i) -> i > 0 || !EnchantableItem.isEnchanted(stack) ? -1 : EnchantableItem.getSpellKey(stack).getColor(), UItems.GEMSTONE);
ColorProviderRegistry.ITEM.register((stack, i) -> i == 1 && EnchantableItem.isEnchanted(stack) ? EnchantableItem.getSpellKey(stack).getColor() : -1, UItems.MAGIC_STAFF);
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), UBlocks.TRANSLUCENT_BLOCKS.stream().toArray(Block[]::new));
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getTranslucent(), UBlocks.SEMI_TRANSPARENT_BLOCKS.stream().toArray(Block[]::new));
@ -190,6 +116,73 @@ public interface URenderers {
SpellRendererFactory.bootstrap();
}
private static void register(DynamicItemRenderer renderer, ItemConvertible...items) {
for (ItemConvertible item : items) {
BuiltinItemRendererRegistry.INSTANCE.register(item, renderer);
}
}
private static void renderBedItem(ItemStack stack, ModelTransformationMode mode, MatrixStack matrices, VertexConsumerProvider vertices, int light, int overlay) {
MinecraftClient.getInstance().getBlockEntityRenderDispatcher().renderEntity(((CloudBedItem)stack.getItem()).getRenderEntity(), matrices, vertices, light, overlay);
}
private static void renderJarItem(ItemStack stack, ModelTransformationMode mode, MatrixStack matrices, VertexConsumerProvider vertices, int light, int overlay) {
ItemRenderer renderer = MinecraftClient.getInstance().getItemRenderer();
ChameleonItem item = (ChameleonItem)stack.getItem();
// Reset stuff done in the beforelands
matrices.pop();
if (mode == ModelTransformationMode.GUI) {
DiffuseLighting.disableGuiDepthLighting();
}
VertexConsumerProvider.Immediate immediate = MinecraftClient.getInstance().getBufferBuilders().getEntityVertexConsumers();
ClientWorld world = MinecraftClient.getInstance().world;
if (item.hasAppearance(stack)) {
matrices.push();
if (mode.isFirstPerson()) {
matrices.translate(0.05, 0.06, 0.06);
} else if (mode == ModelTransformationMode.HEAD) {
matrices.translate(0, 0.4, 0);
} else if (mode == ModelTransformationMode.GROUND
|| mode == ModelTransformationMode.THIRD_PERSON_LEFT_HAND || mode == ModelTransformationMode.THIRD_PERSON_RIGHT_HAND) {
matrices.translate(0, 0.06, 0);
}
// GUI, FIXED, NONE - translate(0, 0, 0)
//matrices.scale(0.5F, 0.5F, 0.5F);
float scale = 0.5F;
matrices.scale(scale, scale, scale);
ItemStack appearance = item.getAppearanceStack(stack);
renderer.renderItem(appearance, mode, light, overlay, matrices, immediate, world, 0);
matrices.pop();
}
renderer.renderItem(item.createAppearanceStack(stack, UItems.EMPTY_JAR), mode, light, OverlayTexture.DEFAULT_UV, matrices, vertices, world, 0);
if (mode == ModelTransformationMode.GUI) {
DiffuseLighting.enableGuiDepthLighting();
}
matrices.push();
}
private static int getTintedBlockColor(BlockState state, @Nullable BlockRenderView view, @Nullable BlockPos pos, int color) {
if (view == null || pos == null) {
color = FoliageColors.getDefaultColor();
} else {
color = BiomeColors.getFoliageColor(view, pos);
}
if (state.getBlock() instanceof TintedBlock block) {
return block.getTint(state, view, pos, color);
}
return color;
}
static <T extends ParticleEffect> PendingParticleFactory<T> createFactory(ParticleSupplier<T> supplier) {
return provider -> (effect, world, x, y, z, dx, dy, dz) -> supplier.get(effect, provider, world, x, y, z, dx, dy, dz);
}

View file

@ -24,8 +24,10 @@ public class AccessoryFeatureRenderer<
private static final List<FeatureFactory<?>> REGISTRY = new ArrayList<>();
public static <T extends LivingEntity> void register(FeatureFactory<T> factory) {
REGISTRY.add(factory);
public static void register(FeatureFactory<?>...factories) {
for (var factory : factories) {
REGISTRY.add(factory);
}
}
private final Iterable<Feature<T>> features;

View file

@ -4,6 +4,7 @@ import net.fabricmc.fabric.api.client.model.ModelLoadingRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.BuiltinItemRendererRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.BuiltinItemRendererRegistry.DynamicItemRenderer;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.item.ClampedModelPredicateProvider;
import net.minecraft.client.item.ModelPredicateProviderRegistry;
import net.minecraft.client.model.*;
import net.minecraft.client.render.VertexConsumerProvider;
@ -20,19 +21,23 @@ import net.minecraft.util.Identifier;
import net.minecraft.util.math.RotationAxis;
import net.minecraft.registry.Registries;
public class PolearmRenderer implements DynamicItemRenderer {
public class PolearmRenderer implements DynamicItemRenderer, ClampedModelPredicateProvider {
private static final PolearmRenderer INSTANCE = new PolearmRenderer();
private static final Identifier THROWING = new Identifier("throwing");
private final TridentEntityModel model = new TridentEntityModel(getTexturedModelData().createModel());
public static void register(Item item) {
BuiltinItemRendererRegistry.INSTANCE.register(item, INSTANCE);
ModelPredicateProviderRegistry.register(item, THROWING, (ItemStack stack, ClientWorld world, LivingEntity entity, int seed) -> {
return entity != null && entity.isUsingItem() && entity.getActiveItem() == stack ? 1 : 0;
public static void register(Item...items) {
for (Item item : items) {
BuiltinItemRendererRegistry.INSTANCE.register(item, INSTANCE);
ModelPredicateProviderRegistry.register(item, THROWING, INSTANCE);
}
ModelLoadingRegistry.INSTANCE.registerModelProvider((renderer, out) -> {
for (Item item : items) {
out.accept(getModelId(item));
}
});
ModelLoadingRegistry.INSTANCE.registerModelProvider((renderer, out) -> out.accept(getModelId(item)));
}
static ModelIdentifier getModelId(ItemConvertible item) {
@ -52,6 +57,11 @@ public class PolearmRenderer implements DynamicItemRenderer {
return TexturedModelData.of(data, 32, 32);
}
@Override
public float unclampedCall(ItemStack stack, ClientWorld world, LivingEntity entity, int seed) {
return entity != null && entity.isUsingItem() && entity.getActiveItem() == stack ? 1 : 0;
}
@Override
public void render(ItemStack stack, ModelTransformationMode mode, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) {

View file

@ -30,8 +30,6 @@ import net.minecraft.util.math.RotationAxis;
import net.minecraft.world.World;
public class CloudBedBlockEntityRenderer implements BlockEntityRenderer<CloudBedBlock.Tile> {
private static final Identifier TEXTURE = Unicopia.id("textures/entity/cloud_bed/white.png");
private final ModelPart bedHead;
private final ModelPart bedFoot;
@ -66,9 +64,10 @@ public class CloudBedBlockEntityRenderer implements BlockEntityRenderer<CloudBed
public void render(CloudBedBlock.Tile entity, float f, MatrixStack matrices, VertexConsumerProvider vertices, int light, int overlay) {
@Nullable
World world = entity.getWorld();
Identifier texture = Unicopia.id("textures/entity/cloud_bed/" + entity.getColor().asString() + ".png");
if (world == null) {
renderModel(matrices, vertices, bedHead, Direction.SOUTH, TEXTURE, light, overlay, false);
renderModel(matrices, vertices, bedFoot, Direction.SOUTH, TEXTURE, light, overlay, true);
renderModel(matrices, vertices, bedHead, Direction.SOUTH, texture, light, overlay, false);
renderModel(matrices, vertices, bedFoot, Direction.SOUTH, texture, light, overlay, true);
return;
}
@ -77,7 +76,7 @@ public class CloudBedBlockEntityRenderer implements BlockEntityRenderer<CloudBed
renderModel(matrices, vertices,
state.get(BedBlock.PART) == BedPart.HEAD ? bedHead : bedFoot,
state.get(BedBlock.FACING),
TEXTURE,
texture,
getModelLight(entity, light),
overlay,
false

View file

@ -179,7 +179,8 @@ public interface UItems {
Item CARAPACE = register("carapace", new Item(new Item.Settings()), ItemGroups.INGREDIENTS);
Item CLOUD_BED = register("cloud_bed", new CloudBedItem(UBlocks.CLOUD_BED, new Item.Settings().maxCount(1)), ItemGroups.FUNCTIONAL);
Item WHITE_CLOUD_BED = register("white_cloud_bed", new CloudBedItem(UBlocks.WHITE_CLOUD_BED, new Item.Settings().maxCount(1)), ItemGroups.FUNCTIONAL);
Item ORANGE_CLOUD_BED = register("orange_cloud_bed", new CloudBedItem(UBlocks.ORANGE_CLOUD_BED, new Item.Settings().maxCount(1)), ItemGroups.FUNCTIONAL);
Item ALICORN_BADGE = register(Race.ALICORN);
Item PEGASUS_BADGE = register(Race.PEGASUS);

View file

@ -0,0 +1,10 @@
{
"variants": {
"facing=up": { "model": "unicopia:block/carved_cloud" },
"facing=down": { "model": "unicopia:block/carved_cloud", "x": 180 },
"facing=north": { "model": "unicopia:block/carved_cloud", "x": 90 },
"facing=south": { "model": "unicopia:block/carved_cloud", "x": -90 },
"facing=east": { "model": "unicopia:block/carved_cloud", "x": 90, "y": 90 },
"facing=west": { "model": "unicopia:block/carved_cloud", "x": 90, "y": -90 }
}
}

View file

@ -1,5 +0,0 @@
{
"variants": {
"": { "model": "unicopia:block/cloud_bed" }
}
}

View file

@ -0,0 +1,7 @@
{
"variants": {
"type=double": { "model": "unicopia:block/cloud_bricks" },
"type=bottom": { "model": "unicopia:block/cloud_brick_slab" },
"type=top": { "model": "unicopia:block/cloud_brick_slab_top" }
}
}

View file

@ -1,206 +1,206 @@
{
"variants": {
"facing=east,half=bottom,shape=inner_left": {
"model": "unicopia:block/cloud_planks_stairs_inner",
"model": "unicopia:block/cloud_brick_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=inner_right": {
"model": "unicopia:block/cloud_planks_stairs_inner"
"model": "unicopia:block/cloud_brick_stairs_inner"
},
"facing=east,half=bottom,shape=outer_left": {
"model": "unicopia:block/cloud_planks_stairs_outer",
"model": "unicopia:block/cloud_brick_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=outer_right": {
"model": "unicopia:block/cloud_planks_stairs_outer"
"model": "unicopia:block/cloud_brick_stairs_outer"
},
"facing=east,half=bottom,shape=straight": {
"model": "unicopia:block/cloud_planks_stairs"
"model": "unicopia:block/cloud_brick_stairs"
},
"facing=east,half=top,shape=inner_left": {
"model": "unicopia:block/cloud_planks_stairs_inner",
"model": "unicopia:block/cloud_brick_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=inner_right": {
"model": "unicopia:block/cloud_planks_stairs_inner",
"model": "unicopia:block/cloud_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=outer_left": {
"model": "unicopia:block/cloud_planks_stairs_outer",
"model": "unicopia:block/cloud_brick_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=outer_right": {
"model": "unicopia:block/cloud_planks_stairs_outer",
"model": "unicopia:block/cloud_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=straight": {
"model": "unicopia:block/cloud_planks_stairs",
"model": "unicopia:block/cloud_brick_stairs",
"uvlock": true,
"x": 180
},
"facing=north,half=bottom,shape=inner_left": {
"model": "unicopia:block/cloud_planks_stairs_inner",
"model": "unicopia:block/cloud_brick_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=inner_right": {
"model": "unicopia:block/cloud_planks_stairs_inner",
"model": "unicopia:block/cloud_brick_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=outer_left": {
"model": "unicopia:block/cloud_planks_stairs_outer",
"model": "unicopia:block/cloud_brick_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=outer_right": {
"model": "unicopia:block/cloud_planks_stairs_outer",
"model": "unicopia:block/cloud_brick_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=straight": {
"model": "unicopia:block/cloud_planks_stairs",
"model": "unicopia:block/cloud_brick_stairs",
"uvlock": true,
"y": 270
},
"facing=north,half=top,shape=inner_left": {
"model": "unicopia:block/cloud_planks_stairs_inner",
"model": "unicopia:block/cloud_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=inner_right": {
"model": "unicopia:block/cloud_planks_stairs_inner",
"model": "unicopia:block/cloud_brick_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=outer_left": {
"model": "unicopia:block/cloud_planks_stairs_outer",
"model": "unicopia:block/cloud_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=outer_right": {
"model": "unicopia:block/cloud_planks_stairs_outer",
"model": "unicopia:block/cloud_brick_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=straight": {
"model": "unicopia:block/cloud_planks_stairs",
"model": "unicopia:block/cloud_brick_stairs",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=south,half=bottom,shape=inner_left": {
"model": "unicopia:block/cloud_planks_stairs_inner"
"model": "unicopia:block/cloud_brick_stairs_inner"
},
"facing=south,half=bottom,shape=inner_right": {
"model": "unicopia:block/cloud_planks_stairs_inner",
"model": "unicopia:block/cloud_brick_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=outer_left": {
"model": "unicopia:block/cloud_planks_stairs_outer"
"model": "unicopia:block/cloud_brick_stairs_outer"
},
"facing=south,half=bottom,shape=outer_right": {
"model": "unicopia:block/cloud_planks_stairs_outer",
"model": "unicopia:block/cloud_brick_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=straight": {
"model": "unicopia:block/cloud_planks_stairs",
"model": "unicopia:block/cloud_brick_stairs",
"uvlock": true,
"y": 90
},
"facing=south,half=top,shape=inner_left": {
"model": "unicopia:block/cloud_planks_stairs_inner",
"model": "unicopia:block/cloud_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=inner_right": {
"model": "unicopia:block/cloud_planks_stairs_inner",
"model": "unicopia:block/cloud_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=outer_left": {
"model": "unicopia:block/cloud_planks_stairs_outer",
"model": "unicopia:block/cloud_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=outer_right": {
"model": "unicopia:block/cloud_planks_stairs_outer",
"model": "unicopia:block/cloud_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=straight": {
"model": "unicopia:block/cloud_planks_stairs",
"model": "unicopia:block/cloud_brick_stairs",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=west,half=bottom,shape=inner_left": {
"model": "unicopia:block/cloud_planks_stairs_inner",
"model": "unicopia:block/cloud_brick_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=inner_right": {
"model": "unicopia:block/cloud_planks_stairs_inner",
"model": "unicopia:block/cloud_brick_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=outer_left": {
"model": "unicopia:block/cloud_planks_stairs_outer",
"model": "unicopia:block/cloud_brick_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=outer_right": {
"model": "unicopia:block/cloud_planks_stairs_outer",
"model": "unicopia:block/cloud_brick_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=straight": {
"model": "unicopia:block/cloud_planks_stairs",
"model": "unicopia:block/cloud_brick_stairs",
"uvlock": true,
"y": 180
},
"facing=west,half=top,shape=inner_left": {
"model": "unicopia:block/cloud_planks_stairs_inner",
"model": "unicopia:block/cloud_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=inner_right": {
"model": "unicopia:block/cloud_planks_stairs_inner",
"model": "unicopia:block/cloud_brick_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=outer_left": {
"model": "unicopia:block/cloud_planks_stairs_outer",
"model": "unicopia:block/cloud_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=outer_right": {
"model": "unicopia:block/cloud_planks_stairs_outer",
"model": "unicopia:block/cloud_brick_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=straight": {
"model": "unicopia:block/cloud_planks_stairs",
"model": "unicopia:block/cloud_brick_stairs",
"uvlock": true,
"x": 180,
"y": 180

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "unicopia:block/cloud_bricks" }
}
}

View file

@ -0,0 +1,7 @@
{
"variants": {
"type=double": { "model": "unicopia:block/cloud_planks" },
"type=bottom": { "model": "unicopia:block/cloud_plank_slab" },
"type=top": { "model": "unicopia:block/cloud_plank_slab_top" }
}
}

View file

@ -0,0 +1,209 @@
{
"variants": {
"facing=east,half=bottom,shape=inner_left": {
"model": "unicopia:block/cloud_plank_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=inner_right": {
"model": "unicopia:block/cloud_plank_stairs_inner"
},
"facing=east,half=bottom,shape=outer_left": {
"model": "unicopia:block/cloud_plank_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=east,half=bottom,shape=outer_right": {
"model": "unicopia:block/cloud_plank_stairs_outer"
},
"facing=east,half=bottom,shape=straight": {
"model": "unicopia:block/cloud_plank_stairs"
},
"facing=east,half=top,shape=inner_left": {
"model": "unicopia:block/cloud_plank_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=inner_right": {
"model": "unicopia:block/cloud_plank_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=outer_left": {
"model": "unicopia:block/cloud_plank_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=east,half=top,shape=outer_right": {
"model": "unicopia:block/cloud_plank_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=east,half=top,shape=straight": {
"model": "unicopia:block/cloud_plank_stairs",
"uvlock": true,
"x": 180
},
"facing=north,half=bottom,shape=inner_left": {
"model": "unicopia:block/cloud_plank_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=inner_right": {
"model": "unicopia:block/cloud_plank_stairs_inner",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=outer_left": {
"model": "unicopia:block/cloud_plank_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=north,half=bottom,shape=outer_right": {
"model": "unicopia:block/cloud_plank_stairs_outer",
"uvlock": true,
"y": 270
},
"facing=north,half=bottom,shape=straight": {
"model": "unicopia:block/cloud_plank_stairs",
"uvlock": true,
"y": 270
},
"facing=north,half=top,shape=inner_left": {
"model": "unicopia:block/cloud_plank_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=inner_right": {
"model": "unicopia:block/cloud_plank_stairs_inner",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=outer_left": {
"model": "unicopia:block/cloud_plank_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=north,half=top,shape=outer_right": {
"model": "unicopia:block/cloud_plank_stairs_outer",
"uvlock": true,
"x": 180
},
"facing=north,half=top,shape=straight": {
"model": "unicopia:block/cloud_plank_stairs",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=south,half=bottom,shape=inner_left": {
"model": "unicopia:block/cloud_plank_stairs_inner"
},
"facing=south,half=bottom,shape=inner_right": {
"model": "unicopia:block/cloud_plank_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=outer_left": {
"model": "unicopia:block/cloud_plank_stairs_outer"
},
"facing=south,half=bottom,shape=outer_right": {
"model": "unicopia:block/cloud_plank_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=south,half=bottom,shape=straight": {
"model": "unicopia:block/cloud_plank_stairs",
"uvlock": true,
"y": 90
},
"facing=south,half=top,shape=inner_left": {
"model": "unicopia:block/cloud_plank_stairs_inner",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=inner_right": {
"model": "unicopia:block/cloud_plank_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=outer_left": {
"model": "unicopia:block/cloud_plank_stairs_outer",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=south,half=top,shape=outer_right": {
"model": "unicopia:block/cloud_plank_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=south,half=top,shape=straight": {
"model": "unicopia:block/cloud_plank_stairs",
"uvlock": true,
"x": 180,
"y": 90
},
"facing=west,half=bottom,shape=inner_left": {
"model": "unicopia:block/cloud_plank_stairs_inner",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=inner_right": {
"model": "unicopia:block/cloud_plank_stairs_inner",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=outer_left": {
"model": "unicopia:block/cloud_plank_stairs_outer",
"uvlock": true,
"y": 90
},
"facing=west,half=bottom,shape=outer_right": {
"model": "unicopia:block/cloud_plank_stairs_outer",
"uvlock": true,
"y": 180
},
"facing=west,half=bottom,shape=straight": {
"model": "unicopia:block/cloud_plank_stairs",
"uvlock": true,
"y": 180
},
"facing=west,half=top,shape=inner_left": {
"model": "unicopia:block/cloud_plank_stairs_inner",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=inner_right": {
"model": "unicopia:block/cloud_plank_stairs_inner",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=outer_left": {
"model": "unicopia:block/cloud_plank_stairs_outer",
"uvlock": true,
"x": 180,
"y": 180
},
"facing=west,half=top,shape=outer_right": {
"model": "unicopia:block/cloud_plank_stairs_outer",
"uvlock": true,
"x": 180,
"y": 270
},
"facing=west,half=top,shape=straight": {
"model": "unicopia:block/cloud_plank_stairs",
"uvlock": true,
"x": 180,
"y": 180
}
}
}

View file

@ -1,7 +0,0 @@
{
"variants": {
"type=double": { "model": "unicopia:block/cloud_planks" },
"type=bottom": { "model": "unicopia:block/cloud_planks_slab" },
"type=top": { "model": "unicopia:block/cloud_planks_slab_top" }
}
}

View file

@ -0,0 +1,268 @@
{
"multipart": [
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_full", "uvlock": true },
"when": { "down": true, "north": true, "east": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_x", "uvlock": true },
"when": { "down": true, "north": true, "east": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_y", "uvlock": true },
"when": { "down": false, "north": true, "east": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_z", "uvlock": true },
"when": { "down": true, "north": false, "east": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xz", "uvlock": true },
"when": { "down": true, "north": false, "east": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xy", "uvlock": true },
"when": { "down": false, "north": true, "east": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_yz", "uvlock": true },
"when": { "down": false, "north": false, "east": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xyz", "uvlock": true },
"when": { "down": false, "north": false, "east": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_full", "uvlock": true, "y": 90 },
"when": { "down": true, "south": true, "east": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_z", "uvlock": true, "y": 90 },
"when": { "down": true, "south": true, "east": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_y", "uvlock": true, "y": 90 },
"when": { "down": false, "south": true, "east": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_x", "uvlock": true, "y": 90 },
"when": { "down": true, "south": false, "east": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xz", "uvlock": true, "y": 90 },
"when": { "down": true, "south": false, "east": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_yz", "uvlock": true, "y": 90 },
"when": { "down": false, "south": true, "east": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xy", "uvlock": true, "y": 90 },
"when": { "down": false, "south": false, "east": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xyz", "uvlock": true, "y": 90 },
"when": { "down": false, "south": false, "east": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_full", "uvlock": true, "y": 180 },
"when": { "down": true, "south": true, "west": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_x", "uvlock": true, "y": 180 },
"when": { "down": true, "south": true, "west": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_y", "uvlock": true, "y": 180 },
"when": { "down": false, "south": true, "west": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_z", "uvlock": true, "y": 180 },
"when": { "down": true, "south": false, "west": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xz", "uvlock": true, "y": 180 },
"when": { "down": true, "south": false, "west": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xy", "uvlock": true, "y": 180 },
"when": { "down": false, "south": true, "west": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_yz", "uvlock": true, "y": 180 },
"when": { "down": false, "south": false, "west": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xyz", "uvlock": true, "y": 180 },
"when": { "down": false, "south": false, "west": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_full", "uvlock": true, "y": 270 },
"when": { "down": true, "north": true, "west": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_z", "uvlock": true, "y": 270 },
"when": { "down": true, "north": true, "west": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_y", "uvlock": true, "y": 270 },
"when": { "down": false, "north": true, "west": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_x", "uvlock": true, "y": 270 },
"when": { "down": true, "north": false, "west": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xz", "uvlock": true, "y": 270 },
"when": { "down": true, "north": false, "west": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_yz", "uvlock": true, "y": 270 },
"when": { "down": false, "north": true, "west": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xy", "uvlock": true, "y": 270 },
"when": { "down": false, "north": false, "west": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xyz", "uvlock": true, "y": 270 },
"when": { "down": false, "north": false, "west": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_full", "uvlock": true, "x": 180 },
"when": { "up": true, "south": true, "east": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_x", "uvlock": true, "x": 180 },
"when": { "up": true, "south": true, "east": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_y", "uvlock": true, "x": 180 },
"when": { "up": false, "south": true, "east": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_z", "uvlock": true, "x": 180 },
"when": { "up": true, "south": false, "east": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xz", "uvlock": true, "x": 180 },
"when": { "up": true, "south": false, "east": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xy", "uvlock": true, "x": 180 },
"when": { "up": false, "south": true, "east": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_yz", "uvlock": true, "x": 180 },
"when": { "up": false, "south": false, "east": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xyz", "uvlock": true, "x": 180 },
"when": { "up": false, "south": false, "east": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_full", "uvlock": true, "x": 180, "y": 90 },
"when": { "up": true, "south": true, "west": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_z", "uvlock": true, "x": 180, "y": 90 },
"when": { "up": true, "south": true, "west": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_y", "uvlock": true, "x": 180, "y": 90 },
"when": { "up": false, "south": true, "west": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_x", "uvlock": true, "x": 180, "y": 90 },
"when": { "up": true, "south": false, "west": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xz", "uvlock": true, "x": 180, "y": 90 },
"when": { "up": true, "south": false, "west": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_yz", "uvlock": true, "x": 180, "y": 90 },
"when": { "up": false, "south": true, "west": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xy", "uvlock": true, "x": 180, "y": 90 },
"when": { "up": false, "south": false, "west": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xyz", "uvlock": true, "x": 180, "y": 90 },
"when": { "up": false, "south": false, "west": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_full", "uvlock": true, "x": 180, "y": 180 },
"when": { "up": true, "north": true, "west": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_x", "uvlock": true, "x": 180, "y": 180 },
"when": { "up": true, "north": true, "west": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_y", "uvlock": true, "x": 180, "y": 180 },
"when": { "up": false, "north": true, "west": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_z", "uvlock": true, "x": 180, "y": 180 },
"when": { "up": true, "north": false, "west": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xz", "uvlock": true, "x": 180, "y": 180 },
"when": { "up": true, "north": false, "west": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xy", "uvlock": true, "x": 180, "y": 180 },
"when": { "up": false, "north": true, "west": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_yz", "uvlock": true, "x": 180, "y": 180 },
"when": { "up": false, "north": false, "west": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xyz", "uvlock": true, "x": 180, "y": 180 },
"when": { "up": false, "north": false, "west": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_full", "uvlock": true, "x": 180, "y": 270 },
"when": { "up": true, "north": true, "east": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_z", "uvlock": true, "x": 180, "y": 270 },
"when": { "up": true, "north": true, "east": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_y", "uvlock": true, "x": 180, "y": 270 },
"when": { "up": false, "north": true, "east": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_x", "uvlock": true, "x": 180, "y": 270 },
"when": { "up": true, "north": false, "east": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xz", "uvlock": true, "x": 180, "y": 270 },
"when": { "up": true, "north": false, "east": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_yz", "uvlock": true, "x": 180, "y": 270 },
"when": { "up": false, "north": true, "east": false }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xy", "uvlock": true, "x": 180, "y": 270 },
"when": { "up": false, "north": false, "east": true }
},
{
"apply": { "model": "unicopia:block/flattened_cloud_bricks_corner_xyz", "uvlock": true, "x": 180, "y": 270 },
"when": { "up": false, "north": false, "east": false }
}
]
}

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "unicopia:block/orange_cloud_bed" }
}
}

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "unicopia:block/white_cloud_bed" }
}
}

View file

@ -240,8 +240,13 @@
"block.unicopia.soggy_cloud_slab": "Soggy Cloud Slab",
"block.unicopia.soggy_cloud_stairs": "Soggy Cloud Stairs",
"block.unicopia.cloud_planks": "Cloud Planks",
"block.unicopia.cloud_planks_slab": "Cloud Plank Slab",
"block.unicopia.cloud_planks_stairs": "Cloud Plank Stairs",
"block.unicopia.cloud_plank_slab": "Cloud Plank Slab",
"block.unicopia.cloud_plank_stairs": "Cloud Plank Stairs",
"block.unicopia.cloud_bricks": "Cloud Bricks",
"block.unicopia.cloud_brick_slab": "Cloud Plank Slab",
"block.unicopia.cloud_brick_stairs": "Cloud Plank Stairs",
"block.unicopia.carved_cloud": "Carved Cloud",
"block.unicopia.compacted_cloud_bricks": "Cloud Bricks",
"block.unicopia.compacted_cloud_planks": "Cloud Planks",
"block.unicopia.unstable_cloud": "Unstable Cloud",
"block.unicopia.dense_cloud": "Dense Cloud",

View file

@ -0,0 +1,8 @@
{
"parent": "minecraft:block/cube_bottom_top",
"textures": {
"bottom": "unicopia:block/carved_cloud_top",
"top": "unicopia:block/carved_cloud_top",
"side": "unicopia:block/carved_cloud"
}
}

View file

@ -0,0 +1,8 @@
{
"parent": "minecraft:block/slab",
"textures": {
"bottom": "unicopia:block/cloud_bricks",
"side": "unicopia:block/cloud_bricks",
"top": "unicopia:block/cloud_bricks"
}
}

View file

@ -0,0 +1,8 @@
{
"parent": "minecraft:block/slab_top",
"textures": {
"bottom": "unicopia:block/cloud_bricks",
"side": "unicopia:block/cloud_bricks",
"top": "unicopia:block/cloud_bricks"
}
}

View file

@ -0,0 +1,8 @@
{
"parent": "unicopia:block/cloud_stairs",
"textures": {
"bottom": "unicopia:block/cloud_bricks",
"side": "unicopia:block/cloud_bricks",
"top": "unicopia:block/cloud_bricks"
}
}

View file

@ -0,0 +1,8 @@
{
"parent": "unicopia:block/cloud_stairs_inner",
"textures": {
"bottom": "unicopia:block/cloud_bricks",
"side": "unicopia:block/cloud_bricks",
"top": "unicopia:block/cloud_bricks"
}
}

View file

@ -0,0 +1,8 @@
{
"parent": "unicopia:block/cloud_stairs_outer",
"textures": {
"bottom": "unicopia:block/cloud_bricks",
"side": "unicopia:block/cloud_bricks",
"top": "unicopia:block/cloud_bricks"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "unicopia:block/cloud_bricks"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "unicopia:block/flattened_cloud_corner_full",
"textures": {
"all": "unicopia:block/cloud_bricks"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "unicopia:block/flattened_cloud_corner_x",
"textures": {
"all": "unicopia:block/cloud_bricks"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "unicopia:block/flattened_cloud_corner_xy",
"textures": {
"all": "unicopia:block/cloud_bricks"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "unicopia:block/flattened_cloud_corner_xyz",
"textures": {
"all": "unicopia:block/cloud_bricks"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "unicopia:block/flattened_cloud_corner_xz",
"textures": {
"all": "unicopia:block/cloud_bricks"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "unicopia:block/flattened_cloud_corner_y",
"textures": {
"all": "unicopia:block/cloud_bricks"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "unicopia:block/flattened_cloud_corner_yz",
"textures": {
"all": "unicopia:block/cloud_bricks"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "unicopia:block/flattened_cloud_corner_z",
"textures": {
"all": "unicopia:block/cloud_bricks"
}
}

View file

@ -0,0 +1,5 @@
{
"textures": {
"particle": "unicopia:block/cloud"
}
}

View file

@ -0,0 +1,3 @@
{
"parent": "unicopia:block/carved_cloud"
}

View file

@ -0,0 +1,3 @@
{
"parent": "unicopia:block/cloud_brick_slab"
}

View file

@ -0,0 +1,3 @@
{
"parent": "unicopia:block/cloud_brick_stairs"
}

View file

@ -0,0 +1,3 @@
{
"parent": "unicopia:block/cloud_bricks"
}

View file

@ -0,0 +1,3 @@
{
"parent": "unicopia:block/cloud_plank_slab"
}

View file

@ -0,0 +1,3 @@
{
"parent": "unicopia:block/cloud_plank_stairs"
}

View file

@ -1,3 +0,0 @@
{
"parent": "unicopia:block/cloud_planks_slab"
}

View file

@ -1,3 +0,0 @@
{
"parent": "unicopia:block/cloud_planks_stairs"
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/template_bed",
"textures": {
"particle": "minecraft:item/orange_wool"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View file

@ -0,0 +1,30 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"unicopia:blocks/cloud_brick_slab"
]
},
"criteria": {
"has_ingredients": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "item": "unicopia:cloud_bricks" }
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "unicopia:blocks/cloud_brick_slab"
}
}
},
"requirements": [
[
"has_ingredients",
"has_the_recipe"
]
]
}

View file

@ -0,0 +1,30 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"unicopia:blocks/cloud_brick_stairs"
]
},
"criteria": {
"has_ingredients": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "item": "unicopia:cloud_bricks" }
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "unicopia:blocks/cloud_brick_stairs"
}
}
},
"requirements": [
[
"has_ingredients",
"has_the_recipe"
]
]
}

View file

@ -7,7 +7,7 @@
"entries": [
{
"type": "minecraft:item",
"name": "unicopia:cloud_planks_slab",
"name": "unicopia:cloud_brick_slab",
"functions": [
{
"add": false,
@ -15,7 +15,7 @@
"function": "minecraft:set_count",
"conditions": [
{
"block": "unicopia:cloud_planks_slab",
"block": "unicopia:cloud_brick_slab",
"condition": "minecraft:block_state_property",
"properties": {
"type": "double"

View file

@ -7,7 +7,7 @@
"entries": [
{
"type": "minecraft:item",
"name": "unicopia:cloud_planks_stairs"
"name": "unicopia:cloud_brick_stairs"
}
],
"conditions": [

View file

@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1.0,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "unicopia:cloud_bricks"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,36 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1.0,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "unicopia:cloud_plank_slab",
"functions": [
{
"add": false,
"count": 2,
"function": "minecraft:set_count",
"conditions": [
{
"block": "unicopia:cloud_plank_slab",
"condition": "minecraft:block_state_property",
"properties": {
"type": "double"
}
}
]
}
]
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1.0,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "unicopia:cloud_plank_stairs"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,29 @@
{
"type": "minecraft:block",
"functions": [
{
"function": "minecraft:explosion_decay"
}
],
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"conditions": [
{
"block": "unicopia:orange_cloud_bed",
"condition": "minecraft:block_state_property",
"properties": {
"part": "head"
}
}
],
"name": "unicopia:orange_cloud_bed"
}
],
"rolls": 1.0
}
]
}

View file

@ -13,14 +13,14 @@
"type": "minecraft:item",
"conditions": [
{
"block": "unicopia:cloud_bed",
"block": "unicopia:white_cloud_bed",
"condition": "minecraft:block_state_property",
"properties": {
"part": "head"
}
}
],
"name": "unicopia:cloud_bed"
"name": "unicopia:white_cloud_bed"
}
],
"rolls": 1.0

View file

@ -0,0 +1,12 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"###"
],
"key": {
"#": [
{ "item": "unicopia:cloud_bricks" }
]
},
"result": { "item": "unicopia:cloud_brick_slab", "count": 6 }
}

View file

@ -0,0 +1,14 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"# ",
"## ",
"###"
],
"key": {
"#": [
{ "item": "unicopia:cloud_bricks" }
]
},
"result": { "item": "unicopia:cloud_brick_stairs", "count": 4 }
}

View file

@ -8,5 +8,5 @@
{ "item": "unicopia:cloud_planks" }
]
},
"result": { "item": "unicopia:cloud_planks_slab", "count": 6 }
"result": { "item": "unicopia:cloud_plank_slab", "count": 6 }
}

View file

@ -10,5 +10,5 @@
{ "item": "unicopia:cloud_planks" }
]
},
"result": { "item": "unicopia:cloud_planks_stairs", "count": 4 }
"result": { "item": "unicopia:cloud_plank_stairs", "count": 4 }
}