提供: Minecraft Modding Wiki
警告: ログインしていません。編集を行うと、あなたの IP アドレスが公開されます。ログインまたはアカウントを作成すれば、あなたの編集はその利用者名とともに表示されるほか、その他の利点もあります。
この編集を取り消せます。
下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 |
編集中の文章 |
42行目: |
42行目: |
| } | | } |
| | | |
− | protected void genSampleOre(World world, int worldX, int worldZ, int size, WorldGenerator generator, int minY, int maxY, Random rand) {
| |
− | int l;
| |
| | | |
− | if (maxY < minY) {
| |
− | l = minY;
| |
− | minY = maxY;
| |
− | maxY = l;
| |
− | } else if (maxY == minY) {
| |
− | if (minY < 255) {
| |
− | ++maxY;
| |
− | } else {
| |
− | --minY;
| |
− | }
| |
− | }
| |
− |
| |
− | for (l = 0; l < size; ++l) {
| |
− | int X = worldX + rnd.nextInt(16);
| |
− | int Y = rnd.nextInt(maxY - minY) + minY;
| |
− | int Z = worldZ + rnd.nextInt(16);
| |
− |
| |
− | generator.generate(world, rnd, X, Y, Z)
| |
− | }
| |
− | }
| |
| } | | } |
| | | |
71行目: |
49行目: |
| *SampleOre.java | | *SampleOre.java |
| <source lang="java"> | | <source lang="java"> |
− | /*パッケージ、インポートは省略*/
| + | |
− | public class SampleOre extends Block {
| |
− | public SampleOre() {
| |
− | super(Material.rock);
| |
− | this.setCreativeTab(CreativeTabs.tabBlock);
| |
− | this.setBlockName("oreSample");
| |
− | this.setBlockTextureName("sampleoregen:sample_ore");
| |
− | }
| |
− | }
| |
| </source> | | </source> |
| + | |
| + | '''※編集途中です。このソースでは動きません。''' |