Add the rest of the palm wood set

This commit is contained in:
Sollace 2023-08-14 20:31:33 +01:00
parent db52feb6b1
commit e3bb03f53b
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
72 changed files with 786 additions and 50 deletions

View file

@ -1,5 +1,6 @@
package com.minelittlepony.unicopia; package com.minelittlepony.unicopia;
import com.minelittlepony.unicopia.entity.AirBalloonEntity;
import com.minelittlepony.unicopia.entity.UEntities; import com.minelittlepony.unicopia.entity.UEntities;
import net.minecraft.entity.vehicle.BoatEntity; import net.minecraft.entity.vehicle.BoatEntity;
@ -20,7 +21,7 @@ public interface Debug {
try { try {
for (var type : BoatEntity.Type.values()) { for (var type : BoatEntity.Type.values()) {
var balloon = UEntities.AIR_BALLOON.create(world); var balloon = UEntities.AIR_BALLOON.create(world);
balloon.setBasketType(type); balloon.setBasketType(AirBalloonEntity.BasketType.of(type));
balloon.asItem(); balloon.asItem();
} }
} catch (Throwable t) { } catch (Throwable t) {

View file

@ -27,6 +27,7 @@ public interface UTags {
TagKey<Item> APPLE_SEEDS = item("apple_seeds"); TagKey<Item> APPLE_SEEDS = item("apple_seeds");
TagKey<Item> ACORNS = item("acorns"); TagKey<Item> ACORNS = item("acorns");
TagKey<Item> BASKETS = item("baskets");
TagKey<Block> GLASS_PANES = block("glass_panes"); TagKey<Block> GLASS_PANES = block("glass_panes");
TagKey<Block> GLASS_BLOCKS = block("glass_blocks"); TagKey<Block> GLASS_BLOCKS = block("glass_blocks");

View file

@ -0,0 +1,13 @@
package com.minelittlepony.unicopia.block;
import net.minecraft.block.Block;
import net.minecraft.block.entity.BlockEntityType;
public interface BlockEntityTypeSupportHelper {
static BlockEntityTypeSupportHelper of(BlockEntityType<?> type) {
return (BlockEntityTypeSupportHelper)type;
}
BlockEntityTypeSupportHelper addSupportedBlocks(Block... blocks);
}

View file

@ -7,12 +7,16 @@ import com.minelittlepony.unicopia.Unicopia;
import com.minelittlepony.unicopia.item.UItems; import com.minelittlepony.unicopia.item.UItems;
import com.minelittlepony.unicopia.item.group.ItemGroupRegistry; import com.minelittlepony.unicopia.item.group.ItemGroupRegistry;
import com.minelittlepony.unicopia.server.world.UTreeGen; import com.minelittlepony.unicopia.server.world.UTreeGen;
import com.terraformersmc.terraform.boat.api.TerraformBoatType;
import com.terraformersmc.terraform.boat.api.TerraformBoatTypeRegistry;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.registry.FlammableBlockRegistry; import net.fabricmc.fabric.api.registry.FlammableBlockRegistry;
import net.fabricmc.fabric.api.registry.StrippableBlockRegistry; import net.fabricmc.fabric.api.registry.StrippableBlockRegistry;
import net.minecraft.block.*; import net.minecraft.block.*;
import net.minecraft.block.AbstractBlock.Settings; import net.minecraft.block.AbstractBlock.Settings;
import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.block.enums.Instrument;
import net.minecraft.block.piston.PistonBehavior; import net.minecraft.block.piston.PistonBehavior;
import net.minecraft.item.*; import net.minecraft.item.*;
import net.minecraft.sound.BlockSoundGroup; import net.minecraft.sound.BlockSoundGroup;
@ -59,15 +63,14 @@ public interface UBlocks {
Block PALM_SLAB = register("palm_slab", new SlabBlock(Settings.create().mapColor(PALM_PLANKS.getDefaultMapColor()).strength(2, 3).sounds(BlockSoundGroup.WOOD).pistonBehavior(PistonBehavior.NORMAL)), ItemGroups.BUILDING_BLOCKS); Block PALM_SLAB = register("palm_slab", new SlabBlock(Settings.create().mapColor(PALM_PLANKS.getDefaultMapColor()).strength(2, 3).sounds(BlockSoundGroup.WOOD).pistonBehavior(PistonBehavior.NORMAL)), ItemGroups.BUILDING_BLOCKS);
Block PALM_FENCE = register("palm_fence", new FenceBlock(Settings.create().mapColor(PALM_PLANKS.getDefaultMapColor()).strength(2, 3).sounds(BlockSoundGroup.WOOD).pistonBehavior(PistonBehavior.NORMAL)), ItemGroups.BUILDING_BLOCKS); Block PALM_FENCE = register("palm_fence", new FenceBlock(Settings.create().mapColor(PALM_PLANKS.getDefaultMapColor()).strength(2, 3).sounds(BlockSoundGroup.WOOD).pistonBehavior(PistonBehavior.NORMAL)), ItemGroups.BUILDING_BLOCKS);
Block PALM_FENCE_GATE = register("palm_fence_gate", new FenceGateBlock(Settings.create().mapColor(PALM_PLANKS.getDefaultMapColor()).strength(2, 3).sounds(BlockSoundGroup.WOOD).pistonBehavior(PistonBehavior.NORMAL), WoodType.OAK), ItemGroups.BUILDING_BLOCKS); Block PALM_FENCE_GATE = register("palm_fence_gate", new FenceGateBlock(Settings.create().mapColor(PALM_PLANKS.getDefaultMapColor()).strength(2, 3).sounds(BlockSoundGroup.WOOD).pistonBehavior(PistonBehavior.NORMAL), WoodType.OAK), ItemGroups.BUILDING_BLOCKS);
// Block PALM_DOOR = register("palm_door", new DoorBlock(Settings.of(Material.WOOD, PALM_PLANKS.getDefaultMapColor()).strength(3.0f).sounds(BlockSoundGroup.WOOD).nonOpaque(), SoundEvents.BLOCK_WOODEN_DOOR_CLOSE, SoundEvents.BLOCK_WOODEN_DOOR_OPEN), ItemGroups.BUILDING_BLOCKS); Block PALM_DOOR = register("palm_door", new DoorBlock(Settings.create().mapColor(PALM_PLANKS.getDefaultMapColor()).instrument(Instrument.BASS).strength(3.0f).nonOpaque().burnable().pistonBehavior(PistonBehavior.DESTROY), UWoodTypes.PALM.setType()), ItemGroups.FUNCTIONAL);
// Block PALM_TRAPDOOR = register("palm_trapdoor", new TrapdoorBlock(Settings.of(Material.WOOD, PALM_PLANKS.getDefaultMapColor()).strength(3.0f).sounds(BlockSoundGroup.WOOD).nonOpaque().allowsSpawning(UBlocks::never), SoundEvents.BLOCK_WOODEN_TRAPDOOR_CLOSE, SoundEvents.BLOCK_WOODEN_TRAPDOOR_OPEN), ItemGroups.BUILDING_BLOCKS); Block PALM_TRAPDOOR = register("palm_trapdoor", new TrapdoorBlock(Settings.create().mapColor(PALM_PLANKS.getDefaultMapColor()).instrument(Instrument.BASS).strength(3).nonOpaque().allowsSpawning(BlockConstructionUtils::never).burnable(), UWoodTypes.PALM.setType()), ItemGroups.FUNCTIONAL);
Block PALM_PRESSURE_PLATE = register("palm_pressure_plate", new PressurePlateBlock(PressurePlateBlock.ActivationRule.EVERYTHING, Settings.create().mapColor(PALM_PLANKS.getDefaultMapColor()).noCollision().strength(0.5f).sounds(BlockSoundGroup.WOOD).pistonBehavior(PistonBehavior.DESTROY), BlockSetType.OAK), ItemGroups.BUILDING_BLOCKS); Block PALM_PRESSURE_PLATE = register("palm_pressure_plate", new PressurePlateBlock(PressurePlateBlock.ActivationRule.EVERYTHING, Settings.create().mapColor(PALM_PLANKS.getDefaultMapColor()).noCollision().strength(0.5f).sounds(BlockSoundGroup.WOOD).pistonBehavior(PistonBehavior.DESTROY), BlockSetType.OAK), ItemGroups.BUILDING_BLOCKS);
Block PALM_BUTTON = register("palm_button", BlockConstructionUtils.woodenButton(), ItemGroups.BUILDING_BLOCKS); Block PALM_BUTTON = register("palm_button", BlockConstructionUtils.woodenButton(), ItemGroups.BUILDING_BLOCKS);
// Block PALM_SIGN = register("palm_sign", new SignBlock(Settings.of(Material.WOOD).noCollision().strength(1.0f).sounds(BlockSoundGroup.WOOD), PALM_SIGN_TYPE), ItemGroups.BUILDING_BLOCKS); Block PALM_SIGN = register("palm_sign", new SignBlock(Settings.create().mapColor(PALM_PLANKS.getDefaultMapColor()).solid().instrument(Instrument.BASS).noCollision().strength(1).burnable().sounds(BlockSoundGroup.WOOD), UWoodTypes.PALM), ItemGroups.FUNCTIONAL);
// Block PALM_WALL_SIGN = register("palm_wall_sign", new WallSignBlock(Settings.create().mapColor(PALM_PLANKS.getDefaultMapColor()).solid().instrument(Instrument.BASS).noCollision().strength(1).dropsLike(PALM_SIGN).burnable(), UWoodTypes.PALM));
// Block PALM_WALL_SIGN = register("palm_wall_sign", new WallSignBlock(Settings.of(Material.WOOD).noCollision().strength(1.0f).sounds(BlockSoundGroup.WOOD).dropsLike(PALM_SIGN), PALM_SIGN_TYPE), ItemGroups.BUILDING_BLOCKS); Block PALM_HANGING_SIGN = register("palm_hanging_sign", new HangingSignBlock(Settings.create().mapColor(PALM_LOG.getDefaultMapColor()).solid().instrument(Instrument.BASS).noCollision().strength(1).burnable(), UWoodTypes.PALM), ItemGroups.FUNCTIONAL);
// Block PALM_HANGING_SIGN = register("palm_hanging_sign", new HangingSignBlock(AbstractBlock.Settings.of(Material.WOOD, PALM_LOG.getDefaultMapColor()).noCollision().strength(1.0f).sounds(BlockSoundGroup.HANGING_SIGN).requires(FeatureFlags.UPDATE_1_20), PALM_SIGN_TYPE), ItemGroups.BUILDING_BLOCKS); Block PALM_WALL_HANGING_SIGN = register("palm_wall_hanging_sign", new WallHangingSignBlock(Settings.create().mapColor(PALM_LOG.getDefaultMapColor()).solid().instrument(Instrument.BASS).noCollision().strength(1.0f).burnable().dropsLike(PALM_HANGING_SIGN), UWoodTypes.PALM));
// Block PALM_WALL_HANGING_SIGN = register("palm_wall_hanging_sign", new WallHangingSignBlock(AbstractBlock.Settings.of(Material.WOOD, PALM_LOG.getDefaultMapColor()).noCollision().strength(1.0f).sounds(BlockSoundGroup.HANGING_SIGN).requires(FeatureFlags.UPDATE_1_20).dropsLike(PALM_HANGING_SIGN), PALM_SIGN_TYPE), ItemGroups.BUILDING_BLOCKS);
Block PALM_LEAVES = register("palm_leaves", BlockConstructionUtils.createLeavesBlock(BlockSoundGroup.GRASS), ItemGroups.BUILDING_BLOCKS); Block PALM_LEAVES = register("palm_leaves", BlockConstructionUtils.createLeavesBlock(BlockSoundGroup.GRASS), ItemGroups.BUILDING_BLOCKS);
@ -114,7 +117,7 @@ public interface UBlocks {
} }
static <T extends Block> T register(Identifier id, T block, RegistryKey<ItemGroup> group) { static <T extends Block> T register(Identifier id, T block, RegistryKey<ItemGroup> group) {
UItems.register(id, ItemGroupRegistry.register(new BlockItem(block, new Item.Settings()), group)); BlockItem.BLOCK_ITEMS.put(block, UItems.register(id, ItemGroupRegistry.register(new BlockItem(block, new Item.Settings()), group)));
return register(id, block); return register(id, block);
} }
@ -122,13 +125,16 @@ public interface UBlocks {
if (block instanceof TintedBlock) { if (block instanceof TintedBlock) {
TintedBlock.REGISTRY.add(block); TintedBlock.REGISTRY.add(block);
} }
if (block instanceof SaplingBlock || block instanceof SproutBlock || block instanceof FruitBlock || block instanceof CropBlock) { if (block instanceof SaplingBlock || block instanceof SproutBlock || block instanceof FruitBlock || block instanceof CropBlock || block instanceof DoorBlock || block instanceof TrapdoorBlock) {
TRANSLUCENT_BLOCKS.add(block); TRANSLUCENT_BLOCKS.add(block);
} }
return Registry.register(Registries.BLOCK, id, block); return Registry.register(Registries.BLOCK, id, block);
} }
static void bootstrap() { static void bootstrap() {
BlockEntityTypeSupportHelper.of(BlockEntityType.SIGN).addSupportedBlocks(PALM_SIGN, PALM_WALL_SIGN);
BlockEntityTypeSupportHelper.of(BlockEntityType.HANGING_SIGN).addSupportedBlocks(PALM_HANGING_SIGN, PALM_WALL_HANGING_SIGN);
StrippableBlockRegistry.register(ZAP_LOG, STRIPPED_ZAP_LOG); StrippableBlockRegistry.register(ZAP_LOG, STRIPPED_ZAP_LOG);
StrippableBlockRegistry.register(PALM_LOG, STRIPPED_PALM_LOG); StrippableBlockRegistry.register(PALM_LOG, STRIPPED_PALM_LOG);
StrippableBlockRegistry.register(ZAP_WOOD, STRIPPED_ZAP_WOOD); StrippableBlockRegistry.register(ZAP_WOOD, STRIPPED_ZAP_WOOD);
@ -145,5 +151,11 @@ public interface UBlocks {
FlammableBlockRegistry.getDefaultInstance().add(BANANAS, 5, 20); FlammableBlockRegistry.getDefaultInstance().add(BANANAS, 5, 20);
UBlockEntities.bootstrap(); UBlockEntities.bootstrap();
Registry.register(TerraformBoatTypeRegistry.INSTANCE, Unicopia.id("palm"), new TerraformBoatType.Builder()
.planks(PALM_PLANKS.asItem())
.item(UItems.PALM_BOAT)
.build());
} }
} }

View file

@ -0,0 +1,25 @@
package com.minelittlepony.unicopia.block;
import com.minelittlepony.unicopia.Unicopia;
import com.terraformersmc.terraform.boat.api.TerraformBoatType;
import com.terraformersmc.terraform.boat.api.TerraformBoatTypeRegistry;
import net.fabricmc.fabric.api.object.builder.v1.block.type.BlockSetTypeBuilder;
import net.fabricmc.fabric.api.object.builder.v1.block.type.WoodTypeBuilder;
import net.minecraft.block.WoodType;
import net.minecraft.registry.RegistryKey;
import net.minecraft.util.Identifier;
public interface UWoodTypes {
WoodType PALM = register("palm");
RegistryKey<TerraformBoatType> PALM_BOAT_TYPE = TerraformBoatTypeRegistry.createKey(Unicopia.id("palm"));
static WoodType register(String name) {
Identifier id = Unicopia.id(name);
return new WoodTypeBuilder().register(id, new BlockSetTypeBuilder().register(id));
}
}

View file

@ -1,5 +1,6 @@
package com.minelittlepony.unicopia.client; package com.minelittlepony.unicopia.client;
import com.minelittlepony.unicopia.Unicopia;
import com.minelittlepony.unicopia.block.*; import com.minelittlepony.unicopia.block.*;
import com.minelittlepony.unicopia.client.particle.ChangelingMagicParticle; import com.minelittlepony.unicopia.client.particle.ChangelingMagicParticle;
import com.minelittlepony.unicopia.client.particle.CloudsEscapingParticle; import com.minelittlepony.unicopia.client.particle.CloudsEscapingParticle;
@ -20,6 +21,7 @@ import com.minelittlepony.unicopia.item.ChameleonItem;
import com.minelittlepony.unicopia.item.EnchantableItem; import com.minelittlepony.unicopia.item.EnchantableItem;
import com.minelittlepony.unicopia.item.UItems; import com.minelittlepony.unicopia.item.UItems;
import com.minelittlepony.unicopia.particle.UParticles; import com.minelittlepony.unicopia.particle.UParticles;
import com.terraformersmc.terraform.boat.api.client.TerraformBoatClientHelper;
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; 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;
@ -154,6 +156,8 @@ public interface URenderers {
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), UBlocks.TRANSLUCENT_BLOCKS.stream().toArray(Block[]::new)); BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), UBlocks.TRANSLUCENT_BLOCKS.stream().toArray(Block[]::new));
// for lava boats // for lava boats
BlockRenderLayerMap.INSTANCE.putFluids(RenderLayer.getTranslucent(), Fluids.LAVA, Fluids.FLOWING_LAVA); BlockRenderLayerMap.INSTANCE.putFluids(RenderLayer.getTranslucent(), Fluids.LAVA, Fluids.FLOWING_LAVA);
TerraformBoatClientHelper.registerModelLayers(Unicopia.id("palm"), false);
} }
static <T extends ParticleEffect> PendingParticleFactory<T> createFactory(ParticleSupplier<T> supplier) { static <T extends ParticleEffect> PendingParticleFactory<T> createFactory(ParticleSupplier<T> supplier) {

View file

@ -96,7 +96,7 @@ public class AirBalloonEntityModel extends EntityModel<AirBalloonEntity> {
if (isBalloon) { if (isBalloon) {
root.pivotY = 0; root.pivotY = 0;
root.pivotX = inflation * MathHelper.cos(limbSwingAmount + entity.age / 5F) / 4F; root.pivotX = inflation * MathHelper.cos(limbSwingAmount + entity.age / 5F) / 4F;
if (entity.getBasketType() == BoatEntity.Type.BAMBOO) { if (entity.getBasketType().isOf(BoatEntity.Type.BAMBOO)) {
ropes.forEach(rope -> rope.pivotY = 0); ropes.forEach(rope -> rope.pivotY = 0);
} else { } else {
ropes.forEach(ModelPart::resetTransform); ropes.forEach(ModelPart::resetTransform);

View file

@ -41,7 +41,7 @@ public class AirBalloonEntityRenderer extends MobEntityRenderer<AirBalloonEntity
@Override @Override
public Identifier getTexture(AirBalloonEntity entity) { public Identifier getTexture(AirBalloonEntity entity) {
return getComponentTexture("basket/" + entity.getBasketType().asString()); return getComponentTexture("basket/" + entity.getBasketType().id().getPath());
} }
@Override @Override

View file

@ -12,9 +12,11 @@ import net.minecraft.item.ItemStack;
import net.minecraft.item.Items; import net.minecraft.item.Items;
import net.minecraft.nbt.NbtCompound; import net.minecraft.nbt.NbtCompound;
import net.minecraft.particle.ParticleTypes; import net.minecraft.particle.ParticleTypes;
import net.minecraft.registry.RegistryKey;
import net.minecraft.sound.SoundEvents; import net.minecraft.sound.SoundEvents;
import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.Identifier;
import net.minecraft.util.StringIdentifiable; import net.minecraft.util.StringIdentifiable;
import net.minecraft.util.function.ValueLists; import net.minecraft.util.function.ValueLists;
import net.minecraft.util.math.*; import net.minecraft.util.math.*;
@ -24,22 +26,29 @@ import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.event.GameEvent; import net.minecraft.world.event.GameEvent;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.function.IntFunction; import java.util.function.IntFunction;
import org.jetbrains.annotations.Nullable;
import com.minelittlepony.unicopia.entity.collision.EntityCollisions; import com.minelittlepony.unicopia.entity.collision.EntityCollisions;
import com.minelittlepony.unicopia.entity.collision.MultiBox; import com.minelittlepony.unicopia.entity.collision.MultiBox;
import com.minelittlepony.unicopia.entity.duck.EntityDuck; import com.minelittlepony.unicopia.entity.duck.EntityDuck;
import com.minelittlepony.unicopia.item.BasketItem;
import com.minelittlepony.unicopia.item.HotAirBalloonItem; import com.minelittlepony.unicopia.item.HotAirBalloonItem;
import com.minelittlepony.unicopia.item.UItems;
import com.minelittlepony.unicopia.server.world.WeatherConditions; import com.minelittlepony.unicopia.server.world.WeatherConditions;
import com.terraformersmc.terraform.boat.api.TerraformBoatType;
public class AirBalloonEntity extends MobEntity implements EntityCollisions.ComplexCollidable, MultiBoundingBoxEntity { public class AirBalloonEntity extends MobEntity implements EntityCollisions.ComplexCollidable, MultiBoundingBoxEntity {
private static final TrackedData<Boolean> ASCENDING = DataTracker.registerData(AirBalloonEntity.class, TrackedDataHandlerRegistry.BOOLEAN); private static final TrackedData<Boolean> ASCENDING = DataTracker.registerData(AirBalloonEntity.class, TrackedDataHandlerRegistry.BOOLEAN);
private static final TrackedData<Integer> BOOSTING = DataTracker.registerData(AirBalloonEntity.class, TrackedDataHandlerRegistry.INTEGER); private static final TrackedData<Integer> BOOSTING = DataTracker.registerData(AirBalloonEntity.class, TrackedDataHandlerRegistry.INTEGER);
private static final TrackedData<Integer> INFLATION = DataTracker.registerData(AirBalloonEntity.class, TrackedDataHandlerRegistry.INTEGER); private static final TrackedData<Integer> INFLATION = DataTracker.registerData(AirBalloonEntity.class, TrackedDataHandlerRegistry.INTEGER);
private static final TrackedData<Integer> BASKET_TYPE = DataTracker.registerData(AirBalloonEntity.class, TrackedDataHandlerRegistry.INTEGER); private static final TrackedData<String> BASKET_TYPE = DataTracker.registerData(AirBalloonEntity.class, TrackedDataHandlerRegistry.STRING);
private static final TrackedData<Integer> BALLOON_DESIGN = DataTracker.registerData(AirBalloonEntity.class, TrackedDataHandlerRegistry.INTEGER); private static final TrackedData<Integer> BALLOON_DESIGN = DataTracker.registerData(AirBalloonEntity.class, TrackedDataHandlerRegistry.INTEGER);
private boolean prevBoosting; private boolean prevBoosting;
@ -59,16 +68,16 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp
dataTracker.startTracking(ASCENDING, false); dataTracker.startTracking(ASCENDING, false);
dataTracker.startTracking(BOOSTING, 0); dataTracker.startTracking(BOOSTING, 0);
dataTracker.startTracking(INFLATION, 0); dataTracker.startTracking(INFLATION, 0);
dataTracker.startTracking(BASKET_TYPE, 0); dataTracker.startTracking(BASKET_TYPE, "");
dataTracker.startTracking(BALLOON_DESIGN, 0); dataTracker.startTracking(BALLOON_DESIGN, 0);
} }
public BoatEntity.Type getBasketType() { public BasketType getBasketType() {
return BoatEntity.Type.getType(dataTracker.get(BASKET_TYPE)); return BasketType.REGISTRY.get(Identifier.tryParse(dataTracker.get(BASKET_TYPE)));
} }
public void setBasketType(BoatEntity.Type type) { public void setBasketType(BasketType type) {
dataTracker.set(BASKET_TYPE, type.ordinal()); dataTracker.set(BASKET_TYPE, type.id().toString());
} }
public BalloonDesign getDesign() { public BalloonDesign getDesign() {
@ -367,17 +376,7 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp
} }
public Item asItem() { public Item asItem() {
return switch (getBasketType()) { return Objects.requireNonNull(BasketItem.REGISTRY.get(getBasketType()));
case SPRUCE -> UItems.SPRUCE_BASKET;
case BIRCH -> UItems.BIRCH_BASKET;
case JUNGLE -> UItems.JUNGLE_BASKET;
case ACACIA -> UItems.ACACIA_BASKET;
case CHERRY -> UItems.CHERRY_BASKET;
case DARK_OAK -> UItems.DARK_OAK_BASKET;
case MANGROVE -> UItems.MANGROVE_BASKET;
case BAMBOO -> UItems.BAMBOO_BASKET;
default -> UItems.OAK_BASKET;
};
} }
@Override @Override
@ -465,7 +464,7 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp
double wallheight = box.maxY + 0.7; double wallheight = box.maxY + 0.7;
double wallThickness = 0.7; double wallThickness = 0.7;
if (getBasketType() != BoatEntity.Type.BAMBOO) { if (!getBasketType().isOf(BoatEntity.Type.BAMBOO)) {
// front left (next to door) // front left (next to door)
output.accept(VoxelShapes.cuboid(new Box(box.minX, box.minY, box.minZ, box.minX + wallThickness + 0.2, wallheight, box.minZ + wallThickness))); output.accept(VoxelShapes.cuboid(new Box(box.minX, box.minY, box.minZ, box.minX + wallThickness + 0.2, wallheight, box.minZ + wallThickness)));
// front right (next to door) // front right (next to door)
@ -489,7 +488,7 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp
@Override @Override
public void readCustomDataFromNbt(NbtCompound compound) { public void readCustomDataFromNbt(NbtCompound compound) {
super.readCustomDataFromNbt(compound); super.readCustomDataFromNbt(compound);
setBasketType(BoatEntity.Type.getType(compound.getString("basketType"))); setBasketType(BasketType.of(compound.getString("basket")));
setDesign(BalloonDesign.getType(compound.getString("design"))); setDesign(BalloonDesign.getType(compound.getString("design")));
setAscending(compound.getBoolean("burnerActive")); setAscending(compound.getBoolean("burnerActive"));
setBoostTicks(compound.getInt("boostTicks")); setBoostTicks(compound.getInt("boostTicks"));
@ -501,7 +500,7 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp
public void writeCustomDataToNbt(NbtCompound compound) { public void writeCustomDataToNbt(NbtCompound compound) {
super.writeCustomDataToNbt(compound); super.writeCustomDataToNbt(compound);
compound.putString("design", getDesign().asString()); compound.putString("design", getDesign().asString());
compound.putString("basket", getBasketType().asString()); compound.putString("basket", getBasketType().id().toString());
compound.putBoolean("burnerActive", isAscending()); compound.putBoolean("burnerActive", isAscending());
compound.putInt("boostTicks", getBoostTicks()); compound.putInt("boostTicks", getBoostTicks());
compound.putInt("inflationAmount", getInflation()); compound.putInt("inflationAmount", getInflation());
@ -530,6 +529,33 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp
return CODEC.byId(name, LUNA); return CODEC.byId(name, LUNA);
} }
} }
public record BasketType(Identifier id, @Nullable BoatEntity.Type boatType) {
private static final Map<Identifier, BasketType> REGISTRY = new HashMap<>();
static {
Arrays.stream(BoatEntity.Type.values()).forEach(BasketType::of);
}
public boolean isOf(BoatEntity.Type boatType) {
return this.boatType == boatType;
}
public static BasketType of(String name) {
Identifier id = Identifier.tryParse(name);
if (id == null) {
return of(BoatEntity.Type.OAK);
}
return REGISTRY.get(id);
}
public static BasketType of(BoatEntity.Type boatType) {
return REGISTRY.computeIfAbsent(new Identifier(boatType.asString()), id -> new BasketType(id, boatType));
}
public static BasketType of(RegistryKey<TerraformBoatType> id) {
return REGISTRY.computeIfAbsent(id.getValue(), i -> new BasketType(i, null));
}
}
} }

View file

@ -5,7 +5,6 @@ import java.util.function.Predicate;
import com.minelittlepony.unicopia.Unicopia; import com.minelittlepony.unicopia.Unicopia;
import com.minelittlepony.unicopia.entity.behaviour.EntityBehaviour; import com.minelittlepony.unicopia.entity.behaviour.EntityBehaviour;
import com.minelittlepony.unicopia.projectile.MagicProjectileEntity; import com.minelittlepony.unicopia.projectile.MagicProjectileEntity;
import net.fabricmc.fabric.api.biome.v1.BiomeModifications; import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
import net.fabricmc.fabric.api.biome.v1.BiomeSelectionContext; import net.fabricmc.fabric.api.biome.v1.BiomeSelectionContext;
import net.fabricmc.fabric.api.biome.v1.BiomeSelectors; import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;

View file

@ -1,5 +1,7 @@
package com.minelittlepony.unicopia.item; package com.minelittlepony.unicopia.item;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Predicate; import java.util.function.Predicate;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
@ -11,7 +13,6 @@ import com.minelittlepony.unicopia.util.Dispensable;
import net.minecraft.block.DispenserBlock; import net.minecraft.block.DispenserBlock;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.vehicle.BoatEntity;
import net.minecraft.item.BoatItem; import net.minecraft.item.BoatItem;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -32,12 +33,15 @@ public class BasketItem extends Item implements Dispensable {
private static final Predicate<Entity> RIDERS = EntityPredicates.EXCEPT_SPECTATOR.and(Entity::canHit); private static final Predicate<Entity> RIDERS = EntityPredicates.EXCEPT_SPECTATOR.and(Entity::canHit);
private static final double REACH = 5; private static final double REACH = 5;
private final BoatEntity.Type type; private final AirBalloonEntity.BasketType type;
public BasketItem(BoatEntity.Type type, Item.Settings settings) { public static final Map<AirBalloonEntity.BasketType, BasketItem> REGISTRY = new HashMap<>();
public BasketItem(AirBalloonEntity.BasketType type, Item.Settings settings) {
super(settings); super(settings);
this.type = type; this.type = type;
DispenserBlock.registerBehavior(this, createDispenserBehaviour()); DispenserBlock.registerBehavior(this, createDispenserBehaviour());
REGISTRY.put(type, this);
} }
@Override @Override

View file

@ -5,11 +5,14 @@ import java.util.List;
import com.minelittlepony.unicopia.*; import com.minelittlepony.unicopia.*;
import com.minelittlepony.unicopia.block.UBlocks; import com.minelittlepony.unicopia.block.UBlocks;
import com.minelittlepony.unicopia.block.UWoodTypes;
import com.minelittlepony.unicopia.entity.AirBalloonEntity;
import com.minelittlepony.unicopia.entity.UEntities; import com.minelittlepony.unicopia.entity.UEntities;
import com.minelittlepony.unicopia.item.enchantment.UEnchantments; import com.minelittlepony.unicopia.item.enchantment.UEnchantments;
import com.minelittlepony.unicopia.item.group.ItemGroupRegistry; import com.minelittlepony.unicopia.item.group.ItemGroupRegistry;
import com.minelittlepony.unicopia.item.group.UItemGroups; import com.minelittlepony.unicopia.item.group.UItemGroups;
import com.minelittlepony.unicopia.item.toxin.UFoodComponents; import com.minelittlepony.unicopia.item.toxin.UFoodComponents;
import com.terraformersmc.terraform.boat.api.item.TerraformBoatItemHelper;
import net.minecraft.entity.vehicle.BoatEntity; import net.minecraft.entity.vehicle.BoatEntity;
import net.minecraft.item.*; import net.minecraft.item.*;
@ -43,10 +46,7 @@ public interface UItems {
Item MUSIC_DISC_POPULAR = register("music_disc_popular", USounds.RECORD_POPULAR, 112); Item MUSIC_DISC_POPULAR = register("music_disc_popular", USounds.RECORD_POPULAR, 112);
Item MUSIC_DISC_FUNK = register("music_disc_funk", USounds.RECORD_FUNK, 91); Item MUSIC_DISC_FUNK = register("music_disc_funk", USounds.RECORD_FUNK, 91);
FriendshipBraceletItem FRIENDSHIP_BRACELET = register("friendship_bracelet", new FriendshipBraceletItem( FriendshipBraceletItem FRIENDSHIP_BRACELET = register("friendship_bracelet", new FriendshipBraceletItem(new FabricItemSettings().rarity(Rarity.UNCOMMON)), ItemGroups.TOOLS);
new FabricItemSettings()
.rarity(Rarity.UNCOMMON)
), ItemGroups.TOOLS);
Item EMPTY_JAR = register("empty_jar", new JarItem(new Item.Settings().maxCount(16).fireproof(), false, false, false), ItemGroups.FUNCTIONAL); Item EMPTY_JAR = register("empty_jar", new JarItem(new Item.Settings().maxCount(16).fireproof(), false, false, false), ItemGroups.FUNCTIONAL);
FilledJarItem FILLED_JAR = register("filled_jar", new FilledJarItem(new Item.Settings().maxCount(1))); FilledJarItem FILLED_JAR = register("filled_jar", new FilledJarItem(new Item.Settings().maxCount(1)));
@ -118,16 +118,21 @@ public interface UItems {
Item BUTTERFLY_SPAWN_EGG = register("butterfly_spawn_egg", new SpawnEggItem(UEntities.BUTTERFLY, 0x222200, 0xaaeeff, new Item.Settings()), ItemGroups.SPAWN_EGGS); Item BUTTERFLY_SPAWN_EGG = register("butterfly_spawn_egg", new SpawnEggItem(UEntities.BUTTERFLY, 0x222200, 0xaaeeff, new Item.Settings()), ItemGroups.SPAWN_EGGS);
Item BUTTERFLY = register("butterfly", new Item(new Item.Settings().food(UFoodComponents.INSECTS)), ItemGroups.FOOD_AND_DRINK); Item BUTTERFLY = register("butterfly", new Item(new Item.Settings().food(UFoodComponents.INSECTS)), ItemGroups.FOOD_AND_DRINK);
Item PALM_BOAT = ItemGroupRegistry.register(TerraformBoatItemHelper.registerBoatItem(Unicopia.id("palm_boat"), UWoodTypes.PALM_BOAT_TYPE, false), ItemGroups.FUNCTIONAL);
Item PALM_CHEST_BOAT = ItemGroupRegistry.register(TerraformBoatItemHelper.registerBoatItem(Unicopia.id("palm_chest_boat"), UWoodTypes.PALM_BOAT_TYPE, true), ItemGroups.FUNCTIONAL);
Item SPELLBOOK = register("spellbook", new SpellbookItem(new Item.Settings().maxCount(1).rarity(Rarity.UNCOMMON)), ItemGroups.TOOLS); Item SPELLBOOK = register("spellbook", new SpellbookItem(new Item.Settings().maxCount(1).rarity(Rarity.UNCOMMON)), ItemGroups.TOOLS);
Item OAK_BASKET = register("oak_basket", new BasketItem(BoatEntity.Type.OAK, new Item.Settings().maxCount(1)), ItemGroups.TOOLS);
Item SPRUCE_BASKET = register("spruce_basket", new BasketItem(BoatEntity.Type.SPRUCE, new Item.Settings().maxCount(1)), ItemGroups.TOOLS); Item OAK_BASKET = register("oak_basket", new BasketItem(AirBalloonEntity.BasketType.of(BoatEntity.Type.OAK), new Item.Settings().maxCount(1)), ItemGroups.TOOLS);
Item BIRCH_BASKET = register("birch_basket", new BasketItem(BoatEntity.Type.BIRCH, new Item.Settings().maxCount(1)), ItemGroups.TOOLS); Item SPRUCE_BASKET = register("spruce_basket", new BasketItem(AirBalloonEntity.BasketType.of(BoatEntity.Type.SPRUCE), new Item.Settings().maxCount(1)), ItemGroups.TOOLS);
Item JUNGLE_BASKET = register("jungle_basket", new BasketItem(BoatEntity.Type.JUNGLE, new Item.Settings().maxCount(1)), ItemGroups.TOOLS); Item BIRCH_BASKET = register("birch_basket", new BasketItem(AirBalloonEntity.BasketType.of(BoatEntity.Type.BIRCH), new Item.Settings().maxCount(1)), ItemGroups.TOOLS);
Item ACACIA_BASKET = register("acacia_basket", new BasketItem(BoatEntity.Type.ACACIA, new Item.Settings().maxCount(1)), ItemGroups.TOOLS); Item JUNGLE_BASKET = register("jungle_basket", new BasketItem(AirBalloonEntity.BasketType.of(BoatEntity.Type.JUNGLE), new Item.Settings().maxCount(1)), ItemGroups.TOOLS);
Item CHERRY_BASKET = register("cherry_basket", new BasketItem(BoatEntity.Type.CHERRY, new Item.Settings().maxCount(1)), ItemGroups.TOOLS); Item ACACIA_BASKET = register("acacia_basket", new BasketItem(AirBalloonEntity.BasketType.of(BoatEntity.Type.ACACIA), new Item.Settings().maxCount(1)), ItemGroups.TOOLS);
Item DARK_OAK_BASKET = register("dark_oak_basket", new BasketItem(BoatEntity.Type.DARK_OAK, new Item.Settings().maxCount(1)), ItemGroups.TOOLS); Item CHERRY_BASKET = register("cherry_basket", new BasketItem(AirBalloonEntity.BasketType.of(BoatEntity.Type.CHERRY), new Item.Settings().maxCount(1)), ItemGroups.TOOLS);
Item MANGROVE_BASKET = register("mangrove_basket", new BasketItem(BoatEntity.Type.MANGROVE, new Item.Settings().maxCount(1)), ItemGroups.TOOLS); Item DARK_OAK_BASKET = register("dark_oak_basket", new BasketItem(AirBalloonEntity.BasketType.of(BoatEntity.Type.DARK_OAK), new Item.Settings().maxCount(1)), ItemGroups.TOOLS);
Item BAMBOO_BASKET = register("bamboo_basket", new BasketItem(BoatEntity.Type.BAMBOO, new Item.Settings().maxCount(1)), ItemGroups.TOOLS); Item MANGROVE_BASKET = register("mangrove_basket", new BasketItem(AirBalloonEntity.BasketType.of(BoatEntity.Type.MANGROVE), new Item.Settings().maxCount(1)), ItemGroups.TOOLS);
Item BAMBOO_BASKET = register("bamboo_basket", new BasketItem(AirBalloonEntity.BasketType.of(BoatEntity.Type.BAMBOO), new Item.Settings().maxCount(1)), ItemGroups.TOOLS);
Item PALM_BASKET = register("palm_basket", new BasketItem(AirBalloonEntity.BasketType.of(UWoodTypes.PALM_BOAT_TYPE), new Item.Settings().maxCount(1)), ItemGroups.TOOLS);
Item GIANT_BALLOON = register("giant_balloon", new HotAirBalloonItem(new Item.Settings().maxCount(1)), ItemGroups.TOOLS); Item GIANT_BALLOON = register("giant_balloon", new HotAirBalloonItem(new Item.Settings().maxCount(1)), ItemGroups.TOOLS);
@ -160,6 +165,9 @@ public interface UItems {
} }
static <T extends Item> T register(Identifier id, T item) { static <T extends Item> T register(Identifier id, T item) {
if (item instanceof BlockItem bi && bi.getBlock() == null) {
throw new NullPointerException("Registered block item did not have a block " + id);
}
ITEMS.add(item); ITEMS.add(item);
return Registry.register(Registries.ITEM, id, item); return Registry.register(Registries.ITEM, id, item);
} }
@ -183,6 +191,7 @@ public interface UItems {
FuelRegistry.INSTANCE.add(BUTTERFLY, 2); FuelRegistry.INSTANCE.add(BUTTERFLY, 2);
FuelRegistry.INSTANCE.add(SPELLBOOK, 9000); FuelRegistry.INSTANCE.add(SPELLBOOK, 9000);
FuelRegistry.INSTANCE.add(MEADOWBROOKS_STAFF, 300); FuelRegistry.INSTANCE.add(MEADOWBROOKS_STAFF, 300);
FuelRegistry.INSTANCE.add(UTags.BASKETS, 700);
CompostingChanceRegistry.INSTANCE.add(GREEN_APPLE, 0.65F); CompostingChanceRegistry.INSTANCE.add(GREEN_APPLE, 0.65F);
CompostingChanceRegistry.INSTANCE.add(SWEET_APPLE, 0.65F); CompostingChanceRegistry.INSTANCE.add(SWEET_APPLE, 0.65F);

View file

@ -0,0 +1,28 @@
package com.minelittlepony.unicopia.mixin;
import java.util.HashSet;
import java.util.Set;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.Shadow;
import com.minelittlepony.unicopia.block.BlockEntityTypeSupportHelper;
import net.minecraft.block.Block;
import net.minecraft.block.entity.BlockEntityType;
@Mixin(BlockEntityType.class)
abstract class MixinBlockEntityType implements BlockEntityTypeSupportHelper {
@Shadow
@Mutable
private @Final Set<Block> blocks;
@Override
public BlockEntityTypeSupportHelper addSupportedBlocks(Block...blocks) {
this.blocks = new HashSet<>(this.blocks);
this.blocks.addAll(Set.of(blocks));
return this;
}
}

View file

@ -0,0 +1,124 @@
{
"variants": {
"facing=east,half=lower,hinge=left,open=false": {
"model": "unicopia:block/palm_door_bottom_left"
},
"facing=east,half=lower,hinge=left,open=true": {
"model": "unicopia:block/palm_door_bottom_left_open",
"y": 90
},
"facing=east,half=lower,hinge=right,open=false": {
"model": "unicopia:block/palm_door_bottom_right"
},
"facing=east,half=lower,hinge=right,open=true": {
"model": "unicopia:block/palm_door_bottom_right_open",
"y": 270
},
"facing=east,half=upper,hinge=left,open=false": {
"model": "unicopia:block/palm_door_top_left"
},
"facing=east,half=upper,hinge=left,open=true": {
"model": "unicopia:block/palm_door_top_left_open",
"y": 90
},
"facing=east,half=upper,hinge=right,open=false": {
"model": "unicopia:block/palm_door_top_right"
},
"facing=east,half=upper,hinge=right,open=true": {
"model": "unicopia:block/palm_door_top_right_open",
"y": 270
},
"facing=north,half=lower,hinge=left,open=false": {
"model": "unicopia:block/palm_door_bottom_left",
"y": 270
},
"facing=north,half=lower,hinge=left,open=true": {
"model": "unicopia:block/palm_door_bottom_left_open"
},
"facing=north,half=lower,hinge=right,open=false": {
"model": "unicopia:block/palm_door_bottom_right",
"y": 270
},
"facing=north,half=lower,hinge=right,open=true": {
"model": "unicopia:block/palm_door_bottom_right_open",
"y": 180
},
"facing=north,half=upper,hinge=left,open=false": {
"model": "unicopia:block/palm_door_top_left",
"y": 270
},
"facing=north,half=upper,hinge=left,open=true": {
"model": "unicopia:block/palm_door_top_left_open"
},
"facing=north,half=upper,hinge=right,open=false": {
"model": "unicopia:block/palm_door_top_right",
"y": 270
},
"facing=north,half=upper,hinge=right,open=true": {
"model": "unicopia:block/palm_door_top_right_open",
"y": 180
},
"facing=south,half=lower,hinge=left,open=false": {
"model": "unicopia:block/palm_door_bottom_left",
"y": 90
},
"facing=south,half=lower,hinge=left,open=true": {
"model": "unicopia:block/palm_door_bottom_left_open",
"y": 180
},
"facing=south,half=lower,hinge=right,open=false": {
"model": "unicopia:block/palm_door_bottom_right",
"y": 90
},
"facing=south,half=lower,hinge=right,open=true": {
"model": "unicopia:block/palm_door_bottom_right_open"
},
"facing=south,half=upper,hinge=left,open=false": {
"model": "unicopia:block/palm_door_top_left",
"y": 90
},
"facing=south,half=upper,hinge=left,open=true": {
"model": "unicopia:block/palm_door_top_left_open",
"y": 180
},
"facing=south,half=upper,hinge=right,open=false": {
"model": "unicopia:block/palm_door_top_right",
"y": 90
},
"facing=south,half=upper,hinge=right,open=true": {
"model": "unicopia:block/palm_door_top_right_open"
},
"facing=west,half=lower,hinge=left,open=false": {
"model": "unicopia:block/palm_door_bottom_left",
"y": 180
},
"facing=west,half=lower,hinge=left,open=true": {
"model": "unicopia:block/palm_door_bottom_left_open",
"y": 270
},
"facing=west,half=lower,hinge=right,open=false": {
"model": "unicopia:block/palm_door_bottom_right",
"y": 180
},
"facing=west,half=lower,hinge=right,open=true": {
"model": "unicopia:block/palm_door_bottom_right_open",
"y": 90
},
"facing=west,half=upper,hinge=left,open=false": {
"model": "unicopia:block/palm_door_top_left",
"y": 180
},
"facing=west,half=upper,hinge=left,open=true": {
"model": "unicopia:block/palm_door_top_left_open",
"y": 270
},
"facing=west,half=upper,hinge=right,open=false": {
"model": "unicopia:block/palm_door_top_right",
"y": 180
},
"facing=west,half=upper,hinge=right,open=true": {
"model": "unicopia:block/palm_door_top_right_open",
"y": 90
}
}
}

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "unicopia:block/palm_hanging_sign"
}
}
}

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "unicopia:block/palm_sign"
}
}
}

View file

@ -0,0 +1,58 @@
{
"variants": {
"facing=east,half=bottom,open=false": {
"model": "unicopia:block/palm_trapdoor_bottom"
},
"facing=east,half=bottom,open=true": {
"model": "unicopia:block/palm_trapdoor_open",
"y": 90
},
"facing=east,half=top,open=false": {
"model": "unicopia:block/palm_trapdoor_top"
},
"facing=east,half=top,open=true": {
"model": "unicopia:block/palm_trapdoor_open",
"y": 90
},
"facing=north,half=bottom,open=false": {
"model": "unicopia:block/palm_trapdoor_bottom"
},
"facing=north,half=bottom,open=true": {
"model": "unicopia:block/palm_trapdoor_open"
},
"facing=north,half=top,open=false": {
"model": "unicopia:block/palm_trapdoor_top"
},
"facing=north,half=top,open=true": {
"model": "unicopia:block/palm_trapdoor_open"
},
"facing=south,half=bottom,open=false": {
"model": "unicopia:block/palm_trapdoor_bottom"
},
"facing=south,half=bottom,open=true": {
"model": "unicopia:block/palm_trapdoor_open",
"y": 180
},
"facing=south,half=top,open=false": {
"model": "unicopia:block/palm_trapdoor_top"
},
"facing=south,half=top,open=true": {
"model": "unicopia:block/palm_trapdoor_open",
"y": 180
},
"facing=west,half=bottom,open=false": {
"model": "unicopia:block/palm_trapdoor_bottom"
},
"facing=west,half=bottom,open=true": {
"model": "unicopia:block/palm_trapdoor_open",
"y": 270
},
"facing=west,half=top,open=false": {
"model": "unicopia:block/palm_trapdoor_top"
},
"facing=west,half=top,open=true": {
"model": "unicopia:block/palm_trapdoor_open",
"y": 270
}
}
}

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "unicopia:block/palm_hanging_sign"
}
}
}

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "unicopia:block/palm_sign"
}
}
}

View file

@ -32,8 +32,12 @@
"item.unicopia.dark_oak_basket": "Dark Oak Basket", "item.unicopia.dark_oak_basket": "Dark Oak Basket",
"item.unicopia.mangrove_basket": "Mangrove Basket", "item.unicopia.mangrove_basket": "Mangrove Basket",
"item.unicopia.bamboo_basket": "Bamboo Basket", "item.unicopia.bamboo_basket": "Bamboo Basket",
"item.unicopia.palm_basket": "Palm Basket",
"item.unicopia.giant_balloon": "Giant Balloon", "item.unicopia.giant_balloon": "Giant Balloon",
"item.unicopia.palm_boat": "Palm Boat",
"item.unicopia.palm_chest_boat": "Palm Boat with Chest",
"item.unicopia.spellbook": "Spellbook", "item.unicopia.spellbook": "Spellbook",
"emi.category.unicopia.spellbook": "Spellbook", "emi.category.unicopia.spellbook": "Spellbook",
@ -165,6 +169,10 @@
"block.unicopia.stripped_palm_log": "Stripped Palm Log", "block.unicopia.stripped_palm_log": "Stripped Palm Log",
"block.unicopia.stripped_palm_wood": "Stripped Palm Wood", "block.unicopia.stripped_palm_wood": "Stripped Palm Wood",
"block.unicopia.palm_leaves": "Palm Leaves", "block.unicopia.palm_leaves": "Palm Leaves",
"block.unicopia.palm_door": "Palm Door",
"block.unicopia.palm_trapdoor": "Palm Trapdoor",
"block.unicopia.palm_sign": "Palm Sign",
"block.unicopia.palm_hanging_sign": "Palm Hanging Sign",
"block.unicopia.apple_pie": "Apple Pie", "block.unicopia.apple_pie": "Apple Pie",
"block.unicopia.weather_vane": "Weather Vane", "block.unicopia.weather_vane": "Weather Vane",

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_bottom_left",
"textures": {
"bottom": "unicopia:block/palm_door_bottom",
"top": "unicopia:block/palm_door_top"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_bottom_left_open",
"textures": {
"bottom": "unicopia:block/palm_door_bottom",
"top": "unicopia:block/palm_door_top"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_bottom_right",
"textures": {
"bottom": "unicopia:block/palm_door_bottom",
"top": "unicopia:block/palm_door_top"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_bottom_right_open",
"textures": {
"bottom": "unicopia:block/palm_door_bottom",
"top": "unicopia:block/palm_door_top"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_top_left",
"textures": {
"bottom": "unicopia:block/palm_door_bottom",
"top": "unicopia:block/palm_door_top"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_top_left_open",
"textures": {
"bottom": "unicopia:block/palm_door_bottom",
"top": "unicopia:block/palm_door_top"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_top_right",
"textures": {
"bottom": "unicopia:block/palm_door_bottom",
"top": "unicopia:block/palm_door_top"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/door_top_right_open",
"textures": {
"bottom": "unicopia:block/palm_door_bottom",
"top": "unicopia:block/palm_door_top"
}
}

View file

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

View file

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

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/template_trapdoor_bottom",
"textures": {
"texture": "unicopia:block/palm_trapdoor"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/template_trapdoor_open",
"textures": {
"texture": "unicopia:block/palm_trapdoor"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/template_trapdoor_top",
"textures": {
"texture": "unicopia:block/palm_trapdoor"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "unicopia:item/palm_basket"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "unicopia:item/palm_boat"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "unicopia:item/palm_chest_boat"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "unicopia:item/palm_door"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "unicopia:item/palm_hanging_sign"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "unicopia:item/palm_sign"
}
}

View file

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"unicopia:palm_sign"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"unicopia:palm_wall_sign"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"unicopia:palm_door"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"unicopia:palm_trapdoor"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"unicopia:palm_sign"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"unicopia:palm_door"
]
}

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"unicopia:palm_trapdoor"
]
}

View file

@ -0,0 +1,29 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"conditions": [
{
"block": "unicopia:palm_door",
"condition": "minecraft:block_state_property",
"properties": {
"half": "lower"
}
}
],
"name": "unicopia:palm_door"
}
],
"rolls": 1.0
}
]
}

View file

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

View file

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

View file

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

View file

@ -0,0 +1,18 @@
{
"type": "minecraft:crafting_shaped",
"group": "basket",
"key": {
"#": {
"item": "unicopia:palm_planks"
}
},
"pattern": [
"# #",
"# #",
"###"
],
"result": {
"count": 1,
"item": "unicopia:palm_basket"
}
}

View file

@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"group": "boat",
"key": {
"#": {
"item": "unicopia:palm_planks"
}
},
"pattern": [
"# #",
"###"
],
"result": {
"item": "unicopia:palm_boat"
}
}

View file

@ -0,0 +1,15 @@
{
"type": "minecraft:crafting_shapeless",
"group": "chest_boat",
"ingredients": [
{
"item": "minecraft:chest"
},
{
"item": "unicopia:palm_boat"
}
],
"result": {
"item": "unicopia:palm_chest_boat"
}
}

View file

@ -0,0 +1,18 @@
{
"type": "minecraft:crafting_shaped",
"group": "wooden_door",
"key": {
"#": {
"item": "unicopia:palm_planks"
}
},
"pattern": [
"##",
"##",
"##"
],
"result": {
"count": 3,
"item": "unicopia:palm_door"
}
}

View file

@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"group": "wooden_sign",
"key": {
"#": {
"item": "unicopia:palm_planks"
},
"|": {
"item": "minecraft:chain"
}
},
"pattern": [
"| |",
"###",
"###"
],
"result": {
"count": 3,
"item": "unicopia:palm_hanging_sign"
}
}

View file

@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"group": "wooden_sign",
"key": {
"#": {
"item": "unicopia:palm_planks"
},
"X": {
"item": "minecraft:stick"
}
},
"pattern": [
"###",
"###",
" X "
],
"result": {
"count": 3,
"item": "unicopia:palm_sign"
}
}

View file

@ -0,0 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"group": "wooden_trapdoor",
"key": {
"#": {
"item": "unicopia:palm_planks"
}
},
"pattern": [
"###",
"###"
],
"result": {
"count": 2,
"item": "unicopia:palm_trapdoor"
}
}

View file

@ -0,0 +1,15 @@
{
"replace": false,
"values": [
"unicopia:oak_basket",
"unicopia:spruce_basket",
"unicopia:birch_basket",
"unicopia:jungle_basket",
"unicopia:acacia_basket",
"unicopia:cherry_basket",
"unicopia:dark_oak_basket",
"unicopia:mangrove_basket",
"unicopia:bamboo_basket",
"unicopia:palm_basket"
]
}

View file

@ -9,6 +9,7 @@
"MixinBlazeEntity", "MixinBlazeEntity",
"MixinBlock", "MixinBlock",
"MixinBlockEntity", "MixinBlockEntity",
"MixinBlockEntityType",
"MixinBlockItem", "MixinBlockItem",
"MixinBoatEntity", "MixinBoatEntity",
"MixinBrain", "MixinBrain",