提供: Minecraft Modding Wiki
この編集を取り消せます。
下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 | 編集中の文章 | ||
1行目: | 1行目: | ||
{{前提MOD|reqmod="Minecraft Forge Universal 9.10.0.xxx~"}} | {{前提MOD|reqmod="Minecraft Forge Universal 9.10.0.xxx~"}} | ||
− | + | ||
− | |||
==概要== | ==概要== | ||
<p>流体追加のチュートリアルです。<br /> | <p>流体追加のチュートリアルです。<br /> | ||
60行目: | 59行目: | ||
@EventHandler | @EventHandler | ||
public void preInit(FMLPreInitializationEvent evt) { | public void preInit(FMLPreInitializationEvent evt) { | ||
+ | //TextureStitchEvent.Preイベントのためにイベントバスに登録します。 | ||
+ | MinecraftForge.EVENT_BUS.register(this); | ||
+ | } | ||
+ | |||
+ | @EventHandler | ||
+ | public void load(FMLInitializationEvent event) { | ||
//Fluidクラスのインスタンスを生成 | //Fluidクラスのインスタンスを生成 | ||
sampleFluid = new Fluid("FluidSample") | sampleFluid = new Fluid("FluidSample") | ||
146行目: | 151行目: | ||
* numAdjacentSourcesが、周囲の水源の数で、上記例であればj1が0であれば、水源化です。 | * numAdjacentSourcesが、周囲の水源の数で、上記例であればj1が0であれば、水源化です。 | ||
*/ | */ | ||
+ | |||
GameRegistry.registerBlock(sampleFluidBlock, sampleFluidBlock.getUnlocalizedName()); | GameRegistry.registerBlock(sampleFluidBlock, sampleFluidBlock.getUnlocalizedName()); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
//容器入り流体の登録です。 | //容器入り流体の登録です。 | ||
//通常のアイテム作成と同様なので省略します。 | //通常のアイテム作成と同様なので省略します。 |