Skip to content

Commit

Permalink
Unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
democat3457 committed Mar 17, 2021
1 parent c23a7a8 commit c16083e
Show file tree
Hide file tree
Showing 21 changed files with 9 additions and 65 deletions.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
1 change: 0 additions & 1 deletion src/main/java/de/ellpeck/nyx/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.google.common.collect.Sets;
import de.ellpeck.nyx.capabilities.NyxWorld;
import de.ellpeck.nyx.lunarevents.LunarEvent;
import de.ellpeck.nyx.lunarevents.StarShower;
import net.minecraft.world.DimensionType;
import net.minecraft.world.World;
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/de/ellpeck/nyx/GuiFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.common.config.ConfigElement;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fml.client.IModGuiFactory;
import net.minecraftforge.fml.client.config.GuiConfig;
import net.minecraftforge.fml.client.config.IConfigElement;

import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/de/ellpeck/nyx/Registry.java
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ public static void preInit() {
CapabilityManager.INSTANCE.register(NyxWorld.class, new Capability.IStorage<NyxWorld>() {
@Nullable
@Override
public NBTBase writeNBT(Capability capability, NyxWorld instance, EnumFacing side) {
public NBTBase writeNBT(Capability<NyxWorld> capability, NyxWorld instance, EnumFacing side) {
return null;
}

@Override
public void readNBT(Capability capability, NyxWorld instance, EnumFacing side, NBTBase nbt) {
public void readNBT(Capability<NyxWorld> capability, NyxWorld instance, EnumFacing side, NBTBase nbt) {

}
}, () -> null);
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/de/ellpeck/nyx/blocks/Crystal.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
package de.ellpeck.nyx.blocks;

import de.ellpeck.nyx.Config;
import de.ellpeck.nyx.Nyx;
import de.ellpeck.nyx.Registry;
import de.ellpeck.nyx.capabilities.NyxWorld;
import de.ellpeck.nyx.lunarevents.HarvestMoon;
import net.minecraft.block.*;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
Expand All @@ -24,7 +18,6 @@
import net.minecraftforge.common.IPlantable;
import net.minecraftforge.fml.common.registry.GameRegistry;

import javax.annotation.Nullable;
import java.util.Random;

public class Crystal extends BlockContainer {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/de/ellpeck/nyx/blocks/LunarWaterCauldron.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package de.ellpeck.nyx.blocks;

import de.ellpeck.nyx.Nyx;
import de.ellpeck.nyx.Registry;
import de.ellpeck.nyx.items.LunarWaterBottle;
import net.minecraft.block.BlockCauldron;
Expand All @@ -16,7 +15,6 @@
import net.minecraft.stats.StatList;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/de/ellpeck/nyx/blocks/MeteorRock.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package de.ellpeck.nyx.blocks;

import de.ellpeck.nyx.Registry;
import de.ellpeck.nyx.capabilities.NyxWorld;
import net.minecraft.block.Block;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.enchantment.EnchantmentHelper;
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/de/ellpeck/nyx/blocks/NyxSlab.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@
import de.ellpeck.nyx.Registry;
import de.ellpeck.nyx.items.ItemNyxSlab;
import net.minecraft.block.Block;
import net.minecraft.block.BlockDoublePlant;
import net.minecraft.block.BlockSlab;
import net.minecraft.block.BlockSlab.EnumBlockHalf;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockFaceShape;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/de/ellpeck/nyx/blocks/StarAir.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

import de.ellpeck.nyx.Nyx;
import de.ellpeck.nyx.Registry;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.BlockFaceShape;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
import net.minecraft.util.math.AxisAlignedBB;
Expand All @@ -20,7 +18,6 @@

import javax.annotation.Nullable;
import java.util.List;
import java.util.Random;

public class StarAir extends BlockContainer {
public StarAir() {
Expand Down
7 changes: 1 addition & 6 deletions src/main/java/de/ellpeck/nyx/capabilities/NyxWorld.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package de.ellpeck.nyx.capabilities;

import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import de.ellpeck.nyx.Config;
import de.ellpeck.nyx.Registry;
import de.ellpeck.nyx.lunarevents.*;
import de.ellpeck.nyx.network.PacketHandler;
import de.ellpeck.nyx.network.PacketNyxWorld;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.nbt.NBTTagLong;
Expand All @@ -18,19 +15,16 @@
import net.minecraft.util.math.ChunkPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.DimensionType;
import net.minecraft.world.World;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.common.util.Constants;
import net.minecraftforge.common.util.INBTSerializable;
import org.apache.commons.lang3.mutable.MutableInt;
import scala.Int;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.*;
import java.util.stream.Collectors;

public class NyxWorld implements ICapabilityProvider, INBTSerializable<NBTTagCompound> {

Expand Down Expand Up @@ -229,6 +223,7 @@ public boolean hasCapability(@Nonnull Capability<?> capability, @Nullable EnumFa
return capability == Registry.worldCapability;
}

@SuppressWarnings("unchecked")
@Nullable
@Override
public <T> T getCapability(@Nonnull Capability<T> capability, @Nullable EnumFacing facing) {
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/de/ellpeck/nyx/commands/CommandMeteor.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
package de.ellpeck.nyx.commands;

import de.ellpeck.nyx.capabilities.NyxWorld;
import de.ellpeck.nyx.entities.FallingMeteor;
import de.ellpeck.nyx.lunarevents.LunarEvent;
import net.minecraft.command.*;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.math.BlockPos;

import java.util.Optional;

public class CommandMeteor extends CommandBase {
@Override
public String getName() {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/de/ellpeck/nyx/entities/CauldronTracker.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import de.ellpeck.nyx.blocks.LunarWaterCauldron;
import de.ellpeck.nyx.capabilities.NyxWorld;
import de.ellpeck.nyx.lunarevents.BloodMoon;
import de.ellpeck.nyx.lunarevents.FullMoon;
import de.ellpeck.nyx.lunarevents.HarvestMoon;
import net.minecraft.block.Block;
import net.minecraft.block.BlockCauldron;
Expand All @@ -25,7 +24,6 @@
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;

import java.util.List;

Expand Down
4 changes: 0 additions & 4 deletions src/main/java/de/ellpeck/nyx/entities/FallingStar.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
package de.ellpeck.nyx.entities;

import de.ellpeck.nyx.Config;
import de.ellpeck.nyx.Nyx;
import de.ellpeck.nyx.Registry;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.MoverType;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;

Expand Down
2 changes: 0 additions & 2 deletions src/main/java/de/ellpeck/nyx/entities/MeteorRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.Entity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;

public class MeteorRenderer extends Render<FallingMeteor> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package de.ellpeck.nyx.entities;

import com.google.common.base.Predicate;
import de.ellpeck.nyx.capabilities.NyxWorld;
import de.ellpeck.nyx.lunarevents.BloodMoon;
import de.ellpeck.nyx.lunarevents.FullMoon;
Expand Down
8 changes: 0 additions & 8 deletions src/main/java/de/ellpeck/nyx/events/ClientEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import de.ellpeck.nyx.Nyx;
import de.ellpeck.nyx.Registry;
import de.ellpeck.nyx.capabilities.NyxWorld;
import de.ellpeck.nyx.enchantments.NyxEnchantment;
import de.ellpeck.nyx.entities.*;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
Expand All @@ -14,10 +13,6 @@
import net.minecraft.client.renderer.block.model.ModelBakery;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.client.resources.I18n;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
Expand All @@ -28,7 +23,6 @@
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
import net.minecraftforge.fml.common.Mod;
Expand All @@ -37,8 +31,6 @@
import net.minecraftforge.fml.common.gameevent.TickEvent;
import net.minecraftforge.fml.relauncher.Side;

import java.util.List;
import java.util.Map;
import java.util.Objects;

@Mod.EventBusSubscriber(modid = Nyx.ID, value = Side.CLIENT)
Expand Down
6 changes: 1 addition & 5 deletions src/main/java/de/ellpeck/nyx/events/Events.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.ellpeck.nyx.events;

import com.google.common.collect.Streams;
import com.google.common.eventbus.Subscribe;
import de.ellpeck.nyx.Config;
import de.ellpeck.nyx.Nyx;
import de.ellpeck.nyx.Registry;
Expand All @@ -25,7 +24,6 @@
import net.minecraft.entity.*;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.ai.attributes.IAttributeInstance;
import net.minecraft.entity.ai.attributes.ModifiableAttributeInstance;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityElderGuardian;
Expand All @@ -36,7 +34,6 @@
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Items;
import net.minecraft.init.MobEffects;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemShield;
import net.minecraft.item.ItemStack;
Expand All @@ -49,7 +46,6 @@
import net.minecraft.util.math.ChunkPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.world.DimensionType;
import net.minecraft.world.World;
import net.minecraft.world.WorldEntitySpawner;
import net.minecraft.world.WorldServer;
Expand Down Expand Up @@ -305,7 +301,7 @@ public static void onExpDrop(LivingExperienceDropEvent event) {
int level = EnchantmentHelper.getEnchantmentLevel(Registry.lunarEdge, held);
if (level <= 0)
return;
float exp = event.getDroppedExperience();
int exp = event.getDroppedExperience();
float mod = level / (float) Registry.lunarEdge.getMaxLevel();
event.setDroppedExperience(exp + MathHelper.floor(exp * mod));
}
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/de/ellpeck/nyx/items/LunarWaterBottle.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package de.ellpeck.nyx.items;

import de.ellpeck.nyx.Nyx;
import de.ellpeck.nyx.Registry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/de/ellpeck/nyx/items/Scythe.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,23 @@
import com.google.common.collect.Multimap;
import de.ellpeck.nyx.Registry;
import net.minecraft.block.Block;
import net.minecraft.block.BlockBush;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumHand;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.IPlantable;
import net.minecraftforge.event.ForgeEventFactory;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import java.util.List;

public class Scythe extends Item {

public Scythe() {
Expand Down Expand Up @@ -52,7 +49,8 @@ public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, EntityPlayer
continue;

// modified version of Block.dropBlockAsItemWithChance since we want custom amounts
List<ItemStack> drops = offBlock.getDrops(worldIn, offset, offState, 0);
NonNullList<ItemStack> drops = NonNullList.create();
offBlock.getDrops(drops, worldIn, offset, offState, 0);
float chance = ForgeEventFactory.fireBlockHarvesting(drops, worldIn, offset, offState, 0, 1, false, player);
for (ItemStack drop : drops) {
if (worldIn.rand.nextFloat() > chance)
Expand Down Expand Up @@ -93,6 +91,7 @@ public boolean getIsRepairable(ItemStack toRepair, ItemStack repair) {
return repair.getItem() == Item.getItemFromBlock(Registry.crystal);
}

@SuppressWarnings("deprecation")
@Override
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) {
Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot);
Expand Down
1 change: 0 additions & 1 deletion src/main/java/de/ellpeck/nyx/lunarevents/BloodMoon.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import net.minecraft.world.WorldServer;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.chunk.Chunk;
import net.minecraftforge.fml.common.registry.EntityEntry;

import java.util.Set;

Expand Down
1 change: 0 additions & 1 deletion src/main/java/de/ellpeck/nyx/network/PacketNyxWorld.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package de.ellpeck.nyx.network;

import de.ellpeck.nyx.Registry;
import de.ellpeck.nyx.capabilities.NyxWorld;
import io.netty.buffer.ByteBuf;
import net.minecraft.client.Minecraft;
Expand Down

0 comments on commit c16083e

Please sign in to comment.