Skip to content

Commit

Permalink
Merge pull request #30 from Yoghurt4C/1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexatos authored Jun 23, 2020
2 parents 9cd49ff + 58cca41 commit 7349ef1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
}
}
dependencies {
classpath "net.fabricmc:fabric-loom:0.2.6-SNAPSHOT"
classpath "net.fabricmc:fabric-loom:0.4-SNAPSHOT"
}
}

Expand All @@ -26,16 +26,16 @@ targetCompatibility = 1.8

group = "com.reddit.user.koppeh.flamingo"
archivesBaseName = "Flamingo"
version = "1.15.2-1.16"
version = "1.16-1.17"

minecraft {
}

dependencies {
minecraft "com.mojang:minecraft:1.15.2"
mappings "net.fabricmc:yarn:1.15.2+build.14:v2"
modCompile "net.fabricmc:fabric-loader:0.7.8+build.187"
modCompile "net.fabricmc.fabric-api:fabric-api:0.5.1+build.294-1.15"
minecraft "com.mojang:minecraft:1.16"
mappings "net.fabricmc:yarn:1.16+build.1:v2"
modImplementation "net.fabricmc:fabric-loader:0.8.8+build.202"
modImplementation "net.fabricmc.fabric-api:fabric-api:0.13.1+build.370-1.16"
}

processResources {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import net.minecraft.block.BlockEntityProvider;
import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState;
import net.minecraft.block.ShapeContext;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.entity.EntityContext;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
Expand All @@ -32,7 +32,7 @@ public FlamingoBlock(Settings settings) {

@Override
@Deprecated
public VoxelShape getOutlineShape(BlockState blockState_1, BlockView blockView_1, BlockPos blockPos_1, EntityContext context) {
public VoxelShape getOutlineShape(BlockState blockState_1, BlockView blockView_1, BlockPos blockPos_1, ShapeContext context) {
return OUTLINE_SHAPE;
}

Expand Down Expand Up @@ -63,13 +63,13 @@ public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity p
public boolean onAttackInteraction(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, Direction direction) {
BlockEntity blockEntity = world.getBlockEntity(pos);
if (!world.isClient && blockEntity instanceof FlamingoBlockEntity) {
world.addBlockAction(pos, this, 0, 0);
world.addSyncedBlockEvent(pos, this, 0, 0);
}
return false;
}

@Override
public boolean onBlockAction(BlockState state, World world, BlockPos pos, int type, int data) {
public boolean onSyncedBlockEvent(BlockState state, World world, BlockPos pos, int type, int data) {
if (world.getBlockEntity(pos) != null) {
((FlamingoBlockEntity) world.getBlockEntity(pos)).wiggle();
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher;
import net.minecraft.client.render.item.BuiltinModelItemRenderer;
import net.minecraft.client.render.model.json.ModelTransformation;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier;
Expand All @@ -19,7 +20,7 @@ public class ItemDynamicRendererMixin {
private final FlamingoBlockEntity flamingoRender = new FlamingoBlockEntity();

@Inject(at = @At("HEAD"), method = "render", cancellable = true)
public void render(ItemStack stack, MatrixStack matrix, VertexConsumerProvider vertexConsumerProvider, int light, int overlay, CallbackInfo info) {
public void render(ItemStack stack, ModelTransformation.Mode mode, MatrixStack matrix, VertexConsumerProvider vertexConsumerProvider, int light, int overlay, CallbackInfo info) {
if (Registry.ITEM.getId(stack.getItem()).equals(new Identifier(Flamingo.MOD_ID, "flamingo"))) {
BlockEntityRenderDispatcher.INSTANCE.renderEntity(this.flamingoRender, matrix, vertexConsumerProvider, light, overlay);
info.cancel();
Expand Down

0 comments on commit 7349ef1

Please sign in to comment.