mirror of
				https://github.com/Uberi/Minetest-WorldEdit.git
				synced 2025-11-04 06:35:28 +01:00 
			
		
		
		
	Fix //shift with absolute axis (x/y/z)
This commit is contained in:
		@@ -114,10 +114,12 @@ minetest.register_chatcommand("/shift", {
 | 
			
		||||
		end
 | 
			
		||||
		
 | 
			
		||||
		local axis, dir
 | 
			
		||||
		if direction ~= "?" then
 | 
			
		||||
			axis, dir = worldedit.translate_direction(name, direction)
 | 
			
		||||
		else
 | 
			
		||||
		if direction == "x" or direction == "y" or direction == "z" then
 | 
			
		||||
			axis, dir = direction, 1
 | 
			
		||||
		elseif direction == "?" then
 | 
			
		||||
			axis, dir = worldedit.player_axis(name)
 | 
			
		||||
		else
 | 
			
		||||
			axis, dir = worldedit.translate_direction(name, direction)
 | 
			
		||||
		end
 | 
			
		||||
		
 | 
			
		||||
		if axis == nil or dir == nil then
 | 
			
		||||
@@ -236,4 +238,4 @@ minetest.register_chatcommand("/contract", {
 | 
			
		||||
	worldedit.marker_update(name)
 | 
			
		||||
      end,
 | 
			
		||||
  }
 | 
			
		||||
)
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user