diff --git a/machines/wind_mill.lua b/machines/wind_mill.lua index 5bfccc5..9c01464 100644 --- a/machines/wind_mill.lua +++ b/machines/wind_mill.lua @@ -76,13 +76,14 @@ function industrialtest.WindMill.action(self,pos) local dimMax=31000 local dim=mcl_worlds.pos_to_dimension(pos) if dim=="overworld" then - dimMax=mcl_vars.mg_overworld_max + dimMax=mcl_vars.mg_overworld_max_official elseif dim=="nether" then dimMax=mcl_vars.mg_nether_max elseif dim=="end" then - dimMax=mcl_vars.mg_end_max + dimMax=mcl_vars.mg_end_max_official end - charging=math.max(mcl_worlds.layer_to_y(pos.y,dim),0)/dimMax + local layer,_=mcl_worlds.y_to_layer(pos.y) + charging=math.min(math.max((layer or 0),0)/dimMax,1.0) end local neighbourPositions={ vector.offset(pos,-1,0,0),