PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my alerts
my settings
my profile
Don't like ads?
PRO users
don't see any ads ;-)
Public Pastes
Untitled
0 sec ago
Untitled
6 sec ago
Untitled
6 sec ago
Untitled
7 sec ago
Aplicar estilos
PHP | 31 sec ago
VB Phi$her Code
VisualBasic | 18 sec ago
Untitled
23 sec ago
tryouts
28 sec ago
Horrible code from a Minecraft mod
By: a guest on
Oct 27th, 2012
| syntax:
Java
| size: 30.48 KB | hits: 2,165 | expires: Never
download
|
raw
|
embed
|
report abuse
|
print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
package
net.minecraft.src
;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
import
java.util.Random
;
public
class
BlockInstantTent
extends
BlockContainer
{
public
BlockInstantTent
(
int
i,
int
j, Material material
)
{
super
(
i, j, material
)
;
}
protected
TileEntity getBlockEntity
(
)
{
return
new
TileEntityTent
(
)
;
}
public
int
tickRate
(
)
{
return
4
;
}
public
static
TentData getTentData
(
short
word0, World world,
boolean
createNew
)
{
String
s
=
prefix_
+
word0
;
TentData mapdata
=
(
TentData
)
world.
loadItemData
(
TentData303.
class
, s
)
;
if
(
mapdata
==
null
&&
createNew
)
{
int
i
=
world.
getUniqueDataId
(
prefix
)
;
String
s1
=
prefix_
+
i
;
mapdata
=
new
HookData303
(
s1
)
;
world.
setItemData
(
s1, mapdata
)
;
}
return
mapdata
;
}
public
void
onBlockPlacedBy
(
World world,
int
i,
int
j,
int
k, EntityLiving entityliving
)
{
int
l
=
MathHelper.
floor_double
(
(
double
)
(
(
entityliving.
rotationYaw
*
4F
)
/
360F
)
+
0.5D
)
&
3
;
if
(
l
==
0
)
{
rotation
=
0
;
}
if
(
l
==
1
)
{
rotation
=
1
;
}
if
(
l
==
2
)
{
rotation
=
2
;
}
if
(
l
==
3
)
{
rotation
=
3
;
}
}
protected
int
damageDropped
(
int
i
)
{
return
i
;
}
public
static
int
func_21034_c
(
int
i
)
{
return
~i
&
0xf
;
}
public
static
int
func_21035_d
(
int
i
)
{
return
~i
&
0xf
;
}
public
int
getBlockTextureFromSideAndMetadata
(
int
i,
int
j
)
{
if
(
i
==
1
)
{
return
mod_instantTent.
instantTentTop
;
}
if
(
j
==
0
)
{
return
mod_instantTent.
instantTent13
;
}
if
(
j
==
1
)
{
return
mod_instantTent.
instantTent1
;
}
if
(
j
==
2
)
{
return
mod_instantTent.
instantTent2
;
}
if
(
j
==
3
)
{
return
mod_instantTent.
instantTent3
;
}
if
(
j
==
4
)
{
return
mod_instantTent.
instantTent4
;
}
if
(
j
==
5
)
{
return
mod_instantTent.
instantTent5
;
}
if
(
j
==
6
)
{
return
mod_instantTent.
instantTent6
;
}
if
(
j
==
7
)
{
return
mod_instantTent.
instantTent7
;
}
if
(
j
==
8
)
{
return
mod_instantTent.
instantTent8
;
}
if
(
j
==
9
)
{
return
mod_instantTent.
instantTent9
;
}
if
(
j
==
10
)
{
return
mod_instantTent.
instantTent10
;
}
if
(
j
==
11
)
{
return
mod_instantTent.
instantTent11
;
}
if
(
j
==
12
)
{
return
mod_instantTent.
instantTent12
;
}
if
(
j
==
13
)
{
return
mod_instantTent.
instantTent0
;
}
if
(
j
==
14
)
{
return
mod_instantTent.
instantTent14
;
}
if
(
j
==
15
)
{
return
mod_instantTent.
instantTent15
;
}
else
{
return
blockIndexInTexture
;
}
}
public
void
onBlockDestroyedByPlayer
(
World world,
int
i,
int
j,
int
k,
int
l
)
{
ModLoader.
getMinecraftInstance
(
)
.
thePlayer
.
triggerAchievement
(
mod_instantTent.
packItUp
)
;
TileEntityTent tent
=
(
TileEntityTent
)
world.
getBlockTileEntity
(
i, j, k
)
;
for
(
int
l
=
0
;
l
<
5
l
++
)
{
ItemStack itemstack
=
tent.
getStackInSlot
(
l
)
;
if
(
itemstack
==
null
)
{
continue
;
}
float
f
=
random.
nextFloat
(
)
*
0.8F
+
0.1F
;
float
f1
=
random.
nextFloat
(
)
*
0.8F
+
0.1F
;
float
f2
=
random.
nextFloat
(
)
*
0.8F
+
0.1F
;
do
{
if
(
itemstack.
stackSize
<=
0
)
{
continue
label0
;
}
int
i1
=
random.
nextInt
(
21
)
+
10
;
if
(
i1
>
itemstack.
stackSize
)
{
i1
=
itemstack.
stackSize
;
}
itemstack.
stackSize
-=
i1
;
EntityItem entityitem
=
new
EntityItem
(
world,
(
float
)
i
+
f,
(
float
)
j
+
f1,
(
float
)
k
+
f2,
new
ItemStack
(
itemstack.
itemID
, i1, itemstack.
getItemDamage
(
)
)
)
;
float
f3
=
0.05F
;
entityitem.
motionX
=
(
float
)
random.
nextGaussian
(
)
*
f3
;
entityitem.
motionY
=
(
float
)
random.
nextGaussian
(
)
*
f3
+
0.2F
;
entityitem.
motionZ
=
(
float
)
random.
nextGaussian
(
)
*
f3
;
world.
entityJoinedWorld
(
entityitem
)
;
}
while
(
true
)
;
}
double
d
=
(
float
)
i
+
0.5F
;
double
d1
=
(
float
)
j
+
0.7F
;
double
d2
=
(
float
)
k
+
0.5F
;
double
d3
=
0.2199999988079071D
;
double
d4
=
0.27000001072883606D
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2, 1.0D, 1.0D, 0.0D
)
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2, 1.0D, 1.0D, 1.0D
)
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2, 0.0D, 1.0D, 1.0D
)
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2, 1.0D, 0.0D, 0.0D
)
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2,
-
1.0D, 1.0D, 0.0D
)
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2,
-
1.0D, 1.0D, 1.0D
)
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2, 0.0D, 1.0D,
-
1.0D
)
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2,
-
1.0D, 0.0D, 0.0D
)
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2,
-
1.0D, 0.0D,
-
1.0D
)
;
if
(
rotation
==
0
)
{
world.
setBlockWithNotify
(
i,j
+
1
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
2
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j,k,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j,k,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j,k,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j,k,
0
)
;
world.
setBlockWithNotify
(
i,j,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i,j,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i,j,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
1
,k,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
1
,k,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
1
,k,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
1
,k,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
1
,k,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
1
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
1
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
1
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
1
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
1
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
1
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
1
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
1
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
1
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
1
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
1
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
1
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
1
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
1
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
1
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
2
,k,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
2
,k,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
2
,k,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
2
,k,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
2
,k,
0
)
;
world.
setBlockWithNotify
(
i,j
+
2
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
2
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
2
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
2
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
2
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
2
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
2
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
2
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
2
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
2
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
2
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
2
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
2
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
2
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
2
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
3
,k,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
3
,k,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
3
,k,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k,
0
)
;
world.
setBlockWithNotify
(
i,j
+
3
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
3
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
3
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
3
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
3
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
3
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k
-
1
,
0
)
;
}
if
(
rotation
==
1
)
{
int
metadata
=
world.
getBlockMetadata
(
i, j, k
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k,
0
,
2
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
2
,k,
0
,
10
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
-
1
,
0
,
1
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k
-
1
,
0
,
9
)
;
for
(
int
i1
=
0
;
i1
<
5
;
i1
++
)
{
for
(
int
j1
=
0
;
j1
<
4
;
j1
++
)
{
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
j1,
(
k
-
i1
)
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
j1,
(
k
-
i1
)
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
(
i
-
j1
)
+
1
,j,
(
k
-
i1
)
+
2
,
0
,metadata
)
;
}
}
world.
setBlockWithNotify
(
i
+
1
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
3
,k
-
2
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
3
,k
-
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
3
,k
-
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k
-
2
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k
-
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k
-
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k
-
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k
+
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k
+
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k
+
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
1
,k
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
2
,k
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
2
,k
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
2
,k
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
2
,k
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
1
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
2
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
2
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
2
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
2
,k
-
2
,
0
,metadata
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
2
,k,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
1
,k,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k,
0
,
2
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
2
,k,
0
,
10
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k
-
1
,
0
,
9
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
-
1
,
0
,
1
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
2
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
2
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
1
,k
+
1
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k,
0
,
3
)
;
world.
setBlockWithNotify
(
i,j
+
2
,k
+
1
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
+
1
,
0
,
3
)
;
world.
setBlockAndMetadataWithNotify
(
i,j,k,
0
,metadata
)
;
}
if
(
rotation
==
2
)
{
int
metadata
=
world.
getBlockMetadata
(
i, j, k
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
+
1
,
0
,
3
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
2
,k
+
1
,
0
,
11
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k,
0
,
2
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k
-
1
,
0
,
10
)
;
for
(
int
i1
=
0
;
i1
<
5
;
i1
++
)
{
for
(
int
j1
=
0
;
j1
<
4
;
j1
++
)
{
world.
setBlockAndMetadataWithNotify
(
(
i
-
i1
)
+
2
,j
+
j1,k
+
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
(
i
-
i1
)
+
2
,j
+
j1,
(
k
-
4
)
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
(
i
-
i1
)
+
2
,j,
(
k
-
j1
)
+
1
,
0
,metadata
)
;
}
}
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k
-
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k
-
2
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k
+
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k
-
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k
+
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k
-
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k
+
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k
-
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
1
,k
+
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
1
,k,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
1
,k
-
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
1
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
2
,k
+
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
2
,k,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
2
,k
-
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
2
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
1
,k
+
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
1
,k,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
1
,k
-
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
1
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
2
,k
+
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
2
,k,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
2
,k
-
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
2
,k
-
2
,
0
,metadata
)
;
world.
setBlockWithNotify
(
(
i
-
1
)
+
1
,j
+
2
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
(
i
-
1
)
+
1
,j
+
1
,k
+
1
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
+
1
,
0
,
3
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
2
,k
+
1
,
0
,
11
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k
-
1
,
0
,
10
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k,
0
,
2
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
2
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
2
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
1
,k
-
1
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
-
1
,
0
,
3
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
2
,k,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k,
0
,
3
)
;
world.
setBlockAndMetadataWithNotify
(
i,j,k,
0
,metadata
)
;
}
if
(
rotation
==
3
)
{
int
metadata
=
world.
getBlockMetadata
(
i, j, k
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k,
0
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
2
,k,
0
,
8
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
+
1
,
0
,
3
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k
+
1
,
0
,
11
)
;
for
(
int
i1
=
0
;
i1
<
5
;
i1
++
)
{
for
(
int
j1
=
0
;
j1
<
4
;
j1
++
)
{
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
j1,
(
k
+
i1
)
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
j1,
(
k
+
i1
)
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
(
i
+
j1
)
-
1
,j,
(
k
+
i1
)
-
2
,
0
,metadata
)
;
}
}
world.
setBlockWithNotify
(
i
-
1
,j
+
3
,k
-
2
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
3
,k
-
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
3
,k
-
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k
-
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k
+
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k
+
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k
+
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k
-
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k
-
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k
-
1
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
1
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
2
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
2
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
2
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
2
,k
-
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
1
,k
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
2
,k
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
2
,k
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
2
,k
+
2
,
0
,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
2
,k
+
2
,
0
,metadata
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
2
,k,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
1
,k,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k,
0
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
2
,k,
0
,
8
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k
+
1
,
0
,
11
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
+
1
,
0
,
3
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
2
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
2
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
1
,k
-
1
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k,
0
,
3
)
;
world.
setBlockWithNotify
(
i,j
+
2
,k
-
1
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
-
1
,
0
,
3
)
;
world.
setBlockAndMetadataWithNotify
(
i,j,k,
0
,metadata
)
;
}
}
public
boolean
blockActivated
(
World world,
int
i,
int
j,
int
k, EntityPlayer entityplayer
)
{
TileEntityTent tileentitytent
=
(
TileEntityTent
)
world.
getBlockTileEntity
(
i, j, k
)
;
ModLoader.
OpenGUI
(
entityplayer,
new
GuiTent
(
entityplayer.
inventory
, tileentitytent
)
)
;
if
(
tileentitytent.
charged
)
{
tileentitytent.
charge
=
0
;
tileentitytent.
charged
=
false
;
}
//activateTent(world, i, j, k, entityplayer);
return
true
;
}
private
void
activateTent
(
World world,
int
i,
int
j,
int
k, EntityPlayer entityplayer
)
{
ModLoader.
getMinecraftInstance
(
)
.
thePlayer
.
triggerAchievement
(
mod_instantTent.
thatWasEasy
)
;
int
metadata
=
world.
getBlockMetadata
(
i, j, k
)
;
world.
playSoundEffect
(
(
double
)
i
+
0.5D,
(
double
)
j
+
0.5D,
(
double
)
k
+
0.5D,
"random.pop"
, 1.0F, world.
rand
.
nextFloat
(
)
*
0.1F
+
0.9F
)
;
double
d
=
(
float
)
i
+
0.5F
;
double
d1
=
(
float
)
j
+
0.7F
;
double
d2
=
(
float
)
k
+
0.5F
;
double
d3
=
0.2199999988079071D
;
double
d4
=
0.27000001072883606D
;
for
(
int
count
=
0
;
count
<
50
;
count
++
)
{
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2, 1.0D, 1.0D, 0.0D
)
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2, 1.0D, 1.0D, 1.0D
)
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2, 0.0D, 1.0D, 1.0D
)
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2, 1.0D, 0.0D, 0.0D
)
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2,
-
1.0D, 1.0D, 0.0D
)
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2,
-
1.0D, 1.0D, 1.0D
)
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2, 0.0D, 1.0D,
-
1.0D
)
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2,
-
1.0D, 0.0D, 0.0D
)
;
world.
spawnParticle
(
"portal"
, d
-
d4, d1
+
d3, d2,
-
1.0D, 0.0D,
-
1.0D
)
;
}
int
instantTent
=
200
;
int
cloth
=
201
;
int
door
=
202
;
int
furnace
=
203
;
int
chest
=
204
;
if
(
rotation
==
0
)
{
for
(
int
i1
=
0
;
i1
<
5
;
i1
++
)
{
for
(
int
j1
=
0
;
j1
<
4
;
j1
++
)
{
world.
setBlockAndMetadataWithNotify
(
(
i
+
i1
)
-
2
,j
+
j1,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
(
i
+
i1
)
-
2
,j
+
j1,
(
k
+
4
)
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
(
i
+
i1
)
-
2
,j,
(
k
+
j1
)
-
1
,cloth,metadata
)
;
}
}
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
1
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
1
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
1
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
1
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
2
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
2
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
2
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
2
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
1
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
1
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
1
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
1
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
2
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
2
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
2
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
2
,k
+
2
,cloth,metadata
)
;
world.
setBlockWithNotify
(
(
i
+
1
)
-
1
,j
+
2
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
(
i
+
1
)
-
1
,j
+
1
,k
-
1
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
(
i
+
1
)
-
1
,j
+
1
,k
-
1
,Block.
doorWood
.
blockID
,
1
)
;
world.
setBlockAndMetadataWithNotify
(
(
i
+
1
)
-
1
,j
+
2
,k
-
1
,Block.
doorWood
.
blockID
,
9
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k
+
1
,Block.
blockBed
.
blockID
,
8
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k,Block.
blockBed
.
blockID
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
2
,k
-
1
,Block.
glass
.
blockID
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
2
,k
-
1
,Block.
glass
.
blockID
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
1
,k
+
1
,Block.
workbench
.
blockID
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
+
1
,chest ,
3
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
2
,k,Block.
cake
.
blockID
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k,furnace ,
3
)
;
world.
setBlockAndMetadataWithNotify
(
i,j,k,instantTent,metadata
)
;
}
if
(
rotation
==
1
)
{
for
(
int
i1
=
0
;
i1
<
5
;
i1
++
)
{
for
(
int
j1
=
0
;
j1
<
4
;
j1
++
)
{
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
j1,
(
k
-
i1
)
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
j1,
(
k
-
i1
)
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
(
i
-
j1
)
+
1
,j,
(
k
-
i1
)
+
2
,cloth,metadata
)
;
}
}
world.
setBlockWithNotify
(
i
+
1
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
3
,k
-
2
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
3
,k
-
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
3
,k
-
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k
-
2
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
1
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
2
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
2
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
2
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
2
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
1
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
2
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
2
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
2
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
2
,k
-
2
,cloth,metadata
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
2
,k,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
1
,k,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k,Block.
doorWood
.
blockID
,
2
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
2
,k,Block.
doorWood
.
blockID
,
10
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k
-
1
,Block.
blockBed
.
blockID
,
9
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
-
1
,Block.
blockBed
.
blockID
,
1
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
2
,k
-
1
,Block.
glass
.
blockID
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
2
,k
+
1
,Block.
glass
.
blockID
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
1
,k
+
1
,Block.
workbench
.
blockID
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k,chest ,
3
)
;
world.
setBlockWithNotify
(
i,j
+
2
,k
+
1
,Block.
cake
.
blockID
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
+
1
,furnace ,
3
)
;
world.
setBlockAndMetadataWithNotify
(
i,j,k,instantTent,metadata
)
;
}
if
(
rotation
==
2
)
{
for
(
int
i1
=
0
;
i1
<
5
;
i1
++
)
{
for
(
int
j1
=
0
;
j1
<
4
;
j1
++
)
{
world.
setBlockAndMetadataWithNotify
(
(
i
-
i1
)
+
2
,j
+
j1,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
(
i
-
i1
)
+
2
,j
+
j1,
(
k
-
4
)
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
(
i
-
i1
)
+
2
,j,
(
k
-
j1
)
+
1
,cloth,metadata
)
;
}
}
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k
-
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k
-
1
,
0
)
;
world.
setBlockWithNotify
(
i
-
2
,j
+
3
,k
-
2
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
1
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
1
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
1
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
1
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
2
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
2
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
2
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
2
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
1
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
1
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
1
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
1
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
2
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
2
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
2
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
2
,j
+
2
,k
-
2
,cloth,metadata
)
;
world.
setBlockWithNotify
(
(
i
-
1
)
+
1
,j
+
2
,k
+
1
,
0
)
;
world.
setBlockWithNotify
(
(
i
-
1
)
+
1
,j
+
1
,k
+
1
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
+
1
,Block.
doorWood
.
blockID
,
3
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
2
,k
+
1
,Block.
doorWood
.
blockID
,
11
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k
-
1
,Block.
blockBed
.
blockID
,
10
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k,Block.
blockBed
.
blockID
,
2
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
2
,k
+
1
,Block.
glass
.
blockID
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
2
,k
+
1
,Block.
glass
.
blockID
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
1
,k
-
1
,Block.
workbench
.
blockID
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
-
1
,chest ,
3
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
2
,k,Block.
cake
.
blockID
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k,furnace ,
3
)
;
world.
setBlockAndMetadataWithNotify
(
i,j,k,instantTent,metadata
)
;
}
if
(
rotation
==
3
)
{
for
(
int
i1
=
0
;
i1
<
5
;
i1
++
)
{
for
(
int
j1
=
0
;
j1
<
4
;
j1
++
)
{
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
j1,
(
k
+
i1
)
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
j1,
(
k
+
i1
)
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
(
i
+
j1
)
-
1
,j,
(
k
+
i1
)
-
2
,cloth,metadata
)
;
}
}
world.
setBlockWithNotify
(
i
-
1
,j
+
3
,k
-
2
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
3
,k
-
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
3
,k
-
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k
-
2
,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockWithNotify
(
i
+
2
,j
+
3
,k
+
2
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k
+
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
3
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
3
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
3
,k
-
1
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
1
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
2
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
2
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
2
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
2
,k
-
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
1
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
2
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
2
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
2
,k
+
2
,cloth,metadata
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
2
,j
+
2
,k
+
2
,cloth,metadata
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
2
,k,
0
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
1
,k,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
1
,k,Block.
doorWood
.
blockID
,
0
)
;
world.
setBlockAndMetadataWithNotify
(
i
-
1
,j
+
2
,k,Block.
doorWood
.
blockID
,
8
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k
+
1
,Block.
blockBed
.
blockID
,
11
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
+
1
,Block.
blockBed
.
blockID
,
3
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
2
,k
+
1
,Block.
glass
.
blockID
)
;
world.
setBlockWithNotify
(
i
-
1
,j
+
2
,k
-
1
,Block.
glass
.
blockID
)
;
world.
setBlockWithNotify
(
i
+
1
,j
+
1
,k
-
1
,Block.
workbench
.
blockID
)
;
world.
setBlockAndMetadataWithNotify
(
i
+
1
,j
+
1
,k,chest ,
3
)
;
world.
setBlockWithNotify
(
i,j
+
2
,k
-
1
,Block.
cake
.
blockID
)
;
world.
setBlockAndMetadataWithNotify
(
i,j
+
1
,k
-
1
,furnace ,
3
)
;
world.
setBlockAndMetadataWithNotify
(
i,j,k,instantTent,metadata
)
;
}
}
private
int
rotation
;
public
GuiTent tentGUI
;
public
TileEntityTent tent
;
public
static
final
String
prefix
=
"tent"
;
public
static
final
String
prefix_
=
prefix
+
"_"
;
}
create a
new version
of this paste
RAW Paste Data
package net.minecraft.src; // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode import java.util.Random; public class BlockInstantTent extends BlockContainer { public BlockInstantTent(int i, int j, Material material) { super(i, j, material); } protected TileEntity getBlockEntity() { return new TileEntityTent(); } public int tickRate() { return 4; } public static TentData getTentData(short word0, World world, boolean createNew) { String s = prefix_ + word0; TentData mapdata = (TentData)world.loadItemData(TentData303.class, s); if(mapdata == null && createNew) { int i = world.getUniqueDataId(prefix); String s1 = prefix_ + i; mapdata = new HookData303(s1); world.setItemData(s1, mapdata); } return mapdata; } public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving) { int l = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3; if(l == 0) { rotation = 0; } if(l == 1) { rotation = 1; } if(l == 2) { rotation = 2; } if(l == 3) { rotation = 3; } } protected int damageDropped(int i) { return i; } public static int func_21034_c(int i) { return ~i & 0xf; } public static int func_21035_d(int i) { return ~i & 0xf; } public int getBlockTextureFromSideAndMetadata(int i, int j) { if(i == 1) { return mod_instantTent.instantTentTop; } if(j == 0) { return mod_instantTent.instantTent13; } if(j == 1) { return mod_instantTent.instantTent1; } if(j == 2) { return mod_instantTent.instantTent2; } if(j == 3) { return mod_instantTent.instantTent3; } if(j == 4) { return mod_instantTent.instantTent4; } if(j == 5) { return mod_instantTent.instantTent5; } if(j == 6) { return mod_instantTent.instantTent6; } if(j == 7) { return mod_instantTent.instantTent7; } if(j == 8) { return mod_instantTent.instantTent8; } if(j == 9) { return mod_instantTent.instantTent9; } if(j == 10) { return mod_instantTent.instantTent10; } if(j == 11) { return mod_instantTent.instantTent11; } if(j == 12) { return mod_instantTent.instantTent12; } if(j == 13) { return mod_instantTent.instantTent0; } if(j == 14) { return mod_instantTent.instantTent14; } if(j == 15) { return mod_instantTent.instantTent15; } else { return blockIndexInTexture; } } public void onBlockDestroyedByPlayer(World world, int i, int j, int k, int l) { ModLoader.getMinecraftInstance().thePlayer.triggerAchievement(mod_instantTent.packItUp); TileEntityTent tent = (TileEntityTent)world.getBlockTileEntity(i, j, k); for(int l = 0; l < 5 l++) { ItemStack itemstack = tent.getStackInSlot(l); if(itemstack == null) { continue; } float f = random.nextFloat() * 0.8F + 0.1F; float f1 = random.nextFloat() * 0.8F + 0.1F; float f2 = random.nextFloat() * 0.8F + 0.1F; do { if(itemstack.stackSize <= 0) { continue label0; } int i1 = random.nextInt(21) + 10; if(i1 > itemstack.stackSize) { i1 = itemstack.stackSize; } itemstack.stackSize -= i1; EntityItem entityitem = new EntityItem(world, (float)i + f, (float)j + f1, (float)k + f2, new ItemStack(itemstack.itemID, i1, itemstack.getItemDamage())); float f3 = 0.05F; entityitem.motionX = (float)random.nextGaussian() * f3; entityitem.motionY = (float)random.nextGaussian() * f3 + 0.2F; entityitem.motionZ = (float)random.nextGaussian() * f3; world.entityJoinedWorld(entityitem); } while(true); } double d = (float)i + 0.5F; double d1 = (float)j + 0.7F; double d2 = (float)k + 0.5F; double d3 = 0.2199999988079071D; double d4 = 0.27000001072883606D; world.spawnParticle("portal", d - d4, d1 + d3, d2, 1.0D, 1.0D, 0.0D); world.spawnParticle("portal", d - d4, d1 + d3, d2, 1.0D, 1.0D, 1.0D); world.spawnParticle("portal", d - d4, d1 + d3, d2, 0.0D, 1.0D, 1.0D); world.spawnParticle("portal", d - d4, d1 + d3, d2, 1.0D, 0.0D, 0.0D); world.spawnParticle("portal", d - d4, d1 + d3, d2, -1.0D, 1.0D, 0.0D); world.spawnParticle("portal", d - d4, d1 + d3, d2, -1.0D, 1.0D, 1.0D); world.spawnParticle("portal", d - d4, d1 + d3, d2, 0.0D, 1.0D, -1.0D); world.spawnParticle("portal", d - d4, d1 + d3, d2, -1.0D, 0.0D, 0.0D); world.spawnParticle("portal", d - d4, d1 + d3, d2, -1.0D, 0.0D, -1.0D); if(rotation == 0) { world.setBlockWithNotify(i,j+1,k-1,0); world.setBlockWithNotify(i,j+2,k-1,0); world.setBlockWithNotify(i+1,j,k,0); world.setBlockWithNotify(i+2,j,k,0); world.setBlockWithNotify(i-1,j,k,0); world.setBlockWithNotify(i-2,j,k,0); world.setBlockWithNotify(i,j,k+1,0); world.setBlockWithNotify(i+1,j,k+1,0); world.setBlockWithNotify(i+2,j,k+1,0); world.setBlockWithNotify(i-1,j,k+1,0); world.setBlockWithNotify(i-2,j,k+1,0); world.setBlockWithNotify(i,j,k+2,0); world.setBlockWithNotify(i+1,j,k+2,0); world.setBlockWithNotify(i+2,j,k+2,0); world.setBlockWithNotify(i-1,j,k+2,0); world.setBlockWithNotify(i-2,j,k+2,0); world.setBlockWithNotify(i,j,k-1,0); world.setBlockWithNotify(i+1,j,k-1,0); world.setBlockWithNotify(i+2,j,k-1,0); world.setBlockWithNotify(i-1,j,k-1,0); world.setBlockWithNotify(i-2,j,k-1,0); world.setBlockWithNotify(i,j+1,k,0); world.setBlockWithNotify(i+1,j+1,k,0); world.setBlockWithNotify(i+2,j+1,k,0); world.setBlockWithNotify(i-1,j+1,k,0); world.setBlockWithNotify(i-2,j+1,k,0); world.setBlockWithNotify(i+1,j+1,k+1,0); world.setBlockWithNotify(i+2,j+1,k+1,0); world.setBlockWithNotify(i-1,j+1,k+1,0); world.setBlockWithNotify(i-2,j+1,k+1,0); world.setBlockWithNotify(i,j+1,k+1,0); world.setBlockWithNotify(i+1,j+1,k+2,0); world.setBlockWithNotify(i+2,j+1,k+2,0); world.setBlockWithNotify(i-1,j+1,k+2,0); world.setBlockWithNotify(i-2,j+1,k+2,0); world.setBlockWithNotify(i,j+1,k+2,0); world.setBlockWithNotify(i+1,j+1,k-1,0); world.setBlockWithNotify(i+2,j+1,k-1,0); world.setBlockWithNotify(i-1,j+1,k-1,0); world.setBlockWithNotify(i-2,j+1,k-1,0); world.setBlockWithNotify(i,j+1,k-1,0); world.setBlockWithNotify(i,j+2,k,0); world.setBlockWithNotify(i+1,j+2,k,0); world.setBlockWithNotify(i+2,j+2,k,0); world.setBlockWithNotify(i-1,j+2,k,0); world.setBlockWithNotify(i-2,j+2,k,0); world.setBlockWithNotify(i,j+2,k+1,0); world.setBlockWithNotify(i+1,j+2,k+1,0); world.setBlockWithNotify(i+2,j+2,k+1,0); world.setBlockWithNotify(i-1,j+2,k+1,0); world.setBlockWithNotify(i-2,j+2,k+1,0); world.setBlockWithNotify(i,j+2,k+2,0); world.setBlockWithNotify(i+1,j+2,k+2,0); world.setBlockWithNotify(i+2,j+2,k+2,0); world.setBlockWithNotify(i-1,j+2,k+2,0); world.setBlockWithNotify(i-2,j+2,k+2,0); world.setBlockWithNotify(i,j+2,k-1,0); world.setBlockWithNotify(i+1,j+2,k-1,0); world.setBlockWithNotify(i+2,j+2,k-1,0); world.setBlockWithNotify(i-1,j+2,k-1,0); world.setBlockWithNotify(i-2,j+2,k-1,0); world.setBlockWithNotify(i,j+3,k,0); world.setBlockWithNotify(i+1,j+3,k,0); world.setBlockWithNotify(i+2,j+3,k,0); world.setBlockWithNotify(i-1,j+3,k,0); world.setBlockWithNotify(i-2,j+3,k,0); world.setBlockWithNotify(i,j+3,k+1,0); world.setBlockWithNotify(i+1,j+3,k+1,0); world.setBlockWithNotify(i+2,j+3,k+1,0); world.setBlockWithNotify(i-1,j+3,k+1,0); world.setBlockWithNotify(i-2,j+3,k+1,0); world.setBlockWithNotify(i,j+3,k+2,0); world.setBlockWithNotify(i+1,j+3,k+2,0); world.setBlockWithNotify(i+2,j+3,k+2,0); world.setBlockWithNotify(i-1,j+3,k+2,0); world.setBlockWithNotify(i-2,j+3,k+2,0); world.setBlockWithNotify(i,j+3,k-1,0); world.setBlockWithNotify(i+1,j+3,k-1,0); world.setBlockWithNotify(i+2,j+3,k-1,0); world.setBlockWithNotify(i-1,j+3,k-1,0); world.setBlockWithNotify(i-2,j+3,k-1,0); } if(rotation == 1) { int metadata = world.getBlockMetadata(i, j, k); world.setBlockAndMetadataWithNotify(i+1,j+1,k,0, 2); world.setBlockAndMetadataWithNotify(i+1,j+2,k,0, 10); world.setBlockAndMetadataWithNotify(i,j+1,k-1,0, 1); world.setBlockAndMetadataWithNotify(i-1,j+1,k-1,0, 9); for (int i1 = 0; i1 < 5; i1++) { for (int j1 = 0; j1 < 4; j1++) { world.setBlockAndMetadataWithNotify(i+1,j+j1,(k-i1)+2,0,metadata); world.setBlockAndMetadataWithNotify(i-2,j+j1,(k-i1)+2,0,metadata); world.setBlockAndMetadataWithNotify((i-j1)+1,j,(k-i1)+2,0,metadata); } } world.setBlockWithNotify(i+1,j+3,k+2,0); world.setBlockWithNotify(i,j+3,k+2,0); world.setBlockWithNotify(i-1,j+3,k+2,0); world.setBlockWithNotify(i-2,j+3,k+2,0); world.setBlockWithNotify(i+1,j+3,k-2,0); world.setBlockWithNotify(i,j+3,k-2,0); world.setBlockWithNotify(i-1,j+3,k-2,0); world.setBlockWithNotify(i-2,j+3,k-2,0); world.setBlockAndMetadataWithNotify(i+1,j+3,k,0,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k,0,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k,0,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k-1,0,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k-1,0,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k-1,0,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k+1,0,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k+1,0,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k+1,0,metadata); world.setBlockAndMetadataWithNotify(i+1,j+1,k+2,0,metadata); world.setBlockAndMetadataWithNotify(i,j+1,k+2,0,metadata); world.setBlockAndMetadataWithNotify(i-1,j+1,k+2,0,metadata); world.setBlockAndMetadataWithNotify(i-2,j+1,k+2,0,metadata); world.setBlockAndMetadataWithNotify(i+1,j+2,k+2,0,metadata); world.setBlockAndMetadataWithNotify(i,j+2,k+2,0,metadata); world.setBlockAndMetadataWithNotify(i-1,j+2,k+2,0,metadata); world.setBlockAndMetadataWithNotify(i-2,j+2,k+2,0,metadata); world.setBlockAndMetadataWithNotify(i+1,j+1,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i,j+1,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i-1,j+1,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i-2,j+1,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i+1,j+2,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i,j+2,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i-1,j+2,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i-2,j+2,k-2,0,metadata); world.setBlockWithNotify(i+1,j+2,k,0); world.setBlockWithNotify(i+1,j+1,k,0); world.setBlockAndMetadataWithNotify(i+1,j+1,k,0, 2); world.setBlockAndMetadataWithNotify(i+1,j+2,k,0, 10); world.setBlockAndMetadataWithNotify(i-1,j+1,k-1,0, 9); world.setBlockAndMetadataWithNotify(i,j+1,k-1,0, 1); world.setBlockWithNotify(i+1,j+2,k-1,0); world.setBlockWithNotify(i+1,j+2,k+1,0); world.setBlockWithNotify(i-1,j+1,k+1,0); world.setBlockAndMetadataWithNotify(i-1,j+1,k,0, 3); world.setBlockWithNotify(i,j+2,k+1,0) ; world.setBlockAndMetadataWithNotify(i,j+1,k+1,0, 3); world.setBlockAndMetadataWithNotify(i,j,k,0,metadata); } if(rotation == 2) { int metadata = world.getBlockMetadata(i, j, k); world.setBlockAndMetadataWithNotify(i,j+1,k+1,0, 3); world.setBlockAndMetadataWithNotify(i,j+2,k+1,0, 11); world.setBlockAndMetadataWithNotify(i-1,j+1,k,0, 2); world.setBlockAndMetadataWithNotify(i-1,j+1,k-1,0, 10); for (int i1 = 0; i1 < 5; i1++) { for (int j1 = 0; j1 < 4; j1++) { world.setBlockAndMetadataWithNotify((i-i1)+2,j+j1,k+1,0,metadata); world.setBlockAndMetadataWithNotify((i-i1)+2,j+j1,(k-4)+2,0,metadata); world.setBlockAndMetadataWithNotify((i-i1)+2,j,(k-j1)+1,0,metadata); } } world.setBlockWithNotify(i+2,j+3,k+1,0); world.setBlockWithNotify(i+2,j+3,k,0); world.setBlockWithNotify(i+2,j+3,k+1,0); world.setBlockWithNotify(i+2,j+3,k-2,0); world.setBlockWithNotify(i-2,j+3,k+1,0); world.setBlockWithNotify(i-2,j+3,k,0); world.setBlockWithNotify(i-2,j+3,k-1,0); world.setBlockWithNotify(i-2,j+3,k-2,0); world.setBlockAndMetadataWithNotify(i,j+3,k+1,0,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k,0,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k-1,0,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k+1,0,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k,0,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k-1,0,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k+1,0,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k,0,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k-1,0,metadata); world.setBlockAndMetadataWithNotify(i+2,j+1,k+1,0,metadata); world.setBlockAndMetadataWithNotify(i+2,j+1,k,0,metadata); world.setBlockAndMetadataWithNotify(i+2,j+1,k-1,0,metadata); world.setBlockAndMetadataWithNotify(i+2,j+1,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i+2,j+2,k+1,0,metadata); world.setBlockAndMetadataWithNotify(i+2,j+2,k,0,metadata); world.setBlockAndMetadataWithNotify(i+2,j+2,k-1,0,metadata); world.setBlockAndMetadataWithNotify(i+2,j+2,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i-2,j+1,k+1,0,metadata); world.setBlockAndMetadataWithNotify(i-2,j+1,k,0,metadata); world.setBlockAndMetadataWithNotify(i-2,j+1,k-1,0,metadata); world.setBlockAndMetadataWithNotify(i-2,j+1,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i-2,j+2,k+1,0,metadata); world.setBlockAndMetadataWithNotify(i-2,j+2,k,0,metadata); world.setBlockAndMetadataWithNotify(i-2,j+2,k-1,0,metadata); world.setBlockAndMetadataWithNotify(i-2,j+2,k-2,0,metadata); world.setBlockWithNotify((i-1)+1,j+2,k+1,0); world.setBlockWithNotify((i-1)+1,j+1,k+1,0); world.setBlockAndMetadataWithNotify(i,j+1,k+1,0, 3); world.setBlockAndMetadataWithNotify(i,j+2,k+1,0, 11); world.setBlockAndMetadataWithNotify(i-1,j+1,k-1,0, 10); world.setBlockAndMetadataWithNotify(i-1,j+1,k,0, 2); world.setBlockWithNotify(i-1,j+2,k+1,0); world.setBlockWithNotify(i+1,j+2,k+1,0); world.setBlockWithNotify(i+1,j+1,k-1,0); world.setBlockAndMetadataWithNotify(i,j+1,k-1,0, 3); world.setBlockWithNotify(i+1,j+2,k,0) ; world.setBlockAndMetadataWithNotify(i+1,j+1,k,0, 3); world.setBlockAndMetadataWithNotify(i,j,k,0,metadata); } if(rotation == 3) { int metadata = world.getBlockMetadata(i, j, k); world.setBlockAndMetadataWithNotify(i-1,j+1,k,0, 0); world.setBlockAndMetadataWithNotify(i-1,j+2,k,0, 8); world.setBlockAndMetadataWithNotify(i,j+1,k+1,0, 3); world.setBlockAndMetadataWithNotify(i+1,j+1,k+1,0, 11); for (int i1 = 0; i1 < 5; i1++) { for (int j1 = 0; j1 < 4; j1++) { world.setBlockAndMetadataWithNotify(i-1,j+j1,(k+i1)-2,0,metadata); world.setBlockAndMetadataWithNotify(i+2,j+j1,(k+i1)-2,0,metadata); world.setBlockAndMetadataWithNotify((i+j1)-1,j,(k+i1)-2,0,metadata); } } world.setBlockWithNotify(i-1,j+3,k-2,0); world.setBlockWithNotify(i,j+3,k-2,0); world.setBlockWithNotify(i+1,j+3,k-2,0); world.setBlockWithNotify(i+2,j+3,k-2,0); world.setBlockWithNotify(i-1,j+3,k+2,0); world.setBlockWithNotify(i,j+3,k+2,0); world.setBlockWithNotify(i+1,j+3,k+2,0); world.setBlockWithNotify(i+2,j+3,k+2,0); world.setBlockAndMetadataWithNotify(i-1,j+3,k,0,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k,0,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k,0,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k+1,0,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k+1,0,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k+1,0,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k-1,0,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k-1,0,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k-1,0,metadata); world.setBlockAndMetadataWithNotify(i-1,j+1,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i,j+1,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i+1,j+1,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i+2,j+1,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i-1,j+2,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i,j+2,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i+1,j+2,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i+2,j+2,k-2,0,metadata); world.setBlockAndMetadataWithNotify(i-1,j+1,k+2,0,metadata); world.setBlockAndMetadataWithNotify(i,j+1,k+2,0,metadata); world.setBlockAndMetadataWithNotify(i+1,j+1,k+2,0,metadata); world.setBlockAndMetadataWithNotify(i+2,j+1,k+2,0,metadata); world.setBlockAndMetadataWithNotify(i-1,j+2,k+2,0,metadata); world.setBlockAndMetadataWithNotify(i,j+2,k+2,0,metadata); world.setBlockAndMetadataWithNotify(i+1,j+2,k+2,0,metadata); world.setBlockAndMetadataWithNotify(i+2,j+2,k+2,0,metadata); world.setBlockWithNotify(i-1,j+2,k,0); world.setBlockWithNotify(i-1,j+1,k,0); world.setBlockAndMetadataWithNotify(i-1,j+1,k,0, 0); world.setBlockAndMetadataWithNotify(i-1,j+2,k,0, 8); world.setBlockAndMetadataWithNotify(i+1,j+1,k+1,0, 11); world.setBlockAndMetadataWithNotify(i,j+1,k+1,0, 3); world.setBlockWithNotify(i-1,j+2,k+1,0); world.setBlockWithNotify(i-1,j+2,k-1,0); world.setBlockWithNotify(i+1,j+1,k-1,0); world.setBlockAndMetadataWithNotify(i+1,j+1,k,0 , 3); world.setBlockWithNotify(i,j+2,k-1,0) ; world.setBlockAndMetadataWithNotify(i,j+1,k-1,0 , 3); world.setBlockAndMetadataWithNotify(i,j,k,0,metadata); } } public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer) { TileEntityTent tileentitytent = (TileEntityTent)world.getBlockTileEntity(i, j, k); ModLoader.OpenGUI(entityplayer, new GuiTent(entityplayer.inventory, tileentitytent)); if(tileentitytent.charged) { tileentitytent.charge = 0; tileentitytent.charged = false; } //activateTent(world, i, j, k, entityplayer); return true; } private void activateTent(World world, int i, int j, int k, EntityPlayer entityplayer) { ModLoader.getMinecraftInstance().thePlayer.triggerAchievement(mod_instantTent.thatWasEasy); int metadata = world.getBlockMetadata(i, j, k); world.playSoundEffect((double)i + 0.5D, (double)j + 0.5D, (double)k + 0.5D, "random.pop", 1.0F, world.rand.nextFloat() * 0.1F + 0.9F); double d = (float)i + 0.5F; double d1 = (float)j + 0.7F; double d2 = (float)k + 0.5F; double d3 = 0.2199999988079071D; double d4 = 0.27000001072883606D; for (int count=0; count<50; count++) { world.spawnParticle("portal", d - d4, d1 + d3, d2, 1.0D, 1.0D, 0.0D); world.spawnParticle("portal", d - d4, d1 + d3, d2, 1.0D, 1.0D, 1.0D); world.spawnParticle("portal", d - d4, d1 + d3, d2, 0.0D, 1.0D, 1.0D); world.spawnParticle("portal", d - d4, d1 + d3, d2, 1.0D, 0.0D, 0.0D); world.spawnParticle("portal", d - d4, d1 + d3, d2, -1.0D, 1.0D, 0.0D); world.spawnParticle("portal", d - d4, d1 + d3, d2, -1.0D, 1.0D, 1.0D); world.spawnParticle("portal", d - d4, d1 + d3, d2, 0.0D, 1.0D, -1.0D); world.spawnParticle("portal", d - d4, d1 + d3, d2, -1.0D, 0.0D, 0.0D); world.spawnParticle("portal", d - d4, d1 + d3, d2, -1.0D, 0.0D, -1.0D); } int instantTent = 200; int cloth = 201; int door = 202; int furnace = 203; int chest = 204; if(rotation == 0) { for (int i1 = 0; i1 < 5; i1++) { for (int j1 = 0; j1 < 4; j1++) { world.setBlockAndMetadataWithNotify((i+i1)-2,j+j1,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify((i+i1)-2,j+j1,(k+4)-2,cloth,metadata); world.setBlockAndMetadataWithNotify((i+i1)-2,j,(k+j1)-1,cloth,metadata); } } world.setBlockWithNotify(i-2,j+3,k-1,0); world.setBlockWithNotify(i-2,j+3,k,0); world.setBlockWithNotify(i-2,j+3,k+1,0); world.setBlockWithNotify(i-2,j+3,k+2,0); world.setBlockWithNotify(i+2,j+3,k-1,0); world.setBlockWithNotify(i+2,j+3,k,0); world.setBlockWithNotify(i+2,j+3,k+1,0); world.setBlockWithNotify(i+2,j+3,k+2,0); world.setBlockAndMetadataWithNotify(i,j+3,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+1,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+1,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+1,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+1,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+2,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+2,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+2,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+2,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+1,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+1,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+1,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+1,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+2,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+2,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+2,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+2,k+2,cloth,metadata); world.setBlockWithNotify((i+1)-1,j+2,k-1,0); world.setBlockWithNotify((i+1)-1,j+1,k-1,0); world.setBlockAndMetadataWithNotify((i+1)-1,j+1,k-1,Block.doorWood.blockID, 1); world.setBlockAndMetadataWithNotify((i+1)-1,j+2,k-1,Block.doorWood.blockID, 9); world.setBlockAndMetadataWithNotify(i+1,j+1,k+1,Block.blockBed.blockID, 8); world.setBlockAndMetadataWithNotify(i+1,j+1,k,Block.blockBed.blockID, 0); world.setBlockWithNotify(i+1,j+2,k-1,Block.glass.blockID); world.setBlockWithNotify(i-1,j+2,k-1,Block.glass.blockID); world.setBlockWithNotify(i-1,j+1,k+1,Block.workbench.blockID); world.setBlockAndMetadataWithNotify(i,j+1,k+1,chest , 3); world.setBlockWithNotify(i-1,j+2,k,Block.cake.blockID) ; world.setBlockAndMetadataWithNotify(i-1,j+1,k,furnace , 3); world.setBlockAndMetadataWithNotify(i,j,k,instantTent,metadata); } if(rotation == 1) { for (int i1 = 0; i1 < 5; i1++) { for (int j1 = 0; j1 < 4; j1++) { world.setBlockAndMetadataWithNotify(i+1,j+j1,(k-i1)+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+j1,(k-i1)+2,cloth,metadata); world.setBlockAndMetadataWithNotify((i-j1)+1,j,(k-i1)+2,cloth,metadata); } } world.setBlockWithNotify(i+1,j+3,k+2,0); world.setBlockWithNotify(i,j+3,k+2,0); world.setBlockWithNotify(i-1,j+3,k+2,0); world.setBlockWithNotify(i-2,j+3,k+2,0); world.setBlockWithNotify(i+1,j+3,k-2,0); world.setBlockWithNotify(i,j+3,k-2,0); world.setBlockWithNotify(i-1,j+3,k-2,0); world.setBlockWithNotify(i-2,j+3,k-2,0); world.setBlockAndMetadataWithNotify(i+1,j+3,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+1,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+1,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+1,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+1,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+2,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+2,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+2,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+2,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+1,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+1,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+1,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+1,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+2,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+2,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+2,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+2,k-2,cloth,metadata); world.setBlockWithNotify(i+1,j+2,k,0); world.setBlockWithNotify(i+1,j+1,k,0); world.setBlockAndMetadataWithNotify(i+1,j+1,k,Block.doorWood.blockID, 2); world.setBlockAndMetadataWithNotify(i+1,j+2,k,Block.doorWood.blockID, 10); world.setBlockAndMetadataWithNotify(i-1,j+1,k-1,Block.blockBed.blockID, 9); world.setBlockAndMetadataWithNotify(i,j+1,k-1,Block.blockBed.blockID, 1); world.setBlockWithNotify(i+1,j+2,k-1,Block.glass.blockID); world.setBlockWithNotify(i+1,j+2,k+1,Block.glass.blockID); world.setBlockWithNotify(i-1,j+1,k+1,Block.workbench.blockID); world.setBlockAndMetadataWithNotify(i-1,j+1,k,chest , 3); world.setBlockWithNotify(i,j+2,k+1,Block.cake.blockID) ; world.setBlockAndMetadataWithNotify(i,j+1,k+1,furnace , 3); world.setBlockAndMetadataWithNotify(i,j,k,instantTent,metadata); } if(rotation == 2) { for (int i1 = 0; i1 < 5; i1++) { for (int j1 = 0; j1 < 4; j1++) { world.setBlockAndMetadataWithNotify((i-i1)+2,j+j1,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify((i-i1)+2,j+j1,(k-4)+2,cloth,metadata); world.setBlockAndMetadataWithNotify((i-i1)+2,j,(k-j1)+1,cloth,metadata); } } world.setBlockWithNotify(i+2,j+3,k+1,0); world.setBlockWithNotify(i+2,j+3,k,0); world.setBlockWithNotify(i+2,j+3,k+1,0); world.setBlockWithNotify(i+2,j+3,k-2,0); world.setBlockWithNotify(i-2,j+3,k+1,0); world.setBlockWithNotify(i-2,j+3,k,0); world.setBlockWithNotify(i-2,j+3,k-1,0); world.setBlockWithNotify(i-2,j+3,k-2,0); world.setBlockAndMetadataWithNotify(i,j+3,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+1,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+1,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+1,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+1,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+2,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+2,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+2,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+2,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+1,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+1,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+1,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+1,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+2,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+2,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+2,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-2,j+2,k-2,cloth,metadata); world.setBlockWithNotify((i-1)+1,j+2,k+1,0); world.setBlockWithNotify((i-1)+1,j+1,k+1,0); world.setBlockAndMetadataWithNotify(i,j+1,k+1,Block.doorWood.blockID, 3); world.setBlockAndMetadataWithNotify(i,j+2,k+1,Block.doorWood.blockID, 11); world.setBlockAndMetadataWithNotify(i-1,j+1,k-1,Block.blockBed.blockID, 10); world.setBlockAndMetadataWithNotify(i-1,j+1,k,Block.blockBed.blockID, 2); world.setBlockWithNotify(i-1,j+2,k+1,Block.glass.blockID); world.setBlockWithNotify(i+1,j+2,k+1,Block.glass.blockID); world.setBlockWithNotify(i+1,j+1,k-1,Block.workbench.blockID); world.setBlockAndMetadataWithNotify(i,j+1,k-1,chest , 3); world.setBlockWithNotify(i+1,j+2,k,Block.cake.blockID) ; world.setBlockAndMetadataWithNotify(i+1,j+1,k,furnace , 3); world.setBlockAndMetadataWithNotify(i,j,k,instantTent,metadata); } if(rotation == 3) { for (int i1 = 0; i1 < 5; i1++) { for (int j1 = 0; j1 < 4; j1++) { world.setBlockAndMetadataWithNotify(i-1,j+j1,(k+i1)-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+j1,(k+i1)-2,cloth,metadata); world.setBlockAndMetadataWithNotify((i+j1)-1,j,(k+i1)-2,cloth,metadata); } } world.setBlockWithNotify(i-1,j+3,k-2,0); world.setBlockWithNotify(i,j+3,k-2,0); world.setBlockWithNotify(i+1,j+3,k-2,0); world.setBlockWithNotify(i+2,j+3,k-2,0); world.setBlockWithNotify(i-1,j+3,k+2,0); world.setBlockWithNotify(i,j+3,k+2,0); world.setBlockWithNotify(i+1,j+3,k+2,0); world.setBlockWithNotify(i+2,j+3,k+2,0); world.setBlockAndMetadataWithNotify(i-1,j+3,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k+1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+3,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+3,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+3,k-1,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+1,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+1,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+1,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+1,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+2,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+2,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+2,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+2,k-2,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+1,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+1,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+1,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+1,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i-1,j+2,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i,j+2,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i+1,j+2,k+2,cloth,metadata); world.setBlockAndMetadataWithNotify(i+2,j+2,k+2,cloth,metadata); world.setBlockWithNotify(i-1,j+2,k,0); world.setBlockWithNotify(i-1,j+1,k,0); world.setBlockAndMetadataWithNotify(i-1,j+1,k,Block.doorWood.blockID, 0); world.setBlockAndMetadataWithNotify(i-1,j+2,k,Block.doorWood.blockID, 8); world.setBlockAndMetadataWithNotify(i+1,j+1,k+1,Block.blockBed.blockID, 11); world.setBlockAndMetadataWithNotify(i,j+1,k+1,Block.blockBed.blockID, 3); world.setBlockWithNotify(i-1,j+2,k+1,Block.glass.blockID); world.setBlockWithNotify(i-1,j+2,k-1,Block.glass.blockID); world.setBlockWithNotify(i+1,j+1,k-1,Block.workbench.blockID); world.setBlockAndMetadataWithNotify(i+1,j+1,k,chest , 3); world.setBlockWithNotify(i,j+2,k-1,Block.cake.blockID) ; world.setBlockAndMetadataWithNotify(i,j+1,k-1,furnace , 3); world.setBlockAndMetadataWithNotify(i,j,k,instantTent,metadata); } } private int rotation; public GuiTent tentGUI; public TileEntityTent tent; public static final String prefix = "tent"; public static final String prefix_ = prefix + "_"; }