본문 바로가기

Game Dev/MineCraft - Mod18

광물블럭 추가 및 월드에서 광물 자동생성하기 오늘은 광물 추가 및 월드젠을 해봅시다~_~ 먼저 bellcraft.blocks 패키지에 BlockOre 클래스를 맹글어줍니다. 앞으로 왠만한 임포트는 직접 해주세요. 빨간 밑줄 쳐진곳 마우스 갖다대면 임포트 추천나오는데, 거기서 나열된 클래스중에 마인크래프트 관련 클래스를 임포트해주시면됩니다. public class BlockOre extends Block { @SideOnly(Side.CLIENT) // 클라이언트에서만 작동 private IIcon icon; private final String customUnlocalizedName; public BlockOre(String arg1) { super(Material.rock); // 돌 재질의 블럭으로 설정 customUnlocalizedName .. 2014. 12. 1.
랜덤박스 티어별로 생성 및 랜덤아이템교환기능 추가하기 일단 bellcraft.items 패키지에 ItemRandomBox 클래스로 가줍니다. 그 다음 다음과같이 코딩(...강좌인데 너무 성의없군)합니다. package bellcraft.items; import java.util.List; import java.util.Random; import bellcraft.core.BellCraft; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; .. 2014. 12. 1.
특정한 기능을 하지 않는 아이템(주괴 등) 추가 및 오어딕셔너리 등록 및 아이템 설명 추가하기! 먼저 bellcraft.items 패키지에 ItemIngots 클래스를 추가해줍니다. 그리고 다음과 같이 코딩해줍니다. ItemIngots.java package bellcraft.items; import java.util.List; import bellcraft.core.BellCraft; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.. 2014. 11. 30.
서버 명령어 추가하기 일단 bellcraft.server 패키지에 Commands 클래스를 추가해줍니다. 그 다음 다음과 같이 코딩해줍니다. Commands.java package bellcraft.server; import java.util.ArrayList; import java.util.List; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ChatComponentTranslation; public class Commands implements ICommand { // ICommand.. 2014. 11. 30.