Package net.minecraft.util.com.google.common.collect

Examples of net.minecraft.util.com.google.common.collect.HashMultiset


                            int k2 = k1 - l;
                            int l2 = j2 - i1;
                            boolean flag = k2 * k2 + l2 * l2 > (j1 - 2) * (j1 - 2);
                            int i3 = (j / i + k1 - 64) * i;
                            int j3 = (k / i + j2 - 64) * i;
                            HashMultiset hashmultiset = HashMultiset.create();
                            Chunk chunk = world.getChunkAtWorldCoords(i3, j3);

                            if (!chunk.isEmpty()) {
                                int k3 = i3 & 15;
                                int l3 = j3 & 15;
                                int i4 = 0;
                                double d1 = 0.0D;
                                int j4;

                                if (world.worldProvider.g) {
                                    j4 = i3 + j3 * 231871;
                                    j4 = j4 * j4 * 31287121 + j4 * 11;
                                    if ((j4 >> 20 & 1) == 0) {
                                        hashmultiset.add(Blocks.DIRT.f(0), 10);
                                    } else {
                                        hashmultiset.add(Blocks.STONE.f(0), 100);
                                    }

                                    d1 = 100.0D;
                                } else {
                                    for (j4 = 0; j4 < i; ++j4) {
                                        for (int k4 = 0; k4 < i; ++k4) {
                                            int l4 = chunk.b(j4 + k3, k4 + l3) + 1;
                                            Block block = Blocks.AIR;
                                            int i5 = 0;

                                            if (l4 > 1) {
                                                do {
                                                    --l4;
                                                    block = chunk.getType(j4 + k3, l4, k4 + l3);
                                                    i5 = chunk.getData(j4 + k3, l4, k4 + l3);
                                                } while (block.f(i5) == MaterialMapColor.b && l4 > 0);

                                                if (l4 > 0 && block.getMaterial().isLiquid()) {
                                                    int j5 = l4 - 1;

                                                    Block block1;

                                                    do {
                                                        block1 = chunk.getType(j4 + k3, j5--, k4 + l3);
                                                        ++i4;
                                                    } while (j5 > 0 && block1.getMaterial().isLiquid());
                                                }
                                            }

                                            d1 += (double) l4 / (double) (i * i);
                                            hashmultiset.add(block.f(i5));
                                        }
                                    }
                                }

                                i4 /= i * i;
 
View Full Code Here

TOP

Related Classes of net.minecraft.util.com.google.common.collect.HashMultiset

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.