mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-25 22:44:38 +00:00
Improve/refactoring (#15)
* Improve the code * Code improve in binnie.core.utils package * Code improve in binnie.core.triggers package * Code improve in binnie.core.resource package * Code improve in binnie.core.proxy package * Code improve readability in binnie.core package * Add missed constructors * Some improve code readabilty * Expand import with * * Revert "Expand import with *" This reverts commit 3bb4a44f3b69a8559bd5753337e0f6793ad18dc4. * Fix using fully qualified names in imports * Fix missed unnessesary "this." * Removed binnie.craftgui package Optimised imports and removed unnessesary "this." * Some refactoring code in binnie.core.craftgui package * Merge from master1.7.10 * Improve code readability in binnie.core.craftgui.database package * Improve code readability in binnie.core.craftgui.events package * Improve code readability in binnie.core.craftgui.geometry package * Improve code readability in binnie.core.craftgui.* package
This commit is contained in:
1 parent
a3c2360ba6
commit
f402cb155f
428 files changed
+9515
-10103
No files matched your search
@@ -79,7 +79,7 @@ public class ItemFluidContainer extends ItemFood {
|
||||
if (!liquid.canPlaceIn(container) || !liquid.showInCreative(container)) {
|
||||
continue;
|
||||
}
|
||||
itemList.add(this.getContainer(liquid));
|
||||
itemList.add(getContainer(liquid));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public class ItemFluidContainer extends ItemFood {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack item, int pass) {
|
||||
FluidStack fluid = this.getLiquid(item);
|
||||
FluidStack fluid = getLiquid(item);
|
||||
if (fluid == null) {
|
||||
return 16777215;
|
||||
}
|
||||
@@ -128,7 +128,7 @@ public class ItemFluidContainer extends ItemFood {
|
||||
return;
|
||||
}
|
||||
|
||||
FluidStack fluid = this.getLiquid(stack);
|
||||
FluidStack fluid = getLiquid(stack);
|
||||
IDrinkLiquid liquid = DrinkManager.getLiquid(fluid);
|
||||
if (liquid != null) {
|
||||
AlcoholEffect.makeDrunk(player, liquid.getABV() * fluid.amount);
|
||||
@@ -148,7 +148,7 @@ public class ItemFluidContainer extends ItemFood {
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
if (isDrinkable(stack)) {
|
||||
player.setItemInUse(stack, this.getMaxItemUseDuration(stack));
|
||||
player.setItemInUse(stack, getMaxItemUseDuration(stack));
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
@@ -164,7 +164,7 @@ public class ItemFluidContainer extends ItemFood {
|
||||
}
|
||||
|
||||
private boolean isDrinkable(ItemStack stack) {
|
||||
FluidStack fluid = this.getLiquid(stack);
|
||||
FluidStack fluid = getLiquid(stack);
|
||||
IDrinkLiquid liquid = DrinkManager.getLiquid(fluid);
|
||||
return liquid != null && liquid.isConsumable();
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ManagerLiquid extends ManagerBase {
|
||||
|
||||
public void createLiquids(IFluidType[] liquids, int startID) {
|
||||
for (IFluidType liquid : liquids) {
|
||||
BinnieFluid fluid = this.createLiquid(liquid, startID++);
|
||||
BinnieFluid fluid = createLiquid(liquid, startID++);
|
||||
if (fluid == null) {
|
||||
throw new RuntimeException("Liquid registered incorrectly - " + liquid.getIdentifier());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user