Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
# Conflicts:
#	gradle.properties
#	src/main/resources/mcmod.info
  • Loading branch information
trychen committed Jul 15, 2017
2 parents 3d3e9b1 + d9860ce commit 07534a4
Show file tree
Hide file tree
Showing 67 changed files with 1,345 additions and 570 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ChinaCraft [![Build Status](https://travis-ci.org/UnknownStudio/ChinaCraft.svg?branch=master)](https://travis-ci.org/UnknownStudio/ChinaCraft)
# ChinaCraft [![Build Status](https://travis-ci.org/UnknownStudio/ChinaCraft.svg?branch=master)](https://travis-ci.org/UnknownStudio/ChinaCraft)



Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ apply plugin: 'forge'

def buildnumber = System.getenv("BUILD_NUMBER") == null ? null : System.getenv("BUILD_NUMBER")

version = minecraft_version + "-" + mod_version + ( buildnumber == null ? "" : "." + buildnumber + "-SanpShot")
version = minecraft_version + "-" + mod_version + ( buildnumber == null ? "" : "." + buildnumber + "-SANPSHOT")

group = mod_group // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = mod_id
Expand Down
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Basic Properties
mod_id = ChinaCraft
<<<<<<< HEAD
mod_version = 0.3.202
=======
mod_version = 0.4.206
>>>>>>> dev
mod_group = unstudio.chinacraft

# Minecraft & Forge
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/unstudio/chinacraft/api/EntityMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static List<EntityMob> findNearbyPlayers(Entity player, double x, double
AxisAlignedBB.getBoundingBox(x - d0, y - d1, z - d0, x + d0, y + d1, z + d0));
}

public static <T> List<T> findNear(EntityPlayer player, Class<? extends T> find, double d0, double d1) {
public static <T> List<T> findNear(Entity player, Class<? extends T> find, double d0, double d1) {
double x = player.posX;
double y = player.posY;
double z = player.posZ;
Expand Down
34 changes: 34 additions & 0 deletions src/main/java/unstudio/chinacraft/block/CCBlockWall.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package unstudio.chinacraft.block;

import net.minecraft.block.Block;
import net.minecraft.block.BlockWall;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import unstudio.chinacraft.common.ChinaCraft;

import java.util.List;

/**
* Created by trychen on 17/5/7.
*/
public class CCBlockWall extends BlockWall{
public Block block;

public CCBlockWall(Block b) {
super(b);
this.block = b;
this.setCreativeTab(ChinaCraft.tabCore);
}

@Override
public IIcon getIcon(int p_149691_1_, int p_149691_2_) {
return block.getIcon(p_149691_1_, p_149691_2_);
}

@Override
public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) {
p_149666_3_.add(new ItemStack(p_149666_1_, 1, 0));
}
}
4 changes: 2 additions & 2 deletions src/main/java/unstudio/chinacraft/block/CCGrowablePlant.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ protected Item func_149866_i() {

@Override
protected Item func_149865_P() {
return dropItem;
return baseItem;
}

@Override
public Item getItemDropped(int par1, Random par2Random, int par3) {
return par1 >= 5 ? baseItem : null;
return par1 == 7 ? dropItem : baseItem;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class BlockWoodenWindow extends BlockPane {
public class CCWindow extends BlockPane {

public BlockWoodenWindow(String arg1, String arg2) {
public CCWindow(String name, String arg1, String arg2) {
super(arg1, arg2, Material.wood, true);
setBlockName(StatCollector.translateToLocal("wooden_window"));
setBlockName(StatCollector.translateToLocal(name));
setHardness(0.3F);
setStepSound(soundTypeWood);
setCreativeTab(ChinaCraft.tabCore);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,7 @@ public IIcon getIcon(int p_149691_1_, int p_149691_2_) {
}

@Override
public List<String> addWailaBodyInfo(ItemStack stack, List<String> tipList, IWailaDataAccessor accessor,
IWailaConfigHandler configHandler) {
TileEntity tile = accessor.getTileEntity();
public List<String> addWailaBodyInfo(ItemStack stack, List<String> tipList, TileEntity tile) {
if (tile instanceof TileBuhrimill) {
TileBuhrimill tileBuhrimill = (TileBuhrimill) tile;
int maxSchedule = tileBuhrimill.getMaxSchedule();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class BlockBambooShoot extends BlockBase implements IPlantable, IWorldGenerator {
public class BlockBambooShoot extends BlockBase implements IPlantable{
public BlockBambooShoot() {
super(Material.plants);
float f = 0.375F;
Expand Down Expand Up @@ -162,17 +162,4 @@ public Block getPlant(IBlockAccess world, int x, int y, int z) {
public int getPlantMetadata(IBlockAccess world, int x, int y, int z) {
return world.getBlockMetadata(x, y, z);
}

@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator,
IChunkProvider chunkProvider) {
int l6 = chunkX * 16 + random.nextInt(16);
int i11 = random.nextInt(128);
int l14 = chunkZ * 16 + random.nextInt(16);
int id = world.getBiomeGenForCoords(l6, l14).biomeID;
if ((id == 3 || id == 4 || id == 18 || id == 20 || id == 34 || id == 27 || id == 28 || id == 29)
&& random.nextInt(16) == 0) {
new WorldGenFlowers(ChinaCraft.blockBambooShoot).generate(world, random, l6, i11, l14);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
package unstudio.chinacraft.client.model.armor;

import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;

public class ModelCassock extends ModelBiped {
private final float scale = 1.005f;

ModelRenderer armorRightLeg;
ModelRenderer armorLeftLeg;
ModelRenderer armorInterBody;
ModelRenderer armorRightArm;
// ModelRenderer armorLeftArm;
ModelRenderer armorOuterBody;
ModelRenderer armorOuterLeftArm;
ModelRenderer armorOuterRightLeg;
ModelRenderer armorOuterLeftLeg;

public ModelCassock() {
super(0.0f, 0, 256, 128);
textureWidth = 256;
textureHeight = 128;

armorRightLeg = new ModelRendererScale(this, 0, 16, scale);
armorRightLeg.addBox(-2F, 0F, -2F, 4, 12, 4);
armorRightLeg.setTextureSize(256, 128);
armorRightLeg.mirror = true;

armorLeftLeg = new ModelRendererScale(this, 0, 16, scale);
armorLeftLeg.addBox(-2F, 0F, -2F, 4, 12, 4);
armorLeftLeg.setTextureSize(256, 128);
armorLeftLeg.mirror = true;

armorInterBody = new ModelRendererScale(this, 16, 16, 1.009f);
armorInterBody.addBox(-4F, 0F, -2F, 8, 12, 4);
armorInterBody.setTextureSize(256, 128);
armorInterBody.mirror = true;

armorRightArm = new ModelRendererScale(this, 40, 16, scale);
armorRightArm.addBox(-3F, -2.5F, -2F, 4, 11, 4);
armorRightArm.setTextureSize(256, 128);
armorRightArm.mirror = true;
//
// armorLeftArm = new ModelRenderer(this, 40, 16);
// armorLeftArm.addBox(0F, 0F, -2F, 4, 11, 4);
// armorLeftArm.setTextureSize(256, 128);
// armorLeftArm.mirror = true;

armorOuterBody = new ModelRendererScale(this, 0, 32, 1.01f);
armorOuterBody.addBox(-4.5F, -0.5F, -2.5F, 9, 14, 5);
armorOuterBody.setTextureSize(256, 128);
armorOuterBody.mirror = true;

armorOuterLeftArm = new ModelRendererScale(this, 36, 32, 1.08f);
armorOuterLeftArm.addBox(-2.5F, -0.5F, -2.5F, 5, 11, 5);
armorOuterLeftArm.setRotationPoint(0.75F, -1.625F, 0F);
armorOuterLeftArm.setTextureSize(256, 128);
armorOuterLeftArm.mirror = true;

armorOuterLeftLeg = new ModelRendererScale(this, 6, 45, scale);
armorOuterLeftLeg.addBox(-2.5F, 0F, -2.5F, 5, 10, 5);
armorOuterLeftLeg.setTextureSize(256, 128);
armorOuterLeftLeg.mirror = true;

armorOuterRightLeg = new ModelRendererScale(this, 0, 45, scale);
armorOuterRightLeg.addBox(-2.5F, 0F, -2.5F, 5, 10, 5);
armorOuterRightLeg.setTextureSize(256, 128);
armorOuterRightLeg.mirror = true;

//bipedLeftArm.addChild(armorLeftArm);
bipedLeftArm.addChild(armorOuterLeftArm);
bipedBody.addChild(armorInterBody);
bipedBody.addChild(armorOuterBody);
bipedLeftLeg.addChild(armorLeftLeg);
bipedLeftLeg.addChild(armorOuterLeftLeg);
bipedRightLeg.addChild(armorRightLeg);
bipedRightLeg.addChild(armorOuterRightLeg);
bipedRightArm.addChild(armorRightArm);
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package unstudio.chinacraft.client.model.armor;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;

@SideOnly(Side.CLIENT)
public class ModelChinaCrown extends ModelBiped {
ModelRenderer Shape1;
ModelRenderer Shape2;
Expand Down Expand Up @@ -442,13 +445,13 @@ public ModelChinaCrown(float expand) {
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
// Shape1.render(f5);
// Shape2.render(f5);
// Shape3.render(f5);
// Shape4.render(f5);
// Shape5.render(f5);
// Shape6.render(f5);
// Shape7.render(f5);
// armorRightLeg.render(f5);
// armorBody.render(f5);
// armorLeftArm.render(f5);
// armorOuterBody.render(f5);
// armorLeftOuterArm.render(f5);
// armorLeftLeg.render(f5);
// armorRightArm.render(f5);
// Shape8.render(f5);
// Shape9.render(f5);
// Shape10.render(f5);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package unstudio.chinacraft.client.model.armor;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;

@SideOnly(Side.CLIENT)
public class ModelNightClothes extends ModelBiped {
ModelRenderer Shape1;
ModelRenderer Shape2;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package unstudio.chinacraft.client.model.armor;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import org.lwjgl.opengl.GL11;

/**
* Created by trychen on 17/4/1.
*/
public class ModelRendererScale extends ModelRenderer {
private float scale;
public ModelRendererScale(ModelBase p_i1172_1_, String p_i1172_2_) {
super(p_i1172_1_, p_i1172_2_);
scale = 1f;
}
public ModelRendererScale(ModelBase p_i1172_1_, String p_i1172_2_, float scale) {
super(p_i1172_1_, p_i1172_2_);
this.scale = scale;
}

public ModelRendererScale(ModelBase p_i1173_1_) {
super(p_i1173_1_);
this.scale = 1f;
}

public ModelRendererScale(ModelBase p_i1173_1_, float scale) {
super(p_i1173_1_);
this.scale = scale;
}

public ModelRendererScale(ModelBase p_i1174_1_, int p_i1174_2_, int p_i1174_3_) {
super(p_i1174_1_, p_i1174_2_, p_i1174_3_);
this.scale = 1f;
}

public ModelRendererScale(ModelBase p_i1174_1_, int p_i1174_2_, int p_i1174_3_, float scale) {
super(p_i1174_1_, p_i1174_2_, p_i1174_3_);
this.scale = scale;
}

public void setScale(float scale) {
this.scale = scale;
}

public float getScale() {
return scale;
}

@Override
public void render(float p_78785_1_) {
GL11.glScalef(scale, scale, scale);
super.render(p_78785_1_);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public List<String> getWailaBody(ItemStack stack, List<String> tipList, IWailaDa
IWailaConfigHandler configHandler) {
Block block = accessor.getBlock();
if (block instanceof CCWailaInfoProvider) {
return ((CCWailaInfoProvider) block).addWailaBodyInfo(stack, tipList, accessor, configHandler);
return ((CCWailaInfoProvider) block).addWailaBodyInfo(stack, tipList, accessor.getTileEntity());
}
return tipList;
}
Expand All @@ -68,7 +68,7 @@ public List<String> getWailaTail(ItemStack stack, List<String> tipList, IWailaDa
* 凡是需要在Waila窗体中添加信息的方块都需实现此接口
*/
public interface CCWailaInfoProvider {
List<String> addWailaBodyInfo(ItemStack stack, List<String> tipList, IWailaDataAccessor accessor, IWailaConfigHandler configHandler);
List<String> addWailaBodyInfo(ItemStack stack, List<String> tipList, TileEntity accessor);
}

}
Loading

0 comments on commit 07534a4

Please sign in to comment.