Merge branch 'mc1.18/dev' of https://github.com/Creators-of-Create/Create into mc1.18/dev

This commit is contained in:
simibubi 2022-09-10 14:04:14 +02:00
commit aeee9f8793
28 changed files with 217 additions and 139 deletions

View file

@ -559,23 +559,23 @@ bf2b0310500213ff853c748c236eb5d01f61658e assets/create/blockstates/yellow_toolbo
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
f85edc574ee6de0de7693ffb031266643db6724a assets/create/lang/en_ud.json
b093292a09f18cce236ddb4ab0461891c5a70fe6 assets/create/lang/en_us.json
603af7f8a80b09da7ef5765f2aa863bbef1fc8ea assets/create/lang/unfinished/de_de.json
48858781b80b77a0d00b6fab733482ae4a9115fc assets/create/lang/unfinished/es_cl.json
ee47168049448ffa0959210d8f06b8f4b7219c85 assets/create/lang/unfinished/es_es.json
8fd4488ce0579f7b71a7cf20fe5556cdbb515834 assets/create/lang/unfinished/fr_fr.json
d4266c22c1265a2ef0784a13b223e4bb17ec11d0 assets/create/lang/unfinished/it_it.json
6578c40b206d61ac0aad1311d02c9bdbcd5f9d45 assets/create/lang/unfinished/ja_jp.json
f642160ce3c6ffe0ded12c7e05a15cb6536c4def assets/create/lang/unfinished/ko_kr.json
fdc3bda8618e963b6023af13caa0050f48ba0c26 assets/create/lang/unfinished/nl_nl.json
c498bb7eb6f030b7b4934882e8bfc418dd8f6174 assets/create/lang/unfinished/pl_pl.json
b9e51c59ae50ae274d0c56f60803d8a397524547 assets/create/lang/unfinished/pt_br.json
2b1ecada0e99852d604fd718e6ef87dbaff180e6 assets/create/lang/unfinished/pt_pt.json
71d01c97da2fd3c15576fb183871833b272174bf assets/create/lang/unfinished/ro_ro.json
6be78dc74952189c50f70df3182c3614cd49fdec assets/create/lang/unfinished/ru_ru.json
573a499be537300fb93d254b45923de80978d434 assets/create/lang/unfinished/uk_ua.json
2e6e637071b2ea70de178c77fe8b85544cc89a6b assets/create/lang/unfinished/zh_cn.json
5ec18f7aee828e35dcf76d491b26d76fc81b010e assets/create/lang/unfinished/zh_tw.json
11fd391ac3015f4dace8138ab1ec423ee822c7b4 assets/create/lang/en_us.json
34ab109f0935b7d0a7dd306188e0bd3056a77f93 assets/create/lang/unfinished/de_de.json
b5487949ee53302706c15051157316bb60dfa070 assets/create/lang/unfinished/es_cl.json
6df40ff1c18bfb83a33bc17e4458feeeee058bf1 assets/create/lang/unfinished/es_es.json
bca24c29adf91e0ee09db39783c59fac843acb46 assets/create/lang/unfinished/fr_fr.json
d7b53a16d03be2f854dfba1e90e2a149c2abecbd assets/create/lang/unfinished/it_it.json
42a6713a509ecd676e7eae6e6492da1e20e79102 assets/create/lang/unfinished/ja_jp.json
38e01a060e0e468a51b1ca4f0bcbec203837ce04 assets/create/lang/unfinished/ko_kr.json
83d812a1003fa3f25a3c28bbf54bf93f583c594a assets/create/lang/unfinished/nl_nl.json
c8c60fe2405f37cce7309326fb62cdb9aa1b49ff assets/create/lang/unfinished/pl_pl.json
11b3809e9c4c3c61687f7789979fdbf2332fd6a4 assets/create/lang/unfinished/pt_br.json
dd52b8df6ea92c1218e398197a1cedae066b4e0e assets/create/lang/unfinished/pt_pt.json
954a947034232204bd415e4bfb6c59a3a448b604 assets/create/lang/unfinished/ro_ro.json
54a92b2d667b55675c694904752760b594ab1424 assets/create/lang/unfinished/ru_ru.json
2f084cc7b66fe4ea82f5ac3338a1245caf67c54d assets/create/lang/unfinished/uk_ua.json
82490ac29a0c35c07cde11c340634bf8b416b6a3 assets/create/lang/unfinished/zh_cn.json
426b06805f08ef3fed15f404e9637b2d7082d660 assets/create/lang/unfinished/zh_tw.json
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json

View file

@ -1257,8 +1257,10 @@
"create.item_attributes.smeltable.inverted": "cannot be Smelted",
"create.item_attributes.smokable": "can be Smoked",
"create.item_attributes.smokable.inverted": "cannot be Smoked",
"create.item_attributes.blastable": "is smeltable in Blast Furnace",
"create.item_attributes.blastable.inverted": "is not smeltable in Blast Furnace",
"create.item_attributes.blastable": "can be Smelted in a Blast Furnace",
"create.item_attributes.blastable.inverted": "cannot be Smelted in a Blast Furnace",
"create.item_attributes.compostable": "can be composted",
"create.item_attributes.compostable.inverted": "cannot be composted",
"create.item_attributes.shulker_level": "is shulker %1$s",
"create.item_attributes.shulker_level.inverted": "is shulker not %1$s",
"create.item_attributes.shulker_level.full": "full",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 838",
"_": "Missing Localizations: 840",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1260,6 +1260,8 @@
"create.item_attributes.smokable.inverted": "kann nicht geräuchert werden",
"create.item_attributes.blastable": "ist im Schmelzofen schmelzbar",
"create.item_attributes.blastable.inverted": "ist nicht im Schmelzofen schmelzbar",
"create.item_attributes.compostable": "UNLOCALIZED: can be composted",
"create.item_attributes.compostable.inverted": "UNLOCALIZED: cannot be composted",
"create.item_attributes.shulker_level": "ist Shulker %1$s",
"create.item_attributes.shulker_level.inverted": "ist Shulker nicht %1$s",
"create.item_attributes.shulker_level.full": "voll",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 984",
"_": "Missing Localizations: 986",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1260,6 +1260,8 @@
"create.item_attributes.smokable.inverted": "no puede ser Ahumado",
"create.item_attributes.blastable": "puede ser cocinado en un Alto Horno",
"create.item_attributes.blastable.inverted": "no puede ser cocinado en un Alto Horno",
"create.item_attributes.compostable": "UNLOCALIZED: can be composted",
"create.item_attributes.compostable.inverted": "UNLOCALIZED: cannot be composted",
"create.item_attributes.shulker_level": "es un shulker %1$s",
"create.item_attributes.shulker_level.inverted": "no es un shulker %1$s",
"create.item_attributes.shulker_level.full": "lleno",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 4",
"_": "Missing Localizations: 6",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1260,6 +1260,8 @@
"create.item_attributes.smokable.inverted": "no puede ser ahumado",
"create.item_attributes.blastable": "es fundible en el alto horno",
"create.item_attributes.blastable.inverted": "no es fundible en el alto horno",
"create.item_attributes.compostable": "UNLOCALIZED: can be composted",
"create.item_attributes.compostable.inverted": "UNLOCALIZED: cannot be composted",
"create.item_attributes.shulker_level": "es shulker %1$s",
"create.item_attributes.shulker_level.inverted": "no es shulker %1$s",
"create.item_attributes.shulker_level.full": "lleno",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 2135",
"_": "Missing Localizations: 2137",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1260,6 +1260,8 @@
"create.item_attributes.smokable.inverted": "ne peut pas être fumé",
"create.item_attributes.blastable": "est fondable dans un Haut fourneau",
"create.item_attributes.blastable.inverted": "n'est pas fondable dans un Haut fourneau",
"create.item_attributes.compostable": "UNLOCALIZED: can be composted",
"create.item_attributes.compostable.inverted": "UNLOCALIZED: cannot be composted",
"create.item_attributes.shulker_level": "UNLOCALIZED: is shulker %1$s",
"create.item_attributes.shulker_level.inverted": "UNLOCALIZED: is shulker not %1$s",
"create.item_attributes.shulker_level.full": "UNLOCALIZED: full",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 4",
"_": "Missing Localizations: 6",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1260,6 +1260,8 @@
"create.item_attributes.smokable.inverted": "non può essere affumicato",
"create.item_attributes.blastable": "è fondibile in un forno fusorio",
"create.item_attributes.blastable.inverted": "non è fondibile in un forno fusorio",
"create.item_attributes.compostable": "UNLOCALIZED: can be composted",
"create.item_attributes.compostable.inverted": "UNLOCALIZED: cannot be composted",
"create.item_attributes.shulker_level": "è uno shulker %1$s",
"create.item_attributes.shulker_level.inverted": "non è uno shulker %1$s",
"create.item_attributes.shulker_level.full": "pieno",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 0",
"_": "Missing Localizations: 2",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1260,6 +1260,8 @@
"create.item_attributes.smokable.inverted": "燻製器で調理できないか",
"create.item_attributes.blastable": "溶鉱炉で精錬できるかか",
"create.item_attributes.blastable.inverted": "溶鉱炉で精錬できないか",
"create.item_attributes.compostable": "UNLOCALIZED: can be composted",
"create.item_attributes.compostable.inverted": "UNLOCALIZED: cannot be composted",
"create.item_attributes.shulker_level": "%1$sシュルカーか",
"create.item_attributes.shulker_level.inverted": "%1$sシュルカーでないか",
"create.item_attributes.shulker_level.full": "満杯の",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 4",
"_": "Missing Localizations: 6",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1260,6 +1260,8 @@
"create.item_attributes.smokable.inverted": "훈연될 수 없음",
"create.item_attributes.blastable": "용광로에 녹일 수 있음",
"create.item_attributes.blastable.inverted": "용광로에 녹일 수 없음",
"create.item_attributes.compostable": "UNLOCALIZED: can be composted",
"create.item_attributes.compostable.inverted": "UNLOCALIZED: cannot be composted",
"create.item_attributes.shulker_level": "셜커가 %1$s있음",
"create.item_attributes.shulker_level.inverted": "셜커가 %1$s있지 않음",
"create.item_attributes.shulker_level.full": "가득 차",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 2483",
"_": "Missing Localizations: 2485",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1258,8 +1258,10 @@
"create.item_attributes.smeltable.inverted": "UNLOCALIZED: cannot be Smelted",
"create.item_attributes.smokable": "UNLOCALIZED: can be Smoked",
"create.item_attributes.smokable.inverted": "UNLOCALIZED: cannot be Smoked",
"create.item_attributes.blastable": "UNLOCALIZED: is smeltable in Blast Furnace",
"create.item_attributes.blastable.inverted": "UNLOCALIZED: is not smeltable in Blast Furnace",
"create.item_attributes.blastable": "UNLOCALIZED: can be Smelted in a Blast Furnace",
"create.item_attributes.blastable.inverted": "UNLOCALIZED: cannot be Smelted in a Blast Furnace",
"create.item_attributes.compostable": "UNLOCALIZED: can be composted",
"create.item_attributes.compostable.inverted": "UNLOCALIZED: cannot be composted",
"create.item_attributes.shulker_level": "UNLOCALIZED: is shulker %1$s",
"create.item_attributes.shulker_level.inverted": "UNLOCALIZED: is shulker not %1$s",
"create.item_attributes.shulker_level.full": "UNLOCALIZED: full",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 8",
"_": "Missing Localizations: 10",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1260,6 +1260,8 @@
"create.item_attributes.smokable.inverted": "nie może być wędzony",
"create.item_attributes.blastable": "może być stopiony w piecu hutniczym",
"create.item_attributes.blastable.inverted": "nie może być stopiony w piecu hutniczym",
"create.item_attributes.compostable": "UNLOCALIZED: can be composted",
"create.item_attributes.compostable.inverted": "UNLOCALIZED: cannot be composted",
"create.item_attributes.shulker_level": "jest %1$s",
"create.item_attributes.shulker_level.inverted": "nie jest %1$s",
"create.item_attributes.shulker_level.full": "pełna",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1327",
"_": "Missing Localizations: 1329",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1260,6 +1260,8 @@
"create.item_attributes.smokable.inverted": "Não pode ser defumado",
"create.item_attributes.blastable": "È fundível no alto-forno",
"create.item_attributes.blastable.inverted": "Não é fundível no alto-forno",
"create.item_attributes.compostable": "UNLOCALIZED: can be composted",
"create.item_attributes.compostable.inverted": "UNLOCALIZED: cannot be composted",
"create.item_attributes.shulker_level": "O shulker é %1$s",
"create.item_attributes.shulker_level.inverted": "O shulker não é %1$s",
"create.item_attributes.shulker_level.full": "Cheio",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 2192",
"_": "Missing Localizations: 2194",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1258,8 +1258,10 @@
"create.item_attributes.smeltable.inverted": "UNLOCALIZED: cannot be Smelted",
"create.item_attributes.smokable": "UNLOCALIZED: can be Smoked",
"create.item_attributes.smokable.inverted": "UNLOCALIZED: cannot be Smoked",
"create.item_attributes.blastable": "UNLOCALIZED: is smeltable in Blast Furnace",
"create.item_attributes.blastable.inverted": "UNLOCALIZED: is not smeltable in Blast Furnace",
"create.item_attributes.blastable": "UNLOCALIZED: can be Smelted in a Blast Furnace",
"create.item_attributes.blastable.inverted": "UNLOCALIZED: cannot be Smelted in a Blast Furnace",
"create.item_attributes.compostable": "UNLOCALIZED: can be composted",
"create.item_attributes.compostable.inverted": "UNLOCALIZED: cannot be composted",
"create.item_attributes.shulker_level": "UNLOCALIZED: is shulker %1$s",
"create.item_attributes.shulker_level.inverted": "UNLOCALIZED: is shulker not %1$s",
"create.item_attributes.shulker_level.full": "UNLOCALIZED: full",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 651",
"_": "Missing Localizations: 653",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1260,6 +1260,8 @@
"create.item_attributes.smokable.inverted": "nu poate fi Afumat",
"create.item_attributes.blastable": "poate fi topit în Furnal",
"create.item_attributes.blastable.inverted": "nu poate fi topit în Furnal",
"create.item_attributes.compostable": "UNLOCALIZED: can be composted",
"create.item_attributes.compostable.inverted": "UNLOCALIZED: cannot be composted",
"create.item_attributes.shulker_level": "este shulkerul %1$s",
"create.item_attributes.shulker_level.inverted": "nu este shulkerul %1$s",
"create.item_attributes.shulker_level.full": "plin",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 0",
"_": "Missing Localizations: 2",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1260,6 +1260,8 @@
"create.item_attributes.smokable.inverted": "нельзя прокоптить",
"create.item_attributes.blastable": "плавится в доменной печи",
"create.item_attributes.blastable.inverted": "не плавится в доменной печи",
"create.item_attributes.compostable": "UNLOCALIZED: can be composted",
"create.item_attributes.compostable.inverted": "UNLOCALIZED: cannot be composted",
"create.item_attributes.shulker_level": "шалкер %1$s",
"create.item_attributes.shulker_level.inverted": "шалкер не %1$s",
"create.item_attributes.shulker_level.full": "полный",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 982",
"_": "Missing Localizations: 984",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1260,6 +1260,8 @@
"create.item_attributes.smokable.inverted": "не можна Коптити",
"create.item_attributes.blastable": "плавиться в Плавильній печі",
"create.item_attributes.blastable.inverted": "не плавиться в Плавильній печі",
"create.item_attributes.compostable": "UNLOCALIZED: can be composted",
"create.item_attributes.compostable.inverted": "UNLOCALIZED: cannot be composted",
"create.item_attributes.shulker_level": "шалкер %1$s",
"create.item_attributes.shulker_level.inverted": "шалкер не %1$s",
"create.item_attributes.shulker_level.full": "повний",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 0",
"_": "Missing Localizations: 2",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1260,6 +1260,8 @@
"create.item_attributes.smokable.inverted": "不可被烟熏",
"create.item_attributes.blastable": "可被高炉冶炼",
"create.item_attributes.blastable.inverted": "不可被高炉冶炼",
"create.item_attributes.compostable": "UNLOCALIZED: can be composted",
"create.item_attributes.compostable.inverted": "UNLOCALIZED: cannot be composted",
"create.item_attributes.shulker_level": "潜影盒是%1$s的",
"create.item_attributes.shulker_level.inverted": "潜影盒不是%1$s的",
"create.item_attributes.shulker_level.full": "满",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 4",
"_": "Missing Localizations: 6",
"_": "->------------------------] Game Elements [------------------------<-",
@ -1260,6 +1260,8 @@
"create.item_attributes.smokable.inverted": "不可被煙熏",
"create.item_attributes.blastable": "可被高爐融煉",
"create.item_attributes.blastable.inverted": "不可被高爐融煉",
"create.item_attributes.compostable": "UNLOCALIZED: can be composted",
"create.item_attributes.compostable.inverted": "UNLOCALIZED: cannot be composted",
"create.item_attributes.shulker_level": "界伏盒是 %1$s",
"create.item_attributes.shulker_level.inverted": "界伏盒不是 %1$s",
"create.item_attributes.shulker_level.full": "滿的",

View file

@ -831,7 +831,7 @@ public abstract class AbstractContraptionEntity extends Entity implements IEntit
}
@OnlyIn(Dist.CLIENT)
public abstract void doLocalTransforms(float partialTicks, PoseStack[] matrixStacks);
public abstract void applyLocalTransforms(PoseStack matrixStack, float partialTicks);
public static class ContraptionRotationState {
public static final ContraptionRotationState NONE = new ContraptionRotationState();

View file

@ -226,12 +226,11 @@ public class ControlledContraptionEntity extends AbstractContraptionEntity {
@Override
@OnlyIn(Dist.CLIENT)
public void doLocalTransforms(float partialTicks, PoseStack[] matrixStacks) {
public void applyLocalTransforms(PoseStack matrixStack, float partialTicks) {
float angle = getAngle(partialTicks);
Axis axis = getRotationAxis();
for (PoseStack stack : matrixStacks)
TransformStack.cast(stack)
TransformStack.cast(matrixStack)
.nudge(getId())
.centre()
.rotate(angle, axis)

View file

@ -514,26 +514,24 @@ public class OrientedContraptionEntity extends AbstractContraptionEntity {
@Override
@OnlyIn(Dist.CLIENT)
public void doLocalTransforms(float partialTicks, PoseStack[] matrixStacks) {
public void applyLocalTransforms(PoseStack matrixStack, float partialTicks) {
float angleInitialYaw = getInitialYaw();
float angleYaw = getViewYRot(partialTicks);
float anglePitch = getViewXRot(partialTicks);
for (PoseStack stack : matrixStacks)
stack.translate(-.5f, 0, -.5f);
matrixStack.translate(-.5f, 0, -.5f);
Entity ridingEntity = getVehicle();
if (ridingEntity instanceof AbstractMinecart)
repositionOnCart(partialTicks, matrixStacks, ridingEntity);
repositionOnCart(matrixStack, partialTicks, ridingEntity);
else if (ridingEntity instanceof AbstractContraptionEntity) {
if (ridingEntity.getVehicle() instanceof AbstractMinecart)
repositionOnCart(partialTicks, matrixStacks, ridingEntity.getVehicle());
repositionOnCart(matrixStack, partialTicks, ridingEntity.getVehicle());
else
repositionOnContraption(partialTicks, matrixStacks, ridingEntity);
repositionOnContraption(matrixStack, partialTicks, ridingEntity);
}
for (PoseStack stack : matrixStacks)
TransformStack.cast(stack)
TransformStack.cast(matrixStack)
.nudge(getId())
.centre()
.rotateY(angleYaw)
@ -543,23 +541,21 @@ public class OrientedContraptionEntity extends AbstractContraptionEntity {
}
@OnlyIn(Dist.CLIENT)
private void repositionOnContraption(float partialTicks, PoseStack[] matrixStacks, Entity ridingEntity) {
private void repositionOnContraption(PoseStack matrixStack, float partialTicks, Entity ridingEntity) {
Vec3 pos = getContraptionOffset(partialTicks, ridingEntity);
for (PoseStack stack : matrixStacks)
stack.translate(pos.x, pos.y, pos.z);
matrixStack.translate(pos.x, pos.y, pos.z);
}
// Minecarts do not always render at their exact location, so the contraption
// has to adjust aswell
@OnlyIn(Dist.CLIENT)
private void repositionOnCart(float partialTicks, PoseStack[] matrixStacks, Entity ridingEntity) {
private void repositionOnCart(PoseStack matrixStack, float partialTicks, Entity ridingEntity) {
Vec3 cartPos = getCartOffset(partialTicks, ridingEntity);
if (cartPos == Vec3.ZERO)
return;
for (PoseStack stack : matrixStacks)
stack.translate(cartPos.x, cartPos.y, cartPos.z);
matrixStack.translate(cartPos.x, cartPos.y, cartPos.z);
}
@OnlyIn(Dist.CLIENT)

View file

@ -176,7 +176,7 @@ public class GantryContraptionEntity extends AbstractContraptionEntity {
}
@Override
public void doLocalTransforms(float partialTicks, PoseStack[] matrixStacks) { }
public void applyLocalTransforms(PoseStack matrixStack, float partialTicks) { }
public void updateClientMotion() {
float modifier = movementAxis.getAxisDirection()

View file

@ -34,7 +34,7 @@ public class ContraptionMatrices {
this.viewProjection.pushPose();
transform(this.viewProjection, viewProjection);
model.pushPose();
entity.doLocalTransforms(partialTicks, new PoseStack[] { model });
entity.applyLocalTransforms(model, partialTicks);
modelViewProjection.pushPose();
transform(modelViewProjection, viewProjection);

View file

@ -33,52 +33,67 @@ public class BlazeBurnerRenderer extends SafeTileEntityRenderer<BlazeBurnerTileE
public BlazeBurnerRenderer(BlockEntityRendererProvider.Context context) {}
@Override
protected void renderSafe(BlazeBurnerTileEntity te, float partialTicks, PoseStack ms, MultiBufferSource buffer,
protected void renderSafe(BlazeBurnerTileEntity te, float partialTicks, PoseStack ms, MultiBufferSource bufferSource,
int light, int overlay) {
HeatLevel heatLevel = te.getHeatLevelFromBlock();
if (heatLevel == HeatLevel.NONE)
return;
float horizontalAngle = AngleHelper.rad(te.headAngle.getValue(partialTicks));
Level level = te.getLevel();
int hashCode = te.hashCode();
float animation = te.headAnimation.getValue(partialTicks) * .175f;
BlockState blockState = te.getBlockState();
float animation = te.headAnimation.getValue(partialTicks) * .175f;
float horizontalAngle = AngleHelper.rad(te.headAngle.getValue(partialTicks));
boolean canDrawFlame = heatLevel.isAtLeast(HeatLevel.FADING);
boolean drawGoggles = te.goggles;
boolean drawHat = te.hat;
int hashCode = te.hashCode();
renderShared(level, buffer, null, ms, blockState, horizontalAngle, animation, drawGoggles, drawHat, hashCode);
renderShared(ms, null, bufferSource,
level, blockState, heatLevel, animation, horizontalAngle,
canDrawFlame, drawGoggles, drawHat, hashCode);
}
public static void renderInContraption(MovementContext context, VirtualRenderWorld renderWorld,
ContraptionMatrices matrices, MultiBufferSource buffer, LerpedFloat headAngle, boolean conductor) {
ContraptionMatrices matrices, MultiBufferSource bufferSource, LerpedFloat headAngle, boolean conductor) {
BlockState state = context.state;
if (BlazeBurnerBlock.getHeatLevelOf(state) == HeatLevel.KINDLED)
state = state.setValue(BlazeBurnerBlock.HEAT_LEVEL, HeatLevel.FADING);
float value = AngleHelper.rad(headAngle.getValue(AnimationTickHolder.getPartialTicks(context.world)));
renderShared(context.world, buffer, matrices.getModel(), matrices.getViewProjection(), state, value, 0,
context.tileData.contains("Goggles"), conductor, context.hashCode());
HeatLevel heatLevel = BlazeBurnerBlock.getHeatLevelOf(state);
if (heatLevel == HeatLevel.NONE)
return;
if (!heatLevel.isAtLeast(HeatLevel.FADING)) {
heatLevel = HeatLevel.FADING;
}
private static void renderShared(Level level, MultiBufferSource buffer, @Nullable PoseStack modelTransform,
PoseStack ms, BlockState blockState, float horizontalAngle, float animation, boolean drawGoggles,
boolean drawHat, int hashCode) {
Level level = context.world;
float horizontalAngle = AngleHelper.rad(headAngle.getValue(AnimationTickHolder.getPartialTicks(level)));
boolean drawGoggles = context.tileData.contains("Goggles");
boolean drawHat = conductor || context.tileData.contains("TrainHat");
int hashCode = context.hashCode();
renderShared(matrices.getViewProjection(), matrices.getModel(), bufferSource,
level, state, heatLevel, 0, horizontalAngle,
false, drawGoggles, drawHat, hashCode);
}
private static void renderShared(PoseStack ms, @Nullable PoseStack modelTransform, MultiBufferSource bufferSource,
Level level, BlockState blockState, HeatLevel heatLevel, float animation, float horizontalAngle,
boolean canDrawFlame, boolean drawGoggles, boolean drawHat, int hashCode) {
boolean blockAbove = animation > 0.125f;
HeatLevel heatLevel = BlazeBurnerBlock.getHeatLevelOf(blockState);
float time = AnimationTickHolder.getRenderTime(level);
float renderTick = time + (hashCode % 13) * 16f;
float offsetMult = heatLevel.isAtLeast(HeatLevel.FADING) ? 64 : 16;
float offset = Mth.sin((float) ((renderTick / 16f) % (2 * Math.PI))) / offsetMult;
float offset1 = Mth.sin((float) ((renderTick / 16f + Math.PI) % (2 * Math.PI))) / offsetMult;
float offset2 = Mth.sin((float) ((renderTick / 16f + Math.PI / 2) % (2 * Math.PI))) / offsetMult;
float headY = offset - (animation * .75f);
VertexConsumer solid = buffer.getBuffer(RenderType.solid());
VertexConsumer cutout = buffer.getBuffer(RenderType.cutoutMipped());
VertexConsumer solid = bufferSource.getBuffer(RenderType.solid());
VertexConsumer cutout = bufferSource.getBuffer(RenderType.cutoutMipped());
ms.pushPose();
if (modelTransform == null && heatLevel.isAtLeast(HeatLevel.FADING) && blockAbove) {
if (canDrawFlame && blockAbove) {
SpriteShiftEntry spriteShift =
heatLevel == HeatLevel.SEETHING ? AllSpriteShifts.SUPER_BURNER_FLAME : AllSpriteShifts.BURNER_FLAME;
@ -102,68 +117,87 @@ public class BlazeBurnerRenderer extends SafeTileEntityRenderer<BlazeBurnerTileE
uScroll = uScroll - Math.floor(uScroll);
uScroll = uScroll * spriteWidth / 2;
draw(CachedBufferer.partial(AllBlockPartials.BLAZE_BURNER_FLAME, blockState)
.shiftUVScrolling(spriteShift, (float) uScroll, (float) vScroll), horizontalAngle, modelTransform, ms,
cutout);
SuperByteBuffer flameBuffer = CachedBufferer.partial(AllBlockPartials.BLAZE_BURNER_FLAME, blockState);
if (modelTransform != null)
flameBuffer.transform(modelTransform);
flameBuffer.shiftUVScrolling(spriteShift, (float) uScroll, (float) vScroll);
draw(flameBuffer, horizontalAngle, ms, cutout);
}
PartialModel blazeModel = modelTransform != null ? AllBlockPartials.BLAZE_IDLE : AllBlockPartials.BLAZE_INERT;
if (heatLevel.isAtLeast(HeatLevel.SEETHING))
PartialModel blazeModel;
if (heatLevel.isAtLeast(HeatLevel.SEETHING)) {
blazeModel = blockAbove ? AllBlockPartials.BLAZE_SUPER_ACTIVE : AllBlockPartials.BLAZE_SUPER;
else if (heatLevel.isAtLeast(HeatLevel.FADING))
} else if (heatLevel.isAtLeast(HeatLevel.FADING)) {
blazeModel = blockAbove && heatLevel.isAtLeast(HeatLevel.KINDLED) ? AllBlockPartials.BLAZE_ACTIVE
: AllBlockPartials.BLAZE_IDLE;
} else {
blazeModel = AllBlockPartials.BLAZE_INERT;
}
float headY = offset - (animation * .75f);
SuperByteBuffer blazeBuffer = CachedBufferer.partial(blazeModel, blockState);
if (modelTransform != null)
blazeBuffer.transform(modelTransform);
blazeBuffer.translate(0, headY, 0);
draw(blazeBuffer, horizontalAngle, ms, solid);
draw(CachedBufferer.partial(blazeModel, blockState)
.translate(0, headY, 0), horizontalAngle, modelTransform, ms, solid);
if (drawGoggles) {
PartialModel gogglesModel = blazeModel == AllBlockPartials.BLAZE_INERT
? AllBlockPartials.BLAZE_GOGGLES_SMALL : AllBlockPartials.BLAZE_GOGGLES;
if (drawGoggles)
draw(CachedBufferer.partial(blazeModel == AllBlockPartials.BLAZE_INERT
? AllBlockPartials.BLAZE_GOGGLES_SMALL : AllBlockPartials.BLAZE_GOGGLES, blockState)
.translate(0, headY + 8 / 16f, 0), horizontalAngle, modelTransform, ms, solid);
SuperByteBuffer gogglesBuffer = CachedBufferer.partial(gogglesModel, blockState);
if (modelTransform != null)
gogglesBuffer.transform(modelTransform);
gogglesBuffer.translate(0, headY + 8 / 16f, 0);
draw(gogglesBuffer, horizontalAngle, ms, solid);
}
if (drawHat) {
SuperByteBuffer partial = CachedBufferer.partial(AllBlockPartials.TRAIN_HAT, blockState)
.translate(0, headY, 0);
SuperByteBuffer hatBuffer = CachedBufferer.partial(AllBlockPartials.TRAIN_HAT, blockState);
if (modelTransform != null)
hatBuffer.transform(modelTransform);
hatBuffer.translate(0, headY, 0);
if (blazeModel == AllBlockPartials.BLAZE_INERT) {
partial.translateY(0.5f)
hatBuffer.translateY(0.5f)
.centre()
.scale(0.75f)
.unCentre();
} else {
partial.translateY(0.75f);
hatBuffer.translateY(0.75f);
}
if (modelTransform != null)
partial.transform(modelTransform);
partial
hatBuffer
.rotateCentered(Direction.UP, horizontalAngle + Mth.PI)
.translate(0.5f, 0, 0.5f)
.light(LightTexture.FULL_BRIGHT)
.renderInto(ms, solid);
}
if (heatLevel.isAtLeast(HeatLevel.FADING) || modelTransform != null) {
PartialModel rods = heatLevel == HeatLevel.SEETHING ? AllBlockPartials.BLAZE_BURNER_SUPER_RODS
if (heatLevel.isAtLeast(HeatLevel.FADING)) {
PartialModel rodsModel = heatLevel == HeatLevel.SEETHING ? AllBlockPartials.BLAZE_BURNER_SUPER_RODS
: AllBlockPartials.BLAZE_BURNER_RODS;
PartialModel rods2 = heatLevel == HeatLevel.SEETHING ? AllBlockPartials.BLAZE_BURNER_SUPER_RODS_2
PartialModel rodsModel2 = heatLevel == HeatLevel.SEETHING ? AllBlockPartials.BLAZE_BURNER_SUPER_RODS_2
: AllBlockPartials.BLAZE_BURNER_RODS_2;
draw(CachedBufferer.partial(rods, blockState)
.translate(0, offset1 + animation + .125f, 0), 0, modelTransform, ms, solid);
draw(CachedBufferer.partial(rods2, blockState)
.translate(0, offset2 + animation - 3 / 16f, 0), 0, modelTransform, ms, solid);
SuperByteBuffer rodsBuffer = CachedBufferer.partial(rodsModel, blockState);
if (modelTransform != null)
rodsBuffer.transform(modelTransform);
rodsBuffer.translate(0, offset1 + animation + .125f, 0)
.light(LightTexture.FULL_BRIGHT)
.renderInto(ms, solid);
SuperByteBuffer rodsBuffer2 = CachedBufferer.partial(rodsModel2, blockState);
if (modelTransform != null)
rodsBuffer2.transform(modelTransform);
rodsBuffer2.translate(0, offset2 + animation - 3 / 16f, 0)
.light(LightTexture.FULL_BRIGHT)
.renderInto(ms, solid);
}
ms.popPose();
}
private static void draw(SuperByteBuffer blazeBuffer, float horizontalAngle, @Nullable PoseStack modelTransform,
PoseStack ms, VertexConsumer vb) {
if (modelTransform != null)
blazeBuffer.transform(modelTransform);
blazeBuffer.rotateCentered(Direction.UP, horizontalAngle)
private static void draw(SuperByteBuffer buffer, float horizontalAngle, PoseStack ms, VertexConsumer vc) {
buffer.rotateCentered(Direction.UP, horizontalAngle)
.light(LightTexture.FULL_BRIGHT)
.renderInto(ms, vb);
.renderInto(ms, vc);
}
}

View file

@ -55,9 +55,8 @@ import net.minecraft.world.level.block.entity.JukeboxBlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.wrapper.CombinedInvWrapper;
import net.minecraftforge.items.ItemHandlerHelper;
import net.minecraftforge.items.wrapper.SidedInvWrapper;
public class AllArmInteractionPointTypes {
@ -605,16 +604,29 @@ public class AllArmInteractionPointTypes {
@Nullable
@Override
protected IItemHandler getHandler() {
if (!cachedHandler.isPresent()) {
cachedHandler = LazyOptional.of(() -> {
ComposterBlock composterBlock = (ComposterBlock) Blocks.COMPOSTER;
WorldlyContainer container = composterBlock.getContainer(cachedState, level, pos);
SidedInvWrapper insertionHandler = new SidedInvWrapper(container, Direction.UP);
SidedInvWrapper extractionHandler = new SidedInvWrapper(container, Direction.DOWN);
return new CombinedInvWrapper(insertionHandler, extractionHandler);
});
return null;
}
return cachedHandler.orElse(null);
protected WorldlyContainer getContainer() {
ComposterBlock composterBlock = (ComposterBlock) Blocks.COMPOSTER;
return composterBlock.getContainer(cachedState, level, pos);
}
@Override
public ItemStack insert(ItemStack stack, boolean simulate) {
IItemHandler handler = new SidedInvWrapper(getContainer(), Direction.UP);
return ItemHandlerHelper.insertItem(handler, stack, simulate);
}
@Override
public ItemStack extract(int slot, int amount, boolean simulate) {
IItemHandler handler = new SidedInvWrapper(getContainer(), Direction.DOWN);
return handler.extractItem(slot, amount, simulate);
}
@Override
public int getSlotCount() {
return 2;
}
}

View file

@ -42,6 +42,7 @@ import net.minecraft.world.item.crafting.Recipe;
import net.minecraft.world.item.crafting.RecipeType;
import net.minecraft.world.item.enchantment.EnchantmentHelper;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.ComposterBlock;
import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@ -148,7 +149,8 @@ public interface ItemAttribute {
|| testRecipe(s, w, AllRecipeTypes.MILLING.getType())),
SMELTABLE((s, w) -> testRecipe(s, w, RecipeType.SMELTING)),
SMOKABLE((s, w) -> testRecipe(s, w, RecipeType.SMOKING)),
BLASTABLE((s, w) -> testRecipe(s, w, RecipeType.BLASTING));
BLASTABLE((s, w) -> testRecipe(s, w, RecipeType.BLASTING)),
COMPOSTABLE(s -> ComposterBlock.COMPOSTABLES.containsKey(s.getItem()));
private static final RecipeWrapper RECIPE_WRAPPER = new RecipeWrapper(new ItemStackHandler(1));
private Predicate<ItemStack> test;

View file

@ -8,16 +8,15 @@ import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.entity.BlockEntity;
public abstract class SafeTileEntityRenderer<T extends BlockEntity> implements BlockEntityRenderer<T> {
@Override
public final void render(T te, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light,
public final void render(T te, float partialTicks, PoseStack ms, MultiBufferSource bufferSource, int light,
int overlay) {
if (isInvalid(te))
return;
renderSafe(te, partialTicks, ms, buffer, light, overlay);
renderSafe(te, partialTicks, ms, bufferSource, light, overlay);
}
protected abstract void renderSafe(T te, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light,
protected abstract void renderSafe(T te, float partialTicks, PoseStack ms, MultiBufferSource bufferSource, int light,
int overlay);
public boolean isInvalid(T te) {

View file

@ -414,8 +414,10 @@
"create.item_attributes.smeltable.inverted": "cannot be Smelted",
"create.item_attributes.smokable": "can be Smoked",
"create.item_attributes.smokable.inverted": "cannot be Smoked",
"create.item_attributes.blastable": "is smeltable in Blast Furnace",
"create.item_attributes.blastable.inverted": "is not smeltable in Blast Furnace",
"create.item_attributes.blastable": "can be Smelted in a Blast Furnace",
"create.item_attributes.blastable.inverted": "cannot be Smelted in a Blast Furnace",
"create.item_attributes.compostable": "can be composted",
"create.item_attributes.compostable.inverted": "cannot be composted",
"create.item_attributes.shulker_level": "is shulker %1$s",
"create.item_attributes.shulker_level.inverted": "is shulker not %1$s",