Porting hiccups

- Fixed missing items rendering flipped in the schematicannon UI
- Fixed broken formatting in Material Checklists
This commit is contained in:
simibubi 2020-12-11 21:35:27 +01:00
parent 42215b8eb0
commit 065be4dc96
4 changed files with 42 additions and 41 deletions

View file

@ -29,8 +29,8 @@
}, },
{ {
"when": { "when": {
"axis": "x", "sticky_south": "true",
"sticky_south": "true" "axis": "x"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x_sticky", "model": "create:block/radial_chassis_side_x_sticky",
@ -39,8 +39,8 @@
}, },
{ {
"when": { "when": {
"axis": "y", "sticky_south": "true",
"sticky_south": "true" "axis": "y"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_y_sticky" "model": "create:block/radial_chassis_side_y_sticky"
@ -48,8 +48,8 @@
}, },
{ {
"when": { "when": {
"axis": "z", "sticky_south": "true",
"sticky_south": "true" "axis": "z"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x_sticky", "model": "create:block/radial_chassis_side_x_sticky",
@ -59,8 +59,8 @@
}, },
{ {
"when": { "when": {
"axis": "x", "sticky_south": "false",
"sticky_south": "false" "axis": "x"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x", "model": "create:block/radial_chassis_side_x",
@ -69,8 +69,8 @@
}, },
{ {
"when": { "when": {
"axis": "y", "sticky_south": "false",
"sticky_south": "false" "axis": "y"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_y" "model": "create:block/radial_chassis_side_y"
@ -78,8 +78,8 @@
}, },
{ {
"when": { "when": {
"axis": "z", "sticky_south": "false",
"sticky_south": "false" "axis": "z"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x", "model": "create:block/radial_chassis_side_x",
@ -149,8 +149,8 @@
}, },
{ {
"when": { "when": {
"axis": "x", "sticky_north": "true",
"sticky_north": "true" "axis": "x"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x_sticky" "model": "create:block/radial_chassis_side_x_sticky"
@ -158,8 +158,8 @@
}, },
{ {
"when": { "when": {
"axis": "y", "sticky_north": "true",
"sticky_north": "true" "axis": "y"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_y_sticky", "model": "create:block/radial_chassis_side_y_sticky",
@ -168,8 +168,8 @@
}, },
{ {
"when": { "when": {
"axis": "z", "sticky_north": "true",
"sticky_north": "true" "axis": "z"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x_sticky", "model": "create:block/radial_chassis_side_x_sticky",
@ -178,8 +178,8 @@
}, },
{ {
"when": { "when": {
"axis": "x", "sticky_north": "false",
"sticky_north": "false" "axis": "x"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x" "model": "create:block/radial_chassis_side_x"
@ -187,8 +187,8 @@
}, },
{ {
"when": { "when": {
"axis": "y", "sticky_north": "false",
"sticky_north": "false" "axis": "y"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_y", "model": "create:block/radial_chassis_side_y",
@ -197,8 +197,8 @@
}, },
{ {
"when": { "when": {
"axis": "z", "sticky_north": "false",
"sticky_north": "false" "axis": "z"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x", "model": "create:block/radial_chassis_side_x",
@ -207,8 +207,8 @@
}, },
{ {
"when": { "when": {
"axis": "x", "sticky_east": "true",
"sticky_east": "true" "axis": "x"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x_sticky", "model": "create:block/radial_chassis_side_x_sticky",
@ -217,8 +217,8 @@
}, },
{ {
"when": { "when": {
"axis": "y", "sticky_east": "true",
"sticky_east": "true" "axis": "y"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_y_sticky", "model": "create:block/radial_chassis_side_y_sticky",
@ -227,8 +227,8 @@
}, },
{ {
"when": { "when": {
"axis": "z", "sticky_east": "true",
"sticky_east": "true" "axis": "z"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_z_sticky" "model": "create:block/radial_chassis_side_z_sticky"
@ -236,8 +236,8 @@
}, },
{ {
"when": { "when": {
"axis": "x", "sticky_east": "false",
"sticky_east": "false" "axis": "x"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x", "model": "create:block/radial_chassis_side_x",
@ -246,8 +246,8 @@
}, },
{ {
"when": { "when": {
"axis": "y", "sticky_east": "false",
"sticky_east": "false" "axis": "y"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_y", "model": "create:block/radial_chassis_side_y",
@ -256,8 +256,8 @@
}, },
{ {
"when": { "when": {
"axis": "z", "sticky_east": "false",
"sticky_east": "false" "axis": "z"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_z" "model": "create:block/radial_chassis_side_z"

View file

@ -40,7 +40,7 @@ public abstract class TranslatingContraption extends Contraption {
} }
@Override @Override
public void removeBlocksFromWorld(IWorld world, BlockPos offset) { public void removeBlocksFromWorld(World world, BlockPos offset) {
int count = blocks.size(); int count = blocks.size();
super.removeBlocksFromWorld(world, offset); super.removeBlocksFromWorld(world, offset);
if (count != blocks.size()) { if (count != blocks.size()) {

View file

@ -157,7 +157,7 @@ public class MaterialChecklist {
int stacks = amount / 64; int stacks = amount / 64;
int remainder = amount % 64; int remainder = amount % 64;
TranslationTextComponent tc = new TranslationTextComponent(item.getTranslationKey()); TranslationTextComponent tc = new TranslationTextComponent(item.getTranslationKey());
return tc.append(" \\u2714\n " + "---"); return tc.append(" \\u2714\n");
//.formatted(TextFormatting.DARK_GREEN).append(new StringTextComponent(" | " //.formatted(TextFormatting.DARK_GREEN).append(new StringTextComponent(" | "
//+ "-" + "\\u25A4 +" + "--" + "\n").formatted(TextFormatting.GRAY)); //+ "-" + "\\u25A4 +" + "--" + "\n").formatted(TextFormatting.GRAY));
// return TextFormatting.DARK_GREEN + tc.getFormattedText() + " \\u2714\n x" + amount + TextFormatting.GRAY + " | " // return TextFormatting.DARK_GREEN + tc.getFormattedText() + " \\u2714\n x" + amount + TextFormatting.GRAY + " | "

View file

@ -273,10 +273,11 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
if (te.missingItem != null) { if (te.missingItem != null) {
stringWidth += 15; stringWidth += 15;
matrixStack.push(); matrixStack.push();
matrixStack.translate(guiLeft + 150, guiTop + 46, 0); GuiGameElement.of(te.missingItem)
GuiGameElement.GuiItemRenderBuilder.renderItemIntoGUI(matrixStack, te.missingItem); .at(guiLeft + 150, guiTop + 62, 100)
.scale(1)
.render(matrixStack);
matrixStack.pop(); matrixStack.pop();
// itemRenderer.renderItemIntoGUI(te.missingItem, guiLeft + 150, guiTop + 46);
} }
textRenderer.drawWithShadow(matrixStack, msg, guiLeft + 20 + 102 - stringWidth / 2, guiTop + 50, 0xCCDDFF); textRenderer.drawWithShadow(matrixStack, msg, guiLeft + 20 + 102 - stringWidth / 2, guiTop + 50, 0xCCDDFF);