Skip to content

Commit

Permalink
Merge branch '1.21' of https://github.com/TeamMoegMC/Caupona.git into…
Browse files Browse the repository at this point in the history
… 1.21
  • Loading branch information
khjxiaogu committed Dec 30, 2024
2 parents 5393bb6 + a5d653a commit 137d7a2
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 3 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ dependencies {

//compileOnly fg.deobf("vazkii.patchouli:Patchouli:1.20.1-81-FORGE:api")
compileOnly "vazkii.patchouli:Patchouli:${mc_version}-${patchouli_version}:api"
runtimeOnly "vazkii.patchouli:Patchouli:${mc_version}-${patchouli_version}"
//compileOnly "me.shedaniel:RoughlyEnoughItems-neoforge:14.0.688"
//clientRuntimeOnly "me.shedaniel:RoughlyEnoughItems-neoforge:14.0.688"
// FG5 requires 0.8.3
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/com/teammoeg/caupona/CPBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,10 @@ public class CPBlocks {
type.setBase(()->base.get().defaultBlockState());
decoblock(name + "_slab", () -> new SlabBlock(getStoneProps()));
decoblock(name + "_stairs", () -> new StairBlock(type.getBase().get(), getStoneProps()));
decoblock(name + "_wall", () -> new WallBlock(getStoneProps()));
if(name.equals("loaf_heap"))
hiddenblock(name + "_wall", () -> new WallBlock(getStoneProps()));
else
decoblock(name + "_wall", () -> new WallBlock(getStoneProps()));
}
if (type.isCounterMaterial()) {
stove(name + "_kitchen_stove", getStoveProps(),
Expand Down Expand Up @@ -423,6 +426,11 @@ static <T extends Block> DeferredHolder<Block,T> decoblock(String name, Supplier
CPItems.ITEMS.register(name, () -> new CPBlockItem(blx.get(), CPItems.createProps(), TabType.DECORATION));
return blx;
}
static <T extends Block> DeferredHolder<Block,T> hiddenblock(String name, Supplier<T> bl) {
DeferredHolder<Block,T> blx = BLOCKS.register(name, bl);
CPItems.ITEMS.register(name, () -> new CPBlockItem(blx.get(), CPItems.createProps(), TabType.HIDDEN));
return blx;
}
static <T extends Block> DeferredHolder<Block,T> maindecoblock(String name, Supplier<T> bl) {
DeferredHolder<Block,T> blx = BLOCKS.register(name, bl);
CPItems.ITEMS.register(name, () -> new CPBlockItem(blx.get(), CPItems.createProps(), TabType.MAIN_AND_DECORATION));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,25 @@ public ParticleRenderType getRenderType() {
}
public void setSpriteSet(SpriteSet ss) {
this.spriteSet=ss;
this.setSpriteFromAge(this.spriteSet);
}

@Override
public void render(VertexConsumer worldRendererIn, Camera entityIn, float pt) {
float age = (this.age + pt) / lifetime * 32.0F;

age = Mth.clamp(age, 0.0F, 1.0F);

this.quadSize = originalScale * age;
super.render(worldRendererIn, entityIn, pt);
}

@Override
public void tick() {
super.tick();

if(this.spriteSet!=null)
this.setSpriteFromAge(this.spriteSet);
super.render(worldRendererIn, entityIn, pt);
}


Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/assets/caupona/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@
"block.caupona.loaf_dough": "Loaf Dough",
"block.caupona.loaf_bowl": "Bread Bowl",
"block.caupona.kitchen_rail": "Kitchen Rail",
"block.caupona.loaf_heap": "Loaf Heap",
"block.caupona.loaf_heap_slab": "Loaf Heap Slab",
"block.caupona.loaf_heap_stairs": "Loaf Heap Stairs",
"block.caupona.loaf_heap_wall": "Loaf Heap Wall",
"item.caupona.book": "Vade Mecum for Innkeepers",
"item.caupona.bone_gelatin": "Bone Gelatin",
"item.caupona.chives_spice_jar": "Spice Jar of Chives",
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/assets/caupona/lang/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@
"block.caupona.loaf": "面包轮",
"block.caupona.loaf_dough": "大面团",
"block.caupona.loaf_bowl": "面包碗",
"block.caupona.loaf_heap": "面包块",
"block.caupona.loaf_heap_slab": "面包台阶",
"block.caupona.loaf_heap_stairs": "面包楼梯",
"block.caupona.loaf_heap_wall": "面包墙",
"block.caupona.kitchen_rail": "厨具架",
"item.caupona.book": "分茶清供",
"item.caupona.acquacotta": "面包汤",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/data/caupona/recipe/crafting/book.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"result": {
"id": "patchouli:guide_book",
"nbt": {
"components": {
"patchouli:book": "caupona:book"
}
},
Expand Down

0 comments on commit 137d7a2

Please sign in to comment.