Jump to content




[CC1.53][MC1.5.2] MiscPeripherals 3.3

turtle peripheral help peripheral

  • This topic is locked This topic is locked
1238 replies to this topic

#761 Lost Ninja

  • Members
  • 39 posts

Posted 18 March 2013 - 04:51 PM

Unsure if this has been reported before of if it has been fixed (if there is a release for MC1.5 yet), but it's late here and I've foolishly not checked... :/

Just been playing around with some XP turtles (having realised they existed after watching DW20) and I have found what I believe to be a bug.

To get the amount of XP on a turtle you call get(), you should according to the OP also use get() to pull XP from something infront of the turtle. However there doesn't seem to be any way to tell the turtle which version of get() to use. :/

I checked the in game methods for the peripheral and get() is listed twice so it isn't merely a mistake in the documentation.

Can I ask for a small update to fix this error? Preferably to work with the current (non-beta) ComputerCraft for MC1.4.7.

Failing that if you plan on fixing for MC1.5 could you also perhaps add a drop or push XP command so we can send XP from turtle to turtle rather than only being able to get?

#762 Kye_Duo

  • Members
  • 70 posts

Posted 19 March 2013 - 02:20 AM

its getLevels()

#763 Lost Ninja

  • Members
  • 39 posts

Posted 19 March 2013 - 07:40 AM

Actually it's not, there are two methods listed when you query the peripheral, one is supposed to tell you how much XP (in points) the turtle has and the other is to pull XP from an object/block/other turtle/Brain in a Jar in front of it. This is what RG says in the OP too.
xp = peripheral.wrap("right")
xp.get()
Should do one or the other (or both) but actually seems to do neither.

getLevels() returns the level value of the XP the turtle has picked up.

#764 Ville Saari

  • Members
  • 14 posts

Posted 20 March 2013 - 12:14 PM

View PostTHUNDERGROOVE, on 15 March 2013 - 05:10 PM, said:

Anyone else having issues with dyes returning odd values with the interactive sorter?
Your script compares the sorter key to plain item id. That will break for any item with metadata higher than zero. Use items[item%32768] and it will work.

#765 Ville Saari

  • Members
  • 14 posts

Posted 20 March 2013 - 12:49 PM

I'm using iteractive sorter with turtles to avoid losing items for the nasty bugs of the sorter. However I had a problem that I didn't get isort_item event when an item was placed in the sorter by the same turtle that listened for the event.

I found the reason for that by diving into turtle's rom code. Turtle api commands read and throw away all events while waiting for the command to complete, so I can't receive the event that was triggered by turtle.drop(). Here is my solution to get around this problem if anyone is interested:

function identifyItem()
	local id, item, status, a, b, c
	timer=os.startTimer(2)
	id=turtle.native.drop(1)
	if id==-1 then return nil end
	while not (item and status) do
		a, b, c=os.pullEvent()
		if a=='turtle_response' and b==id then
			status=c
			if not status then return nil end
		elseif a=='isort_item' then
			item=b
		elseif a=='timer' and b==timer then
			error('timed out')
		end
	end
	turtle.suck()
	return item%32768, math.floor(item/32768)
end

The function will return the id and meta value of the item in current slot provided that the turtle is facing an interactive sorter.

If the isort_item event is not received in two seconds, you get a timeout error. This happens if the block in front of the turtle is not an interactive sorter or the sorter already contains items of the same type. I would consider this latter case to be a bug in interactive sorter. It doesn't emit new event when it receives more stuff to non empty item stack.

#766 lost_RD

  • Members
  • 4 posts

Posted 20 March 2013 - 05:12 PM

I put together a wiki page for the Interactive Sorter. Hopefully it should be more accessible to the general populace now.

http://ftbwiki.org/Interactive_Sorter

#767 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 21 March 2013 - 04:42 AM

the interactive sorter isnt hard to use, its just that you have to enter in a side to eject an item
color codes would be nice (like the diamond pipe)

#768 BananaPirate

  • New Members
  • 2 posts

Posted 21 March 2013 - 07:23 AM

I've been messing around with the FTB mindcrack pack, and I can't seem to craft the barrel turtle.
Everything else is working, I checked the code, barrel related stuff is all there.
It's set to enabled, installed as a coremod, there's still no crafting recipy for it.

Also loving how you detect the mods using their name and checking vs classes of your own.
But my hunch is that the name for factorization returned in MiscPeripherals.loadModule doesn't match, so isn't loaded.
My experience with java is just scientific so I have no idea how to recompile a minecraft mod, so couldn't test it.

#769 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 21 March 2013 - 07:31 AM

View PostBananaPirate, on 21 March 2013 - 07:23 AM, said:

I've been messing around with the FTB mindcrack pack, and I can't seem to craft the barrel turtle.
Everything else is working, I checked the code, barrel related stuff is all there.
It's set to enabled, installed as a coremod, there's still no crafting recipy for it.
it requires factorization i think

#770 BananaPirate

  • New Members
  • 2 posts

Posted 21 March 2013 - 07:36 AM

View PostPixelToast, on 21 March 2013 - 07:31 AM, said:

it requires factorization i think
which is also included in mindcrack. I've been trying to craft a factorization barrel and a turtle together, would be rather hard to do without factorization.

#771 RichardG867

  • Members
  • 196 posts

Posted 21 March 2013 - 11:48 AM

UNTESTED

version for MC 1.5 and CC 1.51: here

#772 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 21 March 2013 - 11:55 AM

how can you port to another MC version and not test it >_>

#773 RichardG867

  • Members
  • 196 posts

Posted 21 March 2013 - 11:57 AM

I haven't had much time to port it, what do you expect.

#774 ShamuMcDoogle

  • Members
  • 3 posts

Posted 21 March 2013 - 12:00 PM

Testing now RG, I'll let you know how/if everything works.

#775 SuicidalSTDz

    Permutator of Strings

  • Members
  • 1,308 posts
  • LocationPennsylvania

Posted 21 March 2013 - 12:03 PM

I wouldn't have even expected you to port it yet, to be honest. Good timing though, I was getting bored without these peripherals ^_^

#776 ShamuMcDoogle

  • Members
  • 3 posts

Posted 21 March 2013 - 12:24 PM

http://paste.ubuntu.com/5632722/

Crashed in Coremods and Mods.
Without Misc Per ComputerCraft works fine.

#777 RichardG867

  • Members
  • 196 posts

Posted 21 March 2013 - 12:36 PM

Update forge to latest.

#778 ShamuMcDoogle

  • Members
  • 3 posts

Posted 21 March 2013 - 01:08 PM

View PostRichardG867, on 21 March 2013 - 12:36 PM, said:

Update forge to latest.

Herp derp derp.

#779 Lindenk

  • New Members
  • 2 posts

Posted 22 March 2013 - 08:44 AM

Not sure if it's been suggested, but how about an ender turtle (working with the ender storage mod) that allows a turtle the following functions. Made when combining a turtle with an ender chest (the mod one, any colors)

setColorCode(int, int, int) //sets the ender color code (by metadata value 0-15 (0 is white, etc)). Defaults to all white (0,0,0)
enderSuck() //sucks an itemstack from the selected ender storage, returns true if successful
enderDrop() //drops the selected itemstack into the selected ender storage, returns true if successful

Also perhaps it could work in tandem with the inventory upgrade by allowing the following two functions if both are installed

enderSuck(slot, amount) //take amount number of items from slot in the selected storage container, returns true if blah blah blah
enderDrop(slot, amount) //places amount of selected item into slot of the selected ender storage, ditto^

Just an idea

#780 RichardG867

  • Members
  • 196 posts

Posted 22 March 2013 - 11:43 AM

Previously DENIED by ChickenBones





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users