I am setting up a server for me and some buds to play on with a bunch of mods. Below is the console output of the "ls" command showing what mods are installed on client and server since some mods are client side only.
CLIENT
SERVER
2014-03-13 03:59:46 [INFO] [Minecraft-Server] shaqaruden joined the game
2014-03-13 03:59:46 [INFO] [STDOUT] Loading Player: shaqaruden
2014-03-13 03:59:46 [INFO] [STDOUT] Sending serverside check to: shaqaruden
2014-03-13 03:59:46 [INFO] [STDOUT] [Mekanism] Sent config to 'shaqaruden.'
2014-03-13 04:00:19 [INFO] [STDERR] java.net.SocketTimeoutException: Read timed out
2014-03-13 04:00:19 [INFO] [STDERR] at java.net.SocketInputStream.socketRead0(Native Method)
2014-03-13 04:00:19 [INFO] [STDERR] at java.net.SocketInputStream.read(SocketInputStream.java:152)
2014-03-13 04:00:19 [INFO] [STDERR] at java.net.SocketInputStream.read(SocketInputStream.java:122)
2014-03-13 04:00:19 [INFO] [STDERR] at java.io.FilterInputStream.read(FilterInputStream.java:133)
2014-03-13 04:00:19 [INFO] [STDERR] at org.bouncycastle.crypto.io.CipherInputStream.nextChunk(Unknown Source)
2014-03-13 04:00:19 [INFO] [STDERR] at org.bouncycastle.crypto.io.CipherInputStream.read(Unknown Source)
2014-03-13 04:00:19 [INFO] [STDERR] at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:288)
2014-03-13 04:00:19 [INFO] [STDERR] at net.minecraft.network.packet.Packet.func_73272_a(Packet.java:145)
2014-03-13 04:00:19 [INFO] [STDERR] at net.minecraft.network.TcpConnection.func_74447_i(TcpConnection.java:325)
2014-03-13 04:00:19 [INFO] [STDERR] at net.minecraft.network.TcpConnection.func_74450_c(TcpConnection.java:549)
2014-03-13 04:00:19 [INFO] [STDERR] at net.minecraft.network.TcpReaderThread.run(SourceFile:94)
2014-03-13 04:00:19 [INFO] [STDERR] java.net.SocketException: Socket closed
2014-03-13 04:00:19 [INFO] [STDERR] at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:121)
2014-03-13 04:00:19 [INFO] [STDERR] at java.net.SocketOutputStream.write(SocketOutputStream.java:159)
2014-03-13 04:00:19 [INFO] [STDERR] at org.bouncycastle.crypto.io.CipherOutputStream.write(Unknown Source)
2014-03-13 04:00:19 [INFO] [STDERR] at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
2014-03-13 04:00:19 [INFO] [STDERR] at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
2014-03-13 04:00:19 [INFO] [STDERR] at java.io.DataOutputStream.flush(DataOutputStream.java:123)
2014-03-13 04:00:19 [INFO] [STDERR] at net.minecraft.network.TcpWriterThread.run(SourceFile:121) 2014-03-13 04:00:19 [INFO] [Minecraft-Server] shaqaruden lost connection: disconnect.genericReason
I have setup an item to test crafting recipes that it will loose durability when crafted but for some reason this can only be done once. Meaning I put the item in the crafting bench and I get the item I want and the durability does decrease but after that I can no longer craft with that item.
Heres my code In my inCrafting method in my Crafting Handler
//Crafting Dmagae Item
for (int i = 0; i < craftMatrix.getSizeInventory(); i++) {
if (craftMatrix.getStackInSlot(i) != null) {
ItemStack j = craftMatrix.getStackInSlot(i);
if (j.getItem() != null && j.getItem() == RedStoneMain.redstoneGem) {
ItemStack k = new ItemStack(RedStoneMain.redstoneGem, 2, (j.getItemDamage() + 1));
if (k.getItemDamage() >= k.getMaxDamage()) {
k.stackSize--;
}
craftMatrix.setInventorySlotContents(i, k);
}
}
}
Crafting Recipe
GameRegistry.addRecipe(new ItemStack(Item.redstone, 1), new Object[] { "T", 'T', (new ItemStack(RedStoneMain.redstoneGem,1,-1))});
Constructor of Item taking Damage
public ItemRedstoneGem(int par1) {
super(par1);
maxStackSize = 1;
setMaxDamage(10);
}
The Crafting handler is being called because Im using it for other things as well.
This is my first time trying to make a custom dimension. I have a work portal and a working dimension but what I have left to do is to make the portal activator. I have created a custom fire block that will light my portal but Im getting an error in the onBlockAdded method. Here is the method,
public void onBlockAdded(World par1World, int par2, int par3, int par4)
{
if (par1World.provider.dimensionId > 0 || par1World.getBlockId(par2, par3 - 1, par4) != RedStoneMain.redstoneGemOre.blockID || !RedStoneMain.redPortalBlock.tryToCreatePortal(par1World, par2, par3, par4))
{
if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && !this.canNeighborBurn(par1World, par2, par3, par4))
{
par1World.setBlockToAir(par2, par3, par4);
}
else
{
par1World.scheduleBlockUpdate(par2, par3, par4, this.blockID, this.tickRate(par1World) + par1World.rand.nextInt(10));
}
}
}
The error I'm getting is on the reference to the tryToCreatePortal method of the redPortalBlock class. Here is the error,
The method tryToCreatePortal(World, int, int, int) is undefined for the type Block
Here is my redPortalBlock class code,
package Redstone_Tutorial.block;
import Redstone_Tutorial.RedStoneMain;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.Random;
import net.minecraft.block.BlockBreakable;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemMonsterPlacer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockRedPortal extends BlockBreakable
{
public BlockRedPortal(int par1)
{
super(par1, "portal", Material.portal, false);
this.setTickRandomly(true);
}
/**
* Ticks the block if it's been scheduled
*/
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
super.updateTick(par1World, par2, par3, par4, par5Random);
if (par1World.provider.isSurfaceWorld() && par5Random.nextInt(2000) < par1World.difficultySetting)
{
int l;
for (l = par3; !par1World.doesBlockHaveSolidTopSurface(par2, l, par4) && l > 0; --l)
{
;
}
if (l > 0 && !par1World.isBlockNormalCube(par2, l + 1, par4))
{
Entity entity = ItemMonsterPlacer.spawnCreature(par1World, 57, (double)par2 + 0.5D, (double)l + 1.1D, (double)par4 + 0.5D);
if (entity != null)
{
entity.timeUntilPortal = entity.getPortalCooldown();
}
}
}
}
/**
* Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
* cleared to be reused)
*/
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
{
return null;
}
/**
* Updates the blocks bounds based on its current state. Args: world, x, y, z
*/
public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
{
float f;
float f1;
if (par1IBlockAccess.getBlockId(par2 - 1, par3, par4) != this.blockID && par1IBlockAccess.getBlockId(par2 + 1, par3, par4) != this.blockID)
{
f = 0.125F;
f1 = 0.5F;
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f1, 0.5F + f, 1.0F, 0.5F + f1);
}
else
{
f = 0.5F;
f1 = 0.125F;
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f1, 0.5F + f, 1.0F, 0.5F + f1);
}
}
/**
* Is this block (a) opaque and (B) a full 1m cube? This determines whether or not to render the shared face of two
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
*/
public boolean isOpaqueCube()
{
return false;
}
/**
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
*/
public boolean renderAsNormalBlock()
{
return false;
}
/**
* Checks to see if this location is valid to create a portal and will return True if it does. Args: world, x, y, z
*/
public boolean tryToCreatePortal(World par1World, int par2, int par3, int par4)
{
byte b0 = 0;
byte b1 = 0;
if (par1World.getBlockId(par2 - 1, par3, par4) == RedStoneMain.redstoneGemOre.blockID || par1World.getBlockId(par2 + 1, par3, par4) == RedStoneMain.redstoneGemOre.blockID)
{
b0 = 1;
}
if (par1World.getBlockId(par2, par3, par4 - 1) == RedStoneMain.redstoneGemOre.blockID || par1World.getBlockId(par2, par3, par4 + 1) == RedStoneMain.redstoneGemOre.blockID)
{
b1 = 1;
}
if (b0 == b1)
{
return false;
}
else
{
if (par1World.isAirBlock(par2 - b0, par3, par4 - b1))
{
par2 -= b0;
par4 -= b1;
}
int l;
int i1;
for (l = -1; l <= 2; ++l)
{
for (i1 = -1; i1 <= 3; ++i1)
{
boolean flag = l == -1 || l == 2 || i1 == -1 || i1 == 3;
if (l != -1 && l != 2 || i1 != -1 && i1 != 3)
{
int j1 = par1World.getBlockId(par2 + b0 * l, par3 + i1, par4 + b1 * l);
boolean isAirBlock = par1World.isAirBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l);
if (flag)
{
if (j1 != RedStoneMain.redstoneGemOre.blockID)
{
return false;
}
}
else if (!isAirBlock && j1 != RedStoneMain.portalSpark.blockID)
{
return false;
}
}
}
}
for (l = 0; l < 2; ++l)
{
for (i1 = 0; i1 < 3; ++i1)
{
par1World.setBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l, RedStoneMain.redPortalBlock.blockID, 0, 2);
}
}
return true;
}
}
/**
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
* their own) Args: x, y, z, neighbor blockID
*/
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
{
byte b0 = 0;
byte b1 = 1;
if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID || par1World.getBlockId(par2 + 1, par3, par4) == this.blockID)
{
b0 = 1;
b1 = 0;
}
int i1;
for (i1 = par3; par1World.getBlockId(par2, i1 - 1, par4) == this.blockID; --i1)
{
;
}
if (par1World.getBlockId(par2, i1 - 1, par4) != RedStoneMain.redstoneGemOre.blockID)
{
par1World.setBlockToAir(par2, par3, par4);
}
else
{
int j1;
for (j1 = 1; j1 < 4 && par1World.getBlockId(par2, i1 + j1, par4) == this.blockID; ++j1)
{
;
}
if (j1 == 3 && par1World.getBlockId(par2, i1 + j1, par4) == RedStoneMain.redstoneGemOre.blockID)
{
boolean flag = par1World.getBlockId(par2 - 1, par3, par4) == this.blockID || par1World.getBlockId(par2 + 1, par3, par4) == this.blockID;
boolean flag1 = par1World.getBlockId(par2, par3, par4 - 1) == this.blockID || par1World.getBlockId(par2, par3, par4 + 1) == this.blockID;
if (flag && flag1)
{
par1World.setBlockToAir(par2, par3, par4);
}
else
{
if ((par1World.getBlockId(par2 + b0, par3, par4 + b1) != RedStoneMain.redstoneGemOre.blockID || par1World.getBlockId(par2 - b0, par3, par4 - b1) != this.blockID) && (par1World.getBlockId(par2 - b0, par3, par4 - b1) != RedStoneMain.redstoneGemOre.blockID || par1World.getBlockId(par2 + b0, par3, par4 + b1) != this.blockID))
{
par1World.setBlockToAir(par2, par3, par4);
}
}
}
else
{
par1World.setBlockToAir(par2, par3, par4);
}
}
}
@SideOnly(Side.CLIENT)
/**
* Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
* coordinates. Args: blockAccess, x, y, z, side
*/
public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
{
if (par1IBlockAccess.getBlockId(par2, par3, par4) == this.blockID)
{
return false;
}
else
{
boolean flag = par1IBlockAccess.getBlockId(par2 - 1, par3, par4) == this.blockID && par1IBlockAccess.getBlockId(par2 - 2, par3, par4) != this.blockID;
boolean flag1 = par1IBlockAccess.getBlockId(par2 + 1, par3, par4) == this.blockID && par1IBlockAccess.getBlockId(par2 + 2, par3, par4) != this.blockID;
boolean flag2 = par1IBlockAccess.getBlockId(par2, par3, par4 - 1) == this.blockID && par1IBlockAccess.getBlockId(par2, par3, par4 - 2) != this.blockID;
boolean flag3 = par1IBlockAccess.getBlockId(par2, par3, par4 + 1) == this.blockID && par1IBlockAccess.getBlockId(par2, par3, par4 + 2) != this.blockID;
boolean flag4 = flag || flag1;
boolean flag5 = flag2 || flag3;
return flag4 && par5 == 4 ? true : (flag4 && par5 == 5 ? true : (flag5 && par5 == 2 ? true : flag5 && par5 == 3));
}
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random par1Random)
{
return 0;
}
/**
* Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity
*/
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
{
if (par5Entity.ridingEntity == null && par5Entity.riddenByEntity == null)
{
par5Entity.setInPortal();
}
}
@SideOnly(Side.CLIENT)
/**
* Returns which pass should this block be rendered on. 0 for solids and 1 for alpha
*/
public int getRenderBlockPass()
{
return 1;
}
@SideOnly(Side.CLIENT)
/**
* A randomly called display update to be able to add particles or other items for display
*/
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
if (par5Random.nextInt(100) == 0)
{
par1World.playSound((double)par2 + 0.5D, (double)par3 + 0.5D, (double)par4 + 0.5D, "portal.portal", 0.5F, par5Random.nextFloat() * 0.4F + 0.8F, false);
}
for (int l = 0; l < 4; ++l)
{
double d0 = (double)((float)par2 + par5Random.nextFloat());
double d1 = (double)((float)par3 + par5Random.nextFloat());
double d2 = (double)((float)par4 + par5Random.nextFloat());
double d3 = 0.0D;
double d4 = 0.0D;
double d5 = 0.0D;
int i1 = par5Random.nextInt(2) * 2 - 1;
d3 = ((double)par5Random.nextFloat() - 0.5D) * 0.5D;
d4 = ((double)par5Random.nextFloat() - 0.5D) * 0.5D;
d5 = ((double)par5Random.nextFloat() - 0.5D) * 0.5D;
if (par1World.getBlockId(par2 - 1, par3, par4) != this.blockID && par1World.getBlockId(par2 + 1, par3, par4) != this.blockID)
{
d0 = (double)par2 + 0.5D + 0.25D * (double)i1;
d3 = (double)(par5Random.nextFloat() * 2.0F * (float)i1);
}
else
{
d2 = (double)par4 + 0.5D + 0.25D * (double)i1;
d5 = (double)(par5Random.nextFloat() * 2.0F * (float)i1);
}
par1World.spawnParticle("portal", d0, d1, d2, d3, d4, d5);
}
}
@SideOnly(Side.CLIENT)
/**
* only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative)
*/
public int idPicked(World par1World, int par2, int par3, int par4)
{
return 0;
}
}
I wonder if theres a way to have it dynamic, that whenever and Tool/Weapon/Armor is combined with a enchantment Item it enchants that item with whatever that enchantment item is(speed III) for example without having to create custom items for each.
I have a video covering different textures for different sides of blocks. Video is below, even though its for biomes I can guess the same code will apply to machines as well.
I am creating a test custom mob and I have it spawn via an egg and I can hear the sounds but its completely invisible. I have my texture located at "assets/redstonetutorial/textures/mob/ReddyFreddy.png"
0
0
CLIENT
SERVER
any idea whats going on?
0
0
Only problem with MCModeller is the links do not work, they are all dead.
Yes its me
0
0
Heres my code
In my inCrafting method in my Crafting Handler
Crafting Recipe
Constructor of Item taking Damage
The Crafting handler is being called because Im using it for other things as well.
Am I missing something?
0
0
0
0
The error I'm getting is on the reference to the tryToCreatePortal method of the redPortalBlock class. Here is the error,
Here is my redPortalBlock class code,
Any ideas on how to fix this error?
0
0
Scrub to 13:10
0
When the mob moves it only nudges along, very slowly.
Model
Entity
Render
Any Ideas?Could it be the length of the legs?
0
0
Here is my render class
My Entity Class
My Model Code
Any Ideas?