-
Notifications
You must be signed in to change notification settings - Fork 29
Fix crop-stick placement behaviour (For 2.9, Regression Fix) #231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+116
−19
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
9b676a3
Allow crop stick placement on non-top block faces
C0bra5 8eaa321
Merge branch 'master' into placement-fix
C0bra5 cde32a8
Merge branch 'master' into placement-fix
C0bra5 72bfcd2
Merge branch 'master' into placement-fix
Dream-Master ba3b909
Merge branch 'master' into placement-fix
C0bra5 446555a
add nullable endpoints to mod utils
C0bra5 19f5877
improve crop stick block placement
C0bra5 21a5e5f
Merge branch 'master' into placement-fix
C0bra5 bdadd41
Merge branch 'master' into placement-fix
C0bra5 b27b8d2
Merge branch 'master' into placement-fix
C0bra5 fdcded1
Merge branch 'master' into placement-fix
C0bra5 8fbb3e6
bump deps
boubou19 69f5095
post dep update build fix
C0bra5 acc645a
Merge branch 'master' into placement-fix
C0bra5 01b92ba
Merge branch 'master' into placement-fix
C0bra5 c1cbb7e
BBW wand registration isn't config-dependent
C0bra5 9a283e8
listen to setBlock return value and use function with more parameters
C0bra5 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
34 changes: 34 additions & 0 deletions
34
...ewhorizon/cropsnh/compatibility/betterbuilderswands/BetterBuildersWandsCompatHandler.java
This file contains hidden or 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,34 @@ | ||
| package com.gtnewhorizon.cropsnh.compatibility.betterbuilderswands; | ||
|
|
||
| import net.minecraftforge.oredict.OreDictionary; | ||
|
|
||
| import com.gtnewhorizon.cropsnh.blocks.BlockCropSticks; | ||
| import com.gtnewhorizon.cropsnh.utility.ModUtils; | ||
|
|
||
| import portablejim.bbw.BetterBuildersWandsMod; | ||
|
|
||
| public class BetterBuildersWandsCompatHandler { | ||
|
|
||
| public static void postInit() { | ||
| if (!ModUtils.BetterBuildersWands.isModLoaded()) return; | ||
|
|
||
| BetterBuildersWandsMod.instance.mappingManager | ||
| .setMapping(new CropsNHBetterBuildersWandsCropStickCustomMapping()); | ||
|
|
||
| // unbreakable wand | ||
| BlockCropSticks.BLOCK_INTERACTION_WITH | ||
| .add(ModUtils.BetterBuildersWands.getItem("wandUnbreakable"), OreDictionary.WILDCARD_VALUE); | ||
|
|
||
| // diamond wand | ||
| BlockCropSticks.BLOCK_INTERACTION_WITH | ||
| .add(ModUtils.BetterBuildersWands.getItem("wandDiamond"), OreDictionary.WILDCARD_VALUE); | ||
|
|
||
| // stone wand | ||
| BlockCropSticks.BLOCK_INTERACTION_WITH | ||
| .add(ModUtils.BetterBuildersWands.getItem("wandStone"), OreDictionary.WILDCARD_VALUE); | ||
|
|
||
| // iron wand | ||
| BlockCropSticks.BLOCK_INTERACTION_WITH | ||
| .add(ModUtils.BetterBuildersWands.getItem("wandIron"), OreDictionary.WILDCARD_VALUE); | ||
| } | ||
| } |
37 changes: 37 additions & 0 deletions
37
...h/compatibility/betterbuilderswands/CropsNHBetterBuildersWandsCropStickCustomMapping.java
This file contains hidden or 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,37 @@ | ||
| package com.gtnewhorizon.cropsnh.compatibility.betterbuilderswands; | ||
|
|
||
| import net.minecraft.block.Block; | ||
| import net.minecraft.item.ItemStack; | ||
|
|
||
| import com.gtnewhorizon.cropsnh.api.CropsNHItemList; | ||
| import com.gtnewhorizon.cropsnh.init.CropsNHBlocks; | ||
|
|
||
| import portablejim.bbw.basics.Point3d; | ||
| import portablejim.bbw.core.conversion.ICustomMapping; | ||
| import portablejim.bbw.shims.IPlayerShim; | ||
| import portablejim.bbw.shims.IWorldShim; | ||
|
|
||
| public class CropsNHBetterBuildersWandsCropStickCustomMapping implements ICustomMapping { | ||
|
|
||
| @Override | ||
| public Block getLookBlock() { | ||
| return CropsNHBlocks.blockCropSticks; | ||
| } | ||
|
|
||
| @Override | ||
| public int getMeta() { | ||
| return 0; | ||
| } | ||
|
|
||
| @Override | ||
| public ItemStack getItems(IWorldShim world, IPlayerShim player, Point3d point) { | ||
| return CropsNHItemList.cropSticks.get( | ||
| player.getPlayer() | ||
| .isSneaking() ? 2 : 1); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean shouldCopyTileNBT() { | ||
| return false; | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.