コード例 #1
0
ファイル: villager.py プロジェクト: KevinKelley/mcedit2
    def __init__(self, expandOffset=0., heightOffset=0.):

        self.villagerHead = ModelRenderer(self)
        self.villagerHead.setCenterPoint(0.0, 0.0 + heightOffset, 0.0)
        self.villagerHead.setTextureOffset(0, 0)
        self.villagerHead.addBox(-4.0, -10.0, -4.0, 8, 10, 8, expandOffset)
        self.villagerNose = ModelRenderer(self)
        self.villagerNose.setCenterPoint(0.0, heightOffset - 2.0, 0.0)
        self.villagerNose.setTextureOffset(24, 0)
        self.villagerNose.addBox(-1.0, -1.0, -6.0, 2, 4, 2, expandOffset)
        #self.villagerHead.addChild(self.villagerNose)
        self.villagerBody = ModelRenderer(self)
        self.villagerBody.setCenterPoint(0.0, 0.0 + heightOffset, 0.0)
        self.villagerBody.setTextureOffset(16, 20)
        self.villagerBody.addBox(-4.0, 0.0, -3.0, 8, 12, 6, expandOffset)
        self.villagerBody.setTextureOffset(0, 38)
        self.villagerBody.addBox(-4.0, 0.0, -3.0, 8, 18, 6, expandOffset + 0.5)
        self.villagerArms = ModelRenderer(self)
        self.villagerArms.setCenterPoint(0.0, 0.0 + heightOffset + 2.0, 0.0)
        self.villagerArms.setTextureOffset(44, 22)
        self.villagerArms.addBox(-8.0, -2.0, -2.0, 4, 8, 4, expandOffset)
        self.villagerArms.setTextureOffset(44, 22)
        self.villagerArms.addBox(4.0, -2.0, -2.0, 4, 8, 4, expandOffset)
        self.villagerArms.setTextureOffset(40, 38)
        self.villagerArms.addBox(-4.0, 2.0, -2.0, 8, 4, 4, expandOffset)
        self.rightVillagerLeg = (ModelRenderer(self, 0, 22))
        self.rightVillagerLeg.setCenterPoint(-2.0, 12.0 + heightOffset, 0.0)
        self.rightVillagerLeg.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset)
        self.leftVillagerLeg = (ModelRenderer(self, 0, 22))
        self.leftVillagerLeg.mirror = True
        self.leftVillagerLeg.setCenterPoint(2.0, 12.0 + heightOffset, 0.0)
        self.leftVillagerLeg.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset)
コード例 #2
0
    def __init__(self):
        super(ModelSheep, self).__init__(12)

        self.head = ModelRenderer(self, 0, 0)
        self.head.addBox(-3.0, -4.0, -6.0, 6, 6, 8, 0.0)
        self.head.setCenterPoint(0.0, 6.0, -8.0)
        self.body = ModelRenderer(self, 28, 8)
        self.body.addBox(-4.0, -10.0, -7.0, 8, 16, 6, 0.0)
        self.body.setCenterPoint(0.0, 5.0, 2.0)

        self.body.setRotation(math.pi / 2., 0, 0)
コード例 #3
0
ファイル: quadruped.py プロジェクト: KevinKelley/mcedit2
    def __init__(self):
        super(ModelSheep, self).__init__(12)
        
        self.head = ModelRenderer(self, 0, 0)
        self.head.addBox(-3.0, -4.0, -6.0, 6, 6, 8, 0.0)
        self.head.setCenterPoint(0.0, 6.0, -8.0)
        self.body = ModelRenderer(self, 28, 8)
        self.body.addBox(-4.0, -10.0, -7.0, 8, 16, 6, 0.0)
        self.body.setCenterPoint(0.0, 5.0, 2.0)

        self.body.setRotation(math.pi/2., 0, 0)
コード例 #4
0
ファイル: chest.py プロジェクト: pamunoz/mcedit2
    def __init__(self):

        self.chestLid = ModelRenderer(self, 0, 0)
        self.chestLid.addBox(0.0, -5.0, -14.0, 30, 5, 14, 0.0)
        self.chestLid.setCenterPoint(1.0, 7.0, 15.0)
        self.chestKnob = ModelRenderer(self, 0, 0)
        self.chestKnob.addBox(-1.0, -2.0, -15.0, 2, 4, 1, 0.0)
        self.chestKnob.setCenterPoint(16.0, 7.0, 15.0)
        self.chestBelow = ModelRenderer(self, 0, 19)
        self.chestBelow.addBox(0.0, 0.0, 0.0, 30, 10, 14, 0.0)
        self.chestBelow.setCenterPoint(1.0, 6.0, 1.0)

        self.parts = [self.chestLid, self.chestKnob, self.chestBelow]
コード例 #5
0
class ModelSheep(ModelQuadruped):
    id = "Sheep"
    modelTexture = "assets/minecraft/textures/entity/sheep/sheep.png"

    def __init__(self):
        super(ModelSheep, self).__init__(12)

        self.head = ModelRenderer(self, 0, 0)
        self.head.addBox(-3.0, -4.0, -6.0, 6, 6, 8, 0.0)
        self.head.setCenterPoint(0.0, 6.0, -8.0)
        self.body = ModelRenderer(self, 28, 8)
        self.body.addBox(-4.0, -10.0, -7.0, 8, 16, 6, 0.0)
        self.body.setCenterPoint(0.0, 5.0, 2.0)

        self.body.setRotation(math.pi / 2., 0, 0)
コード例 #6
0
ファイル: quadruped.py プロジェクト: KevinKelley/mcedit2
class ModelSheep(ModelQuadruped):
    id = "Sheep"
    modelTexture = "assets/minecraft/textures/entity/sheep/sheep.png"

    def __init__(self):
        super(ModelSheep, self).__init__(12)
        
        self.head = ModelRenderer(self, 0, 0)
        self.head.addBox(-3.0, -4.0, -6.0, 6, 6, 8, 0.0)
        self.head.setCenterPoint(0.0, 6.0, -8.0)
        self.body = ModelRenderer(self, 28, 8)
        self.body.addBox(-4.0, -10.0, -7.0, 8, 16, 6, 0.0)
        self.body.setCenterPoint(0.0, 5.0, 2.0)

        self.body.setRotation(math.pi/2., 0, 0)
コード例 #7
0
ファイル: shulker.py プロジェクト: KevinKelley/mcedit2
    def __init__(self):
        self.part1 = ModelRenderer(self, 0, 0)
        self.part2 = ModelRenderer(self, 0, 28)
        self.part3 = ModelRenderer(self, 0, 52)

        self.part1.addBox(-8.0, -16.0, -8.0, 16, 12, 16)
        self.part1.setCenterPoint(0.0, 24.0, 0.0)

        self.part2.addBox(-8.0, -8.0, -8.0, 16, 8, 16)
        self.part2.setCenterPoint(0.0, 24.0, 0.0)

        self.part3.addBox(-3.0, 0.0, -3.0, 6, 6, 6)
        self.part3.setCenterPoint(0.0, 12.0, 0.0)

        self.parts = [
            self.part1, self.part2, self.part3
        ]
コード例 #8
0
ファイル: biped.py プロジェクト: KevinKelley/mcedit2
    def __init__(self, expandOffset=1.0, headOffset=0.0):
        super(ModelSkeleton, self).__init__(expandOffset, headOffset)

        self.bipedRightArm = ModelRenderer(self, 40, 16)
        self.bipedRightArm.addBox(-1.0, -2.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedRightArm.setCenterPoint(-5.0, 2.0, 0.0)
        self.bipedLeftArm = ModelRenderer(self, 40, 16)
        self.bipedLeftArm.mirror = True
        self.bipedLeftArm.addBox(-1.0, -2.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedLeftArm.setCenterPoint(5.0, 2.0, 0.0)
        self.bipedRightLeg = ModelRenderer(self, 0, 16)
        self.bipedRightLeg.addBox(-1.0, 0.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedRightLeg.setCenterPoint(-2.0, 12.0, 0.0)
        self.bipedLeftLeg = ModelRenderer(self, 0, 16)
        self.bipedLeftLeg.mirror = True
        self.bipedLeftLeg.addBox(-1.0, 0.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedLeftLeg.setCenterPoint(2.0, 12.0, 0.0)
コード例 #9
0
ファイル: quadruped.py プロジェクト: KevinKelley/mcedit2
    def __init__(self):
        super(ModelCow, self).__init__(12)

        self.head = ModelRenderer(self, 0, 0)
        self.head.addBox(-4.0, -4.0, -6.0, 8, 8, 6, 0.0)
        self.head.setCenterPoint(0.0, 4.0, -8.0)
        self.head.setTextureOffset(22, 0)
        self.head.addBox(-5.0, -5.0, -4.0, 1, 3, 1, 0.0)
        self.head.setTextureOffset(22, 0)
        self.head.addBox(4.0, -5.0, -4.0, 1, 3, 1, 0.0)
        self.body = ModelRenderer(self, 18, 4)
        self.body.addBox(-6.0, -10.0, -7.0, 12, 18, 10, 0.0)
        self.body.setCenterPoint(0.0, 5.0, 2.0)
        self.body.setTextureOffset(52, 0)
        self.body.addBox(-2.0, 2.0, -8.0, 4, 6, 1)

        self.body.setRotation(math.pi/2., 0, 0)

        self.leg1.cx -= 1
        self.leg2.cx += 1
        self.leg3.cx -= 1
        self.leg4.cx += 1
        self.leg3.cz -= 1
        self.leg4.cz += 1
コード例 #10
0
    def __init__(self):
        super(ModelCow, self).__init__(12)

        self.head = ModelRenderer(self, 0, 0)
        self.head.addBox(-4.0, -4.0, -6.0, 8, 8, 6, 0.0)
        self.head.setCenterPoint(0.0, 4.0, -8.0)
        self.head.setTextureOffset(22, 0)
        self.head.addBox(-5.0, -5.0, -4.0, 1, 3, 1, 0.0)
        self.head.setTextureOffset(22, 0)
        self.head.addBox(4.0, -5.0, -4.0, 1, 3, 1, 0.0)
        self.body = ModelRenderer(self, 18, 4)
        self.body.addBox(-6.0, -10.0, -7.0, 12, 18, 10, 0.0)
        self.body.setCenterPoint(0.0, 5.0, 2.0)
        self.body.setTextureOffset(52, 0)
        self.body.addBox(-2.0, 2.0, -8.0, 4, 6, 1)

        self.body.setRotation(math.pi / 2., 0, 0)

        self.leg1.cx -= 1
        self.leg2.cx += 1
        self.leg3.cx -= 1
        self.leg4.cx += 1
        self.leg3.cz -= 1
        self.leg4.cz += 1
コード例 #11
0
ファイル: biped.py プロジェクト: wcpe/mcedit2
    def __init__(self, expandOffset=1.0, headOffset=0.0):
        super(ModelSkeleton, self).__init__(expandOffset, headOffset)

        self.bipedRightArm = ModelRenderer(self, 40, 16)
        self.bipedRightArm.addBox(-1.0, -2.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedRightArm.setCenterPoint(-5.0, 2.0, 0.0)
        self.bipedLeftArm = ModelRenderer(self, 40, 16)
        self.bipedLeftArm.mirror = True
        self.bipedLeftArm.addBox(-1.0, -2.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedLeftArm.setCenterPoint(5.0, 2.0, 0.0)
        self.bipedRightLeg = ModelRenderer(self, 0, 16)
        self.bipedRightLeg.addBox(-1.0, 0.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedRightLeg.setCenterPoint(-2.0, 12.0, 0.0)
        self.bipedLeftLeg = ModelRenderer(self, 0, 16)
        self.bipedLeftLeg.mirror = True
        self.bipedLeftLeg.addBox(-1.0, 0.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedLeftLeg.setCenterPoint(2.0, 12.0, 0.0)
コード例 #12
0
    def __init__(self):
        self.part1 = ModelRenderer(self, 0, 0)
        self.part2 = ModelRenderer(self, 0, 28)
        self.part3 = ModelRenderer(self, 0, 52)

        self.part1.addBox(-8.0, -16.0, -8.0, 16, 12, 16)
        self.part1.setCenterPoint(0.0, 24.0, 0.0)

        self.part2.addBox(-8.0, -8.0, -8.0, 16, 8, 16)
        self.part2.setCenterPoint(0.0, 24.0, 0.0)

        self.part3.addBox(-3.0, 0.0, -3.0, 6, 6, 6)
        self.part3.setCenterPoint(0.0, 12.0, 0.0)

        self.parts = [self.part1, self.part2, self.part3]
コード例 #13
0
ファイル: chest.py プロジェクト: wcpe/mcedit2
    def __init__(self):

        self.chestLid = ModelRenderer(self, 0, 0)
        self.chestLid.addBox(0.0, -5.0, -14.0, 30, 5, 14, 0.0)
        self.chestLid.setCenterPoint(1., 7., 15.)
        self.chestKnob = ModelRenderer(self, 0, 0)
        self.chestKnob.addBox(-1.0, -2.0, -15.0, 2, 4, 1, 0.0)
        self.chestKnob.setCenterPoint(16., 7., 15.)
        self.chestBelow = ModelRenderer(self, 0, 19)
        self.chestBelow.addBox(0.0, 0.0, 0.0, 30, 10, 14, 0.0)
        self.chestBelow.setCenterPoint(1., 6., 1.)

        self.parts = [
            self.chestLid,
            self.chestKnob,
            self.chestBelow,
        ]
コード例 #14
0
ファイル: biped.py プロジェクト: KevinKelley/mcedit2
 def __init__(self, expandOffset=0.0, headOffset=0.0):
     self.bipedHead = ModelRenderer(self, 0, 0)
     self.bipedHead.addBox(-4.0, -8.0, -4.0, 8, 8, 8, expandOffset)
     self.bipedHead.setCenterPoint(0.0, 0.0 + headOffset, 0.0)
     self.bipedHeadwear = ModelRenderer(self, 32, 0)
     self.bipedHeadwear.addBox(-4.0, -8.0, -4.0, 8, 8, 8, expandOffset + 0.5)
     self.bipedHeadwear.setCenterPoint(0.0, 0.0 + headOffset, 0.0)
     self.bipedBody = ModelRenderer(self, 16, 16)
     self.bipedBody.addBox(-4.0, 0.0, -2.0, 8, 12, 4, expandOffset)
     self.bipedBody.setCenterPoint(0.0, 0.0 + headOffset, 0.0)
     self.bipedRightArm = ModelRenderer(self, 40, 16)
     self.bipedRightArm.addBox(-3.0, -2.0, -2.0, 4, 12, 4, expandOffset)
     self.bipedRightArm.setCenterPoint(-5.0, 2.0 + headOffset, 0.0)
     self.bipedLeftArm = ModelRenderer(self, 40, 16)
     self.bipedLeftArm.mirror = True
     self.bipedLeftArm.addBox(-1.0, -2.0, -2.0, 4, 12, 4, expandOffset)
     self.bipedLeftArm.setCenterPoint(5.0, 2.0 + headOffset, 0.0)
     self.bipedRightLeg = ModelRenderer(self, 0, 16)
     self.bipedRightLeg.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset)
     self.bipedRightLeg.setCenterPoint(-1.9, 12.0 + headOffset, 0.0)
     self.bipedLeftLeg = ModelRenderer(self, 0, 16)
     self.bipedLeftLeg.mirror = True
     self.bipedLeftLeg.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset)
     self.bipedLeftLeg.setCenterPoint(1.9, 12.0 + headOffset, 0.0)
コード例 #15
0
ファイル: quadruped.py プロジェクト: KevinKelley/mcedit2
    def __init__(self, height, expandOffset=0.0):
        self.head = ModelRenderer(self, 0, 0)
        
        self.head.addBox(-4.0, -4.0, -8.0, 8, 8, 8, expandOffset)
        self.head.setCenterPoint(0.0, (18 - height), -6.0)
        self.body = ModelRenderer(self, 28, 8)
        self.body.addBox(-5.0, -10.0, -7.0, 10, 16, 8, expandOffset)
        self.body.setCenterPoint(0.0, (17 - height), 2.0)
        self.leg1 = ModelRenderer(self, 0, 16)
        self.leg1.addBox(-2.0, 0.0, -2.0, 4, height, 4, expandOffset)
        self.leg1.setCenterPoint(-3.0, (24 - height), 7.0)
        self.leg2 = ModelRenderer(self, 0, 16)
        self.leg2.addBox(-2.0, 0.0, -2.0, 4, height, 4, expandOffset)
        self.leg2.setCenterPoint(3.0, (24 - height), 7.0)
        self.leg3 = ModelRenderer(self, 0, 16)
        self.leg3.addBox(-2.0, 0.0, -2.0, 4, height, 4, expandOffset)
        self.leg3.setCenterPoint(-3.0, (24 - height), -5.0)
        self.leg4 = ModelRenderer(self, 0, 16)
        self.leg4.addBox(-2.0, 0.0, -2.0, 4, height, 4, expandOffset)
        self.leg4.setCenterPoint(3.0, (24 - height), -5.0)

        self.body.setRotation(math.pi/2., 0, 0)
コード例 #16
0
ファイル: quadruped.py プロジェクト: KevinKelley/mcedit2
    def __init__(self):
        super(ModelSheepWool, self).__init__(12)
        self.head = ModelRenderer(self, 0, 0)
        self.head.addBox(-3.0, -4.0, -4.0, 6, 6, 6, 0.6)
        self.head.setCenterPoint(0.0, 6.0, -8.0)
        self.body = ModelRenderer(self, 28, 8)
        self.body.addBox(-4.0, -10.0, -7.0, 8, 16, 6, 1.75)
        self.body.setCenterPoint(0.0, 5.0, 2.0)

        legExpand = 0.5
        self.leg1 = ModelRenderer(self, 0, 16)
        self.leg1.addBox(-2.0, 0.0, -2.0, 4, 6, 4, legExpand)
        self.leg1.setCenterPoint(-3.0, 12.0, 7.0)
        self.leg2 = ModelRenderer(self, 0, 16)
        self.leg2.addBox(-2.0, 0.0, -2.0, 4, 6, 4, legExpand)
        self.leg2.setCenterPoint(3.0, 12.0, 7.0)
        self.leg3 = ModelRenderer(self, 0, 16)
        self.leg3.addBox(-2.0, 0.0, -2.0, 4, 6, 4, legExpand)
        self.leg3.setCenterPoint(-3.0, 12.0, -5.0)
        self.leg4 = ModelRenderer(self, 0, 16)
        self.leg4.addBox(-2.0, 0.0, -2.0, 4, 6, 4, legExpand)
        self.leg4.setCenterPoint(3.0, 12.0, -5.0)

        self.body.setRotation(math.pi/2., 0, 0)
コード例 #17
0
ファイル: biped.py プロジェクト: wcpe/mcedit2
class ModelSkeleton(ModelBiped):
    modelTexture = "assets/minecraft/textures/entity/skeleton/skeleton.png"
    id = "Skeleton"

    def __init__(self, expandOffset=1.0, headOffset=0.0):
        super(ModelSkeleton, self).__init__(expandOffset, headOffset)

        self.bipedRightArm = ModelRenderer(self, 40, 16)
        self.bipedRightArm.addBox(-1.0, -2.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedRightArm.setCenterPoint(-5.0, 2.0, 0.0)
        self.bipedLeftArm = ModelRenderer(self, 40, 16)
        self.bipedLeftArm.mirror = True
        self.bipedLeftArm.addBox(-1.0, -2.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedLeftArm.setCenterPoint(5.0, 2.0, 0.0)
        self.bipedRightLeg = ModelRenderer(self, 0, 16)
        self.bipedRightLeg.addBox(-1.0, 0.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedRightLeg.setCenterPoint(-2.0, 12.0, 0.0)
        self.bipedLeftLeg = ModelRenderer(self, 0, 16)
        self.bipedLeftLeg.mirror = True
        self.bipedLeftLeg.addBox(-1.0, 0.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedLeftLeg.setCenterPoint(2.0, 12.0, 0.0)
コード例 #18
0
ファイル: biped.py プロジェクト: wcpe/mcedit2
class ModelBiped(object):
    textureWidth = 64
    textureHeight = 32

    def __init__(self, expandOffset=0.0, headOffset=0.0):
        self.bipedHead = ModelRenderer(self, 0, 0)
        self.bipedHead.addBox(-4.0, -8.0, -4.0, 8, 8, 8, expandOffset)
        self.bipedHead.setCenterPoint(0.0, 0.0 + headOffset, 0.0)
        self.bipedHeadwear = ModelRenderer(self, 32, 0)
        self.bipedHeadwear.addBox(-4.0, -8.0, -4.0, 8, 8, 8,
                                  expandOffset + 0.5)
        self.bipedHeadwear.setCenterPoint(0.0, 0.0 + headOffset, 0.0)
        self.bipedBody = ModelRenderer(self, 16, 16)
        self.bipedBody.addBox(-4.0, 0.0, -2.0, 8, 12, 4, expandOffset)
        self.bipedBody.setCenterPoint(0.0, 0.0 + headOffset, 0.0)
        self.bipedRightArm = ModelRenderer(self, 40, 16)
        self.bipedRightArm.addBox(-3.0, -2.0, -2.0, 4, 12, 4, expandOffset)
        self.bipedRightArm.setCenterPoint(-5.0, 2.0 + headOffset, 0.0)
        self.bipedLeftArm = ModelRenderer(self, 40, 16)
        self.bipedLeftArm.mirror = True
        self.bipedLeftArm.addBox(-1.0, -2.0, -2.0, 4, 12, 4, expandOffset)
        self.bipedLeftArm.setCenterPoint(5.0, 2.0 + headOffset, 0.0)
        self.bipedRightLeg = ModelRenderer(self, 0, 16)
        self.bipedRightLeg.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset)
        self.bipedRightLeg.setCenterPoint(-1.9, 12.0 + headOffset, 0.0)
        self.bipedLeftLeg = ModelRenderer(self, 0, 16)
        self.bipedLeftLeg.mirror = True
        self.bipedLeftLeg.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset)
        self.bipedLeftLeg.setCenterPoint(1.9, 12.0 + headOffset, 0.0)

    @property
    def parts(self):
        return [
            self.bipedHead, self.bipedHeadwear, self.bipedBody,
            self.bipedRightArm, self.bipedLeftArm, self.bipedRightLeg,
            self.bipedLeftLeg
        ]
コード例 #19
0
class ModelArmorStand(ModelArmorStandArmor):
    textureWidth = 64
    textureHeight = 64

    modelTexture = "assets/minecraft/textures/entity/armorstand/wood.png"
    id = "ArmorStand"
    
    def __init__(self, expandOffset=0.0):
        self.bipedHead = ModelRenderer(self, 0, 0)
        self.bipedHead.addBox(-1.0, -7.0, -1.0, 2, 7, 2, expandOffset)
        self.bipedHead.setCenterPoint(0.0, 0.0, 0.0)
        self.bipedBody = ModelRenderer(self, 0, 26)
        self.bipedBody.addBox(-6.0, 0.0, -1.5, 12, 3, 3, expandOffset)
        self.bipedBody.setCenterPoint(0.0, 0.0, 0.0)
        self.bipedRightArm = ModelRenderer(self, 24, 0)
        self.bipedRightArm.addBox(-2.0, -2.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedRightArm.setCenterPoint(-5.0, 2.0, 0.0)
        self.bipedLeftArm = ModelRenderer(self, 32, 16)
        self.bipedLeftArm.mirror = True
        self.bipedLeftArm.addBox(0.0, -2.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedLeftArm.setCenterPoint(5.0, 2.0, 0.0)
        self.bipedRightLeg = ModelRenderer(self, 8, 0)
        self.bipedRightLeg.addBox(-1.0, 0.0, -1.0, 2, 11, 2, expandOffset)
        self.bipedRightLeg.setCenterPoint(-1.9, 12.0, 0.0)
        self.bipedLeftLeg = ModelRenderer(self, 40, 16)
        self.bipedLeftLeg.mirror = True
        self.bipedLeftLeg.addBox(-1.0, 0.0, -1.0, 2, 11, 2, expandOffset)
        self.bipedLeftLeg.setCenterPoint(1.9, 12.0, 0.0)
        self.standRightSide = ModelRenderer(self, 16, 0)
        self.standRightSide.addBox(-3.0, 3.0, -1.0, 2, 7, 2, expandOffset)
        self.standRightSide.setCenterPoint(0.0, 0.0, 0.0)
        self.standRightSide.showModel = True
        self.standLeftSide = ModelRenderer(self, 48, 16)
        self.standLeftSide.addBox(1.0, 3.0, -1.0, 2, 7, 2, expandOffset)
        self.standLeftSide.setCenterPoint(0.0, 0.0, 0.0)
        self.standWaist = ModelRenderer(self, 0, 48)
        self.standWaist.addBox(-4.0, 10.0, -1.0, 8, 2, 2, expandOffset)
        self.standWaist.setCenterPoint(0.0, 0.0, 0.0)
        self.standBase = ModelRenderer(self, 0, 32)
        self.standBase.addBox(-6.0, 11.0, -6.0, 12, 1, 12, expandOffset)
        self.standBase.setCenterPoint(0.0, 12.0, 0.0)

    @property
    def parts(self):
        return [
            self.bipedHead,
            self.bipedBody,
            self.bipedRightArm,
            self.bipedLeftArm,
            self.bipedRightLeg,
            self.bipedLeftLeg,
            self.standRightSide,
            self.standLeftSide,
            self.standWaist,
            self.standBase
        ]
コード例 #20
0
ファイル: spider.py プロジェクト: wcpe/mcedit2
    def __init__(self):
        var1 = 0.0
        var2 = 15
        self.spiderHead = ModelRenderer(self, 32, 4)
        self.spiderHead.addBox(-4.0, -4.0, -8.0, 8, 8, 8, var1)
        self.spiderHead.setCenterPoint(0.0, var2, -3.0)
        self.spiderNeck = ModelRenderer(self, 0, 0)
        self.spiderNeck.addBox(-3.0, -3.0, -3.0, 6, 6, 6, var1)
        self.spiderNeck.setCenterPoint(0.0, var2, 0.0)
        self.spiderBody = ModelRenderer(self, 0, 12)
        self.spiderBody.addBox(-5.0, -4.0, -6.0, 10, 8, 12, var1)
        self.spiderBody.setCenterPoint(0.0, var2, 9.0)
        self.spiderLeg1 = ModelRenderer(self, 18, 0)
        self.spiderLeg1.addBox(-15.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg1.setCenterPoint(-4.0, var2, 2.0)
        self.spiderLeg2 = ModelRenderer(self, 18, 0)
        self.spiderLeg2.addBox(-1.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg2.setCenterPoint(4.0, var2, 2.0)
        self.spiderLeg3 = ModelRenderer(self, 18, 0)
        self.spiderLeg3.addBox(-15.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg3.setCenterPoint(-4.0, var2, 1.0)
        self.spiderLeg4 = ModelRenderer(self, 18, 0)
        self.spiderLeg4.addBox(-1.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg4.setCenterPoint(4.0, var2, 1.0)
        self.spiderLeg5 = ModelRenderer(self, 18, 0)
        self.spiderLeg5.addBox(-15.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg5.setCenterPoint(-4.0, var2, 0.0)
        self.spiderLeg6 = ModelRenderer(self, 18, 0)
        self.spiderLeg6.addBox(-1.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg6.setCenterPoint(4.0, var2, 0.0)
        self.spiderLeg7 = ModelRenderer(self, 18, 0)
        self.spiderLeg7.addBox(-15.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg7.setCenterPoint(-4.0, var2, -1.0)
        self.spiderLeg8 = ModelRenderer(self, 18, 0)
        self.spiderLeg8.addBox(-1.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg8.setCenterPoint(4.0, var2, -1.0)

        legYaw = 0.3926991
        legPitch = math.pi / 4
        self.spiderLeg1.setRotation(0, 2 * legYaw, -legPitch)
        self.spiderLeg2.setRotation(0, -2 * legYaw, legPitch)
        self.spiderLeg3.setRotation(0, legYaw, -legPitch * 3 / 4.)
        self.spiderLeg4.setRotation(0, -legYaw, legPitch * 3 / 4.)
        self.spiderLeg5.setRotation(0, -legYaw, -legPitch * 3 / 4.)
        self.spiderLeg6.setRotation(0, legYaw, legPitch * 3 / 4.)
        self.spiderLeg7.setRotation(0, -2 * legYaw, -legPitch)
        self.spiderLeg8.setRotation(0, 2 * legYaw, legPitch)

        self.parts = [
            self.spiderHead,
            self.spiderNeck,
            self.spiderBody,
            self.spiderLeg1,
            self.spiderLeg2,
            self.spiderLeg3,
            self.spiderLeg4,
            self.spiderLeg5,
            self.spiderLeg6,
            self.spiderLeg7,
            self.spiderLeg8,
        ]
コード例 #21
0
ファイル: biped.py プロジェクト: KevinKelley/mcedit2
class ModelBiped(object):
    textureWidth = 64
    textureHeight = 32

    def __init__(self, expandOffset=0.0, headOffset=0.0):
        self.bipedHead = ModelRenderer(self, 0, 0)
        self.bipedHead.addBox(-4.0, -8.0, -4.0, 8, 8, 8, expandOffset)
        self.bipedHead.setCenterPoint(0.0, 0.0 + headOffset, 0.0)
        self.bipedHeadwear = ModelRenderer(self, 32, 0)
        self.bipedHeadwear.addBox(-4.0, -8.0, -4.0, 8, 8, 8, expandOffset + 0.5)
        self.bipedHeadwear.setCenterPoint(0.0, 0.0 + headOffset, 0.0)
        self.bipedBody = ModelRenderer(self, 16, 16)
        self.bipedBody.addBox(-4.0, 0.0, -2.0, 8, 12, 4, expandOffset)
        self.bipedBody.setCenterPoint(0.0, 0.0 + headOffset, 0.0)
        self.bipedRightArm = ModelRenderer(self, 40, 16)
        self.bipedRightArm.addBox(-3.0, -2.0, -2.0, 4, 12, 4, expandOffset)
        self.bipedRightArm.setCenterPoint(-5.0, 2.0 + headOffset, 0.0)
        self.bipedLeftArm = ModelRenderer(self, 40, 16)
        self.bipedLeftArm.mirror = True
        self.bipedLeftArm.addBox(-1.0, -2.0, -2.0, 4, 12, 4, expandOffset)
        self.bipedLeftArm.setCenterPoint(5.0, 2.0 + headOffset, 0.0)
        self.bipedRightLeg = ModelRenderer(self, 0, 16)
        self.bipedRightLeg.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset)
        self.bipedRightLeg.setCenterPoint(-1.9, 12.0 + headOffset, 0.0)
        self.bipedLeftLeg = ModelRenderer(self, 0, 16)
        self.bipedLeftLeg.mirror = True
        self.bipedLeftLeg.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset)
        self.bipedLeftLeg.setCenterPoint(1.9, 12.0 + headOffset, 0.0)


    @property
    def parts(self):
        return [
            self.bipedHead,
            self.bipedHeadwear,
            self.bipedBody,
            self.bipedRightArm,
            self.bipedLeftArm,
            self.bipedRightLeg,
            self.bipedLeftLeg
        ]
コード例 #22
0
ファイル: chest.py プロジェクト: pamunoz/mcedit2
class ModelChest(object):
    textureWidth = 64
    textureHeight = 64

    tileEntityID = "Chest"

    modelTexture = "assets/minecraft/textures/entity/chest/normal.png"

    def __init__(self):
        self.chestLid = ModelRenderer(self, 0, 0)
        self.chestLid.addBox(0.0, -5.0, -14.0, 14, 5, 14, 0.0)
        self.chestLid.setCenterPoint(1.0, 7.0, 15.0)

        self.chestKnob = ModelRenderer(self, 0, 0)
        self.chestKnob.addBox(-1.0, -2.0, -15.0, 2, 4, 1, 0.0)
        self.chestKnob.setCenterPoint(8.0, 7.0, 15.0)

        self.chestBelow = ModelRenderer(self, 0, 19)
        self.chestBelow.addBox(0.0, 0.0, 0.0, 14, 10, 14, 0.0)
        self.chestBelow.setCenterPoint(1.0, 6.0, 1.0)

        self.parts = [self.chestLid, self.chestKnob, self.chestBelow]
コード例 #23
0
class ModelSheepWool(ModelQuadruped):
    id = "MCEDIT_SheepWool"  # eww
    modelTexture = "assets/minecraft/textures/entity/sheep/sheep_fur.png"

    def __init__(self):
        super(ModelSheepWool, self).__init__(12)
        self.head = ModelRenderer(self, 0, 0)
        self.head.addBox(-3.0, -4.0, -4.0, 6, 6, 6, 0.6)
        self.head.setCenterPoint(0.0, 6.0, -8.0)
        self.body = ModelRenderer(self, 28, 8)
        self.body.addBox(-4.0, -10.0, -7.0, 8, 16, 6, 1.75)
        self.body.setCenterPoint(0.0, 5.0, 2.0)

        legExpand = 0.5
        self.leg1 = ModelRenderer(self, 0, 16)
        self.leg1.addBox(-2.0, 0.0, -2.0, 4, 6, 4, legExpand)
        self.leg1.setCenterPoint(-3.0, 12.0, 7.0)
        self.leg2 = ModelRenderer(self, 0, 16)
        self.leg2.addBox(-2.0, 0.0, -2.0, 4, 6, 4, legExpand)
        self.leg2.setCenterPoint(3.0, 12.0, 7.0)
        self.leg3 = ModelRenderer(self, 0, 16)
        self.leg3.addBox(-2.0, 0.0, -2.0, 4, 6, 4, legExpand)
        self.leg3.setCenterPoint(-3.0, 12.0, -5.0)
        self.leg4 = ModelRenderer(self, 0, 16)
        self.leg4.addBox(-2.0, 0.0, -2.0, 4, 6, 4, legExpand)
        self.leg4.setCenterPoint(3.0, 12.0, -5.0)

        self.body.setRotation(math.pi / 2., 0, 0)
コード例 #24
0
ファイル: spider.py プロジェクト: KevinKelley/mcedit2
class ModelSpider(object):
    textureWidth = 64
    textureHeight = 32

    id = "Spider"
    modelTexture = "assets/minecraft/textures/entity/spider/spider.png"

    def __init__(self):
        var1 = 0.0
        var2 = 15
        self.spiderHead = ModelRenderer(self, 32, 4)
        self.spiderHead.addBox(-4.0, -4.0, -8.0, 8, 8, 8, var1)
        self.spiderHead.setCenterPoint(0.0, var2, -3.0)
        self.spiderNeck = ModelRenderer(self, 0, 0)
        self.spiderNeck.addBox(-3.0, -3.0, -3.0, 6, 6, 6, var1)
        self.spiderNeck.setCenterPoint(0.0, var2, 0.0)
        self.spiderBody = ModelRenderer(self, 0, 12)
        self.spiderBody.addBox(-5.0, -4.0, -6.0, 10, 8, 12, var1)
        self.spiderBody.setCenterPoint(0.0, var2, 9.0)
        self.spiderLeg1 = ModelRenderer(self, 18, 0)
        self.spiderLeg1.addBox(-15.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg1.setCenterPoint(-4.0, var2, 2.0)
        self.spiderLeg2 = ModelRenderer(self, 18, 0)
        self.spiderLeg2.addBox(-1.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg2.setCenterPoint(4.0, var2, 2.0)
        self.spiderLeg3 = ModelRenderer(self, 18, 0)
        self.spiderLeg3.addBox(-15.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg3.setCenterPoint(-4.0, var2, 1.0)
        self.spiderLeg4 = ModelRenderer(self, 18, 0)
        self.spiderLeg4.addBox(-1.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg4.setCenterPoint(4.0, var2, 1.0)
        self.spiderLeg5 = ModelRenderer(self, 18, 0)
        self.spiderLeg5.addBox(-15.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg5.setCenterPoint(-4.0, var2, 0.0)
        self.spiderLeg6 = ModelRenderer(self, 18, 0)
        self.spiderLeg6.addBox(-1.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg6.setCenterPoint(4.0, var2, 0.0)
        self.spiderLeg7 = ModelRenderer(self, 18, 0)
        self.spiderLeg7.addBox(-15.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg7.setCenterPoint(-4.0, var2, -1.0)
        self.spiderLeg8 = ModelRenderer(self, 18, 0)
        self.spiderLeg8.addBox(-1.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg8.setCenterPoint(4.0, var2, -1.0)

        legYaw = 0.3926991
        legPitch = math.pi / 4
        self.spiderLeg1.setRotation(0, 2*legYaw, -legPitch)
        self.spiderLeg2.setRotation(0, -2*legYaw, legPitch)
        self.spiderLeg3.setRotation(0, legYaw, -legPitch*3/4.)
        self.spiderLeg4.setRotation(0, -legYaw, legPitch*3/4.)
        self.spiderLeg5.setRotation(0, -legYaw, -legPitch*3/4.)
        self.spiderLeg6.setRotation(0, legYaw, legPitch*3/4.)
        self.spiderLeg7.setRotation(0, -2*legYaw, -legPitch)
        self.spiderLeg8.setRotation(0, 2*legYaw, legPitch)

        self.parts = [
            self.spiderHead,
            self.spiderNeck,
            self.spiderBody,
            self.spiderLeg1,
            self.spiderLeg2,
            self.spiderLeg3,
            self.spiderLeg4,
            self.spiderLeg5,
            self.spiderLeg6,
            self.spiderLeg7,
            self.spiderLeg8,

        ]
コード例 #25
0
ファイル: creeper.py プロジェクト: wcpe/mcedit2
    def __init__(self):
        headCenterHeight = 6
        head = ModelRenderer(self, 0, 0)
        head.addBox(-4.0, -8.0, -4.0, 8, 8, 8)
        head.setCenterPoint(0.0, headCenterHeight, 0.0)
        # creeperArmor = ModelRenderer(self, 32, 0)
        # creeperArmor.addBox(-4.0, -8.0, -4.0, 8, 8, 8)
        # creeperArmor.setCenterPoint(0.0, headCenterHeight, 0.0)
        body = ModelRenderer(self, 16, 16)
        body.addBox(-4.0, 0.0, -2.0, 8, 12, 4)
        body.setCenterPoint(0.0, headCenterHeight, 0.0)
        leg1 = ModelRenderer(self, 0, 16)
        leg1.addBox(-2.0, 0.0, -2.0, 4, 6, 4)
        leg1.setCenterPoint(-2.0, (12 + headCenterHeight), 4.0)
        leg2 = ModelRenderer(self, 0, 16)
        leg2.addBox(-2.0, 0.0, -2.0, 4, 6, 4)
        leg2.setCenterPoint(2.0, (12 + headCenterHeight), 4.0)
        leg3 = ModelRenderer(self, 0, 16)
        leg3.addBox(-2.0, 0.0, -2.0, 4, 6, 4)
        leg3.setCenterPoint(-2.0, (12 + headCenterHeight), -4.0)
        leg4 = ModelRenderer(self, 0, 16)
        leg4.addBox(-2.0, 0.0, -2.0, 4, 6, 4)
        leg4.setCenterPoint(2.0, (12 + headCenterHeight), -4.0)

        self.parts = [head, body, leg1, leg2, leg3, leg4]
コード例 #26
0
ファイル: quadruped.py プロジェクト: KevinKelley/mcedit2
class ModelSheepWool(ModelQuadruped):
    id = "MCEDIT_SheepWool"  # eww
    modelTexture = "assets/minecraft/textures/entity/sheep/sheep_fur.png"
    
    def __init__(self):
        super(ModelSheepWool, self).__init__(12)
        self.head = ModelRenderer(self, 0, 0)
        self.head.addBox(-3.0, -4.0, -4.0, 6, 6, 6, 0.6)
        self.head.setCenterPoint(0.0, 6.0, -8.0)
        self.body = ModelRenderer(self, 28, 8)
        self.body.addBox(-4.0, -10.0, -7.0, 8, 16, 6, 1.75)
        self.body.setCenterPoint(0.0, 5.0, 2.0)

        legExpand = 0.5
        self.leg1 = ModelRenderer(self, 0, 16)
        self.leg1.addBox(-2.0, 0.0, -2.0, 4, 6, 4, legExpand)
        self.leg1.setCenterPoint(-3.0, 12.0, 7.0)
        self.leg2 = ModelRenderer(self, 0, 16)
        self.leg2.addBox(-2.0, 0.0, -2.0, 4, 6, 4, legExpand)
        self.leg2.setCenterPoint(3.0, 12.0, 7.0)
        self.leg3 = ModelRenderer(self, 0, 16)
        self.leg3.addBox(-2.0, 0.0, -2.0, 4, 6, 4, legExpand)
        self.leg3.setCenterPoint(-3.0, 12.0, -5.0)
        self.leg4 = ModelRenderer(self, 0, 16)
        self.leg4.addBox(-2.0, 0.0, -2.0, 4, 6, 4, legExpand)
        self.leg4.setCenterPoint(3.0, 12.0, -5.0)

        self.body.setRotation(math.pi/2., 0, 0)
コード例 #27
0
ファイル: shulker.py プロジェクト: KevinKelley/mcedit2
class ModelShulker(object):
    textureWidth = 64
    textureHeight = 64

    modelTexture = "assets/minecraft/textures/entity/shulker/endergolem.png"
    id = "Shulker"

    def __init__(self):
        self.part1 = ModelRenderer(self, 0, 0)
        self.part2 = ModelRenderer(self, 0, 28)
        self.part3 = ModelRenderer(self, 0, 52)

        self.part1.addBox(-8.0, -16.0, -8.0, 16, 12, 16)
        self.part1.setCenterPoint(0.0, 24.0, 0.0)

        self.part2.addBox(-8.0, -8.0, -8.0, 16, 8, 16)
        self.part2.setCenterPoint(0.0, 24.0, 0.0)

        self.part3.addBox(-3.0, 0.0, -3.0, 6, 6, 6)
        self.part3.setCenterPoint(0.0, 12.0, 0.0)

        self.parts = [
            self.part1, self.part2, self.part3
        ]
コード例 #28
0
ファイル: villager.py プロジェクト: KevinKelley/mcedit2
class ModelVillager(object):
    textureWidth = 64
    textureHeight = 64
    modelTexture = "assets/minecraft/textures/entity/villager/villager.png"

    id = "Villager"

    def textureForEntity(self, entityRef):
        prof = entityRef.Profession
        profNames = {
            0: "farmer",
            1: "librarian",
            2: "priest",
            3: "smith",
            4: "butcher",
        }
        profName = profNames.get(prof, "villager")
        return "assets/minecraft/textures/entity/villager/%s.png" % profName

    def __init__(self, expandOffset=0., heightOffset=0.):

        self.villagerHead = ModelRenderer(self)
        self.villagerHead.setCenterPoint(0.0, 0.0 + heightOffset, 0.0)
        self.villagerHead.setTextureOffset(0, 0)
        self.villagerHead.addBox(-4.0, -10.0, -4.0, 8, 10, 8, expandOffset)
        self.villagerNose = ModelRenderer(self)
        self.villagerNose.setCenterPoint(0.0, heightOffset - 2.0, 0.0)
        self.villagerNose.setTextureOffset(24, 0)
        self.villagerNose.addBox(-1.0, -1.0, -6.0, 2, 4, 2, expandOffset)
        #self.villagerHead.addChild(self.villagerNose)
        self.villagerBody = ModelRenderer(self)
        self.villagerBody.setCenterPoint(0.0, 0.0 + heightOffset, 0.0)
        self.villagerBody.setTextureOffset(16, 20)
        self.villagerBody.addBox(-4.0, 0.0, -3.0, 8, 12, 6, expandOffset)
        self.villagerBody.setTextureOffset(0, 38)
        self.villagerBody.addBox(-4.0, 0.0, -3.0, 8, 18, 6, expandOffset + 0.5)
        self.villagerArms = ModelRenderer(self)
        self.villagerArms.setCenterPoint(0.0, 0.0 + heightOffset + 2.0, 0.0)
        self.villagerArms.setTextureOffset(44, 22)
        self.villagerArms.addBox(-8.0, -2.0, -2.0, 4, 8, 4, expandOffset)
        self.villagerArms.setTextureOffset(44, 22)
        self.villagerArms.addBox(4.0, -2.0, -2.0, 4, 8, 4, expandOffset)
        self.villagerArms.setTextureOffset(40, 38)
        self.villagerArms.addBox(-4.0, 2.0, -2.0, 8, 4, 4, expandOffset)
        self.rightVillagerLeg = (ModelRenderer(self, 0, 22))
        self.rightVillagerLeg.setCenterPoint(-2.0, 12.0 + heightOffset, 0.0)
        self.rightVillagerLeg.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset)
        self.leftVillagerLeg = (ModelRenderer(self, 0, 22))
        self.leftVillagerLeg.mirror = True
        self.leftVillagerLeg.setCenterPoint(2.0, 12.0 + heightOffset, 0.0)
        self.leftVillagerLeg.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset)

    @property
    def parts(self):
        return [
            self.villagerHead,
            self.villagerNose,
            self.villagerBody,
            self.villagerArms,
            self.rightVillagerLeg,
            self.leftVillagerLeg,
        ]
コード例 #29
0
ファイル: chest.py プロジェクト: wcpe/mcedit2
class ModelChest(object):
    textureWidth = 64
    textureHeight = 64

    tileEntityID = "Chest"

    modelTexture = "assets/minecraft/textures/entity/chest/normal.png"

    def __init__(self):
        self.chestLid = ModelRenderer(self, 0, 0)
        self.chestLid.addBox(0.0, -5.0, -14.0, 14, 5, 14, 0.0)
        self.chestLid.setCenterPoint(1., 7., 15.)

        self.chestKnob = ModelRenderer(self, 0, 0)
        self.chestKnob.addBox(-1.0, -2.0, -15.0, 2, 4, 1, 0.0)
        self.chestKnob.setCenterPoint(8., 7., 15.)

        self.chestBelow = ModelRenderer(self, 0, 19)
        self.chestBelow.addBox(0.0, 0.0, 0.0, 14, 10, 14, 0.0)
        self.chestBelow.setCenterPoint(1., 6., 1.)

        self.parts = [
            self.chestLid,
            self.chestKnob,
            self.chestBelow,
        ]
コード例 #30
0
class ModelShulker(object):
    textureWidth = 64
    textureHeight = 64

    modelTexture = "assets/minecraft/textures/entity/shulker/endergolem.png"
    id = "Shulker"

    def __init__(self):
        self.part1 = ModelRenderer(self, 0, 0)
        self.part2 = ModelRenderer(self, 0, 28)
        self.part3 = ModelRenderer(self, 0, 52)

        self.part1.addBox(-8.0, -16.0, -8.0, 16, 12, 16)
        self.part1.setCenterPoint(0.0, 24.0, 0.0)

        self.part2.addBox(-8.0, -8.0, -8.0, 16, 8, 16)
        self.part2.setCenterPoint(0.0, 24.0, 0.0)

        self.part3.addBox(-3.0, 0.0, -3.0, 6, 6, 6)
        self.part3.setCenterPoint(0.0, 12.0, 0.0)

        self.parts = [self.part1, self.part2, self.part3]
コード例 #31
0
ファイル: quadruped.py プロジェクト: KevinKelley/mcedit2
class ModelQuadruped(object):
    textureWidth = 64
    textureHeight = 32

    def __init__(self, height, expandOffset=0.0):
        self.head = ModelRenderer(self, 0, 0)
        
        self.head.addBox(-4.0, -4.0, -8.0, 8, 8, 8, expandOffset)
        self.head.setCenterPoint(0.0, (18 - height), -6.0)
        self.body = ModelRenderer(self, 28, 8)
        self.body.addBox(-5.0, -10.0, -7.0, 10, 16, 8, expandOffset)
        self.body.setCenterPoint(0.0, (17 - height), 2.0)
        self.leg1 = ModelRenderer(self, 0, 16)
        self.leg1.addBox(-2.0, 0.0, -2.0, 4, height, 4, expandOffset)
        self.leg1.setCenterPoint(-3.0, (24 - height), 7.0)
        self.leg2 = ModelRenderer(self, 0, 16)
        self.leg2.addBox(-2.0, 0.0, -2.0, 4, height, 4, expandOffset)
        self.leg2.setCenterPoint(3.0, (24 - height), 7.0)
        self.leg3 = ModelRenderer(self, 0, 16)
        self.leg3.addBox(-2.0, 0.0, -2.0, 4, height, 4, expandOffset)
        self.leg3.setCenterPoint(-3.0, (24 - height), -5.0)
        self.leg4 = ModelRenderer(self, 0, 16)
        self.leg4.addBox(-2.0, 0.0, -2.0, 4, height, 4, expandOffset)
        self.leg4.setCenterPoint(3.0, (24 - height), -5.0)

        self.body.setRotation(math.pi/2., 0, 0)

    @property
    def parts(self):
        return [
            self.head,
            self.body,
            self.leg1,
            self.leg2,
            self.leg3,
            self.leg4,
        ]
コード例 #32
0
class ModelPlayer(ModelBiped):
    id = "MCEDIT_Player"
    textureWidth = 64
    textureHeight = 64
    modelTexture = None

    def __init__(self, expandOffset=0.0, headOffset=0.0, smallArms=False):
        super(ModelPlayer, self).__init__(expandOffset, headOffset)

        self.smallArms = smallArms
        self.bipedCape = ModelRenderer(self, 0, 0)
        # self.bipedCape.setTextureSize(64, 32)
        self.bipedCape.addBox(-5.0, 0.0, -1.0, 10, 16, 1, expandOffset)

        if smallArms:
            self.bipedLeftArm = ModelRenderer(self, 32, 48)
            self.bipedLeftArm.addBox(-1.0, -2.0, -2.0, 3, 12, 4, expandOffset)
            self.bipedLeftArm.setCenterPoint(5.0, 2.5, 0.0)
            self.bipedRightArm = ModelRenderer(self, 40, 16)
            self.bipedRightArm.addBox(-2.0, -2.0, -2.0, 3, 12, 4, expandOffset)
            self.bipedRightArm.setCenterPoint(-5.0, 2.5, 0.0)
            self.bipedLeftArmwear = ModelRenderer(self, 48, 48)
            self.bipedLeftArmwear.addBox(-1.0, -2.0, -2.0, 3, 12, 4,
                                         expandOffset + 0.25)
            self.bipedLeftArmwear.setCenterPoint(5.0, 2.5, 0.0)
            self.bipedRightArmwear = ModelRenderer(self, 40, 32)
            self.bipedRightArmwear.addBox(-2.0, -2.0, -2.0, 3, 12, 4,
                                          expandOffset + 0.25)
            self.bipedRightArmwear.setCenterPoint(-5.0, 2.5, 10.0)

        else:
            self.bipedLeftArm = ModelRenderer(self, 32, 48)
            self.bipedLeftArm.addBox(-1.0, -2.0, -2.0, 4, 12, 4, expandOffset)
            self.bipedLeftArm.setCenterPoint(5.0, 2.0, 0.0)
            self.bipedLeftArmwear = ModelRenderer(self, 48, 48)
            self.bipedLeftArmwear.addBox(-1.0, -2.0, -2.0, 4, 12, 4,
                                         expandOffset + 0.25)
            self.bipedLeftArmwear.setCenterPoint(5.0, 2.0, 0.0)
            self.bipedRightArmwear = ModelRenderer(self, 40, 32)
            self.bipedRightArmwear.addBox(-3.0, -2.0, -2.0, 4, 12, 4,
                                          expandOffset + 0.25)
            self.bipedRightArmwear.setCenterPoint(-5.0, 2.0, 10.0)

        self.bipedLeftLeg = ModelRenderer(self, 16, 48)
        self.bipedLeftLeg.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset)
        self.bipedLeftLeg.setCenterPoint(1.9, 12.0, 0.0)
        self.bipedLeftLegwear = ModelRenderer(self, 0, 48)
        self.bipedLeftLegwear.addBox(-2.0, 0.0, -2.0, 4, 12, 4,
                                     expandOffset + 0.25)
        self.bipedLeftLegwear.setCenterPoint(1.9, 12.0, 0.0)
        self.bipedRightLegwear = ModelRenderer(self, 0, 32)
        self.bipedRightLegwear.addBox(-2.0, 0.0, -2.0, 4, 12, 4,
                                      expandOffset + 0.25)
        self.bipedRightLegwear.setCenterPoint(-1.9, 12.0, 0.0)
        self.bipedBodyWear = ModelRenderer(self, 16, 32)
        self.bipedBodyWear.addBox(-4.0, 0.0, -2.0, 8, 12, 4,
                                  expandOffset + 0.25)
        self.bipedBodyWear.setCenterPoint(0.0, 0.0, 0.0)

    @property
    def parts(self):
        return [
            self.bipedHead,
            self.bipedHeadwear,
            self.bipedBody,
            self.bipedBodyWear,
            self.bipedRightArm,
            self.bipedRightArmwear,
            self.bipedLeftArm,
            self.bipedLeftArmwear,
            self.bipedRightLeg,
            self.bipedRightLegwear,
            self.bipedLeftLeg,
            self.bipedLeftLegwear,
        ]
コード例 #33
0
    def __init__(self):
        super(ModelSheepWool, self).__init__(12)
        self.head = ModelRenderer(self, 0, 0)
        self.head.addBox(-3.0, -4.0, -4.0, 6, 6, 6, 0.6)
        self.head.setCenterPoint(0.0, 6.0, -8.0)
        self.body = ModelRenderer(self, 28, 8)
        self.body.addBox(-4.0, -10.0, -7.0, 8, 16, 6, 1.75)
        self.body.setCenterPoint(0.0, 5.0, 2.0)

        legExpand = 0.5
        self.leg1 = ModelRenderer(self, 0, 16)
        self.leg1.addBox(-2.0, 0.0, -2.0, 4, 6, 4, legExpand)
        self.leg1.setCenterPoint(-3.0, 12.0, 7.0)
        self.leg2 = ModelRenderer(self, 0, 16)
        self.leg2.addBox(-2.0, 0.0, -2.0, 4, 6, 4, legExpand)
        self.leg2.setCenterPoint(3.0, 12.0, 7.0)
        self.leg3 = ModelRenderer(self, 0, 16)
        self.leg3.addBox(-2.0, 0.0, -2.0, 4, 6, 4, legExpand)
        self.leg3.setCenterPoint(-3.0, 12.0, -5.0)
        self.leg4 = ModelRenderer(self, 0, 16)
        self.leg4.addBox(-2.0, 0.0, -2.0, 4, 6, 4, legExpand)
        self.leg4.setCenterPoint(3.0, 12.0, -5.0)

        self.body.setRotation(math.pi / 2., 0, 0)
コード例 #34
0
ファイル: biped.py プロジェクト: KevinKelley/mcedit2
class ModelSkeleton(ModelBiped):
    modelTexture = "assets/minecraft/textures/entity/skeleton/skeleton.png"
    id = "Skeleton"

    def __init__(self, expandOffset=1.0, headOffset=0.0):
        super(ModelSkeleton, self).__init__(expandOffset, headOffset)

        self.bipedRightArm = ModelRenderer(self, 40, 16)
        self.bipedRightArm.addBox(-1.0, -2.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedRightArm.setCenterPoint(-5.0, 2.0, 0.0)
        self.bipedLeftArm = ModelRenderer(self, 40, 16)
        self.bipedLeftArm.mirror = True
        self.bipedLeftArm.addBox(-1.0, -2.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedLeftArm.setCenterPoint(5.0, 2.0, 0.0)
        self.bipedRightLeg = ModelRenderer(self, 0, 16)
        self.bipedRightLeg.addBox(-1.0, 0.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedRightLeg.setCenterPoint(-2.0, 12.0, 0.0)
        self.bipedLeftLeg = ModelRenderer(self, 0, 16)
        self.bipedLeftLeg.mirror = True
        self.bipedLeftLeg.addBox(-1.0, 0.0, -1.0, 2, 12, 2, expandOffset)
        self.bipedLeftLeg.setCenterPoint(2.0, 12.0, 0.0)
コード例 #35
0
ファイル: chest.py プロジェクト: pamunoz/mcedit2
class ModelLargeChest(object):
    textureWidth = 128
    textureHeight = 64

    modelTexture = "assets/minecraft/textures/entity/chest/normal_double.png"
    tileEntityID = "MCEDIT_LargeChest"  # gross

    def __init__(self):

        self.chestLid = ModelRenderer(self, 0, 0)
        self.chestLid.addBox(0.0, -5.0, -14.0, 30, 5, 14, 0.0)
        self.chestLid.setCenterPoint(1.0, 7.0, 15.0)
        self.chestKnob = ModelRenderer(self, 0, 0)
        self.chestKnob.addBox(-1.0, -2.0, -15.0, 2, 4, 1, 0.0)
        self.chestKnob.setCenterPoint(16.0, 7.0, 15.0)
        self.chestBelow = ModelRenderer(self, 0, 19)
        self.chestBelow.addBox(0.0, 0.0, 0.0, 30, 10, 14, 0.0)
        self.chestBelow.setCenterPoint(1.0, 6.0, 1.0)

        self.parts = [self.chestLid, self.chestKnob, self.chestBelow]
コード例 #36
0
ファイル: player.py プロジェクト: KevinKelley/mcedit2
    def __init__(self, expandOffset=0.0, headOffset=0.0, smallArms=False):
        super(ModelPlayer, self).__init__(expandOffset, headOffset)
        
        self.smallArms = smallArms
        self.bipedCape = ModelRenderer(self, 0, 0)
        # self.bipedCape.setTextureSize(64, 32)
        self.bipedCape.addBox(-5.0, 0.0, -1.0, 10, 16, 1, expandOffset)

        if smallArms:
            self.bipedLeftArm = ModelRenderer(self, 32, 48)
            self.bipedLeftArm.addBox(-1.0, -2.0, -2.0, 3, 12, 4, expandOffset)
            self.bipedLeftArm.setCenterPoint(5.0, 2.5, 0.0)
            self.bipedRightArm = ModelRenderer(self, 40, 16)
            self.bipedRightArm.addBox(-2.0, -2.0, -2.0, 3, 12, 4, expandOffset)
            self.bipedRightArm.setCenterPoint(-5.0, 2.5, 0.0)
            self.bipedLeftArmwear = ModelRenderer(self, 48, 48)
            self.bipedLeftArmwear.addBox(-1.0, -2.0, -2.0, 3, 12, 4, expandOffset + 0.25)
            self.bipedLeftArmwear.setCenterPoint(5.0, 2.5, 0.0)
            self.bipedRightArmwear = ModelRenderer(self, 40, 32)
            self.bipedRightArmwear.addBox(-2.0, -2.0, -2.0, 3, 12, 4, expandOffset + 0.25)
            self.bipedRightArmwear.setCenterPoint(-5.0, 2.5, 10.0)
        
        else:
            self.bipedLeftArm = ModelRenderer(self, 32, 48)
            self.bipedLeftArm.addBox(-1.0, -2.0, -2.0, 4, 12, 4, expandOffset)
            self.bipedLeftArm.setCenterPoint(5.0, 2.0, 0.0)
            self.bipedLeftArmwear = ModelRenderer(self, 48, 48)
            self.bipedLeftArmwear.addBox(-1.0, -2.0, -2.0, 4, 12, 4, expandOffset + 0.25)
            self.bipedLeftArmwear.setCenterPoint(5.0, 2.0, 0.0)
            self.bipedRightArmwear = ModelRenderer(self, 40, 32)
            self.bipedRightArmwear.addBox(-3.0, -2.0, -2.0, 4, 12, 4, expandOffset + 0.25)
            self.bipedRightArmwear.setCenterPoint(-5.0, 2.0, 10.0)
        
        self.bipedLeftLeg = ModelRenderer(self, 16, 48)
        self.bipedLeftLeg.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset)
        self.bipedLeftLeg.setCenterPoint(1.9, 12.0, 0.0)
        self.bipedLeftLegwear = ModelRenderer(self, 0, 48)
        self.bipedLeftLegwear.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset + 0.25)
        self.bipedLeftLegwear.setCenterPoint(1.9, 12.0, 0.0)
        self.bipedRightLegwear = ModelRenderer(self, 0, 32)
        self.bipedRightLegwear.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset + 0.25)
        self.bipedRightLegwear.setCenterPoint(-1.9, 12.0, 0.0)
        self.bipedBodyWear = ModelRenderer(self, 16, 32)
        self.bipedBodyWear.addBox(-4.0, 0.0, -2.0, 8, 12, 4, expandOffset + 0.25)
        self.bipedBodyWear.setCenterPoint(0.0, 0.0, 0.0)
コード例 #37
0
ファイル: spider.py プロジェクト: wcpe/mcedit2
class ModelSpider(object):
    textureWidth = 64
    textureHeight = 32

    id = "Spider"
    modelTexture = "assets/minecraft/textures/entity/spider/spider.png"

    def __init__(self):
        var1 = 0.0
        var2 = 15
        self.spiderHead = ModelRenderer(self, 32, 4)
        self.spiderHead.addBox(-4.0, -4.0, -8.0, 8, 8, 8, var1)
        self.spiderHead.setCenterPoint(0.0, var2, -3.0)
        self.spiderNeck = ModelRenderer(self, 0, 0)
        self.spiderNeck.addBox(-3.0, -3.0, -3.0, 6, 6, 6, var1)
        self.spiderNeck.setCenterPoint(0.0, var2, 0.0)
        self.spiderBody = ModelRenderer(self, 0, 12)
        self.spiderBody.addBox(-5.0, -4.0, -6.0, 10, 8, 12, var1)
        self.spiderBody.setCenterPoint(0.0, var2, 9.0)
        self.spiderLeg1 = ModelRenderer(self, 18, 0)
        self.spiderLeg1.addBox(-15.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg1.setCenterPoint(-4.0, var2, 2.0)
        self.spiderLeg2 = ModelRenderer(self, 18, 0)
        self.spiderLeg2.addBox(-1.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg2.setCenterPoint(4.0, var2, 2.0)
        self.spiderLeg3 = ModelRenderer(self, 18, 0)
        self.spiderLeg3.addBox(-15.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg3.setCenterPoint(-4.0, var2, 1.0)
        self.spiderLeg4 = ModelRenderer(self, 18, 0)
        self.spiderLeg4.addBox(-1.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg4.setCenterPoint(4.0, var2, 1.0)
        self.spiderLeg5 = ModelRenderer(self, 18, 0)
        self.spiderLeg5.addBox(-15.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg5.setCenterPoint(-4.0, var2, 0.0)
        self.spiderLeg6 = ModelRenderer(self, 18, 0)
        self.spiderLeg6.addBox(-1.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg6.setCenterPoint(4.0, var2, 0.0)
        self.spiderLeg7 = ModelRenderer(self, 18, 0)
        self.spiderLeg7.addBox(-15.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg7.setCenterPoint(-4.0, var2, -1.0)
        self.spiderLeg8 = ModelRenderer(self, 18, 0)
        self.spiderLeg8.addBox(-1.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg8.setCenterPoint(4.0, var2, -1.0)

        legYaw = 0.3926991
        legPitch = math.pi / 4
        self.spiderLeg1.setRotation(0, 2 * legYaw, -legPitch)
        self.spiderLeg2.setRotation(0, -2 * legYaw, legPitch)
        self.spiderLeg3.setRotation(0, legYaw, -legPitch * 3 / 4.)
        self.spiderLeg4.setRotation(0, -legYaw, legPitch * 3 / 4.)
        self.spiderLeg5.setRotation(0, -legYaw, -legPitch * 3 / 4.)
        self.spiderLeg6.setRotation(0, legYaw, legPitch * 3 / 4.)
        self.spiderLeg7.setRotation(0, -2 * legYaw, -legPitch)
        self.spiderLeg8.setRotation(0, 2 * legYaw, legPitch)

        self.parts = [
            self.spiderHead,
            self.spiderNeck,
            self.spiderBody,
            self.spiderLeg1,
            self.spiderLeg2,
            self.spiderLeg3,
            self.spiderLeg4,
            self.spiderLeg5,
            self.spiderLeg6,
            self.spiderLeg7,
            self.spiderLeg8,
        ]
コード例 #38
0
class ModelQuadruped(object):
    textureWidth = 64
    textureHeight = 32

    def __init__(self, height, expandOffset=0.0):
        self.head = ModelRenderer(self, 0, 0)

        self.head.addBox(-4.0, -4.0, -8.0, 8, 8, 8, expandOffset)
        self.head.setCenterPoint(0.0, (18 - height), -6.0)
        self.body = ModelRenderer(self, 28, 8)
        self.body.addBox(-5.0, -10.0, -7.0, 10, 16, 8, expandOffset)
        self.body.setCenterPoint(0.0, (17 - height), 2.0)
        self.leg1 = ModelRenderer(self, 0, 16)
        self.leg1.addBox(-2.0, 0.0, -2.0, 4, height, 4, expandOffset)
        self.leg1.setCenterPoint(-3.0, (24 - height), 7.0)
        self.leg2 = ModelRenderer(self, 0, 16)
        self.leg2.addBox(-2.0, 0.0, -2.0, 4, height, 4, expandOffset)
        self.leg2.setCenterPoint(3.0, (24 - height), 7.0)
        self.leg3 = ModelRenderer(self, 0, 16)
        self.leg3.addBox(-2.0, 0.0, -2.0, 4, height, 4, expandOffset)
        self.leg3.setCenterPoint(-3.0, (24 - height), -5.0)
        self.leg4 = ModelRenderer(self, 0, 16)
        self.leg4.addBox(-2.0, 0.0, -2.0, 4, height, 4, expandOffset)
        self.leg4.setCenterPoint(3.0, (24 - height), -5.0)

        self.body.setRotation(math.pi / 2., 0, 0)

    @property
    def parts(self):
        return [
            self.head,
            self.body,
            self.leg1,
            self.leg2,
            self.leg3,
            self.leg4,
        ]
コード例 #39
0
ファイル: creeper.py プロジェクト: KevinKelley/mcedit2
    def __init__(self):
        headCenterHeight = 6
        head = ModelRenderer(self, 0, 0)
        head.addBox(-4.0, -8.0, -4.0, 8, 8, 8)
        head.setCenterPoint(0.0, headCenterHeight, 0.0)
        # creeperArmor = ModelRenderer(self, 32, 0)
        # creeperArmor.addBox(-4.0, -8.0, -4.0, 8, 8, 8)
        # creeperArmor.setCenterPoint(0.0, headCenterHeight, 0.0)
        body = ModelRenderer(self, 16, 16)
        body.addBox(-4.0, 0.0, -2.0, 8, 12, 4)
        body.setCenterPoint(0.0, headCenterHeight, 0.0)
        leg1 = ModelRenderer(self, 0, 16)
        leg1.addBox(-2.0, 0.0, -2.0, 4, 6, 4)
        leg1.setCenterPoint(-2.0, (12 + headCenterHeight), 4.0)
        leg2 = ModelRenderer(self, 0, 16)
        leg2.addBox(-2.0, 0.0, -2.0, 4, 6, 4)
        leg2.setCenterPoint(2.0, (12 + headCenterHeight), 4.0)
        leg3 = ModelRenderer(self, 0, 16)
        leg3.addBox(-2.0, 0.0, -2.0, 4, 6, 4)
        leg3.setCenterPoint(-2.0, (12 + headCenterHeight), -4.0)
        leg4 = ModelRenderer(self, 0, 16)
        leg4.addBox(-2.0, 0.0, -2.0, 4, 6, 4)
        leg4.setCenterPoint(2.0, (12 + headCenterHeight), -4.0)

        self.parts = [
            head, body, leg1, leg2, leg3, leg4
        ]
コード例 #40
0
ファイル: quadruped.py プロジェクト: KevinKelley/mcedit2
class ModelCow(ModelQuadruped):
    id = "Cow"
    modelTexture = "assets/minecraft/textures/entity/cow/cow.png"

    def __init__(self):
        super(ModelCow, self).__init__(12)

        self.head = ModelRenderer(self, 0, 0)
        self.head.addBox(-4.0, -4.0, -6.0, 8, 8, 6, 0.0)
        self.head.setCenterPoint(0.0, 4.0, -8.0)
        self.head.setTextureOffset(22, 0)
        self.head.addBox(-5.0, -5.0, -4.0, 1, 3, 1, 0.0)
        self.head.setTextureOffset(22, 0)
        self.head.addBox(4.0, -5.0, -4.0, 1, 3, 1, 0.0)
        self.body = ModelRenderer(self, 18, 4)
        self.body.addBox(-6.0, -10.0, -7.0, 12, 18, 10, 0.0)
        self.body.setCenterPoint(0.0, 5.0, 2.0)
        self.body.setTextureOffset(52, 0)
        self.body.addBox(-2.0, 2.0, -8.0, 4, 6, 1)

        self.body.setRotation(math.pi/2., 0, 0)

        self.leg1.cx -= 1
        self.leg2.cx += 1
        self.leg3.cx -= 1
        self.leg4.cx += 1
        self.leg3.cz -= 1
        self.leg4.cz += 1
コード例 #41
0
 def __init__(self, expandOffset=0.0):
     self.bipedHead = ModelRenderer(self, 0, 0)
     self.bipedHead.addBox(-1.0, -7.0, -1.0, 2, 7, 2, expandOffset)
     self.bipedHead.setCenterPoint(0.0, 0.0, 0.0)
     self.bipedBody = ModelRenderer(self, 0, 26)
     self.bipedBody.addBox(-6.0, 0.0, -1.5, 12, 3, 3, expandOffset)
     self.bipedBody.setCenterPoint(0.0, 0.0, 0.0)
     self.bipedRightArm = ModelRenderer(self, 24, 0)
     self.bipedRightArm.addBox(-2.0, -2.0, -1.0, 2, 12, 2, expandOffset)
     self.bipedRightArm.setCenterPoint(-5.0, 2.0, 0.0)
     self.bipedLeftArm = ModelRenderer(self, 32, 16)
     self.bipedLeftArm.mirror = True
     self.bipedLeftArm.addBox(0.0, -2.0, -1.0, 2, 12, 2, expandOffset)
     self.bipedLeftArm.setCenterPoint(5.0, 2.0, 0.0)
     self.bipedRightLeg = ModelRenderer(self, 8, 0)
     self.bipedRightLeg.addBox(-1.0, 0.0, -1.0, 2, 11, 2, expandOffset)
     self.bipedRightLeg.setCenterPoint(-1.9, 12.0, 0.0)
     self.bipedLeftLeg = ModelRenderer(self, 40, 16)
     self.bipedLeftLeg.mirror = True
     self.bipedLeftLeg.addBox(-1.0, 0.0, -1.0, 2, 11, 2, expandOffset)
     self.bipedLeftLeg.setCenterPoint(1.9, 12.0, 0.0)
     self.standRightSide = ModelRenderer(self, 16, 0)
     self.standRightSide.addBox(-3.0, 3.0, -1.0, 2, 7, 2, expandOffset)
     self.standRightSide.setCenterPoint(0.0, 0.0, 0.0)
     self.standRightSide.showModel = True
     self.standLeftSide = ModelRenderer(self, 48, 16)
     self.standLeftSide.addBox(1.0, 3.0, -1.0, 2, 7, 2, expandOffset)
     self.standLeftSide.setCenterPoint(0.0, 0.0, 0.0)
     self.standWaist = ModelRenderer(self, 0, 48)
     self.standWaist.addBox(-4.0, 10.0, -1.0, 8, 2, 2, expandOffset)
     self.standWaist.setCenterPoint(0.0, 0.0, 0.0)
     self.standBase = ModelRenderer(self, 0, 32)
     self.standBase.addBox(-6.0, 11.0, -6.0, 12, 1, 12, expandOffset)
     self.standBase.setCenterPoint(0.0, 12.0, 0.0)
コード例 #42
0
    def __init__(self, height, expandOffset=0.0):
        self.head = ModelRenderer(self, 0, 0)

        self.head.addBox(-4.0, -4.0, -8.0, 8, 8, 8, expandOffset)
        self.head.setCenterPoint(0.0, (18 - height), -6.0)
        self.body = ModelRenderer(self, 28, 8)
        self.body.addBox(-5.0, -10.0, -7.0, 10, 16, 8, expandOffset)
        self.body.setCenterPoint(0.0, (17 - height), 2.0)
        self.leg1 = ModelRenderer(self, 0, 16)
        self.leg1.addBox(-2.0, 0.0, -2.0, 4, height, 4, expandOffset)
        self.leg1.setCenterPoint(-3.0, (24 - height), 7.0)
        self.leg2 = ModelRenderer(self, 0, 16)
        self.leg2.addBox(-2.0, 0.0, -2.0, 4, height, 4, expandOffset)
        self.leg2.setCenterPoint(3.0, (24 - height), 7.0)
        self.leg3 = ModelRenderer(self, 0, 16)
        self.leg3.addBox(-2.0, 0.0, -2.0, 4, height, 4, expandOffset)
        self.leg3.setCenterPoint(-3.0, (24 - height), -5.0)
        self.leg4 = ModelRenderer(self, 0, 16)
        self.leg4.addBox(-2.0, 0.0, -2.0, 4, height, 4, expandOffset)
        self.leg4.setCenterPoint(3.0, (24 - height), -5.0)

        self.body.setRotation(math.pi / 2., 0, 0)
コード例 #43
0
ファイル: biped.py プロジェクト: wcpe/mcedit2
 def __init__(self, expandOffset=0.0, headOffset=0.0):
     self.bipedHead = ModelRenderer(self, 0, 0)
     self.bipedHead.addBox(-4.0, -8.0, -4.0, 8, 8, 8, expandOffset)
     self.bipedHead.setCenterPoint(0.0, 0.0 + headOffset, 0.0)
     self.bipedHeadwear = ModelRenderer(self, 32, 0)
     self.bipedHeadwear.addBox(-4.0, -8.0, -4.0, 8, 8, 8,
                               expandOffset + 0.5)
     self.bipedHeadwear.setCenterPoint(0.0, 0.0 + headOffset, 0.0)
     self.bipedBody = ModelRenderer(self, 16, 16)
     self.bipedBody.addBox(-4.0, 0.0, -2.0, 8, 12, 4, expandOffset)
     self.bipedBody.setCenterPoint(0.0, 0.0 + headOffset, 0.0)
     self.bipedRightArm = ModelRenderer(self, 40, 16)
     self.bipedRightArm.addBox(-3.0, -2.0, -2.0, 4, 12, 4, expandOffset)
     self.bipedRightArm.setCenterPoint(-5.0, 2.0 + headOffset, 0.0)
     self.bipedLeftArm = ModelRenderer(self, 40, 16)
     self.bipedLeftArm.mirror = True
     self.bipedLeftArm.addBox(-1.0, -2.0, -2.0, 4, 12, 4, expandOffset)
     self.bipedLeftArm.setCenterPoint(5.0, 2.0 + headOffset, 0.0)
     self.bipedRightLeg = ModelRenderer(self, 0, 16)
     self.bipedRightLeg.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset)
     self.bipedRightLeg.setCenterPoint(-1.9, 12.0 + headOffset, 0.0)
     self.bipedLeftLeg = ModelRenderer(self, 0, 16)
     self.bipedLeftLeg.mirror = True
     self.bipedLeftLeg.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset)
     self.bipedLeftLeg.setCenterPoint(1.9, 12.0 + headOffset, 0.0)
コード例 #44
0
class ModelCow(ModelQuadruped):
    id = "Cow"
    modelTexture = "assets/minecraft/textures/entity/cow/cow.png"

    def __init__(self):
        super(ModelCow, self).__init__(12)

        self.head = ModelRenderer(self, 0, 0)
        self.head.addBox(-4.0, -4.0, -6.0, 8, 8, 6, 0.0)
        self.head.setCenterPoint(0.0, 4.0, -8.0)
        self.head.setTextureOffset(22, 0)
        self.head.addBox(-5.0, -5.0, -4.0, 1, 3, 1, 0.0)
        self.head.setTextureOffset(22, 0)
        self.head.addBox(4.0, -5.0, -4.0, 1, 3, 1, 0.0)
        self.body = ModelRenderer(self, 18, 4)
        self.body.addBox(-6.0, -10.0, -7.0, 12, 18, 10, 0.0)
        self.body.setCenterPoint(0.0, 5.0, 2.0)
        self.body.setTextureOffset(52, 0)
        self.body.addBox(-2.0, 2.0, -8.0, 4, 6, 1)

        self.body.setRotation(math.pi / 2., 0, 0)

        self.leg1.cx -= 1
        self.leg2.cx += 1
        self.leg3.cx -= 1
        self.leg4.cx += 1
        self.leg3.cz -= 1
        self.leg4.cz += 1
コード例 #45
0
ファイル: spider.py プロジェクト: KevinKelley/mcedit2
    def __init__(self):
        var1 = 0.0
        var2 = 15
        self.spiderHead = ModelRenderer(self, 32, 4)
        self.spiderHead.addBox(-4.0, -4.0, -8.0, 8, 8, 8, var1)
        self.spiderHead.setCenterPoint(0.0, var2, -3.0)
        self.spiderNeck = ModelRenderer(self, 0, 0)
        self.spiderNeck.addBox(-3.0, -3.0, -3.0, 6, 6, 6, var1)
        self.spiderNeck.setCenterPoint(0.0, var2, 0.0)
        self.spiderBody = ModelRenderer(self, 0, 12)
        self.spiderBody.addBox(-5.0, -4.0, -6.0, 10, 8, 12, var1)
        self.spiderBody.setCenterPoint(0.0, var2, 9.0)
        self.spiderLeg1 = ModelRenderer(self, 18, 0)
        self.spiderLeg1.addBox(-15.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg1.setCenterPoint(-4.0, var2, 2.0)
        self.spiderLeg2 = ModelRenderer(self, 18, 0)
        self.spiderLeg2.addBox(-1.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg2.setCenterPoint(4.0, var2, 2.0)
        self.spiderLeg3 = ModelRenderer(self, 18, 0)
        self.spiderLeg3.addBox(-15.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg3.setCenterPoint(-4.0, var2, 1.0)
        self.spiderLeg4 = ModelRenderer(self, 18, 0)
        self.spiderLeg4.addBox(-1.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg4.setCenterPoint(4.0, var2, 1.0)
        self.spiderLeg5 = ModelRenderer(self, 18, 0)
        self.spiderLeg5.addBox(-15.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg5.setCenterPoint(-4.0, var2, 0.0)
        self.spiderLeg6 = ModelRenderer(self, 18, 0)
        self.spiderLeg6.addBox(-1.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg6.setCenterPoint(4.0, var2, 0.0)
        self.spiderLeg7 = ModelRenderer(self, 18, 0)
        self.spiderLeg7.addBox(-15.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg7.setCenterPoint(-4.0, var2, -1.0)
        self.spiderLeg8 = ModelRenderer(self, 18, 0)
        self.spiderLeg8.addBox(-1.0, -1.0, -1.0, 16, 2, 2, var1)
        self.spiderLeg8.setCenterPoint(4.0, var2, -1.0)

        legYaw = 0.3926991
        legPitch = math.pi / 4
        self.spiderLeg1.setRotation(0, 2*legYaw, -legPitch)
        self.spiderLeg2.setRotation(0, -2*legYaw, legPitch)
        self.spiderLeg3.setRotation(0, legYaw, -legPitch*3/4.)
        self.spiderLeg4.setRotation(0, -legYaw, legPitch*3/4.)
        self.spiderLeg5.setRotation(0, -legYaw, -legPitch*3/4.)
        self.spiderLeg6.setRotation(0, legYaw, legPitch*3/4.)
        self.spiderLeg7.setRotation(0, -2*legYaw, -legPitch)
        self.spiderLeg8.setRotation(0, 2*legYaw, legPitch)

        self.parts = [
            self.spiderHead,
            self.spiderNeck,
            self.spiderBody,
            self.spiderLeg1,
            self.spiderLeg2,
            self.spiderLeg3,
            self.spiderLeg4,
            self.spiderLeg5,
            self.spiderLeg6,
            self.spiderLeg7,
            self.spiderLeg8,

        ]
コード例 #46
0
ファイル: chest.py プロジェクト: wcpe/mcedit2
class ModelLargeChest(object):
    textureWidth = 128
    textureHeight = 64

    modelTexture = "assets/minecraft/textures/entity/chest/normal_double.png"
    tileEntityID = "MCEDIT_LargeChest"  # gross

    def __init__(self):

        self.chestLid = ModelRenderer(self, 0, 0)
        self.chestLid.addBox(0.0, -5.0, -14.0, 30, 5, 14, 0.0)
        self.chestLid.setCenterPoint(1., 7., 15.)
        self.chestKnob = ModelRenderer(self, 0, 0)
        self.chestKnob.addBox(-1.0, -2.0, -15.0, 2, 4, 1, 0.0)
        self.chestKnob.setCenterPoint(16., 7., 15.)
        self.chestBelow = ModelRenderer(self, 0, 19)
        self.chestBelow.addBox(0.0, 0.0, 0.0, 30, 10, 14, 0.0)
        self.chestBelow.setCenterPoint(1., 6., 1.)

        self.parts = [
            self.chestLid,
            self.chestKnob,
            self.chestBelow,
        ]
コード例 #47
0
    def __init__(self, expandOffset=0.0, headOffset=0.0, smallArms=False):
        super(ModelPlayer, self).__init__(expandOffset, headOffset)

        self.smallArms = smallArms
        self.bipedCape = ModelRenderer(self, 0, 0)
        # self.bipedCape.setTextureSize(64, 32)
        self.bipedCape.addBox(-5.0, 0.0, -1.0, 10, 16, 1, expandOffset)

        if smallArms:
            self.bipedLeftArm = ModelRenderer(self, 32, 48)
            self.bipedLeftArm.addBox(-1.0, -2.0, -2.0, 3, 12, 4, expandOffset)
            self.bipedLeftArm.setCenterPoint(5.0, 2.5, 0.0)
            self.bipedRightArm = ModelRenderer(self, 40, 16)
            self.bipedRightArm.addBox(-2.0, -2.0, -2.0, 3, 12, 4, expandOffset)
            self.bipedRightArm.setCenterPoint(-5.0, 2.5, 0.0)
            self.bipedLeftArmwear = ModelRenderer(self, 48, 48)
            self.bipedLeftArmwear.addBox(-1.0, -2.0, -2.0, 3, 12, 4,
                                         expandOffset + 0.25)
            self.bipedLeftArmwear.setCenterPoint(5.0, 2.5, 0.0)
            self.bipedRightArmwear = ModelRenderer(self, 40, 32)
            self.bipedRightArmwear.addBox(-2.0, -2.0, -2.0, 3, 12, 4,
                                          expandOffset + 0.25)
            self.bipedRightArmwear.setCenterPoint(-5.0, 2.5, 10.0)

        else:
            self.bipedLeftArm = ModelRenderer(self, 32, 48)
            self.bipedLeftArm.addBox(-1.0, -2.0, -2.0, 4, 12, 4, expandOffset)
            self.bipedLeftArm.setCenterPoint(5.0, 2.0, 0.0)
            self.bipedLeftArmwear = ModelRenderer(self, 48, 48)
            self.bipedLeftArmwear.addBox(-1.0, -2.0, -2.0, 4, 12, 4,
                                         expandOffset + 0.25)
            self.bipedLeftArmwear.setCenterPoint(5.0, 2.0, 0.0)
            self.bipedRightArmwear = ModelRenderer(self, 40, 32)
            self.bipedRightArmwear.addBox(-3.0, -2.0, -2.0, 4, 12, 4,
                                          expandOffset + 0.25)
            self.bipedRightArmwear.setCenterPoint(-5.0, 2.0, 10.0)

        self.bipedLeftLeg = ModelRenderer(self, 16, 48)
        self.bipedLeftLeg.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset)
        self.bipedLeftLeg.setCenterPoint(1.9, 12.0, 0.0)
        self.bipedLeftLegwear = ModelRenderer(self, 0, 48)
        self.bipedLeftLegwear.addBox(-2.0, 0.0, -2.0, 4, 12, 4,
                                     expandOffset + 0.25)
        self.bipedLeftLegwear.setCenterPoint(1.9, 12.0, 0.0)
        self.bipedRightLegwear = ModelRenderer(self, 0, 32)
        self.bipedRightLegwear.addBox(-2.0, 0.0, -2.0, 4, 12, 4,
                                      expandOffset + 0.25)
        self.bipedRightLegwear.setCenterPoint(-1.9, 12.0, 0.0)
        self.bipedBodyWear = ModelRenderer(self, 16, 32)
        self.bipedBodyWear.addBox(-4.0, 0.0, -2.0, 8, 12, 4,
                                  expandOffset + 0.25)
        self.bipedBodyWear.setCenterPoint(0.0, 0.0, 0.0)
コード例 #48
0
ファイル: player.py プロジェクト: KevinKelley/mcedit2
class ModelPlayer(ModelBiped):
    id = "MCEDIT_Player"
    textureWidth = 64
    textureHeight = 64
    modelTexture = None

    def __init__(self, expandOffset=0.0, headOffset=0.0, smallArms=False):
        super(ModelPlayer, self).__init__(expandOffset, headOffset)
        
        self.smallArms = smallArms
        self.bipedCape = ModelRenderer(self, 0, 0)
        # self.bipedCape.setTextureSize(64, 32)
        self.bipedCape.addBox(-5.0, 0.0, -1.0, 10, 16, 1, expandOffset)

        if smallArms:
            self.bipedLeftArm = ModelRenderer(self, 32, 48)
            self.bipedLeftArm.addBox(-1.0, -2.0, -2.0, 3, 12, 4, expandOffset)
            self.bipedLeftArm.setCenterPoint(5.0, 2.5, 0.0)
            self.bipedRightArm = ModelRenderer(self, 40, 16)
            self.bipedRightArm.addBox(-2.0, -2.0, -2.0, 3, 12, 4, expandOffset)
            self.bipedRightArm.setCenterPoint(-5.0, 2.5, 0.0)
            self.bipedLeftArmwear = ModelRenderer(self, 48, 48)
            self.bipedLeftArmwear.addBox(-1.0, -2.0, -2.0, 3, 12, 4, expandOffset + 0.25)
            self.bipedLeftArmwear.setCenterPoint(5.0, 2.5, 0.0)
            self.bipedRightArmwear = ModelRenderer(self, 40, 32)
            self.bipedRightArmwear.addBox(-2.0, -2.0, -2.0, 3, 12, 4, expandOffset + 0.25)
            self.bipedRightArmwear.setCenterPoint(-5.0, 2.5, 10.0)
        
        else:
            self.bipedLeftArm = ModelRenderer(self, 32, 48)
            self.bipedLeftArm.addBox(-1.0, -2.0, -2.0, 4, 12, 4, expandOffset)
            self.bipedLeftArm.setCenterPoint(5.0, 2.0, 0.0)
            self.bipedLeftArmwear = ModelRenderer(self, 48, 48)
            self.bipedLeftArmwear.addBox(-1.0, -2.0, -2.0, 4, 12, 4, expandOffset + 0.25)
            self.bipedLeftArmwear.setCenterPoint(5.0, 2.0, 0.0)
            self.bipedRightArmwear = ModelRenderer(self, 40, 32)
            self.bipedRightArmwear.addBox(-3.0, -2.0, -2.0, 4, 12, 4, expandOffset + 0.25)
            self.bipedRightArmwear.setCenterPoint(-5.0, 2.0, 10.0)
        
        self.bipedLeftLeg = ModelRenderer(self, 16, 48)
        self.bipedLeftLeg.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset)
        self.bipedLeftLeg.setCenterPoint(1.9, 12.0, 0.0)
        self.bipedLeftLegwear = ModelRenderer(self, 0, 48)
        self.bipedLeftLegwear.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset + 0.25)
        self.bipedLeftLegwear.setCenterPoint(1.9, 12.0, 0.0)
        self.bipedRightLegwear = ModelRenderer(self, 0, 32)
        self.bipedRightLegwear.addBox(-2.0, 0.0, -2.0, 4, 12, 4, expandOffset + 0.25)
        self.bipedRightLegwear.setCenterPoint(-1.9, 12.0, 0.0)
        self.bipedBodyWear = ModelRenderer(self, 16, 32)
        self.bipedBodyWear.addBox(-4.0, 0.0, -2.0, 8, 12, 4, expandOffset + 0.25)
        self.bipedBodyWear.setCenterPoint(0.0, 0.0, 0.0)

    @property
    def parts(self):
        return [
            self.bipedHead,
            self.bipedHeadwear,
            self.bipedBody,
            self.bipedBodyWear,
            self.bipedRightArm,
            self.bipedRightArmwear,
            self.bipedLeftArm,
            self.bipedLeftArmwear,
            self.bipedRightLeg,
            self.bipedRightLegwear,
            self.bipedLeftLeg,
            self.bipedLeftLegwear,
        ]