| Type: | Bug | ||
| Reporter: | bl4ckscor3 | Assignee: | Maria Lemón |
| Resolution: | Fixed | Votes: | 19 |
| Labels: | cobblestone_wall, fence, fence_gate, rendering | ||
| Environment: |
Win 8.1, Java 7, GeForce GT 640M, i7-3630QM @ 2.4GHz |
||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| CHK: | |||||||||||||||||||||||||||||||||||||
| Confirmation Status: | Confirmed | ||||||||||||||||||||||||||||||||||||
| Description |
|
What I expected to happen was: Fences don't connect with Fence Gates facing in the other direction What actually happened was: Fences do connect with Fence Gates facing in the other direction Steps to Reproduce: 1. Place two Fences with a one block gap between |
| Comments |
| Comment by Roadhog360 [ 12/Apr/17 ] |
|
Still happens in 17w15a. This problem drives me insane with OCD. Please fix it. |
| Comment by J. W. [ 21/Dec/16 ] |
|
I know the code has probably changed a bit since May of 2014, but maybe that sample commented from then is still a possible solution for this near 4 year old problem? |
| Comment by Immaterialise [ 17/Feb/16 ] |
|
Still present in 1.9-pre1; it occurs with all fence/fence gate types, including nether brick fence and cobblestone wall. |
| Comment by Kumasasa [ 24/Oct/15 ] |
|
@bl4ckscor3: It's sufficient to add the affected version, you don't need to add a "Confirmed for ..." comment. |
| Comment by bl4ckscor3 [ 24/Oct/15 ] |
|
Confirmed for 15w43c |
| Comment by bl4ckscor3 [ 07/Aug/15 ] |
|
Reproducable in 15w32c |
| Comment by bl4ckscor3 [ 06/Aug/15 ] |
|
Still present in 15w32b |
| Comment by bl4ckscor3 [ 05/Aug/15 ] |
|
Can reproduce in 15w32a |
| Comment by bl4ckscor3 [ 01/Aug/15 ] |
|
Confirmed for 15w31b/c. |
| Comment by bl4ckscor3 [ 29/Jul/15 ] |
|
Confirmed for 15w31a. Still all fence gate/fence combinations affected. EDIT: Also confirmed for 1.8.8 |
| Comment by J. P. Coder [ 04/Sep/14 ] |
|
confimed for 1.8 |
| Comment by HenrikoMagnifico [ 13/Aug/14 ] |
|
14w33a confirmed |
| Comment by Anon Ymus [ 09/Aug/14 ] |
|
Affects the new fences too. |
| Comment by Andrew Thomas [ 10/Jul/14 ] |
|
Confirmed in 14w28b |
| Comment by Rando Jones [ 09/Jul/14 ] |
|
Affects version 14w28a as well. Using code from MCP 9.08 for MC1.7.10 I've been able to correct this in my personal mod with the following changes: blocks/BlockFence.java public void addCollisionBoxesToList(World par1, int par2, int par3, int par4, AxisAlignedBB par5, List par6, Entity par7) { boolean var8 = this.func_149826_e(par1, par2, par3, par4 - 1) && (!(par1.getBlock(par2, par3, par4 - 1) instanceof BlockFenceGate) || (par1.getBlockMetadata(par2, par3, par4 - 1) & 1) == 1); boolean var9 = this.func_149826_e(par1, par2, par3, par4 + 1) && (!(par1.getBlock(par2, par3, par4 + 1) instanceof BlockFenceGate) || (par1.getBlockMetadata(par2, par3, par4 + 1) & 1) == 1); boolean var10 = this.func_149826_e(par1, par2 - 1, par3, par4) && (!(par1.getBlock(par2 - 1, par3, par4) instanceof BlockFenceGate) || (par1.getBlockMetadata(par2 - 1, par3, par4) & 1) == 0); boolean var11 = this.func_149826_e(par1, par2 + 1, par3, par4) && (!(par1.getBlock(par2 + 1, par3, par4) instanceof BlockFenceGate) || (par1.getBlockMetadata(par2 + 1, par3, par4) & 1) == 0); . . . public void setBlockBoundsBasedOnState(IBlockAccess par1, int par2, int par3, int par4) { boolean var5 = this.func_149826_e(par1, par2, par3, par4 - 1) && (!(par1.getBlock(par2, par3, par4 - 1) instanceof BlockFenceGate) || (par1.getBlockMetadata(par2, par3, par4 - 1) & 1) == 1); boolean var6 = this.func_149826_e(par1, par2, par3, par4 + 1) && (!(par1.getBlock(par2, par3, par4 + 1) instanceof BlockFenceGate) || (par1.getBlockMetadata(par2, par3, par4 + 1) & 1) == 1); boolean var7 = this.func_149826_e(par1, par2 - 1, par3, par4) && (!(par1.getBlock(par2 - 1, par3, par4) instanceof BlockFenceGate) || (par1.getBlockMetadata(par2 - 1, par3, par4) & 1) == 0); boolean var8 = this.func_149826_e(par1, par2 + 1, par3, par4) && (!(par1.getBlock(par2 + 1, par3, par4) instanceof BlockFenceGate) || (par1.getBlockMetadata(par2 + 1, par3, par4) & 1) == 0); . . . public boolean func_149826_e(IBlockAccess par1, int par2, int par3, int par4) { Block var5 = par1.getBlock(par2, par3, par4); boolean ret = (var5 == this); if (!ret) { if (var5 instanceof BlockFence) { ret = this.blockMaterial == var5.blockMaterial; } else if (var5 instanceof BlockFenceGate) { ret = true; } else if (var5.blockMaterial.isOpaque() && var5.renderAsNormalBlock()) { ret = var5.blockMaterial != Material.field_151572_C; //don't connect to melons or pumpkins ret = ret && var5 != Blocks.hay_block; } } else //always connect to self { ret = true; } return ret; } client/renderer/RenderBlocks.java public boolean renderBlockFence(BlockFence par1, int par2, int par3, int par4) { . . . Block nearBlock = null; if (par1.func_149826_e(this.blockAccess, par2 - 1, par3, par4) || par1.func_149826_e(this.blockAccess, par2 + 1, par3, par4)) { if (!(this.blockAccess.getBlock(par2 - 1, par3, par4) instanceof BlockFenceGate) || (this.blockAccess.getBlockMetadata(par2 - 1, par3, par4) & 1) == 0) { var8 = true; } else if (!(this.blockAccess.getBlock(par2 + 1, par3, par4) instanceof BlockFenceGate) || (this.blockAccess.getBlockMetadata(par2 + 1, par3, par4) & 1) == 0) { var8 = true; } } if (par1.func_149826_e(this.blockAccess, par2, par3, par4 - 1) || par1.func_149826_e(this.blockAccess, par2, par3, par4 + 1)) { if (!(this.blockAccess.getBlock(par2, par3, par4 - 1) instanceof BlockFenceGate) || (this.blockAccess.getBlockMetadata(par2, par3, par4 - 1) & 1) == 1) { var9 = true; } else if (!(this.blockAccess.getBlock(par2, par3, par4 + 1) instanceof BlockFenceGate) || (this.blockAccess.getBlockMetadata(par2, par3, par4 + 1) & 1) == 1) { var9 = true; } } boolean var10 = par1.func_149826_e(this.blockAccess, par2 - 1, par3, par4) && (!(this.blockAccess.getBlock(par2 - 1, par3, par4) instanceof BlockFenceGate) || (this.blockAccess.getBlockMetadata(par2 - 1, par3, par4) & 1) == 0); boolean var11 = par1.func_149826_e(this.blockAccess, par2 + 1, par3, par4) && (!(this.blockAccess.getBlock(par2 + 1, par3, par4) instanceof BlockFenceGate) || (this.blockAccess.getBlockMetadata(par2 + 1, par3, par4) & 1) == 0); boolean var12 = par1.func_149826_e(this.blockAccess, par2, par3, par4 - 1) && (!(this.blockAccess.getBlock(par2, par3, par4 - 1) instanceof BlockFenceGate) || (this.blockAccess.getBlockMetadata(par2, par3, par4 - 1) & 1) == 1); boolean var13 = par1.func_149826_e(this.blockAccess, par2, par3, par4 + 1) && (!(this.blockAccess.getBlock(par2, par3, par4 + 1) instanceof BlockFenceGate) || (this.blockAccess.getBlockMetadata(par2, par3, par4 + 1) & 1) == 1); . . . Sorry to dump this on you - I hope your open to coding changes with actual code examples. I just made a suggestion in reddit/minecraftSuggestions about this very issue. This same code can be used to fix BlockWall as well. Note that changes to BlockFence.java/func_149826_e contain some alterations to make fences not connect to melons or hay blocks; exclude that at your preference. |
| Comment by bl4ckscor3 [ 11/May/14 ] |
|
Confirmed for 14w18b and 14w19a |
| Comment by Itouch2 [ 16/Mar/14 ] |
|
Confirmed for 1.7.5 and 14w11b |
| Comment by Anon Ymus [ 29/Sep/13 ] |
|
Please do not mark unreleased versions (anything starting with "Future Version") as affected. You don't have access to them yet. |
| Comment by Anon Ymus [ 10/Feb/13 ] |
|
Confirmed. |