mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 20:52:26 +00:00
Code Clean up
This commit is contained in:
1 parent
517c841d5c
commit
30ea9db349
8 files changed
+23
-21
No files matched your search
@@ -3,10 +3,6 @@ package tconstruct.blocks;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import tconstruct.client.block.OreberryRender;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.tools.AbilityHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLeavesBase;
|
||||
import net.minecraft.block.material.Material;
|
||||
@@ -25,6 +21,10 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import tconstruct.client.block.OreberryRender;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.tools.AbilityHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ public class SlimeLeaves extends BlockLeaves
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeaves(IBlockAccess world, int x, int y, int z)
|
||||
public boolean isLeaves (IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public class SlimeLeaves extends BlockLeaves
|
||||
* Returns the ID of the items to drop on destruction.
|
||||
*/
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
public Item getItemDropped (int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
{
|
||||
return Item.getItemFromBlock(TRepo.slimeSapling);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class SlimeSapling extends BlockSapling
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canPlaceBlockOn(Block p_149854_1_)
|
||||
protected boolean canPlaceBlockOn (Block p_149854_1_)
|
||||
{
|
||||
return p_149854_1_ == Blocks.grass || p_149854_1_ == Blocks.dirt || p_149854_1_ == TRepo.slimeGrass || p_149854_1_ == TRepo.craftedSoil;
|
||||
}
|
||||
|
||||
@@ -363,6 +363,7 @@ public class TProxyClient extends TProxyCommon
|
||||
public static Document volume2;
|
||||
public static Document smelter;
|
||||
public static ManualInfo manualData;
|
||||
|
||||
@Override
|
||||
public void readManuals ()
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ public class Manual extends CraftingItem
|
||||
{
|
||||
super(name, textureName, "", "tinker", TConstructRegistry.materialTab);
|
||||
setUnlocalizedName("tconstruct.manual");
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package tconstruct.items;
|
||||
|
||||
import mantle.books.BookData;
|
||||
import mantle.books.BookDataStore;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
@@ -8,9 +10,6 @@ import org.w3c.dom.Document;
|
||||
import tconstruct.client.TProxyClient;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import mantle.books.BookData;
|
||||
import mantle.books.BookDataStore;
|
||||
import mantle.books.ManualReader;
|
||||
|
||||
public class ManualInfo
|
||||
{
|
||||
@@ -30,13 +29,14 @@ public class ManualInfo
|
||||
public ManualInfo()
|
||||
{
|
||||
Side side = FMLCommonHandler.instance().getEffectiveSide();
|
||||
beginner = initManual(beginner, "tconstruct.manual.beginner", "\u00a7o" + StatCollector.translateToLocal("manual1.tooltip"), side == Side.CLIENT ? TProxyClient.volume1 : null, "tinker:tinkerbook_diary");
|
||||
toolStation = initManual(toolStation, "tconstruct.manual.toolstation", "\u00a7o" + StatCollector.translateToLocal("manual2.tooltip"), side == Side.CLIENT ? TProxyClient.volume2 : null, "tinker:tinkerbook_toolstation");
|
||||
smeltery = initManual(smeltery, "tconstruct.manual.smeltery", "\u00a7o" + StatCollector.translateToLocal("manual3.tooltip"), side == Side.CLIENT ? TProxyClient.smelter : null, "tinker:tinkerbook_smeltery");
|
||||
beginner = initManual(beginner, "tconstruct.manual.beginner", "\u00a7o" + StatCollector.translateToLocal("manual1.tooltip"), side == Side.CLIENT ? TProxyClient.volume1 : null,
|
||||
"tinker:tinkerbook_diary");
|
||||
toolStation = initManual(toolStation, "tconstruct.manual.toolstation", "\u00a7o" + StatCollector.translateToLocal("manual2.tooltip"), side == Side.CLIENT ? TProxyClient.volume2 : null,
|
||||
"tinker:tinkerbook_toolstation");
|
||||
smeltery = initManual(smeltery, "tconstruct.manual.smeltery", "\u00a7o" + StatCollector.translateToLocal("manual3.tooltip"), side == Side.CLIENT ? TProxyClient.smelter : null,
|
||||
"tinker:tinkerbook_smeltery");
|
||||
diary = initManual(diary, "tconstruct.manual.diary", "\u00a7o" + StatCollector.translateToLocal("manual4.tooltip"), side == Side.CLIENT ? TProxyClient.diary : null, "tinker:tinkerbook_blue");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public BookData initManual (BookData data, String unlocName, String toolTip, Document xmlDoc, String itemImage)
|
||||
|
||||
@@ -6,12 +6,13 @@ import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import mantle.lib.TabTools;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import tconstruct.library.crafting.Detailing;
|
||||
import tconstruct.library.crafting.LiquidCasting;
|
||||
import tconstruct.library.crafting.ToolBuilder;
|
||||
|
||||
@@ -28,7 +28,7 @@ public class SlimeTreeGen extends WorldGenerator
|
||||
this.metaLeaves = leavesMeta;
|
||||
this.seekHeight = !notify;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean generate (World world, Random random, int xPos, int yPos, int zPos)
|
||||
{
|
||||
@@ -45,7 +45,7 @@ public class SlimeTreeGen extends WorldGenerator
|
||||
{
|
||||
Block soil = world.getBlock(xPos, yPos - 1, zPos);
|
||||
boolean isSoil = (soil != null && soil.canSustainPlant(world, xPos, yPos - 1, zPos, ForgeDirection.UP, TRepo.slimeSapling));
|
||||
|
||||
|
||||
if (isSoil)
|
||||
{
|
||||
//TODO Fix this for 1.7
|
||||
|
||||
Reference in new issue
Block a user