mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-27 23:33:00 +00:00
Big code cleanup
This commit is contained in:
1 parent
1b58077904
commit
a3363fb4bc
132 files changed
+1587
-1863
No files matched your search
@@ -14,11 +14,6 @@ import forestry.api.apiculture.DefaultBeeModifier;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
|
||||
public class BeehouseBeeModifier extends DefaultBeeModifier {
|
||||
@Override
|
||||
public float getTerritoryModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 0.25f;
|
||||
|
||||
@@ -87,7 +87,6 @@ import forestry.apiculture.genetics.alleles.AlleleEffect;
|
||||
import forestry.apiculture.items.EnumHoneyComb;
|
||||
import forestry.apiculture.items.EnumPollenCluster;
|
||||
import forestry.apiculture.items.EnumPropolis;
|
||||
import forestry.apiculture.items.ItemHabitatLocator;
|
||||
import forestry.apiculture.items.ItemRegistryApiculture;
|
||||
import forestry.apiculture.multiblock.TileAlvearyFan;
|
||||
import forestry.apiculture.multiblock.TileAlvearyHeater;
|
||||
@@ -258,7 +257,7 @@ public class PluginApiculture extends BlankForestryPlugin {
|
||||
parsePlantableFlowers(property, flowerType);
|
||||
|
||||
Set<Flower> acceptableFlowers = flowerRegistry.getAcceptableFlowers(flowerType);
|
||||
if (acceptableFlowers == null || acceptableFlowers.size() == 0) {
|
||||
if (acceptableFlowers == null || acceptableFlowers.isEmpty()) {
|
||||
Log.error("Flower type '" + flowerType + "' has no valid flowers set in apiculture.cfg. Add valid flowers or delete the config to set it to default.");
|
||||
}
|
||||
}
|
||||
@@ -691,7 +690,7 @@ public class PluginApiculture extends BlankForestryPlugin {
|
||||
));
|
||||
|
||||
// Irradiated combs
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.IRRADIATED, 1), ImmutableMap.<ItemStack, Float>of(
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.IRRADIATED, 1), ImmutableMap.of(
|
||||
));
|
||||
|
||||
// Powdery combs
|
||||
|
||||
@@ -37,7 +37,6 @@ import forestry.core.utils.BlockUtil;
|
||||
public class BlockStump extends BlockTorch implements IItemModelRegister {
|
||||
|
||||
public BlockStump() {
|
||||
super();
|
||||
this.setHardness(0.0F);
|
||||
this.setStepSound(soundTypeWood);
|
||||
setCreativeTab(Tabs.tabApiculture);
|
||||
|
||||
@@ -93,9 +93,4 @@ public class EntityMinecartBeehouse extends EntityMinecartBeeHousingBase {
|
||||
public Object getContainer(EntityPlayer player, int data) {
|
||||
return new ContainerMinecartBeehouse(player.inventory, this, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIdOfEntity() {
|
||||
return getEntityId();
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public class ApiaristTracker extends BreedingTracker implements IApiaristTracker
|
||||
return;
|
||||
}
|
||||
|
||||
if (speciesRoot.getCombinations(individual.getGenome().getPrimary()).size() > 0) {
|
||||
if (!speciesRoot.getCombinations(individual.getGenome().getPrimary()).isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -573,7 +573,7 @@ public class Bee extends IndividualLiving implements IBee {
|
||||
}
|
||||
}
|
||||
|
||||
if (bees.size() > 0) {
|
||||
if (!bees.isEmpty()) {
|
||||
return bees.toArray(new IBee[bees.size()]);
|
||||
} else {
|
||||
return null;
|
||||
|
||||
@@ -79,7 +79,7 @@ public class AlleleEffectResurrection extends AlleleEffectThrottled {
|
||||
@Override
|
||||
public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing) {
|
||||
List<EntityItem> entities = getEntitiesInRange(genome, housing, EntityItem.class);
|
||||
if (entities.size() == 0) {
|
||||
if (entities.isEmpty()) {
|
||||
return storedData;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ public class ItemHabitatLocator extends ItemWithGui implements ISpriteRegister {
|
||||
}
|
||||
|
||||
/* SPRITES */
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerSprites(ITextureManager manager) {
|
||||
TextureAtlasSprite texture = new TextureHabitatLocator(iconName);
|
||||
|
||||
@@ -28,7 +28,6 @@ import forestry.core.items.ItemForestry;
|
||||
|
||||
public class ItemHoneyComb extends ItemForestry {
|
||||
public ItemHoneyComb() {
|
||||
super();
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
setCreativeTab(Tabs.tabApiculture);
|
||||
|
||||
@@ -62,7 +62,7 @@ public class TileAlvearySwarmer extends TileAlveary implements ISidedInventory,
|
||||
/* UPDATING */
|
||||
@Override
|
||||
public void updateServer(int tickCount) {
|
||||
if (pendingSpawns.size() > 0) {
|
||||
if (!pendingSpawns.isEmpty()) {
|
||||
setActive(true);
|
||||
if (tickCount % 1000 == 0) {
|
||||
trySpawnSwarm();
|
||||
|
||||
@@ -12,6 +12,7 @@ package forestry.apiculture.network.packets;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import forestry.api.multiblock.IMultiblockComponent;
|
||||
import forestry.apiculture.multiblock.IAlvearyControllerInternal;
|
||||
import forestry.core.network.DataInputStreamForestry;
|
||||
@@ -38,7 +39,7 @@ public class PacketAlveryChange extends PacketCoordinates implements IForestryPa
|
||||
public void onPacketData(DataInputStreamForestry data, EntityPlayer player) {
|
||||
TileEntity tile = getTarget(Proxies.common.getRenderWorld());
|
||||
if (tile instanceof IMultiblockComponent) {
|
||||
((IMultiblockComponent) tile).getMultiblockLogic().getController().reassemble();;
|
||||
((IMultiblockComponent) tile).getMultiblockLogic().getController().reassemble();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -164,11 +164,6 @@ public abstract class TileBeeHousingBase extends TileBase implements IBeeHousing
|
||||
return getAccessHandler().getOwner();
|
||||
}
|
||||
|
||||
@Override
|
||||
public World getWorld() {
|
||||
return worldObj;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 getBeeFXCoordinates() {
|
||||
return new Vec3(getPos().getX() + 0.5, getPos().getY() + 0.5, getPos().getZ() + 0.5);
|
||||
|
||||
@@ -40,7 +40,7 @@ public class TriggerNoFrames extends Trigger {
|
||||
|
||||
InventoryApiary inventory = (InventoryApiary) apiary.getInternalInventory();
|
||||
|
||||
return inventory.getFrames().size() == 0;
|
||||
return inventory.getFrames().isEmpty();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user