Cuberite Forum
MCServer Development Discussion - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: MCServer Development Discussion (/thread-186.html)

Pages: 1 2 3 4 5 6 7 8 9


RE: MCServer Development Discussion - Sebi - 11-08-2011

cClientHandle:
I added an if on line 644, it seems to create some issues, sometimes you can't place blocks, it turns out that packet contains wrong position! (negative rounding error) D:


RE: MCServer Development Discussion - rs2k - 11-08-2011

Where's the error at? UI don't see any sort of rounding in cPacket_BlockPlace. It just reads the packet and puts the information it into a variable as far as I can tell.

Is it in AbsoluteToRelative in cWorld.h?


RE: MCServer Development Discussion - Sebi - 11-08-2011

(11-08-2011, 05:55 AM)rs2k Wrote: Where's the error at? UI don't see any sort of rounding in cPacket_BlockPlace. It just reads the packet and puts the information it into a variable as far as I can tell.

I also was looking for rounding but it's just not there (could it be client bug? *notch coding*)
Put at case E_BLOCK_PLACE in cClientHandle, after cPacket_BlockPlace* PacketData = reinterpret_cast<cPacket_BlockPlace*>(a_Packet);
Code:
printf(" Placed block at %d, %d, %d\n", PacketData->m_PosX, PacketData->m_PosY, PacketData->m_PosZ);
And compare the coords with coords in-game.


RE: MCServer Development Discussion - rs2k - 11-08-2011

Hmm, that's odd. Certainly the wrong info, I wonder how the block is actually making it to the right place.

Edit:
Actually, I think that info is correct. When you floor a negative number its absolute value rises.


RE: MCServer Development Discussion - Sebi - 11-08-2011

Ahh, my bad, those coords are for the block that is being clicked, not where new one should be placed :V
I just wonder why would it work when I was testing it.
DIFF


RE: MCServer Development Discussion - Sebi - 11-08-2011

Code:
if ( (int)m_World->GetBlock( fillx, filly, fillz ) == E_BLOCK_REDSTONE_TORCH_OFF ) { //I don't think notch knows on from off. >.>
You've got E_BLOCK_REDSTONE_TORCH_OFF set to 76 which is torch onTongue


RE: MCServer Development Discussion - rs2k - 11-08-2011

Fixed.Big Grin

You can now also place colored wool.Big Grin

And when a redstone device is broken by a piston or the ground under it gives way, the redstone circuit will now recalculate.


RE: MCServer Development Discussion - Sebi - 11-10-2011

I am working on pickup physics in water and water-with-lava interaction. I will do some other stuff (block placement rules) but I will have my internet cut off today so I won't be able to commit for maybe week or two.


RE: MCServer Development Discussion - rs2k - 11-10-2011

D: No internet for more than a few hours? I'd die!

Good luck and see you in a few weeks.


RE: MCServer Development Discussion - Sebi - 11-10-2011

(11-10-2011, 10:07 AM)rs2k Wrote: D: No internet for more than a few hours? I'd die!

Internet at school keeps me alive. Wink