Commits

durron597 authored f199cc7190e
Changed tabs to 4 spaces, removed unnecessary imports
No tags

src/main/java/net/minecraft/server/BlockFlowing.java

Modified
49 49 int l2 = g(world, i1, j1 + 1, k1);
50 50 if(l2 >= 8)
51 51 j2 = l2;
52 52 else
53 53 j2 = l2 + 8;
54 54 }
55 55 if(a >= 2 && bs == Material.f)
56 56 if(world.d(i1, j1 - 1, k1))
57 57 j2 = 0;
58 58 else
59 - if(world.c(i1, j1 - 1, k1) == bs && world.b(i1, j1, k1) == 0)
60 - j2 = 0;
59 + if(world.c(i1, j1 - 1, k1) == bs && world.b(i1, j1, k1) == 0)
60 + j2 = 0;
61 61 if(bs == Material.g && l1 < 8 && j2 < 8 && j2 > l1 && random.nextInt(4) != 0)
62 62 {
63 63 j2 = l1;
64 64 flag = false;
65 65 }
66 66 if(j2 != l1)
67 67 {
68 68 l1 = j2;
69 69 if(l1 < 0)
70 70 {
71 71 world.d(i1, j1, k1, 0);
72 72 } else
73 73 {
74 74 world.b(i1, j1, k1, l1);
75 75 world.h(i1, j1, k1, bh);
76 76 world.g(i1, j1, k1, bh);
77 77 }
78 78 } else
79 - if(flag)
80 - i(world, i1, j1, k1);
79 + if(flag)
80 + i(world, i1, j1, k1);
81 81 } else
82 82 {
83 83 i(world, i1, j1, k1);
84 84 }
85 -
85 +
86 86 // Craftbukkit start
87 87 CraftBlock source = (CraftBlock) ((WorldServer) world).getWorld().getBlockAt(i1, j1, k1);
88 -
88 +
89 89 if(l(world, i1, j1 - 1, k1))
90 90 {
91 - // Craftbucket send "down" to the server
92 - BlockFromToEvent blockFlow = new BlockFromToEvent(Type.BLOCK_FLOW, source, BlockFace.Down);
91 + // Craftbucket send "down" to the server
92 + BlockFromToEvent blockFlow = new BlockFromToEvent(Type.BLOCK_FLOW, source, BlockFace.Down);
93 93 ((WorldServer) world).getServer().getPluginManager().callEvent(blockFlow);
94 -
95 - if (!blockFlow.isCancelled()) {
96 - if(l1 >= 8)
97 - world.b(i1, j1 - 1, k1, bh, l1);
98 - else
99 - world.b(i1, j1 - 1, k1, bh, l1 + 8);
100 - }
94 +
95 + if (!blockFlow.isCancelled()) {
96 + if(l1 >= 8)
97 + world.b(i1, j1 - 1, k1, bh, l1);
98 + else
99 + world.b(i1, j1 - 1, k1, bh, l1 + 8);
100 + }
101 101 } else
102 - if(l1 >= 0 && (l1 == 0 || k(world, i1, j1 - 1, k1)))
103 - {
104 - boolean aflag[] = j(world, i1, j1, k1);
105 - int k2 = l1 + byte0;
106 - if(l1 >= 8)
107 - k2 = 1;
108 - if(k2 >= 8)
109 - return;
110 -
111 - // Craftbukkit start
112 - BlockFace[] faces = new BlockFace[]{ BlockFace.North, BlockFace.South, BlockFace.East, BlockFace.West };
113 - for (BlockFace currentFace : faces) {
114 - int index = 0;
115 - if (aflag[index]) {
116 - BlockFromToEvent event = new BlockFromToEvent(Type.BLOCK_FLOW, source, currentFace);
117 - ((WorldServer) world).getServer().getPluginManager().callEvent(event);
118 - if (!event.isCancelled())
119 - f(world, i1 + currentFace.getModX(), j1, k1 + currentFace.getModZ(), k2);
120 - }
121 - index++;
102 + if(l1 >= 0 && (l1 == 0 || k(world, i1, j1 - 1, k1)))
103 + {
104 + boolean aflag[] = j(world, i1, j1, k1);
105 + int k2 = l1 + byte0;
106 + if(l1 >= 8)
107 + k2 = 1;
108 + if(k2 >= 8)
109 + return;
110 +
111 + // Craftbukkit start
112 + BlockFace[] faces = new BlockFace[]{ BlockFace.North, BlockFace.South, BlockFace.East, BlockFace.West };
113 + for (BlockFace currentFace : faces) {
114 + int index = 0;
115 + if (aflag[index]) {
116 + BlockFromToEvent event = new BlockFromToEvent(Type.BLOCK_FLOW, source, currentFace);
117 + ((WorldServer) world).getServer().getPluginManager().callEvent(event);
118 + if (!event.isCancelled())
119 + f(world, i1 + currentFace.getModX(), j1, k1 + currentFace.getModZ(), k2);
120 + }
121 + index++;
122 + }
123 + // Craftbukkit stop
122 124 }
123 - // Craftbukkit stop
124 - }
125 125 }
126 126
127 127 private void f(World world, int i1, int j1, int k1, int l1)
128 128 {
129 129 if(l(world, i1, j1, k1))
130 130 {
131 131 int i2 = world.a(i1, j1, k1);
132 132 if(i2 > 0)
133 133 if(bs == Material.g)
134 134 h(world, i1, j1, k1);

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut