This commit is contained in:
modmuss50 2020-03-25 18:20:06 +00:00
parent ce6dd8380f
commit 372d827d5a
11 changed files with 18 additions and 16 deletions

View file

@ -12,9 +12,9 @@ plugins {
def ENV = System.getenv()
class Globals {
static def baseVersion = "0.5.5"
static def mcVersion = "20w12a"
static def yarnVersion = "+build.3"
static def baseVersion = "0.5.6"
static def mcVersion = "20w13a"
static def yarnVersion = "+build.1"
}
import org.apache.commons.codec.digest.DigestUtils

View file

@ -1,5 +1,5 @@
archivesBaseName = "fabric-networking-blockentity-v0"
version = getSubprojectVersion(project, "0.2.4")
version = getSubprojectVersion(project, "0.2.5")
dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')

View file

@ -16,6 +16,8 @@
package net.fabricmc.fabric.mixin.networking.blockentity;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.spongepowered.asm.mixin.Mixin;
@ -41,7 +43,7 @@ public class MixinClientPlayNetworkHandler {
private static Logger FABRIC_LOGGER = LogManager.getLogger();
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;getBlockEntityType()I", ordinal = 0), method = "onBlockEntityUpdate", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD)
public void onBlockEntityUpdate(BlockEntityUpdateS2CPacket packet, CallbackInfo info, BlockEntity entity) {
public void onBlockEntityUpdate(BlockEntityUpdateS2CPacket packet, CallbackInfo info, BlockPos blockPos, BlockEntity entity) {
if (entity instanceof BlockEntityClientSerializable) {
if (packet.getBlockEntityType() == 127) {
BlockEntityClientSerializable serializable = (BlockEntityClientSerializable) entity;
@ -68,12 +70,12 @@ public class MixinClientPlayNetworkHandler {
}
}
@Redirect(method = "onChunkData", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/entity/BlockEntity;fromTag(Lnet/minecraft/nbt/CompoundTag;)V"))
public void deserializeBlockEntityChunkData(BlockEntity entity, CompoundTag tag) {
@Redirect(method = "onChunkData", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/entity/BlockEntity;fromTag(Lnet/minecraft/block/BlockState;Lnet/minecraft/nbt/CompoundTag;)V"))
public void deserializeBlockEntityChunkData(BlockEntity entity, BlockState blockState, CompoundTag tag) {
if (entity instanceof BlockEntityClientSerializable) {
((BlockEntityClientSerializable) entity).fromClientTag(tag);
} else {
entity.fromTag(tag);
entity.fromTag(blockState, tag);
}
}
}

View file

@ -1,5 +1,5 @@
archivesBaseName = "fabric-object-builders"
version = getSubprojectVersion(project, "0.2.1")
version = getSubprojectVersion(project, "0.2.2")
dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')

View file

@ -50,7 +50,7 @@ public final class BlockSettingsExtensions {
}
public static void materialColor(Settings settings, MaterialColor materialColor) {
((BlockSettingsHooks) settings).setMaterialColor(blockState -> materialColor);
((BlockSettingsHooks) settings).setMaterialColorFactory(blockState -> materialColor);
}
public static void drops(Settings settings, Identifier dropTableId) {

View file

@ -42,7 +42,7 @@ public interface BlockSettingsHooks {
void setCollidable(boolean collidable);
@Accessor
void setMaterialColor(Function<BlockState, MaterialColor> materialColorFunction);
void setMaterialColorFactory(Function<BlockState, MaterialColor> materialColorFunction);
@Accessor
void setDropTableId(Identifier dropTableId);

View file

@ -1,5 +1,5 @@
archivesBaseName = "fabric-registry-sync-v0"
version = getSubprojectVersion(project, "0.2.8")
version = getSubprojectVersion(project, "0.2.9")
dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')

View file

@ -42,6 +42,6 @@ public final class BlockInitTracker implements RegistryEntryAddedCallback<Block>
// if false, getDropTableId() will generate an invalid drop table ID
assert id.equals(registry.getId(object));
object.method_26162();
object.getDropTableID();
}
}

View file

@ -1,5 +1,5 @@
archivesBaseName = "fabric-renderer-indigo"
version = getSubprojectVersion(project, "0.2.26")
version = getSubprojectVersion(project, "0.2.27")
dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')

View file

@ -458,7 +458,7 @@ public class AoCalculator {
int lightCenter;
searchPos.set(pos).move(lightFace);
if (isOnBlockFace || !world.getBlockState(searchPos).method_26216(world, searchPos)) {
if (isOnBlockFace || !world.getBlockState(searchPos).isOpaqueFullCube(world, searchPos)) {
lightCenter = brightnessFunc.applyAsInt(searchPos);
} else {
lightCenter = brightnessFunc.applyAsInt(pos);

View file

@ -104,7 +104,7 @@ public class MixinChunkRebuildTask {
final BakedModel model = renderManager.getModel(blockState);
if (Indigo.ALWAYS_TESSELATE_INDIGO || !((FabricBakedModel) model).isVanillaAdapter()) {
Vec3d vec3d = blockState.method_26226(blockView, blockPos);
Vec3d vec3d = blockState.getModelOffset(blockView, blockPos);
matrix.translate(vec3d.x, vec3d.y, vec3d.z);
return ((AccessChunkRendererRegion) blockView).fabric_getRenderer().tesselateBlock(blockState, blockPos, model, matrix);
}