Frame perfect

- Re-enable AO on fluid pipes to restore smooth lighting on them
- Boost sounds in stock keeper screen
- Tweak item frame transforms of creates components
This commit is contained in:
simibubi 2025-02-28 10:57:08 +01:00
parent b67842105d
commit a8a160c666
33 changed files with 121 additions and 38 deletions

View file

@ -876,7 +876,7 @@ public class AllBlocks {
.properties(p -> p.forceSolidOff())
.transform(pickaxeOnly())
.blockstate(BlockStateGen.pipe())
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withoutAO))
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withAO))
.item()
.transform(customItemModel())
.register();
@ -915,7 +915,7 @@ public class AllBlocks {
.build();
}, BlockStateProperties.WATERLOGGED);
})
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withoutAO))
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withAO))
.loot((p, b) -> p.dropOther(b, FLUID_PIPE.get()))
.register();
@ -924,7 +924,7 @@ public class AllBlocks {
.properties(p -> p.mapColor(MapColor.STONE))
.transform(pickaxeOnly())
.blockstate(BlockStateGen.directionalBlockProviderIgnoresWaterlogged(true))
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withoutAO))
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withAO))
.transform(CStress.setImpact(4.0))
.item()
.transform(customItemModel())
@ -936,7 +936,7 @@ public class AllBlocks {
.properties(p -> p.mapColor(MapColor.TERRACOTTA_YELLOW))
.transform(pickaxeOnly())
.blockstate(new SmartFluidPipeGenerator()::generate)
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withoutAO))
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withAO))
.item()
.transform(customItemModel())
.register();
@ -948,7 +948,7 @@ public class AllBlocks {
.blockstate((c, p) -> BlockStateGen.directionalAxisBlock(c, p,
(state, vertical) -> AssetLookup.partialBaseModel(c, p, vertical ? "vertical" : "horizontal",
state.getValue(FluidValveBlock.ENABLED) ? "open" : "closed")))
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withoutAO))
.onRegister(CreateRegistrate.blockModel(() -> PipeAttachmentModel::withAO))
.item()
.transform(customItemModel())
.register();

View file

@ -1080,12 +1080,12 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
if (!entry.hidden) {
hiddenCategories.add(indexOf);
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 0.75f, 1.5f);
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 1f, 1.5f);
}
else {
hiddenCategories.remove(indexOf);
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 0.75f, 0.675f);
playUiSound(SoundEvents.ITEM_FRAME_ROTATE_ITEM, 1f, 0.675f);
}
refreshSearchNextTick = true;
@ -1122,8 +1122,8 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
if (itemsToOrder.size() >= cols || rmb)
return true;
itemsToOrder.add(existingOrder = new BigItemStack(itemStack.copyWithCount(1), 0));
playUiSound(SoundEvents.WOOL_STEP, 0.5f, 1.2f);
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.5f, 0.8f);
playUiSound(SoundEvents.WOOL_STEP, 0.75f, 1.2f);
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.75f, 0.8f);
}
int current = existingOrder.count;
@ -1132,8 +1132,8 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
existingOrder.count = current - transfer;
if (existingOrder.count <= 0) {
itemsToOrder.remove(existingOrder);
playUiSound(SoundEvents.WOOL_STEP, 0.5f, 1.8f);
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.5f, 1.8f);
playUiSound(SoundEvents.WOOL_STEP, 0.75f, 1.8f);
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.75f, 1.8f);
}
return true;
}
@ -1189,8 +1189,8 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
if (itemsToOrder.size() >= cols || remove)
return true;
itemsToOrder.add(existingOrder = new BigItemStack(entry.stack.copyWithCount(1), 0));
playUiSound(SoundEvents.WOOL_STEP, 0.5f, 1.2f);
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.5f, 0.8f);
playUiSound(SoundEvents.WOOL_STEP, 0.75f, 1.2f);
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.75f, 0.8f);
}
int current = existingOrder.count;
@ -1199,8 +1199,8 @@ public class StockKeeperRequestScreen extends AbstractSimiContainerScreen<StockK
existingOrder.count = current - transfer;
if (existingOrder.count <= 0) {
itemsToOrder.remove(existingOrder);
playUiSound(SoundEvents.WOOL_STEP, 0.5f, 1.8f);
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.5f, 1.8f);
playUiSound(SoundEvents.WOOL_STEP, 0.75f, 1.8f);
playUiSound(SoundEvents.BAMBOO_WOOD_STEP, 0.75f, 1.8f);
} else if (existingOrder.count != current)
playUiSound(AllSoundEvents.SCROLL_VALUE.getMainEvent(), 0.25f, 1.2f);
return true;

View file

@ -146,8 +146,7 @@ public class ValueBox extends ChasingAABBOutline {
ItemRenderer itemRenderer = Minecraft.getInstance()
.getItemRenderer();
BakedModel modelWithOverrides = itemRenderer.getModel(stack, null, null, 0);
boolean blockItem = modelWithOverrides.isGui3d() && modelWithOverrides.getRenderPasses(stack, false)
.size() <= 1;
boolean blockItem = modelWithOverrides.isGui3d();
float scale = 1.5f;
ms.translate(-font.width(count), 0, 0);

View file

@ -28,8 +28,7 @@ public class ValueBoxRenderer {
Minecraft mc = Minecraft.getInstance();
ItemRenderer itemRenderer = mc.getItemRenderer();
BakedModel modelWithOverrides = itemRenderer.getModel(filter, null, null, 0);
boolean blockItem =
modelWithOverrides.isGui3d() && modelWithOverrides.getRenderPasses(filter, false).size() <= 1;
boolean blockItem = modelWithOverrides.isGui3d();
float scale = (!blockItem ? .5f : 1f) + 1 / 64f;
float zOffset = (!blockItem ? -.15f : 0) + customZOffset(filter.getItem());
ms.scale(scale, scale, scale);

View file

@ -10,9 +10,9 @@
"scale":[ 0.4, 0.4, 0.4 ]
},
"fixed": {
"rotation": [ 90, 0, 0 ],
"rotation": [ 270, 180, 0 ],
"translation": [ 0, 0, 0],
"scale":[ 0.5, 0.5, 0.5 ]
"scale":[ 0.375, 0.375, 0.375 ]
}
}
}

View file

@ -61,6 +61,12 @@
}
}
],
"display": {
"fixed": {
"rotation": [0, 90, 0],
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
0,
1,

View file

@ -99,7 +99,7 @@
},
"fixed": {
"rotation": [ 270, 0, 0 ],
"translation": [ 0, 0, -3],
"translation": [ 0, 0, -5],
"scale":[ 0.5, 0.5, 0.5 ]
}
}

View file

@ -101,7 +101,7 @@
},
"fixed": {
"rotation": [ 270, 0, 0 ],
"translation": [ 0, 0, -3],
"translation": [ 0, 0, -5],
"scale":[ 0.5, 0.5, 0.5 ]
}
}

View file

@ -94,7 +94,7 @@
},
"fixed": {
"rotation": [270, 0, 0],
"translation": [0, 0, -3],
"translation": [0, 0, -5],
"scale": [0.5, 0.5, 0.5]
}
}

View file

@ -68,7 +68,7 @@
},
"fixed": {
"rotation": [270, 0, 0],
"translation": [0, 0, -3],
"translation": [0, 0, -5],
"scale": [0.5, 0.5, 0.5]
}
}

View file

@ -68,7 +68,7 @@
},
"fixed": {
"rotation": [270, 0, 0],
"translation": [0, 0, -3],
"translation": [0, 0, -5],
"scale": [0.5, 0.5, 0.5]
}
}

View file

@ -136,6 +136,8 @@
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"rotation": [270, 0, 0],
"translation": [0, 0, -4],
"scale": [0.5, 0.5, 0.5]
}
}

View file

@ -214,6 +214,12 @@
}
}
],
"display": {
"fixed": {
"rotation": [0, 90, 0],
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
{
"name": "Frame",

View file

@ -80,6 +80,12 @@
}
}
],
"display": {
"fixed": {
"rotation": [0, 90, 0],
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
0,
1,

View file

@ -112,7 +112,9 @@
"translation": [0, 14.25, 0]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
"rotation": [-90, 0, 0],
"translation": [0, 0, -6.5],
"scale": [0.75, 0.75, 0.75]
}
},
"groups": [

View file

@ -128,6 +128,7 @@
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"rotation": [90, 0, 0],
"scale": [0.5, 0.5, 0.5]
}
},

View file

@ -11,8 +11,8 @@
},
"fixed": {
"rotation": [ 90, 0, 0 ],
"translation": [ 0, 0, 0],
"scale":[ 0.4, 0.4, 0.4 ]
"translation": [ 0, 0, -1],
"scale":[ 0.375, 0.375, 0.375 ]
}
}
}

View file

@ -80,6 +80,12 @@
}
}
],
"display": {
"fixed": {
"rotation": [0, 90, 0],
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
0,
1,

View file

@ -92,5 +92,12 @@
"color": 0,
"children": [0, 1, 2, 3, 4, 5, 6]
}
]
],
"display": {
"fixed": {
"rotation": [0, 0, 0],
"translation": [0, 0, -1],
"scale": [0.5, 0.5, 0.5]
}
}
}

View file

@ -264,7 +264,7 @@
},
"fixed": {
"rotation": [0, 90, 0],
"translation": [0, 2.25, -0.75],
"translation": [0, 4.25, -0.75],
"scale": [0.45, 0.45, 0.45]
}
},

View file

@ -77,5 +77,11 @@
}
]
}
},
"display": {
"fixed": {
"rotation": [0, 90, 0],
"scale": [0.5, 0.5, 0.5]
}
}
}

View file

@ -90,5 +90,12 @@
"color": 0,
"children": [0, 1, 2, 3, 4, 5, 6]
}
]
],
"display": {
"fixed": {
"rotation": [0, 0, 0],
"translation": [0, 0, -1],
"scale": [0.5, 0.5, 0.5]
}
}
}

View file

@ -102,7 +102,7 @@
"translation": [0, 22.25, 0]
},
"fixed": {
"translation": [0, -1.25, 0],
"translation": [0, 0, 0],
"scale": [0.5, 0.5, 0.5]
}
},

View file

@ -210,7 +210,7 @@
"translation": [0, 22.25, 0]
},
"fixed": {
"translation": [0, -1.25, 0],
"translation": [0, 0, 0],
"scale": [0.5, 0.5, 0.5]
}
},

View file

@ -99,6 +99,8 @@
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"rotation": [270, 90, 0],
"translation": [0, 0, -4],
"scale": [0.5, 0.5, 0.5]
}
}

View file

@ -80,6 +80,12 @@
}
}
],
"display": {
"fixed": {
"rotation": [0, 90, 0],
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
{
"name": "encased_shaft",

View file

@ -112,6 +112,7 @@
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"rotation": [0, 90, 0],
"scale": [0.5, 0.5, 0.5]
}
}

View file

@ -148,6 +148,8 @@
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"rotation": [270, 0, 0],
"translation": [0, 0, -4],
"scale": [0.5, 0.5, 0.5]
}
}

View file

@ -202,7 +202,8 @@
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"translation": [0, 5.75, 0],
"rotation": [270, 0, 0],
"translation": [0, 0, -6],
"scale": [0.5, 0.5, 0.5]
}
},

View file

@ -37,6 +37,10 @@
"gui": {
"rotation": [30, -135, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"rotation": [0, 90, 0],
"scale": [0.5, 0.5, 0.5]
}
}
}

View file

@ -6,5 +6,24 @@
"textures": {
"3": "create:block/valve_handle/valve_handle_copper",
"particle": "#3"
},
"display": {
"fixed": {
"rotation": [
270,
0,
0
],
"translation": [
0,
0,
-2
],
"scale": [
0.5,
0.5,
0.5
]
}
}
}

View file

@ -122,7 +122,8 @@
},
"fixed": {
"rotation": [0, 90, 0],
"translation": [0, -5, 0]
"translation": [0, -2.5, -0.75],
"scale": [0.5, 0.5, 0.5]
}
}
}

View file

@ -134,8 +134,8 @@
"scale": [1.09453, 1.09453, 1.09453]
},
"fixed": {
"rotation": [0, 160.5, 0],
"translation": [0.5, 0.5, 0]
"rotation": [0, 180, 0],
"translation": [0.5, 0.5, -0.75]
}
},
"groups": [