Merge branch 'master' of github.com:kitsushadow/forgecraft
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -19,7 +19,11 @@ forge-*-changelog.txt
|
|||||||
1.11/usernamecache.json
|
1.11/usernamecache.json
|
||||||
1.11/options.txt
|
1.11/options.txt
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.iws
|
||||||
|
1.11/eula.txt
|
||||||
|
1.11/server.properties
|
||||||
|
|
||||||
# eclipse
|
# eclipse
|
||||||
bin
|
bin
|
||||||
|
|||||||
BIN
1.11/e_particle.png
Normal file
BIN
1.11/e_particle.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 159 B |
BIN
1.11/e_texture.png
Normal file
BIN
1.11/e_texture.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 141 B |
@@ -94,6 +94,8 @@ public class Anvil extends CustomContainerFacing {
|
|||||||
//System.out.println("Tile is not null");
|
//System.out.println("Tile is not null");
|
||||||
//if ((player.inventory.getCurrentItem().getItem().equals(PrimalItems.STONE_GALLAGHER)) || (player.inventory.getCurrentItem().getItem() == ModItems.forgehammer)) {
|
//if ((player.inventory.getCurrentItem().getItem().equals(PrimalItems.STONE_GALLAGHER)) || (player.inventory.getCurrentItem().getItem() == ModItems.forgehammer)) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ((pItem.getItem() instanceof WorkMallet) || (pItem.getItem() == ModItems.forgehammer)) {
|
if ((pItem.getItem() instanceof WorkMallet) || (pItem.getItem() == ModItems.forgehammer)) {
|
||||||
|
|
||||||
|
|
||||||
@@ -244,65 +246,66 @@ public class Anvil extends CustomContainerFacing {
|
|||||||
|
|
||||||
|
|
||||||
if ( (!(pItem.getItem() instanceof WorkMallet)) || (!(pItem.getItem() instanceof ForgeHammer)) ) {
|
if ( (!(pItem.getItem() instanceof WorkMallet)) || (!(pItem.getItem() instanceof ForgeHammer)) ) {
|
||||||
|
if(Block.getBlockFromItem(pItem.getItem()) instanceof IngotBall) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (state.getValue(FACING) == EnumFacing.NORTH) {
|
if (state.getValue(FACING) == EnumFacing.NORTH) {
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
for (int z = 0; z < 5; z++) {
|
for (int z = 0; z < 5; z++) {
|
||||||
for (int x = 0; x < 5; x++) {
|
for (int x = 0; x < 5; x++) {
|
||||||
if (hitx >= this.getNormalMin(x) && hitx <= this.getNormalMax(x)) {
|
if (hitx >= this.getNormalMin(x) && hitx <= this.getNormalMax(x)) {
|
||||||
if (hitz >= this.getNormalMin(z) && hitz <= this.getNormalMax(z)) {
|
if (hitz >= this.getNormalMin(z) && hitz <= this.getNormalMax(z)) {
|
||||||
doWork(pItem, counter, tile, world, pos, player);
|
doWork(pItem, counter, tile, world, pos, player);
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
|
||||||
counter++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
counter++;
|
||||||
}
|
}
|
||||||
if (state.getValue(FACING) == EnumFacing.SOUTH) {
|
}
|
||||||
int counter = 0;
|
}
|
||||||
for (int z = 0; z < 5; z++) {
|
if (state.getValue(FACING) == EnumFacing.SOUTH) {
|
||||||
for (int x = 0; x < 5; x++) {
|
int counter = 0;
|
||||||
if (hitx >= this.getReverseMin(x) && hitx <= this.getReverseMax(x)) {
|
for (int z = 0; z < 5; z++) {
|
||||||
if (hitz >= this.getReverseMin(z) && hitz <= this.getReverseMax(z)) {
|
for (int x = 0; x < 5; x++) {
|
||||||
doWork(pItem, counter, tile, world, pos, player);
|
if (hitx >= this.getReverseMin(x) && hitx <= this.getReverseMax(x)) {
|
||||||
return true;
|
if (hitz >= this.getReverseMin(z) && hitz <= this.getReverseMax(z)) {
|
||||||
}
|
doWork(pItem, counter, tile, world, pos, player);
|
||||||
}
|
return true;
|
||||||
counter++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
counter++;
|
||||||
}
|
}
|
||||||
if (state.getValue(FACING) == EnumFacing.WEST) {
|
}
|
||||||
int counter = 0;
|
}
|
||||||
for (int x = 0; x < 5; x++) {
|
if (state.getValue(FACING) == EnumFacing.WEST) {
|
||||||
for (int z = 0; z < 5; z++) {
|
int counter = 0;
|
||||||
if (hitx >= this.getNormalMin(x) && hitx <= this.getNormalMax(x)) {
|
for (int x = 0; x < 5; x++) {
|
||||||
if (hitz >= this.getReverseMin(z) && hitz <= this.getReverseMax(z)) {
|
for (int z = 0; z < 5; z++) {
|
||||||
doWork(pItem, counter, tile, world, pos, player);
|
if (hitx >= this.getNormalMin(x) && hitx <= this.getNormalMax(x)) {
|
||||||
return true;
|
if (hitz >= this.getReverseMin(z) && hitz <= this.getReverseMax(z)) {
|
||||||
}
|
doWork(pItem, counter, tile, world, pos, player);
|
||||||
}
|
return true;
|
||||||
counter++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
counter++;
|
||||||
}
|
}
|
||||||
if (state.getValue(FACING) == EnumFacing.EAST) {
|
}
|
||||||
int counter = 0;
|
}
|
||||||
for (int x = 0; x < 5; x++) {
|
if (state.getValue(FACING) == EnumFacing.EAST) {
|
||||||
for (int z = 0; z < 5; z++) {
|
int counter = 0;
|
||||||
if (hitx >= this.getReverseMin(x) && hitx <= this.getReverseMax(x)) {
|
for (int x = 0; x < 5; x++) {
|
||||||
if (hitz >= this.getNormalMin(z) && hitz <= this.getNormalMax(z)) {
|
for (int z = 0; z < 5; z++) {
|
||||||
doWork(pItem, counter, tile, world, pos, player);
|
if (hitx >= this.getReverseMin(x) && hitx <= this.getReverseMax(x)) {
|
||||||
return true;
|
if (hitz >= this.getNormalMin(z) && hitz <= this.getNormalMax(z)) {
|
||||||
}
|
doWork(pItem, counter, tile, world, pos, player);
|
||||||
}
|
return true;
|
||||||
counter++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
counter++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class ModBlocks {
|
|||||||
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (pItem.equals(PrimalItems.STONE_GALLAGHER) || pItem.equals(ModItems.forgehammer)) {
|
if (pItem instanceof WorkMallet || pItem.equals(ModItems.forgehammer)) {
|
||||||
if(world.getBlockState(belowPos).getBlock().equals(ModBlocks.stoneanvil)) {
|
if(world.getBlockState(belowPos).getBlock().equals(ModBlocks.stoneanvil)) {
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -49,24 +49,24 @@ public class TileAnvil extends TileBaseSlot implements ITickable {
|
|||||||
if (!world.isRemote) {
|
if (!world.isRemote) {
|
||||||
IBlockState state = world.getBlockState(this.pos);
|
IBlockState state = world.getBlockState(this.pos);
|
||||||
|
|
||||||
if ( ThreadLocalRandom.current().nextInt(0,500) == 0 ) {
|
if ( ThreadLocalRandom.current().nextInt(0,10000) == 0 ) {
|
||||||
for(int i=0; i<this.getSlotListSize(); i++){
|
for(int i=0; i<this.getSlotListSize(); i++){
|
||||||
if(this.getSlotStack(i).getItem() == ModItems.ironchunkhot){
|
if(this.getSlotStack(i).getItem() == ModItems.ironchunkhot){
|
||||||
if(ThreadLocalRandom.current().nextInt(0,10) == 1){
|
if(ThreadLocalRandom.current().nextInt(0,100) == 1){
|
||||||
this.setSlotStack(i, new ItemStack(ModBlocks.ironchunk, 1));
|
this.setSlotStack(i, new ItemStack(ModBlocks.ironchunk, 1));
|
||||||
this.updateBlock();
|
this.updateBlock();
|
||||||
this.markDirty();
|
this.markDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.getSlotStack(i).getItem() == ModItems.ironingotballhot){
|
if(this.getSlotStack(i).getItem() == ModItems.ironingotballhot){
|
||||||
if(ThreadLocalRandom.current().nextInt(0,20) == 2){
|
if(ThreadLocalRandom.current().nextInt(0,100) == 2){
|
||||||
this.setSlotStack(i, new ItemStack(ModBlocks.ironball, 1));
|
this.setSlotStack(i, new ItemStack(ModBlocks.ironball, 1));
|
||||||
this.updateBlock();
|
this.updateBlock();
|
||||||
this.markDirty();
|
this.markDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.getSlotStack(i).getItem() instanceof ToolPart){
|
if(this.getSlotStack(i).getItem() instanceof ToolPart){
|
||||||
if(ThreadLocalRandom.current().nextInt(0,10) == 0){
|
if(ThreadLocalRandom.current().nextInt(0,100) == 0){
|
||||||
((ToolPart) this.getSlotStack(i).getItem()).setHot(this.getSlotStack(i), false);
|
((ToolPart) this.getSlotStack(i).getItem()).setHot(this.getSlotStack(i), false);
|
||||||
this.updateBlock();
|
this.updateBlock();
|
||||||
this.markDirty();
|
this.markDirty();
|
||||||
|
|||||||
59
1.11/stoneanvil.json
Normal file
59
1.11/stoneanvil.json
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
||||||
|
"parent": "block/block",
|
||||||
|
"textures": {
|
||||||
|
"particle": "blocks/particle",
|
||||||
|
"texture": "blocks/texture",
|
||||||
|
"texture1": "blocks/texture1"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"__comment": "Cube1",
|
||||||
|
"from": [ 0, 0, 0 ],
|
||||||
|
"to": [ 16, 14, 16 ],
|
||||||
|
"faces": {
|
||||||
|
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
|
||||||
|
"north": { "uv": [ 0, 2, 16, 16 ], "texture": "#texture" },
|
||||||
|
"south": { "uv": [ 0, 2, 16, 16 ], "texture": "#texture" },
|
||||||
|
"west": { "uv": [ 0, 2, 16, 16 ], "texture": "#texture" },
|
||||||
|
"east": { "uv": [ 0, 2, 16, 16 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "Cube2",
|
||||||
|
"from": [ 0, 14, 0 ],
|
||||||
|
"to": [ 16, 16, 16 ],
|
||||||
|
"faces": {
|
||||||
|
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture1" },
|
||||||
|
"north": { "uv": [ 0, 0, 16, 2 ], "texture": "#texture1" },
|
||||||
|
"south": { "uv": [ 0, 0, 16, 2 ], "texture": "#texture1" },
|
||||||
|
"west": { "uv": [ 0, 0, 16, 2 ], "texture": "#texture1" },
|
||||||
|
"east": { "uv": [ 0, 0, 16, 2 ], "texture": "#texture1" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"display": {
|
||||||
|
"thirdperson_righthand": {
|
||||||
|
"rotation": [ 75, 45, 0 ],
|
||||||
|
"translation": [ 0, 2.5, 0 ],
|
||||||
|
"scale": [ 0.375, 0.375, 0.375 ]
|
||||||
|
},
|
||||||
|
"firstperson_righthand": {
|
||||||
|
"rotation": [ 0, 45, 0 ],
|
||||||
|
"scale": [ 0.4, 0.4, 0.4 ]
|
||||||
|
},
|
||||||
|
"gui": {
|
||||||
|
"rotation": [ 30, 225, 0 ],
|
||||||
|
"scale": [ 0.625, 0.625, 0.625 ]
|
||||||
|
},
|
||||||
|
"ground": {
|
||||||
|
"translation": [ 0, 3, 0 ],
|
||||||
|
"scale": [ 0.25, 0.25, 0.25 ]
|
||||||
|
},
|
||||||
|
"fixed": {
|
||||||
|
"scale": [ 0.5, 0.5, 0.5 ]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overrides": [
|
||||||
|
]
|
||||||
|
}
|
||||||
5
push.sh
5
push.sh
@@ -5,5 +5,6 @@ git status
|
|||||||
git add --all :/
|
git add --all :/
|
||||||
IFS= read -r -p "Enter commit message: " com
|
IFS= read -r -p "Enter commit message: " com
|
||||||
git commit -m "${com}"
|
git commit -m "${com}"
|
||||||
git push nmd master
|
IFS= read -r -p "Enter Branch name: " com1
|
||||||
git push github master
|
git push nmd ${com1}
|
||||||
|
git push github ${com1}
|
||||||
|
|||||||
Reference in New Issue
Block a user