forked from FabricMC/fabric
Initial port to 20w09a
This commit is contained in:
parent
a279af2a9a
commit
2f56dff236
9 changed files with 14 additions and 14 deletions
|
@ -13,7 +13,7 @@ def ENV = System.getenv()
|
|||
|
||||
class Globals {
|
||||
static def baseVersion = "0.4.33"
|
||||
static def mcVersion = "20w07a"
|
||||
static def mcVersion = "20w09a"
|
||||
static def yarnVersion = "+build.1"
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
archivesBaseName = "fabric-loot-tables-v1"
|
||||
version = getSubprojectVersion(project, "0.1.5")
|
||||
version = getSubprojectVersion(project, "0.1.6")
|
||||
|
||||
dependencies {
|
||||
compile project(path: ':fabric-api-base', configuration: 'dev')
|
||||
|
|
|
@ -38,13 +38,13 @@ import net.fabricmc.fabric.api.loot.v1.event.LootTableLoadingCallback;
|
|||
|
||||
@Mixin(LootManager.class)
|
||||
public class MixinLootManager {
|
||||
@Shadow private Map<Identifier, LootTable> suppliers;
|
||||
@Shadow private Map<Identifier, LootTable> tables;
|
||||
|
||||
@Inject(method = "apply", at = @At("RETURN"))
|
||||
private void apply(Map<Identifier, JsonObject> objectMap, ResourceManager manager, Profiler profiler, CallbackInfo info) {
|
||||
Map<Identifier, LootTable> newSuppliers = new HashMap<>();
|
||||
|
||||
suppliers.forEach((id, supplier) -> {
|
||||
tables.forEach((id, supplier) -> {
|
||||
FabricLootSupplierBuilder builder = FabricLootSupplierBuilder.of(supplier);
|
||||
|
||||
//noinspection ConstantConditions
|
||||
|
@ -55,6 +55,6 @@ public class MixinLootManager {
|
|||
newSuppliers.computeIfAbsent(id, (i) -> builder.create());
|
||||
});
|
||||
|
||||
suppliers = ImmutableMap.copyOf(newSuppliers);
|
||||
tables = ImmutableMap.copyOf(newSuppliers);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
archivesBaseName = "fabric-renderer-api-v1"
|
||||
version = getSubprojectVersion(project, "0.2.10")
|
||||
version = getSubprojectVersion(project, "0.2.11")
|
||||
|
||||
dependencies {
|
||||
compile project(path: ':fabric-api-base', configuration: 'dev')
|
||||
|
|
|
@ -122,7 +122,7 @@ public interface QuadView {
|
|||
default BakedQuad toBakedQuad(int spriteIndex, Sprite sprite, boolean isItem) {
|
||||
int[] vertexData = new int[VANILLA_QUAD_STRIDE];
|
||||
toVanilla(spriteIndex, vertexData, 0, isItem);
|
||||
return new BakedQuad(vertexData, colorIndex(), lightFace(), sprite);
|
||||
return new BakedQuad(vertexData, colorIndex(), lightFace(), sprite, true /* TODO:20w09a check me */);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
archivesBaseName = "fabric-renderer-indigo"
|
||||
version = getSubprojectVersion(project, "0.2.24")
|
||||
version = getSubprojectVersion(project, "0.2.25")
|
||||
|
||||
dependencies {
|
||||
compile project(path: ':fabric-api-base', configuration: 'dev')
|
||||
|
|
|
@ -28,5 +28,5 @@ public interface AccessAmbientOcclusionCalculator {
|
|||
|
||||
int[] fabric_brightness();
|
||||
|
||||
void fabric_apply(BlockRenderView blockRenderView, BlockState blockState, BlockPos pos, Direction face, float[] aoData, BitSet controlBits);
|
||||
void fabric_apply(BlockRenderView blockRenderView, BlockState blockState, BlockPos pos, Direction face, float[] aoData, BitSet controlBits, boolean shade);
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ public class AoCalculator {
|
|||
}
|
||||
|
||||
public void compute(MutableQuadViewImpl quad, boolean isVanilla) {
|
||||
final AoConfig config = Indigo.AMBIENT_OCCLUSION_MODE;
|
||||
final AoConfig config = AoConfig.VANILLA; // Indigo.AMBIENT_OCCLUSION_MODE; TODO:20w09a Fix me
|
||||
final boolean shouldCompare;
|
||||
|
||||
switch (config) {
|
||||
|
@ -188,7 +188,7 @@ public class AoCalculator {
|
|||
quad.toVanilla(0, vertexData, 0, false);
|
||||
|
||||
VanillaAoHelper.updateShape(blockInfo.blockView, blockInfo.blockState, blockInfo.blockPos, vertexData, face, vanillaAoData, vanillaAoControlBits);
|
||||
vanillaCalc.fabric_apply(blockInfo.blockView, blockInfo.blockState, blockInfo.blockPos, quad.lightFace(), vanillaAoData, vanillaAoControlBits);
|
||||
vanillaCalc.fabric_apply(blockInfo.blockView, blockInfo.blockState, blockInfo.blockPos, quad.lightFace(), vanillaAoData, vanillaAoControlBits, true /* TODO:20w09a check me */);
|
||||
|
||||
System.arraycopy(vanillaCalc.fabric_colorMultiplier(), 0, aoDest, 0, 4);
|
||||
System.arraycopy(vanillaCalc.fabric_brightness(), 0, lightDest, 0, 4);
|
||||
|
|
|
@ -34,7 +34,7 @@ public abstract class MixinAmbientOcclusionCalculator implements AccessAmbientOc
|
|||
@Shadow private int[] light;
|
||||
|
||||
@Shadow
|
||||
public abstract void apply(BlockRenderView blockRenderView, BlockState blockState, BlockPos pos, Direction face, float[] aoData, BitSet controlBits);
|
||||
public abstract void apply(BlockRenderView blockRenderView, BlockState blockState, BlockPos pos, Direction face, float[] aoData, BitSet controlBits, boolean shade);
|
||||
|
||||
@Override
|
||||
public float[] fabric_colorMultiplier() {
|
||||
|
@ -47,7 +47,7 @@ public abstract class MixinAmbientOcclusionCalculator implements AccessAmbientOc
|
|||
}
|
||||
|
||||
@Override
|
||||
public void fabric_apply(BlockRenderView blockRenderView, BlockState blockState, BlockPos pos, Direction face, float[] aoData, BitSet controlBits) {
|
||||
apply(blockRenderView, blockState, pos, face, aoData, controlBits);
|
||||
public void fabric_apply(BlockRenderView blockRenderView, BlockState blockState, BlockPos pos, Direction face, float[] aoData, BitSet controlBits, boolean shade) {
|
||||
apply(blockRenderView, blockState, pos, face, aoData, controlBits, shade);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue