Skip to content

Commit

Permalink
Fixed code error
Browse files Browse the repository at this point in the history
  • Loading branch information
trychen committed Feb 9, 2018
1 parent 99baf31 commit ee59c9e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 22 deletions.
6 changes: 1 addition & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Basic Properties
mod_id = ChinaCraft
<<<<<<< HEAD
mod_version = 0.3.202
=======
mod_version = 0.4.206
>>>>>>> dev
mod_version = 0.4.208
mod_group = unstudio.chinacraft

# Minecraft & Forge
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/unstudio/chinacraft/common/ChinaCraft.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
public class ChinaCraft implements ICollection {
public static final String MODID = "chinacraft";
public static final String NAME = "ChinaCraft";
public static final String VERSION = "0.4.207";
public static final String VERSION = "0.4.208";
public static final int PROJECT_ID = 1;

public static SimpleNetworkWrapper Network;
Expand Down
31 changes: 17 additions & 14 deletions src/main/java/unstudio/chinacraft/item/CCItemLatticeDoor.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import org.apache.commons.lang3.NotImplementedException;
import unstudio.chinacraft.common.ChinaCraft;

public class CCItemLatticeDoor extends Item {
Expand All @@ -19,20 +21,21 @@ public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World w, int
return false;
} else {
++y;
Block block = ChinaCraft.latticeDoor;

if (player.canPlayerEdit(x, y, z, meta, itemStack) && player.canPlayerEdit(x, y + 1, z, meta, itemStack)) {
if (!block.canPlaceBlockAt(w, x, y, z)) {
return false;
} else {
int i1 = MathHelper.floor_double((double) ((player.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
placeDoorBlock(w, x, y, z, i1, block);
--itemStack.stackSize;
return true;
}
} else {
return false;
}
throw new NotImplementedException("Feature Not Implemented");
// Block block = ChinaCraft.latticeDoor;
// Block block = Blocks.air;
// if (player.canPlayerEdit(x, y, z, meta, itemStack) && player.canPlayerEdit(x, y + 1, z, meta, itemStack)) {
// if (!block.canPlaceBlockAt(w, x, y, z)) {
// return false;
// } else {
// int i1 = MathHelper.floor_double((double) ((player.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
// placeDoorBlock(w, x, y, z, i1, block);
// --itemStack.stackSize;
// return true;
// }
// } else {
// return false;
// }
}
}

Expand Down
Binary file modified src/main/resources/assets/chinacraft/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"modid": "chinacraft",
"name": "ChinaCraft",
"description": "A mod with Chinese features.",
"version": "Beta 0.4.207",
"version": "Beta 0.4.208",
"mcversion": "1.7.10",
"url": "http://mccraft.cn/project/chinacraft",
"updateUrl": "",
"authorList": ["Mouse","Trychen","Huangshize","Mcdarc","Lasm_Gratel", "and so on, more see url.(no order)"],
"authorList": ["Unknown Domain", "Mouse","Trychen","Huangshize","Mcdarc","Lasm_Gratel", "and so on, more see url.(no order)"],
"logoFile": "assets/chinacraft/logo.png",
"screenshots": [],
"dependencies": []
Expand Down

0 comments on commit ee59c9e

Please sign in to comment.