前提Mod: Minecraft1.7.10 IC2Exp
リビジョン | 30e601e8180d9bfaf58b28fbd708f5bf5e618abb (tree) |
---|---|
日時 | 2015-08-06 12:55:56 |
作者 | MirrgieRiana |
コミッター | MirrgieRiana |
InitializerCrops: 多くの作物にBaseSeedを追加
@@ -13,6 +13,7 @@ | ||
13 | 13 | import miragecrops6.alis.AliItemStack; |
14 | 14 | import miragecrops6.crop.CropCardMirageCrops; |
15 | 15 | import miragecrops6.crop.CropCardMirageCrops.CropCardMirageCropsParameter; |
16 | +import mirrg.minecraft.itemstack.mir60.HItemStack; | |
16 | 17 | import mirrg.struct.hydrogen.Tuple; |
17 | 18 | import net.minecraft.entity.EnumCreatureAttribute; |
18 | 19 | import net.minecraft.entity.monster.EntityZombie; |
@@ -41,23 +42,36 @@ | ||
41 | 42 | CropCardMirageCrops c; |
42 | 43 | String a1 = "Spinach"; |
43 | 44 | String a2 = "SpinachGroup"; |
45 | + | |
44 | 46 | c = r("spinach", 2, 4, s(0, 4, 0, 1, 0), a(a1, a2, "Food", "Edible")); |
45 | 47 | setGain(c, cropTile -> AliItemStack.cropSpinach.copy()); |
48 | + registerBaseSeed(c, () -> HItemStack.copy(AliItemStack.cropSpinach, 4)); | |
49 | + | |
46 | 50 | c = r("spinachRed", 3, 4, s(2, 2, 0, 3, 0), a(a1, a2, "Red", "Undead", "Blood")); |
47 | 51 | setGain(c, cropTile -> AliItemStack.cropSpinachRed.copy()); |
48 | 52 | setTextureRespect(c, max(3), AliCrop.spinach); |
53 | + registerBaseSeed(c, () -> HItemStack.copy(AliItemStack.cropSpinachRed, 4)); | |
54 | + | |
49 | 55 | c = r("spinachBlue", 5, 4, s(4, 1, 0, 3, 0), a(a1, a2, "Blue", "Magic")); |
50 | 56 | setGain(c, cropTile -> AliItemStack.cropSpinachBlue.copy()); |
51 | 57 | setTextureRespect(c, max(3), AliCrop.spinach); |
58 | + registerBaseSeed(c, () -> HItemStack.copy(AliItemStack.cropSpinachBlue, 4)); | |
59 | + | |
52 | 60 | c = r("spinachPoison", 8, 4, s(6, 0, 4, 1, 0), a(a1, a2, "Purple", "Poizon", "Toxic")); |
53 | 61 | setGain(c, cropTile -> AliItemStack.cropSpinachPoison.copy()); |
54 | 62 | setTextureRespect(c, max(3), AliCrop.spinach); |
63 | + registerBaseSeed(c, () -> HItemStack.copy(AliItemStack.cropSpinachPoison, 4)); | |
64 | + | |
55 | 65 | c = r("spinachFire", 10, 4, s(2, 0, 6, 1, 0), a(a1, a2, "Orange", "Fire", "Flame")); |
56 | 66 | setGain(c, cropTile -> AliItemStack.cropSpinachFire.copy()); |
57 | 67 | setTextureRespect(c, max(3), AliCrop.spinach); |
68 | + registerBaseSeed(c, () -> HItemStack.copy(AliItemStack.cropSpinachFire, 4)); | |
69 | + | |
58 | 70 | c = r("spinachIce", 12, 4, s(1, 1, 1, 1, 0), a(a1, a2, "White", "Blue", "Ice")); |
59 | 71 | setGain(c, cropTile -> AliItemStack.cropSpinachIce.copy()); |
60 | 72 | setTextureRespect(c, max(3), AliCrop.spinach); |
73 | + registerBaseSeed(c, () -> HItemStack.copy(AliItemStack.cropSpinachIce, 4)); | |
74 | + | |
61 | 75 | } |
62 | 76 | |
63 | 77 | private static void registerSarracenias() |
@@ -211,11 +225,13 @@ | ||
211 | 225 | c = r("cactus", 2, 4, s(1, 0, 4, 4, 1), a(a1, a2, "Green")); |
212 | 226 | setGain(c, cropTile -> AliItemStack.cropCactus.copy()); |
213 | 227 | addCropComponentCactus(c, array(4), COLLISION, 1.0f); |
228 | + registerBaseSeed(c, () -> HItemStack.copy(AliItemStack.cropCactus, 1)); | |
214 | 229 | |
215 | 230 | c = r("cactusObsidian", 7, 4, s(3, 0, 6, 3, 0), a(a1, a2, "Purple", "Black", "Obsidian", "Glass", "Fire")); |
216 | 231 | setGain(c, cropTile -> AliItemStack.cropCactusObsidian.copy()); |
217 | 232 | setTextureRespect(c, max(3), AliCrop.cactus); |
218 | 233 | addCropComponentCactus(c, array(4), COLLISION, 2.0f); |
234 | + registerBaseSeed(c, () -> HItemStack.copy(AliItemStack.cropCactusObsidian, 1)); | |
219 | 235 | |
220 | 236 | c = r("cactusSnow", 6, 5, s(2, 0, 5, 2, 0), a(a1, a2, "White", "Ice", "Snow")); |
221 | 237 | setGain(c, cropTile -> w() |
@@ -229,6 +245,7 @@ | ||
229 | 245 | setTextureRespect(c, max(3), AliCrop.cactus); |
230 | 246 | addCropComponentCactus(c, array(4, 5), COLLISION | CLICK, 1.0f); |
231 | 247 | addCropComponentSlow(c, array(5), COLLISION); |
248 | + registerBaseSeed(c, () -> HItemStack.copy(AliItemStack.cropCactusSnow, 1)); | |
232 | 249 | } |
233 | 250 | |
234 | 251 | private static void registerWeeds() |
@@ -242,6 +259,7 @@ | ||
242 | 259 | |
243 | 260 | c = r("fern", 1, 4, s(0, 0, 0, 1, 4), a(a1, a2, a5, "Weed")); |
244 | 261 | setGain(c, cropTile -> new ItemStack(Blocks.tallgrass, 1, 2)); |
262 | + registerBaseSeed(c, () -> new ItemStack(Blocks.tallgrass, 1, 2)); | |
245 | 263 | |
246 | 264 | c = r("fernHoney", 5, 5, s(0, 3, 0, 1, 2), a(a1, a2, a5, "Bee", "Honey", "Edible")); |
247 | 265 | setGain(c, cropTile -> null); |
@@ -254,6 +272,7 @@ | ||
254 | 272 | |
255 | 273 | c = r("vine", 1, 4, s(0, 0, 1, 0, 4), a(a3, a4, a5, "Weed")); |
256 | 274 | setGain(c, cropTile -> new ItemStack(Blocks.vine)); |
275 | + registerBaseSeed(c, () -> new ItemStack(Blocks.vine)); | |
257 | 276 | |
258 | 277 | c = r("vineApatite", 6, 4, s(3, 0, 0, 2, 1), a(a3, a4, a5, "Blue", "Apatite", "Crystal", "Phosphorus")); |
259 | 278 | setGain(c, cropTile -> w() |
@@ -385,4 +404,9 @@ | ||
385 | 404 | return cropTile.getWorld().rand.nextInt(max - min + 1) + min; |
386 | 405 | } |
387 | 406 | |
407 | + private static void registerBaseSeed(CropCardMirageCrops cropCardMirageCrops, Supplier<ItemStack> itemStack) | |
408 | + { | |
409 | + Crops.instance.registerBaseSeed(itemStack.get(), cropCardMirageCrops, 1, 0, 0, 0); | |
410 | + } | |
411 | + | |
388 | 412 | } |