Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import bspkrs.treecapitator.registry.TreeDefinition;
import bspkrs.treecapitator.registry.TreeRegistry;
import bspkrs.treecapitator.util.TCLog;
import bspkrs.util.ModulusBlockID;
import bspkrs.util.BlockID;

import com.google.common.base.Charsets;
import com.google.common.hash.HashFunction;
Expand All @@ -46,7 +46,7 @@ public void onBlockClicked(PlayerInteractEvent event)
@SubscribeEvent
public void getPlayerBreakSpeed(BreakSpeed event)
{
ModulusBlockID blockID = new ModulusBlockID(event.state, 4);
BlockID blockID = new BlockID(event.state);
BlockPos pos = event.pos;

if (TreecapitatorMod.proxy.isEnabled() && (TreeRegistry.instance().isRegistered(blockID)
Expand Down Expand Up @@ -101,7 +101,7 @@ public void onBlockHarvested(BreakEvent event)
{
if (TreecapitatorMod.proxy.isEnabled() && !event.world.isRemote)
{
ModulusBlockID blockID = new ModulusBlockID(event.state, 4);
BlockID blockID = new BlockID(event.state);

if ((TreeRegistry.instance().isRegistered(blockID) || (TCSettings.allowAutoTreeDetection
&& TreeRegistry.canAutoDetect(event.world, event.state.getBlock(), event.pos)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,13 @@ protected void initDefaultModConfigs()
// "", true).setOverrideIMC(false));

defaultModCfgs.put("Thaumcraft", new ThirdPartyModConfig("Thaumcraft")
.addAxe(new ItemID("Thaumcraft:ItemAxeThaumium"))
.addAxe(new ItemID("Thaumcraft:ItemAxeElemental"))
.addAxe(new ItemID("thaumcraft:thaumium_axe"))
.addAxe(new ItemID("thaumcraft:void_axe"))
.addAxe(new ItemID("thaumcraft:elemental_axe"))
.setOverrideIMC(false)
.addTreeDef("greatwood", new TreeDefinition().addLogID(new ModulusBlockID("Thaumcraft:blockMagicalLog", 0, 4)).addLeafID(new ModulusBlockID("Thaumcraft:blockMagicalLeaves", 0, 8))
.addTreeDef("greatwood", new TreeDefinition().addLogID(new BlockID("thaumcraft:log", 0)).addLogID(new BlockID("thaumcraft:log", 1)).addLogID(new BlockID("thaumcraft:log", 2)).addLeafID(new ModulusBlockID("thaumcraft:leaf", 0, 2))
.setMaxHorLeafBreakDist(7).setRequireLeafDecayCheck(false))
.addTreeDef("silverwood", new TreeDefinition().addLogID(new ModulusBlockID("Thaumcraft:blockMagicalLog", 1, 4)).addLeafID(new ModulusBlockID("Thaumcraft:blockMagicalLeaves", 1, 8))));
.addTreeDef("silverwood", new TreeDefinition().addLogID(new BlockID("thaumcraft:log", 3)).addLogID(new BlockID("thaumcraft:log", 4)).addLogID(new BlockID("thaumcraft:log", 5)).addLeafID(new ModulusBlockID("thaumcraft:leaf", 1, 2))));

defaultModCfgs.put("TConstruct", new ThirdPartyModConfig("TConstruct")
.addAxe(new ItemID("TConstruct:hatchet"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ public TreeDefinition get(BlockID blockID)
{
String treeKey = logToStringMap.get(blockID);
TreeDefinition treeDef = get(logToStringMap.get(blockID));
if(!treeKey.equals("vanilla_oak"))
TCLog.debug(treeDef.toString());

if (treeDef != null)
{
Expand Down Expand Up @@ -313,7 +315,8 @@ else if ((treeDef != null) && (leaves.size() >= TCSettings.minLeavesToID))
// if (shouldLog)
// TCLog.debug("Auto Tree Detection: Block ID %s is a log, but not enough leaves were " +
// "found to identify this structure as a tree. Found %d leaves.", blockID, leaves.size());
treeDef = null;
// Shhh... No need to be so aggressive...
// treeDef = null;
}

return treeDef;
Expand Down