Skip to content

Commit

Permalink
Fixed relaxed placement tilling under water
Browse files Browse the repository at this point in the history
  • Loading branch information
X-com committed May 14, 2020
1 parent c84e728 commit 135a29a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions patches/net/minecraft/item/ItemHoe.java.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- ../src-base/minecraft/net/minecraft/item/ItemHoe.java
+++ ../src-work/minecraft/net/minecraft/item/ItemHoe.java
@@ -1,5 +1,6 @@
package net.minecraft.item;

+import carpet.CarpetSettings;
import com.google.common.collect.Multimap;
import net.minecraft.block.Block;
import net.minecraft.block.BlockDirt;
@@ -48,7 +49,8 @@
IBlockState iblockstate = p_180614_2_.func_180495_p(p_180614_3_);
Block block = iblockstate.func_177230_c();

- if (p_180614_5_ != EnumFacing.DOWN && p_180614_2_.func_180495_p(p_180614_3_.func_177984_a()).func_185904_a() == Material.field_151579_a)
+ // Added relaxed placement for tilling water on top of dirt. CARPET-XCOM
+ if (p_180614_5_ != EnumFacing.DOWN && (p_180614_2_.func_180495_p(p_180614_3_.func_177984_a()).func_185904_a() == Material.field_151579_a || (CarpetSettings.relaxedBlockPlacement && p_180614_2_.func_180495_p(p_180614_3_.func_177984_a()).func_185904_a() == Material.field_151586_h)))
{
if (block == Blocks.field_150349_c || block == Blocks.field_185774_da)
{

0 comments on commit 135a29a

Please sign in to comment.