Getting *closer*, but not quite there D:
This commit is contained in:
parent
fdcb241062
commit
9be46aa31e
8 changed files with 59 additions and 16 deletions
|
|
@ -1,18 +1,24 @@
|
||||||
package com.oitsjustjose.criss_cross.tileentity;
|
package com.oitsjustjose.criss_cross.tileentity;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Items;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.util.ITickable;
|
||||||
|
import net.minecraft.world.storage.WorldInfo;
|
||||||
|
|
||||||
public class TileAtmosManipulator extends TileEntity
|
public class TileAtmosManipulator extends TileEntity implements ITickable
|
||||||
{
|
{
|
||||||
public boolean isUseableByPlayer(EntityPlayer player)
|
public boolean isUseableByPlayer(EntityPlayer player)
|
||||||
{
|
{
|
||||||
return this.worldObj.getTileEntity(this.pos) != this ? false : player.getDistanceSq((double) this.pos.getX() + 0.5D, (double) this.pos.getY() + 0.5D, (double) this.pos.getZ() + 0.5D) <= 64.0D;
|
return this.worldObj.getTileEntity(this.pos) != this ? false : player.getDistanceSq((double) this.pos.getX() + 0.5D, (double) this.pos.getY() + 0.5D, (double) this.pos.getZ() + 0.5D) <= 64.0D;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update()
|
||||||
|
{
|
||||||
|
if (worldObj.isRemote)
|
||||||
|
System.out.println(worldObj.isRaining());
|
||||||
|
}
|
||||||
|
|
||||||
public void setRain()
|
public void setRain()
|
||||||
{
|
{
|
||||||
EntityPlayer player = worldObj.getClosestPlayer(this.pos.getX(), this.pos.getY(), this.pos.getZ(), 3);
|
EntityPlayer player = worldObj.getClosestPlayer(this.pos.getX(), this.pos.getY(), this.pos.getZ(), 3);
|
||||||
|
|
@ -30,19 +36,15 @@ public class TileAtmosManipulator extends TileEntity
|
||||||
|
|
||||||
public void setSun()
|
public void setSun()
|
||||||
{
|
{
|
||||||
EntityPlayer player = worldObj.getClosestPlayer(this.pos.getX(), this.pos.getY(), this.pos.getZ(), 3);
|
worldObj.getWorldInfo().setRaining(false);
|
||||||
if (player.inventory.hasItem(Items.lava_bucket))
|
|
||||||
|
if (worldObj.isRemote)
|
||||||
{
|
{
|
||||||
worldObj.getWorldInfo().setRaining(false);
|
worldObj.setRainStrength(0.0F);
|
||||||
|
worldObj.setThunderStrength(1.0f);
|
||||||
if (worldObj.isRemote)
|
|
||||||
{
|
|
||||||
worldObj.setRainStrength(0.0F);
|
|
||||||
worldObj.setThunderStrength(0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
worldObj.getWorldInfo().setThunderTime(0);
|
|
||||||
worldObj.getWorldInfo().setThundering(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
worldObj.getWorldInfo().setThunderTime(0);
|
||||||
|
worldObj.getWorldInfo().setThundering(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
package com.oitsjustjose.criss_cross.util;
|
||||||
|
|
||||||
|
public class PacketHandlerWeather
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
"forge_marker": 1,
|
||||||
|
"defaults": {
|
||||||
|
"textures": {
|
||||||
|
"top": "crisscross:blocks/atmos_manipulator/atmos_manipulator_top",
|
||||||
|
"front": "crisscross:blocks/atmos_manipulator/atmos_manipulator_front",
|
||||||
|
"side": "crisscross:blocks/atmos_manipulator/atmos_manipulator_sides",
|
||||||
|
"bottom": "crisscross:blocks/atmos_manipulator/atmos_manipulator_bottom"
|
||||||
|
},
|
||||||
|
"model": "crisscross:machine",
|
||||||
|
"uvlock": false
|
||||||
|
},
|
||||||
|
"variants": {
|
||||||
|
"normal": [{}],
|
||||||
|
"inventory": [{}],
|
||||||
|
"facing": {
|
||||||
|
"north": {
|
||||||
|
},
|
||||||
|
"east": {
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"south": {
|
||||||
|
"y": 180
|
||||||
|
},
|
||||||
|
"west": {
|
||||||
|
"y": 270
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 622 B |
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 417 B |
Binary file not shown.
|
After Width: | Height: | Size: 9.9 KiB |
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"animation": {
|
||||||
|
"frametime": 4
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue