-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #28, Update for recent versions of DT.
Fix #27 and #20, register TFC soils as acceptable for all registered DT species. Cactus? Fix #24, no tree punching!
- Loading branch information
Showing
53 changed files
with
347 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
modGroup=org.labellum.mc | ||
modVersion=0.9.12 | ||
modVersion=0.9.13 | ||
modBaseName=dynamictreestfc | ||
forgeVersion=1.12.2-14.23.5.2847 | ||
mcpVersion=stable_39 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/main/java/org/labellum/mc/dynamictreestfc/blocks/BlockBranchBasicTFC.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.labellum.mc.dynamictreestfc.blocks; | ||
|
||
import com.ferreusveritas.dynamictrees.blocks.BlockBranchBasic; | ||
import net.dries007.tfc.ConfigTFC; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
|
||
import java.util.Set; | ||
|
||
public class BlockBranchBasicTFC extends BlockBranchBasic { | ||
public BlockBranchBasicTFC(String name) { | ||
super(name); | ||
} | ||
|
||
@Override | ||
public boolean removedByPlayer(IBlockState state, World world, BlockPos cutPos, EntityPlayer player, boolean canHarvest) { | ||
ItemStack tool = player.getHeldItemMainhand(); | ||
// after BlockLogTFC#harvestBlock | ||
final Set<String> toolClasses = tool.getItem().getToolClasses(tool); | ||
if (toolClasses.contains("axe") || toolClasses.contains("saw")) { | ||
// success! | ||
} else if (toolClasses.contains("hammer") && ConfigTFC.General.TREE.enableHammerSticks) { | ||
// can't force only stick drop from here | ||
// so hammers only drop a few sticks from dynamic trees | ||
return false; //No wood for you! | ||
} else if (ConfigTFC.General.TREE.requiresAxe) { | ||
// Here, there was no valid tool used. Deny spawning any drops since logs require axes | ||
return false; //Also no wood for you! | ||
} else { | ||
// or no tool, but handle normally | ||
} | ||
|
||
return super.removedByPlayer(state, world, cutPos, player, canHarvest); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
src/main/java/org/labellum/mc/dynamictreestfc/blocks/BlockBranchThickTFC.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.labellum.mc.dynamictreestfc.blocks; | ||
|
||
import com.ferreusveritas.dynamictrees.blocks.BlockBranchThick; | ||
import net.dries007.tfc.ConfigTFC; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
|
||
import java.util.Set; | ||
|
||
public class BlockBranchThickTFC extends BlockBranchThick { | ||
public BlockBranchThickTFC(String name) { | ||
super(name); | ||
} | ||
|
||
@Override | ||
public boolean removedByPlayer(IBlockState state, World world, BlockPos cutPos, EntityPlayer player, boolean canHarvest) { | ||
ItemStack tool = player.getHeldItemMainhand(); | ||
// after BlockLogTFC#harvestBlock | ||
final Set<String> toolClasses = tool.getItem().getToolClasses(tool); | ||
if (toolClasses.contains("axe") || toolClasses.contains("saw")) { | ||
// success! | ||
} else if (toolClasses.contains("hammer") && ConfigTFC.General.TREE.enableHammerSticks) { | ||
// can't force only stick drop from here | ||
// so hammers only drop a few sticks from dynamic trees | ||
return false; //No wood for you! | ||
} else if (ConfigTFC.General.TREE.requiresAxe) { | ||
// Here, there was no valid tool used. Deny spawning any drops since logs require axes | ||
return false; //Also no wood for you! | ||
} else { | ||
// or no tool, but handle normally | ||
} | ||
|
||
return super.removedByPlayer(state, world, cutPos, player, canHarvest); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/acacia.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/acacia#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/ash.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/ash#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/aspen.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/aspen#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/base.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/white_cedar#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/birch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/birch#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/blackwood.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/blackwood#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/chestnut.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/chestnut#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/douglas_fir.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/douglas_fir#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/hevea.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/hevea#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/hickory.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/hickory#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/kapok.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/kapok#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/maple.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/maple#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/oak.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/oak#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/palm.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/palm#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/pine.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/pine#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/rosewood.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/rosewood#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/sequoia.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/sequoia#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/spruce.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/spruce#dynamictree" } | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/sycamore.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/sycamore#dynamictree" } | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
src/main/resources/assets/dynamictreestfc/blockstates/branch/update.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
for i in ../../trees/*.txt; do tree=`echo $i|sed -e s/.txt// -e s,^.*/trees/,,`; echo $tree; sed -e s/white_cedar/$tree/ base.json >$tree.json ; done |
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/dynamictreestfc/blockstates/branch/white_cedar.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"variants": { | ||
"normal": { "model": "dynamictreestfc:branch/white_cedar#dynamictree" } | ||
} | ||
} |
Oops, something went wrong.