Skip to content

Commit

Permalink
More deprecated code missed in the last compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
KnightMiner committed Nov 17, 2019
1 parent 74d980e commit 0c97e98
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
Expand Up @@ -57,6 +57,7 @@ public ChainBlock(Item rungsItem, Properties props) {
SHAPE_BOTTOM[Rungs.Z.ordinal()] = VoxelShapes.or(chain_core_bottom, chain_rungs_z);
}

@Deprecated
@Nonnull
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
Expand Down
Expand Up @@ -232,6 +232,7 @@ public int getLevel(BlockState state) {
return state.get(LEVEL);
}

@Deprecated
@Override
public int getComparatorInputOverride(BlockState state, World world, BlockPos pos) {
return getLevel(state);
Expand Down
@@ -1,13 +1,5 @@
package knightminer.inspirations.shared.client;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.function.Function;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import com.google.common.collect.ImmutableMap;
import knightminer.inspirations.library.util.TagUtil;
import knightminer.inspirations.library.util.TextureBlockUtil;
Expand All @@ -33,6 +25,14 @@
import net.minecraftforge.client.model.data.ModelProperty;
import slimeknights.mantle.client.ModelHelper;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.function.Function;

public class TextureModel extends BakedModelWrapper<IBakedModel> {
private final Map<String, IBakedModel> cache = new HashMap<>();
private IModel model;
Expand All @@ -58,7 +58,7 @@ public List<BakedQuad> getQuads(@Nullable BlockState state, @Nullable Direction
if(texture != null) {
bakedModel = getCachedTextureModel(texture);
}
return bakedModel.getQuads(state, side, rand);
return bakedModel.getQuads(state, side, rand, extraData);
}

protected IBakedModel getTexturedModel(ImmutableMap<String, String> textures) {
Expand Down
10 changes: 4 additions & 6 deletions src/main/java/knightminer/inspirations/tweaks/TweaksEvents.java
Expand Up @@ -4,13 +4,12 @@
import knightminer.inspirations.common.network.InspirationsNetwork;
import knightminer.inspirations.common.network.MilkablePacket;
import knightminer.inspirations.library.InspirationsRegistry;
import knightminer.inspirations.library.Util;
import knightminer.inspirations.shared.SharedEvents;
import net.minecraft.block.Blocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.BushBlock;
import net.minecraft.block.CropsBlock;
import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.passive.CowEntity;
Expand All @@ -29,7 +28,6 @@
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.event.LootTableLoadEvent;
import net.minecraftforge.event.entity.living.LivingFallEvent;
import net.minecraftforge.event.entity.player.BonemealEvent;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
Expand All @@ -50,7 +48,7 @@ public static void unsaddlePig(EntityInteract event) {
return;
}

PlayerEntity player = event.getEntityPlayer();
PlayerEntity player = event.getPlayer();
ItemStack stack = player.getHeldItem(event.getHand());
// must be sneaking and holding nothing
if(player.isSneaking() && stack.isEmpty()) {
Expand Down Expand Up @@ -337,7 +335,7 @@ public static void milkCow(EntityInteract event) {
}

// must be holding a milk container
ItemStack stack = event.getEntityPlayer().getHeldItem(event.getHand());
ItemStack stack = event.getPlayer().getHeldItem(event.getHand());
if(stack.getItem().isIn(InspirationsRegistry.TAG_MILK_CONTAINERS)) {
// if has tag, cannot be milked
CompoundNBT tags = target.getPersistentData();
Expand Down
Expand Up @@ -54,7 +54,7 @@ public static void placeCarpetOnPressurePlate(RightClickBlock event) {
state = state.updatePostPlacement(Direction.DOWN, world.getBlockState(pos.down()), world, pos, pos.down());

// play sound
PlayerEntity player = event.getEntityPlayer();
PlayerEntity player = event.getPlayer();
SoundType sound = state.getBlock().getSoundType(state, world, pos, player);
world.playSound(player, pos, sound.getPlaceSound(), SoundCategory.BLOCKS, (sound.getVolume() + 1.0F) / 2.0F, sound.getPitch() * 0.8F);

Expand Down

0 comments on commit 0c97e98

Please sign in to comment.