提供: Minecraft Modding Wiki
警告: ログインしていません。編集を行うと、あなたの IP アドレスが公開されます。ログインまたはアカウントを作成すれば、あなたの編集はその利用者名とともに表示されるほか、その他の利点もあります。
この編集を取り消せます。
下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 |
編集中の文章 |
39行目: |
39行目: |
| useMetadata = true) | | useMetadata = true) |
| public class SampleMod { | | public class SampleMod { |
− | @SidedProxy(clientSide = "sampleMod.ClientProxy", serverSide = "sampleMod.CommonProxy")
| + | |
− | public static CommonProxy proxy;
| |
| @EventHandler | | @EventHandler |
| public void preInit(FMLPreInitializationEvent event) { | | public void preInit(FMLPreInitializationEvent event) { |
277行目: |
276行目: |
| | | |
| </source> | | </source> |
− | ===CommonProxyクラス===
| |
− |
| |
− | <source lang = "java">
| |
− |
| |
− | package com.example.examplemod;
| |
− |
| |
− | import net.minecraft.entity.player.EntityPlayer;
| |
− |
| |
− | public class CommonProxy {
| |
− |
| |
− | public EntityPlayer getEntityPlayerInstance() {return null;}
| |
− |
| |
− | }
| |
− |
| |
− | </source>
| |
− |
| |
− | ===ClientProxyクラス===
| |
− |
| |
− | <source lang = "java">
| |
− |
| |
− | package com.example.examplemod;
| |
− |
| |
− | import net.minecraft.client.Minecraft;
| |
− |
| |
− | import net.minecraft.entity.player.EntityPlayer;
| |
− |
| |
− | public class ClientProxy extends CommonProxy {
| |
| | | |
− | @Override
| |
− |
| |
− | public EntityPlayer getEntityPlayerInstance() {
| |
− |
| |
− | return Minecraft.getMinecraft().thePlayer;
| |
− |
| |
− | }
| |
− |
| |
− | }
| |
− |
| |
− | </source>
| |
| ===PacketHandlerクラス=== | | ===PacketHandlerクラス=== |
| <source lang = "java"> | | <source lang = "java"> |